Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
506ebf6f
提交
506ebf6f
authored
8月 24, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户新增时初始化钱包
上级
98989c95
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
16 行删除
+37
-16
PayWalletDTO.java
...java/com/mmc/iuav/user/model/dto/wallet/PayWalletDTO.java
+0
-4
PayWalletController.java
.../mmc/iuav/user/controller/wallet/PayWalletController.java
+19
-10
PayWalletDO.java
...ain/java/com/mmc/iuav/user/entity/wallet/PayWalletDO.java
+1
-2
AuthServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
+8
-0
PayWalletService.java
...va/com/mmc/iuav/user/service/wallet/PayWalletService.java
+3
-0
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+6
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/wallet/PayWalletDTO.java
浏览文件 @
506ebf6f
...
...
@@ -28,16 +28,12 @@ public class PayWalletDTO implements Serializable {
private
String
userName
;
@ApiModelProperty
(
value
=
"云享金余额"
)
private
BigDecimal
cashAmt
;
@ApiModelProperty
(
value
=
"已消耗云享金"
)
private
BigDecimal
cashPaid
;
@ApiModelProperty
(
value
=
"云享金总金额"
)
private
BigDecimal
totalCash
;
@ApiModelProperty
(
value
=
"已冻结云享金"
)
private
BigDecimal
cashFreeze
;
@ApiModelProperty
(
value
=
"佣金余额"
)
private
BigDecimal
salaryAmt
;
@ApiModelProperty
(
value
=
"已消耗佣金"
)
private
BigDecimal
salaryPaid
;
@ApiModelProperty
(
value
=
"已冻结佣金"
)
private
BigDecimal
salaryFreeze
;
@ApiModelProperty
(
value
=
"佣金总额度"
)
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wallet/PayWalletController.java
浏览文件 @
506ebf6f
...
...
@@ -29,39 +29,48 @@ public class PayWalletController extends BaseController {
@ApiOperation
(
value
=
"获取当前用户消费(钱包)信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PayWalletDTO
.
class
)})
@GetMapping
(
"getCurrentUserPayWalletInfo"
)
public
ResultBody
getCurrentUserPayWalletInfo
(
HttpServletRequest
request
)
{
public
ResultBody
<
PayWalletDTO
>
getCurrentUserPayWalletInfo
(
HttpServletRequest
request
)
{
return
payWalletService
.
getPayWalletInfo
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"获取用户消费(钱包)信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PayWalletDTO
.
class
)})
@GetMapping
(
"getPayWalletInfo"
)
public
ResultBody
getPayWalletInfo
(
public
ResultBody
<
PayWalletDTO
>
getPayWalletInfo
(
@ApiParam
(
value
=
"用户userAccountId"
,
required
=
true
)
@RequestParam
Integer
userAccountId
)
{
return
ResultBody
.
success
(
payWalletService
.
getPayWalletInfo
(
userAccountId
));
}
@ApiOperation
(
value
=
"feign-初始化钱包"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiIgnore
@GetMapping
(
"feignInitPayWallet"
)
public
ResultBody
feignInitPayWallet
(
@RequestParam
Integer
userAccountId
)
{
return
payWalletService
.
initPayWallet
(
userAccountId
);
}
//
@ApiOperation(value = "feign-初始化钱包")
//
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
//
@ApiIgnore
//
@GetMapping("feignInitPayWallet")
//
public ResultBody feignInitPayWallet(@RequestParam Integer userAccountId) {
//
return payWalletService.initPayWallet(userAccountId);
//
}
@ApiIgnore
@ApiOperation
(
value
=
"feign-云享金充值增加金额"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiIgnore
@PostMapping
(
"feignTopUpCash"
)
public
ResultBody
feignTopUpCash
(
@RequestBody
TopUpOrderVO
topUpOrderVO
)
{
return
payWalletService
.
feignTopUpCash
(
topUpOrderVO
);
}
@ApiIgnore
@ApiOperation
(
value
=
"feign-钱包流水记录"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"feignWalletFlow"
)
public
ResultBody
feignWalletFlow
(
@RequestBody
WalletFlowVO
walletFlowVO
)
{
return
payWalletService
.
feignWalletFlow
(
walletFlowVO
);
}
@ApiOperation
(
value
=
"用户账单明细"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"customerBillingDetail"
)
public
ResultBody
customerBillingDetail
(
Integer
userAccountId
)
{
return
payWalletService
.
customerBillingDetail
(
userAccountId
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/wallet/PayWalletDO.java
浏览文件 @
506ebf6f
...
...
@@ -67,8 +67,7 @@ public class PayWalletDO implements Serializable {
public
PayWalletDTO
buildPayWalletDTO
()
{
return
PayWalletDTO
.
builder
().
id
(
this
.
id
).
userAccountId
(
this
.
userAccountId
)
.
cashAmt
(
this
.
cashAmt
).
cashFreeze
(
this
.
cashFreeze
)
.
cashPaid
(
this
.
cashPaid
).
salaryAmt
(
this
.
salaryAmt
)
.
salaryFreeze
(
this
.
salaryFreeze
).
salaryPaid
(
this
.
salaryPaid
)
.
salaryAmt
(
this
.
salaryAmt
).
salaryFreeze
(
this
.
salaryFreeze
)
.
rebateWdl
(
this
.
salaryWdl
).
build
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
浏览文件 @
506ebf6f
...
...
@@ -18,6 +18,7 @@ import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import
com.mmc.iuav.user.model.qo.LoginUserQO
;
import
com.mmc.iuav.user.model.vo.*
;
import
com.mmc.iuav.user.service.*
;
import
com.mmc.iuav.user.service.wallet.PayWalletService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,6 +26,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -66,8 +68,12 @@ public class AuthServiceImpl implements AuthService {
@Autowired
private
AuthHandler
authHandler
;
@Resource
private
PayWalletService
payWalletService
;
@Transactional
@Override
public
ResultBody
appletLogin
(
WxLoginVO
wxLoginVO
)
{
String
unionId
;
String
openId
;
...
...
@@ -101,6 +107,8 @@ public class AuthServiceImpl implements AuthService {
userAccountDO
.
setSource
(
wxLoginVO
.
getSource
());
userAccountService
.
insertUserAccount
(
userAccountDO
);
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
// 创建用户钱包
payWalletService
.
initPayWallet
(
userAccountDO
.
getId
());
payClient
.
createWallet
(
userAccountDO
.
getId
());
// 查询之前有没有实名过
RealNameAuthDO
nameAuthByUnionId
=
realNameAuthDao
.
getRealNameAuthBakByUnionId
(
unionId
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/PayWalletService.java
浏览文件 @
506ebf6f
...
...
@@ -17,4 +17,7 @@ public interface PayWalletService {
ResultBody
feignWalletFlow
(
WalletFlowVO
walletFlowVO
);
ResultBody
feignTopUpCash
(
TopUpOrderVO
topUpOrderVO
);
ResultBody
customerBillingDetail
(
Integer
userAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
506ebf6f
...
...
@@ -451,4 +451,10 @@ public class PayWalletServiceImpl implements PayWalletService {
return
ResultBody
.
error
(
"充值时钱包操作错误!"
);
}
}
@Override
public
ResultBody
customerBillingDetail
(
Integer
userAccountId
)
{
return
null
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论