Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
cc9da842
提交
cc9da842
authored
12月 19, 2023
作者:
han
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公众号消息通知提现成功
上级
3190a4ad
流水线
#7680
已通过 于阶段
in 2 分 23 秒
变更
3
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
67 行增加
和
3 行删除
+67
-3
MessageDao.java
...-user/src/main/java/com/mmc/iuav/user/dao/MessageDao.java
+7
-0
WithdrawalServiceImpl.java
...mc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
+50
-3
MessageDao.xml
...cms-service-user/src/main/resources/mapper/MessageDao.xml
+10
-0
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/MessageDao.java
浏览文件 @
cc9da842
...
@@ -22,6 +22,13 @@ public interface MessageDao {
...
@@ -22,6 +22,13 @@ public interface MessageDao {
int
insertSystemMessage
(
SystemMessageDO
messageDO
);
int
insertSystemMessage
(
SystemMessageDO
messageDO
);
/**
/**
* 修改系统消息
* @param messageDO
* @return
*/
int
updateSystemMessage
(
SystemMessageDO
messageDO
);
/**
* 根据ID查询系统消息
* 根据ID查询系统消息
* @param id
* @param id
* @return
* @return
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
浏览文件 @
cc9da842
...
@@ -5,14 +5,14 @@ import com.mmc.iuav.general.CodeUtil;
...
@@ -5,14 +5,14 @@ import com.mmc.iuav.general.CodeUtil;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.controller.WxController
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.UserSubInfoDao
;
import
com.mmc.iuav.user.dao.wallet.PayWalletDao
;
import
com.mmc.iuav.user.dao.wallet.PayWalletDao
;
import
com.mmc.iuav.user.dao.xzsz.WithdrawalDao
;
import
com.mmc.iuav.user.dao.xzsz.WithdrawalDao
;
import
com.mmc.iuav.user.dao.xzsz.XzDao
;
import
com.mmc.iuav.user.dao.xzsz.XzDao
;
import
com.mmc.iuav.user.entity.RealNameAuthDO
;
import
com.mmc.iuav.user.entity.*
;
import
com.mmc.iuav.user.entity.XzAuthDO
;
import
com.mmc.iuav.user.entity.XzWithdrawalApplyDO
;
import
com.mmc.iuav.user.entity.wallet.PayWalletDO
;
import
com.mmc.iuav.user.entity.wallet.PayWalletDO
;
import
com.mmc.iuav.user.entity.wallet.WithdrawalLogDO
;
import
com.mmc.iuav.user.entity.wallet.WithdrawalLogDO
;
import
com.mmc.iuav.user.enums.WithdrawalApplyStatus
;
import
com.mmc.iuav.user.enums.WithdrawalApplyStatus
;
...
@@ -24,8 +24,10 @@ import com.mmc.iuav.user.model.dto.wallet.WithdrawalApplyDTO;
...
@@ -24,8 +24,10 @@ import com.mmc.iuav.user.model.dto.wallet.WithdrawalApplyDTO;
import
com.mmc.iuav.user.model.dto.xzsz.CashPoolingDTO
;
import
com.mmc.iuav.user.model.dto.xzsz.CashPoolingDTO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
com.mmc.iuav.user.model.vo.WxMsgVO
;
import
com.mmc.iuav.user.model.vo.XzWithdrawalVO
;
import
com.mmc.iuav.user.model.vo.XzWithdrawalVO
;
import
com.mmc.iuav.user.model.vo.wallet.ApplyWithdrawalVO
;
import
com.mmc.iuav.user.model.vo.wallet.ApplyWithdrawalVO
;
import
com.mmc.iuav.user.service.WxService
;
import
com.mmc.iuav.user.service.xzsz.WithdrawalService
;
import
com.mmc.iuav.user.service.xzsz.WithdrawalService
;
import
com.mmc.iuav.user.service.xzsz.XzService
;
import
com.mmc.iuav.user.service.xzsz.XzService
;
import
com.mmc.iuav.user.util.SmsUtil
;
import
com.mmc.iuav.user.util.SmsUtil
;
...
@@ -40,6 +42,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
...
@@ -40,6 +42,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -69,6 +72,12 @@ public class WithdrawalServiceImpl implements WithdrawalService {
...
@@ -69,6 +72,12 @@ public class WithdrawalServiceImpl implements WithdrawalService {
@Autowired
@Autowired
private
UserServiceDao
userServiceDao
;
private
UserServiceDao
userServiceDao
;
@Autowired
private
WxService
wxService
;
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Override
@Override
@Transactional
@Transactional
public
ResultBody
apply
(
ApplyWithdrawalVO
applyWithdrawalVO
,
Integer
userAccountId
)
{
public
ResultBody
apply
(
ApplyWithdrawalVO
applyWithdrawalVO
,
Integer
userAccountId
)
{
...
@@ -241,9 +250,21 @@ public class WithdrawalServiceImpl implements WithdrawalService {
...
@@ -241,9 +250,21 @@ public class WithdrawalServiceImpl implements WithdrawalService {
}
}
String
userPhone
=
userServiceDao
.
getUserPhoneByUserId
(
applyInfo
.
getUserAccountId
());
String
userPhone
=
userServiceDao
.
getUserPhoneByUserId
(
applyInfo
.
getUserAccountId
());
SmsUtil
.
sendPassWithdrawalApply
(
userPhone
);
SmsUtil
.
sendPassWithdrawalApply
(
userPhone
);
// 公众号消息通知提现成功
WxMsgVO
ws
=
new
WxMsgVO
();
String
unionId
=
userServiceDao
.
getUserAccountById
(
applyInfo
.
getUserAccountId
()).
getUnionId
();
// 查询对应的openId(touser)
String
touser
=
userSubInfoDao
.
getUserSubInfoByUnionId
(
unionId
).
getOpenId
();
JSONObject
jsonObject
=
spellMsg
(
applyInfo
.
getEmpName
(),
applyInfo
.
getPayAmount
(),
applyInfo
.
getPayAccount
());
ws
.
setTouser
(
touser
);
ws
.
setTemplateId
(
"y6PHvZownxqR5hf4dSXaa2Lp1jeq3ccytd6G-kUQla4"
);
ws
.
setDataObject
(
jsonObject
);
wxService
.
sendSubTemplateMsg
(
ws
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
rollbackPayWallet
(
XzWithdrawalApplyDO
applyInfo
,
PayWalletDO
wallet
)
{
public
int
rollbackPayWallet
(
XzWithdrawalApplyDO
applyInfo
,
PayWalletDO
wallet
)
{
// 生成提现流水编号
// 生成提现流水编号
...
@@ -281,4 +302,30 @@ public class WithdrawalServiceImpl implements WithdrawalService {
...
@@ -281,4 +302,30 @@ public class WithdrawalServiceImpl implements WithdrawalService {
cashAmountDTO
.
setCashPoolAmount
(
cashPoolingDTO
.
getAvailableBalance
());
cashAmountDTO
.
setCashPoolAmount
(
cashPoolingDTO
.
getAvailableBalance
());
return
cashAmountDTO
;
return
cashAmountDTO
;
}
}
public
JSONObject
spellMsg
(
String
empName
,
Double
payAmount
,
String
payAccount
){
JSONObject
data
=
new
JSONObject
();
//提现商户:{{keyword1.DATA}}
JSONObject
keyword1
=
new
JSONObject
();
keyword1
.
put
(
"value"
,
empName
);
data
.
put
(
"keyword1"
,
keyword1
);
//提现金额:{{keyword2.DATA}}
JSONObject
keyword2
=
new
JSONObject
();
keyword2
.
put
(
"value"
,
payAmount
);
data
.
put
(
"keyword2"
,
keyword2
);
//提现账户:{{keyword3.DATA}}
JSONObject
keyword3
=
new
JSONObject
();
keyword3
.
put
(
"value"
,
payAccount
);
data
.
put
(
"keyword3"
,
keyword3
);
//处理时间:{{keyword4.DATA}}
JSONObject
keyword4
=
new
JSONObject
();
keyword4
.
put
(
"value"
,
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
data
.
put
(
"keyword4"
,
keyword4
);
return
data
;
}
}
}
csm-service/cms-service-user/src/main/resources/mapper/MessageDao.xml
浏览文件 @
cc9da842
...
@@ -72,5 +72,15 @@
...
@@ -72,5 +72,15 @@
set is_deleted = 1, deleted_time = NOW()
set is_deleted = 1, deleted_time = NOW()
where message_id = #{messageId}
where message_id = #{messageId}
</update>
</update>
<update
id=
"updateSystemMessage"
>
UPDATE message
<set>
<if
test=
"subject != null"
>
subject,
</if>
<if
test=
"content != null"
>
content
</if>
</set>
<where>
id = #{id}
</where>
</update>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论