Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
7ca4239a
提交
7ca4239a
authored
12月 20, 2023
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
ce40f685
3ddf3987
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
119 行增加
和
4 行删除
+119
-4
MessageDao.java
...-user/src/main/java/com/mmc/iuav/user/dao/MessageDao.java
+7
-0
PilotCertificationServiceImpl.java
...ervice/dronepilot/impl/PilotCertificationServiceImpl.java
+42
-0
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+9
-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
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/MessageDao.java
浏览文件 @
7ca4239a
...
...
@@ -22,6 +22,13 @@ public interface MessageDao {
int
insertSystemMessage
(
SystemMessageDO
messageDO
);
/**
* 修改系统消息
* @param messageDO
* @return
*/
int
updateSystemMessage
(
SystemMessageDO
messageDO
);
/**
* 根据ID查询系统消息
* @param id
* @return
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/dronepilot/impl/PilotCertificationServiceImpl.java
浏览文件 @
7ca4239a
...
...
@@ -11,6 +11,7 @@ import com.mmc.iuav.user.constant.WxConstant;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.controller.wx.*
;
import
com.mmc.iuav.user.dao.UserSubInfoDao
;
import
com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
...
...
@@ -24,9 +25,11 @@ import com.mmc.iuav.user.model.dto.dronepilot.*;
import
com.mmc.iuav.user.model.qo.dronepilot.*
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
com.mmc.iuav.user.model.vo.PilotAuditSumVO
;
import
com.mmc.iuav.user.model.vo.WxMsgVO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO
;
import
com.mmc.iuav.user.model.vo.userpoints.UserPointsVO
;
import
com.mmc.iuav.user.service.WxService
;
import
com.mmc.iuav.user.service.dronepilot.PilotCertificationService
;
import
com.mmc.iuav.user.util.SmsUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -72,6 +75,13 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
@Value
(
"${iuav.ims.uri}"
)
private
String
imsApp
;
@Autowired
private
WxService
wxService
;
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Override
public
ResultBody
insertPilot
(
PilotCertificationVO
certificationVO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
...
...
@@ -297,6 +307,17 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
if
(
param
.
getAuditStatus
()
==
1
)
{
String
pilotApplyPhone
=
certificationDao
.
getPilotApplyPhone
(
param
.
getId
());
SmsUtil
.
sendPassPilotApply
(
pilotApplyPhone
);
// 审核通过,通过公众号发布消息通知
WxMsgVO
ws
=
new
WxMsgVO
();
String
unionId
=
userAccountDO
.
getUnionId
();
// 查询对应的openId(touser)
String
touser
=
userSubInfoDao
.
getUserSubInfoByUnionId
(
unionId
).
getOpenId
();
JSONObject
jsonObject
=
spellMsg
(
"飞手执照及能力认证"
,
"审核通过"
);
ws
.
setTouser
(
touser
);
ws
.
setTemplateId
(
"9qvgBhfW9yoQJY91iMfhrog8y5eZUPSbo9PLvQzS_vk"
);
ws
.
setDataObject
(
jsonObject
);
wxService
.
sendSubTemplateMsg
(
ws
);
}
PilotCertificationLogDO
pilotCertificationLog
=
new
PilotCertificationLogDO
(
userAccountDO
.
getId
(),
userLoginInfoFromRedis
.
getUserAccountId
(),
CertificationMessage
.
match
(
param
.
getAuditStatus
()));
...
...
@@ -642,4 +663,25 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
userIdList
.
add
(
userAccountId
);
return
userIdList
;
}
public
JSONObject
spellMsg
(
String
name
,
String
result
){
JSONObject
data
=
new
JSONObject
();
//申请项目{{thing3.DATA}}
JSONObject
thing3
=
new
JSONObject
();
thing3
.
put
(
"value"
,
name
);
data
.
put
(
"thing3"
,
thing3
);
//审核时间{{time6.DATA}}
JSONObject
time6
=
new
JSONObject
();
time6
.
put
(
"value"
,
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
data
.
put
(
"time6"
,
time6
);
//审核结果{{thing5.DATA}}
JSONObject
thing5
=
new
JSONObject
();
thing5
.
put
(
"value"
,
result
);
data
.
put
(
"thing5"
,
thing5
);
return
data
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
7ca4239a
...
...
@@ -9,6 +9,7 @@ import com.mmc.iuav.response.ResultEnum;
import
com.mmc.iuav.user.constant.UserSystemConstant
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.controller.wx.HttpsOpenUtil
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.UserSubInfoDao
;
import
com.mmc.iuav.user.entity.UserSubInfoDO
;
import
com.mmc.iuav.user.model.vo.AppletMsgVO
;
...
...
@@ -49,6 +50,9 @@ public class WxServiceImpl implements WxService {
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Autowired
private
UserServiceDao
userServiceDao
;
@Override
public
String
appLogin
(
WxLoginVO
wxLoginVO
)
{
String
url
=
WxConstant
.
CODE2_SESSION_URL
+
"?appid="
+
userSystemConstant
.
getWxAppId
()
+
"&secret="
+
...
...
@@ -250,6 +254,11 @@ public class WxServiceImpl implements WxService {
String
accessToken
=
null
;
try
{
accessToken
=
this
.
getSubStableAccessToken
();
if
(
StringUtils
.
isBlank
(
ws
.
getTouser
()))
{
String
unionId
=
userServiceDao
.
getUserAccountById
(
ws
.
getUserAccountId
()).
getUnionId
();
String
touser
=
userSubInfoDao
.
getUserSubInfoByUnionId
(
unionId
).
getOpenId
();
ws
.
setTouser
(
touser
);
}
String
url
=
"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="
+
accessToken
;
String
param
=
ws
.
buildTemplateMsg
();
String
result
=
HttpHelper
.
httpPost
(
url
,
param
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
浏览文件 @
7ca4239a
...
...
@@ -5,14 +5,14 @@ import com.mmc.iuav.general.CodeUtil;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
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.UserServiceDao
;
import
com.mmc.iuav.user.dao.UserSubInfoDao
;
import
com.mmc.iuav.user.dao.wallet.PayWalletDao
;
import
com.mmc.iuav.user.dao.xzsz.WithdrawalDao
;
import
com.mmc.iuav.user.dao.xzsz.XzDao
;
import
com.mmc.iuav.user.entity.RealNameAuthDO
;
import
com.mmc.iuav.user.entity.XzAuthDO
;
import
com.mmc.iuav.user.entity.XzWithdrawalApplyDO
;
import
com.mmc.iuav.user.entity.*
;
import
com.mmc.iuav.user.entity.wallet.PayWalletDO
;
import
com.mmc.iuav.user.entity.wallet.WithdrawalLogDO
;
import
com.mmc.iuav.user.enums.WithdrawalApplyStatus
;
...
...
@@ -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.qo.wallet.WalletFlowQO
;
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.wallet.ApplyWithdrawalVO
;
import
com.mmc.iuav.user.service.WxService
;
import
com.mmc.iuav.user.service.xzsz.WithdrawalService
;
import
com.mmc.iuav.user.service.xzsz.XzService
;
import
com.mmc.iuav.user.util.SmsUtil
;
...
...
@@ -40,6 +42,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -69,6 +72,12 @@ public class WithdrawalServiceImpl implements WithdrawalService {
@Autowired
private
UserServiceDao
userServiceDao
;
@Autowired
private
WxService
wxService
;
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Override
@Transactional
public
ResultBody
apply
(
ApplyWithdrawalVO
applyWithdrawalVO
,
Integer
userAccountId
)
{
...
...
@@ -241,9 +250,21 @@ public class WithdrawalServiceImpl implements WithdrawalService {
}
String
userPhone
=
userServiceDao
.
getUserPhoneByUserId
(
applyInfo
.
getUserAccountId
());
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
();
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
rollbackPayWallet
(
XzWithdrawalApplyDO
applyInfo
,
PayWalletDO
wallet
)
{
// 生成提现流水编号
...
...
@@ -281,4 +302,30 @@ public class WithdrawalServiceImpl implements WithdrawalService {
cashAmountDTO
.
setCashPoolAmount
(
cashPoolingDTO
.
getAvailableBalance
());
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
浏览文件 @
7ca4239a
...
...
@@ -72,5 +72,15 @@
set is_deleted = 1, deleted_time = NOW()
where message_id = #{messageId}
</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>
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
7ca4239a
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag
:
a
65911c558c751fe6e978306a29ad8cde9fcbe86
newTag
:
a
cba4adbfd695fa1204f8c66b0ab9f477675509a
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论