Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
33a78448
Commit
33a78448
authored
Jul 24, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
3af73120
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
22 deletions
+56
-22
UserInfoDTO.java
...va/com/github/wxiaoqi/security/admin/dto/UserInfoDTO.java
+3
-1
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+2
-0
MyWaterBiz.java
...ava/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
+29
-0
AppUserController.java
...github/wxiaoqi/security/admin/rest/AppUserController.java
+15
-0
ActivityFeign.java
.../java/com/xxfc/platform/activity/feign/ActivityFeign.java
+2
-1
IntegralUserTotalBiz.java
.../com/xxfc/platform/activity/biz/IntegralUserTotalBiz.java
+0
-17
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+4
-2
UserCouponController.java
...com/xxfc/platform/activity/rest/UserCouponController.java
+1
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/UserInfoDTO.java
View file @
33a78448
...
@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.dto;
...
@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
/**
* 个人中心信息
* 个人中心信息
...
@@ -30,7 +32,7 @@ public class UserInfoDTO {
...
@@ -30,7 +32,7 @@ public class UserInfoDTO {
* 钱包总额
* 钱包总额
*/
*/
@ApiModelProperty
(
value
=
"钱包总额"
)
@ApiModelProperty
(
value
=
"钱包总额"
)
private
Integer
totalWallet
;
private
BigDecimal
balance
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
33a78448
...
@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.admin.vo.AppletWalletVo;
...
@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.admin.vo.AppletWalletVo;
import
com.github.wxiaoqi.security.admin.vo.WalletPageVo
;
import
com.github.wxiaoqi.security.admin.vo.WalletPageVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -36,6 +37,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
...
@@ -36,6 +37,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
@Autowired
@Autowired
private
MyWalletCathBiz
myWalletCathBiz
;
private
MyWalletCathBiz
myWalletCathBiz
;
public
AppletWalletVo
findMyWallet
(
Integer
userId
)
{
public
AppletWalletVo
findMyWallet
(
Integer
userId
)
{
AppletWalletVo
appletWalletVo
=
new
AppletWalletVo
();
AppletWalletVo
appletWalletVo
=
new
AppletWalletVo
();
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
View file @
33a78448
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
com.github.wxiaoqi.security.admin.dto.UserInfoDTO
;
import
com.github.wxiaoqi.security.admin.entity.MyWallet
;
import
com.github.wxiaoqi.security.admin.entity.MyWallet
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletDetail
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletDetail
;
import
com.github.wxiaoqi.security.admin.mapper.MyWalletDetailMapper
;
import
com.github.wxiaoqi.security.admin.mapper.MyWalletDetailMapper
;
import
com.github.wxiaoqi.security.admin.mapper.MyWalletMapper
;
import
com.github.wxiaoqi.security.admin.mapper.MyWalletMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
...
@@ -33,6 +37,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
...
@@ -33,6 +37,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
@Autowired
@Autowired
MyWalletDetailBiz
walletDetailBiz
;
MyWalletDetailBiz
walletDetailBiz
;
@Autowired
ActivityFeign
activityFeign
;
//我的钱包入账
//我的钱包入账
public
void
updMyWater
(
MyWalletDetail
walletDetail
){
public
void
updMyWater
(
MyWalletDetail
walletDetail
){
...
@@ -149,4 +156,26 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
...
@@ -149,4 +156,26 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
myWallet
.
setUpdTime
(
Instant
.
now
().
toEpochMilli
());
myWallet
.
setUpdTime
(
Instant
.
now
().
toEpochMilli
());
return
mapper
.
insertSelective
(
myWallet
);
return
mapper
.
insertSelective
(
myWallet
);
}
}
public
ObjectRestResponse
getUserProfit
(
Integer
userId
){
try
{
UserInfoDTO
dto
=
activityFeign
.
getUserInfo
(
userId
);
if
(
dto
==
null
){
dto
=
new
UserInfoDTO
();
dto
.
setCouponNumber
(
0L
);
dto
.
setTotalPoint
(
0
);
}
MyWallet
wallet
=
new
MyWallet
();
wallet
.
setUserId
(
userId
);
wallet
=
selectOne
(
wallet
);
BeanUtils
.
copyProperties
(
wallet
,
dto
);
return
ObjectRestResponse
.
succ
(
dto
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserController.java
View file @
33a78448
...
@@ -14,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.TableResultResponse;
...
@@ -14,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -55,6 +56,9 @@ public class AppUserController extends CommonBaseController {
...
@@ -55,6 +56,9 @@ public class AppUserController extends CommonBaseController {
@Autowired
@Autowired
private
UserMemberLevelBiz
userMemberLevelBiz
;
private
UserMemberLevelBiz
userMemberLevelBiz
;
@Autowired
private
MyWaterBiz
myWaterBiz
;
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
public
TableResultResponse
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
public
TableResultResponse
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
Query
query
=
new
Query
(
params
);
Query
query
=
new
Query
(
params
);
...
@@ -147,6 +151,17 @@ public class AppUserController extends CommonBaseController {
...
@@ -147,6 +151,17 @@ public class AppUserController extends CommonBaseController {
return
ObjectRestResponse
.
succ
(
userDTO
);
return
ObjectRestResponse
.
succ
(
userDTO
);
}
}
@ApiOperation
(
"获取用户收益"
)
@GetMapping
(
"/profit"
)
public
ObjectRestResponse
profit
()
throws
Exception
{
String
username
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
if
(
username
==
null
)
{
throw
new
Exception
();
}
Integer
userid
=
Integer
.
parseInt
(
username
);
return
myWaterBiz
.
getUserProfit
(
userid
);
}
/**
/**
* 更新用户信息
* 更新用户信息
* @param userVo
* @param userVo
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/feign/ActivityFeign.java
View file @
33a78448
package
com
.
xxfc
.
platform
.
activity
.
feign
;
package
com
.
xxfc
.
platform
.
activity
.
feign
;
import
com.github.wxiaoqi.security.admin.dto.UserInfoDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.entity.IntegralUserTotal
;
import
com.xxfc.platform.activity.entity.IntegralUserTotal
;
import
com.xxfc.platform.activity.vo.UserCouponVo
;
import
com.xxfc.platform.activity.vo.UserCouponVo
;
...
@@ -53,7 +54,7 @@ public interface ActivityFeign {
...
@@ -53,7 +54,7 @@ public interface ActivityFeign {
@ApiModelProperty
(
"获取用户积分"
)
@ApiModelProperty
(
"获取用户积分"
)
@GetMapping
(
value
=
"/user/info"
)
@GetMapping
(
value
=
"/user/info"
)
public
IntegralUserTotal
i
nfo
(
@RequestParam
(
"userId"
)
Integer
userId
);
public
UserInfoDTO
getUserI
nfo
(
@RequestParam
(
"userId"
)
Integer
userId
);
@GetMapping
(
"/activity_data/clear"
)
@GetMapping
(
"/activity_data/clear"
)
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
);
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
);
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralUserTotalBiz.java
View file @
33a78448
...
@@ -131,23 +131,6 @@ public class IntegralUserTotalBiz extends BaseBiz<IntegralUserTotalMapper, Integ
...
@@ -131,23 +131,6 @@ public class IntegralUserTotalBiz extends BaseBiz<IntegralUserTotalMapper, Integ
return
ObjectRestResponse
.
succ
(
pageDataVO
);
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
/**
* 获取某个用户的积分信息
* @return
*/
public
IntegralUserTotal
getIntegralByUser
(
Integer
userId
)
{
IntegralUserTotalDto
integralUserTotalDto
=
new
IntegralUserTotalDto
();
integralUserTotalDto
.
setUserId
(
userId
);
List
<
IntegralUserTotal
>
oldValue
=
mapper
.
selectAllByParam
(
integralUserTotalDto
);
if
(
oldValue
==
null
||
oldValue
.
size
()
<=
0
)
{
IntegralUserTotal
integralUserTotal
=
IntegralUserTotal
.
initIntegralUserTotal
();
integralUserTotal
.
setUserId
(
userId
);
insertSelective
(
integralUserTotal
);
return
integralUserTotal
;
}
return
oldValue
.
get
(
0
);
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
33a78448
...
@@ -333,8 +333,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -333,8 +333,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
public
UserInfoDTO
getUserInfo
(
Integer
userId
)
throws
Exception
{
public
UserInfoDTO
getUserInfo
(
Integer
userId
)
throws
Exception
{
UserInfoDTO
userInfoDTO
=
new
UserInfoDTO
();
UserInfoDTO
userInfoDTO
=
new
UserInfoDTO
();
IntegralUserTotal
integralUserTotal
=
integralUserTotalBiz
.
getIntegralByUser
(
userId
);
IntegralUserTotal
integralUserTotal
=
new
IntegralUserTotal
();
BeanUtils
.
copyProperties
(
userInfoDTO
,
integralUserTotal
);
integralUserTotal
.
setUserId
(
userId
);
integralUserTotal
=
integralUserTotalBiz
.
selectOne
(
integralUserTotal
);
BeanUtils
.
copyProperties
(
integralUserTotal
,
userInfoDTO
);
UserCoupon
userCoupon
=
new
UserCoupon
();
UserCoupon
userCoupon
=
new
UserCoupon
();
userCoupon
.
setUserId
(
userId
);
userCoupon
.
setUserId
(
userId
);
userCoupon
.
setIsUse
(
0
);
userCoupon
.
setIsUse
(
0
);
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/UserCouponController.java
View file @
33a78448
...
@@ -101,7 +101,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
...
@@ -101,7 +101,7 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
@ApiOperation
(
"获取用户信息"
)
@ApiOperation
(
"获取用户信息"
)
@GetMapping
(
value
=
"/info"
)
@GetMapping
(
value
=
"/info"
)
public
UserInfoDTO
i
nfo
(
@RequestParam
(
"userId"
)
Integer
userId
)
throws
Exception
{
public
UserInfoDTO
getUserI
nfo
(
@RequestParam
(
"userId"
)
Integer
userId
)
throws
Exception
{
return
baseBiz
.
getUserInfo
(
userId
);
return
baseBiz
.
getUserInfo
(
userId
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment