Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
13ee364d
提交
13ee364d
authored
8月 24, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RequirementsController(update)
上级
3c402e0b
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
118 行增加
和
18 行删除
+118
-18
RequirementsController.java
...om/mmc/csf/release/controller/RequirementsController.java
+3
-3
RequirementsInfoDO.java
...c/csf/release/entity/requirements/RequirementsInfoDO.java
+7
-0
RequirementsService.java
...java/com/mmc/csf/release/service/RequirementsService.java
+1
-1
RequirementsServiceImpl.java
...mmc/csf/release/service/impl/RequirementsServiceImpl.java
+102
-13
RequirementsDao.xml
...rc/main/resources/mapper/requirements/RequirementsDao.xml
+5
-1
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/controller/RequirementsController.java
浏览文件 @
13ee364d
...
@@ -175,12 +175,12 @@ public class RequirementsController extends BaseController {
...
@@ -175,12 +175,12 @@ public class RequirementsController extends BaseController {
}
}
@ApiOperation
(
value
=
"new--小程序————飞手端确认结算"
)
@ApiOperation
(
value
=
"new--小程序————飞手端
最终
确认结算"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"confirmSettlement"
)
@PostMapping
(
"confirmSettlement"
)
public
ResultBody
confirmSettlement
(
HttpServletRequest
request
)
{
public
ResultBody
confirmSettlement
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"需求id"
)
Integer
requirementsInfoId
)
{
Integer
userAccountId
=
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
();
Integer
userAccountId
=
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
();
return
requirementsService
.
confirmSettlement
(
userAccountId
);
return
requirementsService
.
confirmSettlement
(
userAccountId
,
requirementsInfoId
);
}
}
@ApiOperation
(
value
=
"new——小程序-—发布者--订单结算详情"
)
@ApiOperation
(
value
=
"new——小程序-—发布者--订单结算详情"
)
...
...
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsInfoDO.java
浏览文件 @
13ee364d
...
@@ -131,6 +131,13 @@ public class RequirementsInfoDO implements Serializable {
...
@@ -131,6 +131,13 @@ public class RequirementsInfoDO implements Serializable {
private
BigDecimal
salaryAmount
;
private
BigDecimal
salaryAmount
;
@ApiModelProperty
(
value
=
"抢单飞手用户id "
)
private
Integer
pilotCertificationUserId
;
@ApiModelProperty
(
value
=
"抢单飞手用户openid "
)
private
String
flyerOpenid
;
@ApiModelProperty
(
value
=
"飞手获得任务佣金"
)
private
BigDecimal
receiveSalaryAmount
;
public
RequirementsInfoVO
buildRequirementsInfoVO
()
{
public
RequirementsInfoVO
buildRequirementsInfoVO
()
{
...
...
release-service/src/main/java/com/mmc/csf/release/service/RequirementsService.java
浏览文件 @
13ee364d
...
@@ -106,5 +106,5 @@ public interface RequirementsService {
...
@@ -106,5 +106,5 @@ public interface RequirementsService {
ResultBody
<
FlowDictionaryDTO
>
flowDictionary
();
ResultBody
<
FlowDictionaryDTO
>
flowDictionary
();
ResultBody
confirmSettlement
(
Integer
userAccountId
);
ResultBody
confirmSettlement
(
Integer
userAccountId
,
Integer
requirementsInfoId
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/impl/RequirementsServiceImpl.java
浏览文件 @
13ee364d
...
@@ -531,13 +531,60 @@ public class RequirementsServiceImpl implements RequirementsService {
...
@@ -531,13 +531,60 @@ public class RequirementsServiceImpl implements RequirementsService {
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
requirementsDao
.
updateScene
(
requirementsInfoId
,
7
);
requirementsDao
.
updateScene
(
requirementsInfoId
,
7
);
requirementsDao
.
updateInfo
(
requirementsInfoId
,
7
);
requirementsDao
.
updateInfo
(
requirementsInfoId
,
7
);
this
.
sendMsg
Flyer
InfoAuth
(
requirementsServiceDO
);
this
.
sendMsg
Publish
InfoAuth
(
requirementsServiceDO
);
return
ResultBody
.
success
(
ResultEnum
.
PAYMENT_SUCCESS
.
getResultMsg
());
return
ResultBody
.
success
(
ResultEnum
.
PAYMENT_SUCCESS
.
getResultMsg
());
}
}
private
void
sendMsgFlyerInfoAuth
(
Requirements
ServiceDO
requirementsService
DO
)
{
private
void
sendMsgFlyerInfoAuth
(
Requirements
InfoDO
requirementsInfo
DO
)
{
//订单编号
JSONObject
value1
=
new
JSONObject
();
value1
.
put
(
"value"
,
requirementsInfoDO
.
getPublisherNumber
());
//订单金额
JSONObject
value2
=
new
JSONObject
();
value2
.
put
(
"value"
,
requirementsInfoDO
.
getOrderAmount
());
//下单时间
JSONObject
value3
=
new
JSONObject
();
value3
.
put
(
"value"
,
requirementsInfoDO
.
getCreateTime
());
//取消时间
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
// 设置日期格式
String
date
=
df
.
format
(
new
Date
());
JSONObject
value4
=
new
JSONObject
();
value4
.
put
(
"value"
,
date
);
JSONObject
value5
=
new
JSONObject
();
String
remark
=
"飞手已取消,你获得赔偿金"
+
requirementsInfoDO
.
getReceiveSalaryAmount
()
+
"元"
;
value5
.
put
(
"value"
,
remark
);
JSONObject
datad
=
new
JSONObject
();
//订单编号
datad
.
put
(
"character_string2"
,
value1
);
//订单金额
datad
.
put
(
"amount3"
,
value2
);
//下单时间
datad
.
put
(
"date5"
,
value3
);
//取消时间
datad
.
put
(
"time7"
,
value4
);
//备注
datad
.
put
(
"thing4"
,
value5
);
AppletMsgVOS
appletMsgVO
=
new
AppletMsgVOS
();
appletMsgVO
.
setTouser
(
requirementsInfoDO
.
getFlyerOpenid
());
appletMsgVO
.
setTemplate_id
(
WxMsgTemplete
.
INDEMNIFY_FOR_PUBLICATION
);
appletMsgVO
.
setPage
(
"pages/welcome/index"
);
appletMsgVO
.
setData
(
datad
);
appletMsgVO
.
setMiniprogram_state
(
userSystemConstant
.
getMiniProgramState
());
appletMsgVO
.
setLang
(
"zh_CN"
);
sendUserAppletMsg
(
appletMsgVO
);
}
private
void
sendMsgPublishInfoAuth
(
RequirementsServiceDO
requirementsServiceDO
)
{
//订单编号
//订单编号
...
@@ -572,7 +619,8 @@ public class RequirementsServiceImpl implements RequirementsService {
...
@@ -572,7 +619,8 @@ public class RequirementsServiceImpl implements RequirementsService {
JSONObject
value5
=
new
JSONObject
();
JSONObject
value5
=
new
JSONObject
();
value5
.
put
(
"value"
,
""
);
String
remark
=
"飞手已取消,你获得赔偿金"
+
requirementsServiceDO
.
getPercentagePenaltyOfOrder
()
+
"元"
;
value5
.
put
(
"value"
,
remark
);
JSONObject
datad
=
new
JSONObject
();
JSONObject
datad
=
new
JSONObject
();
//订单编号
//订单编号
...
@@ -671,7 +719,9 @@ public class RequirementsServiceImpl implements RequirementsService {
...
@@ -671,7 +719,9 @@ public class RequirementsServiceImpl implements RequirementsService {
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
ApplyRefundVO
applyRefundVO
=
new
ApplyRefundVO
();
WalletFlowVO
walletFlowVO
=
new
WalletFlowVO
();
WalletFlowVO
walletFlowVO
=
new
WalletFlowVO
();
PublisherWalletFlowVO
publisherWalletFlowVO
=
new
PublisherWalletFlowVO
();
PublisherWalletFlowVO
publisherWalletFlowVO
=
new
PublisherWalletFlowVO
();
FlyerWalletFlowVO
flyerWalletFlowVO
=
new
FlyerWalletFlowVO
();
IsNullConvertZeroUtil
.
checkIsNull
(
publisherWalletFlowVO
);
IsNullConvertZeroUtil
.
checkIsNull
(
publisherWalletFlowVO
);
IsNullConvertZeroUtil
.
checkIsNull
(
flyerWalletFlowVO
);
if
(
serviceFlowId
==
1
)
{
if
(
serviceFlowId
==
1
)
{
//飞手无责取消 将全部退回 不包含加急或者置顶
//飞手无责取消 将全部退回 不包含加急或者置顶
//支付
//支付
...
@@ -700,33 +750,68 @@ public class RequirementsServiceImpl implements RequirementsService {
...
@@ -700,33 +750,68 @@ public class RequirementsServiceImpl implements RequirementsService {
}
}
//单方面取消订单并且飞手已经抢单
//单方面取消订单并且飞手已经抢单
if
(
serviceFlowId
==
2
)
{
if
(
serviceFlowId
==
2
)
{
BigDecimal
orderAmount
=
requirementsInfoDO
.
getOrderAmount
();
BigDecimal
orderAmount
=
requirementsInfoDO
.
getOrderAmount
();
BigDecimal
bigDecimal
=
new
BigDecimal
(
0.7
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
0.7
);
//剩余金额
//剩余金额
BigDecimal
residueOrderAmount
=
orderAmount
.
multiply
(
bigDecimal
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
residueOrderAmount
=
orderAmount
.
multiply
(
bigDecimal
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//先退微信 再退任务佣金 最后退云享金
//先退微信 再退任务佣金 最后退云享金
BigDecimal
weChat
=
requirementsInfoDO
.
getWeChat
();
BigDecimal
weChat
=
requirementsInfoDO
.
getWeChat
();
//微信需要退款多少金额
//微信需要退款多少金额
//微信金额大于扣除之后的金额
//微信金额大于扣除之后的金额
BigDecimal
refundCashAmount
=
new
BigDecimal
(
0
);
BigDecimal
refundCashAmount
=
new
BigDecimal
(
0
);
BigDecimal
refundSalaryAmount
=
new
BigDecimal
(
0
);
BigDecimal
refundSalaryAmount
=
new
BigDecimal
(
0
);
BigDecimal
refundWeChat
=
new
BigDecimal
(
0
);
BigDecimal
refundWeChat
=
new
BigDecimal
(
0
);
//微信支付金额大于需要退款金额
if
(
weChat
.
compareTo
(
residueOrderAmount
)
==
1
)
{
if
(
weChat
.
compareTo
(
residueOrderAmount
)
==
1
)
{
refundWeChat
=
refundCashAmount
;
refundWeChat
=
refundCashAmount
;
BigDecimal
multiply
=
w
eChat
.
multiply
(
new
BigDecimal
(
100
));
BigDecimal
multiply
=
refundW
eChat
.
multiply
(
new
BigDecimal
(
100
));
Long
longWeChat
=
multiply
.
longValue
();
Long
longWeChat
=
multiply
.
longValue
();
applyRefundVO
.
setRefund
(
longWeChat
);
applyRefundVO
.
setRefund
(
longWeChat
);
applyRefundVO
.
setReason
(
"扣除飞手百分之三十的费用"
);
applyRefundVO
.
setReason
(
"扣除飞手百分之三十的费用"
);
applyRefundVO
.
setOutTradeNo
(
requirementsInfoDO
.
getWechatPayOrderNumber
());
//退款到微信
applyRefund
(
applyRefundVO
,
request
.
getHeader
(
"token"
));
applyRefund
(
applyRefundVO
,
request
.
getHeader
(
"token"
));
}
}
//微信支付金额小于需要退款金额
if
(
weChat
.
compareTo
(
residueOrderAmount
)
==
-
1
||
weChat
.
compareTo
(
refundCashAmount
)
==
0
)
{
//优先扣除微信里面的钱
BigDecimal
returnToWechat
=
residueOrderAmount
.
subtract
(
requirementsInfoDO
.
getWeChat
());
//退回佣金
BigDecimal
residueAmount
=
returnToWechat
.
subtract
(
requirementsInfoDO
.
getSalaryAmount
());
if
(
residueAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
||
residueAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
-
1
)
{
publisherWalletFlowVO
.
setUserAccountId
(
userAccountId
);
publisherWalletFlowVO
.
setOperateUserAccountId
(
userAccountId
);
publisherWalletFlowVO
.
setModeOfPayment
(
300
);
publisherWalletFlowVO
.
setSalaryAmount
(
residueAmount
);
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
}
else
if
(
residueAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
publisherWalletFlowVO
.
setCashAmount
(
residueAmount
);
publisherWalletFlowVO
.
setSalaryAmount
(
requirementsInfoDO
.
getSalaryAmount
());
publisherWalletFlowVO
.
setUserAccountId
(
userAccountId
);
publisherWalletFlowVO
.
setOperateUserAccountId
(
userAccountId
);
publisherWalletFlowVO
.
setModeOfPayment
(
300
);
walletFlowVO
.
setPublisherWalletFlowVO
(
publisherWalletFlowVO
);
//退回任务佣金
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
}
BigDecimal
weChatAmount
=
requirementsInfoDO
.
getWeChat
();
long
longWeChat
=
weChatAmount
.
multiply
(
new
BigDecimal
(
100
)).
longValue
();
applyRefundVO
.
setRefund
(
longWeChat
);
applyRefundVO
.
setReason
(
"退回方式——微信佣金云享金"
);
applyRefundVO
.
setOutTradeNo
(
requirementsInfoDO
.
getWechatPayOrderNumber
());
applyRefund
(
applyRefundVO
,
request
.
getHeader
(
"token"
));
}
BigDecimal
receiveSalaryAmount
=
orderAmount
.
multiply
(
new
BigDecimal
(
0.2
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
flyerWalletFlowVO
.
setSalaryAmount
(
receiveSalaryAmount
);
flyerWalletFlowVO
.
setUserAccountId
(
requirementsInfoDO
.
getPilotCertificationUserId
());
flyerWalletFlowVO
.
setOperateUserAccountId
(
userAccountId
);
flyerWalletFlowVO
.
setModeOfPayment
(
300
);
flyerCancel
(
walletFlowVO
,
request
.
getHeader
(
"token"
));
requirementsInfoDO
.
setReceiveSalaryAmount
(
receiveSalaryAmount
);
//给飞手发送短信
this
.
sendMsgFlyerInfoAuth
(
requirementsInfoDO
);
return
ResultBody
.
success
(
ResultEnum
.
REFUND_PERCENTAGE
.
getResultMsg
());
return
ResultBody
.
success
(
ResultEnum
.
REFUND_PERCENTAGE
.
getResultMsg
());
}
}
return
ResultBody
.
success
();
return
ResultBody
.
success
();
...
@@ -770,7 +855,11 @@ public class RequirementsServiceImpl implements RequirementsService {
...
@@ -770,7 +855,11 @@ public class RequirementsServiceImpl implements RequirementsService {
}
}
@Override
@Override
public
ResultBody
confirmSettlement
(
Integer
userAccountId
)
{
public
ResultBody
confirmSettlement
(
Integer
userAccountId
,
Integer
requirementsInfoId
)
{
RequirementsInfoDO
requirementsInfoDO
=
requirementsDao
.
publisherCancel
(
requirementsInfoId
,
userAccountId
);
if
(
requirementsInfoDO
==
null
)
{
return
ResultBody
.
error
(
"结算失败"
);
}
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
...
release-service/src/main/resources/mapper/requirements/RequirementsDao.xml
浏览文件 @
13ee364d
...
@@ -622,11 +622,15 @@
...
@@ -622,11 +622,15 @@
ra.level_salary_amount,
ra.level_salary_amount,
ra.level_we_chat_amount,
ra.level_we_chat_amount,
ra.wechat_pay_order_number,
ra.wechat_pay_order_number,
ri.service_flow_id
ri.service_flow_id,
rs.pilot_certification_user_id,
rs.openid as flyerOpenid,
ri.create_time
FROM requirements_info ri
FROM requirements_info ri
LEFT JOIN requirements_type rt ON rt.id = ri.requirement_type_id
LEFT JOIN requirements_type rt ON rt.id = ri.requirement_type_id
LEFT JOIN service_flow sf ON sf.id = ri.service_flow_id
LEFT JOIN service_flow sf ON sf.id = ri.service_flow_id
LEFT JOIN requirements_amount ra ON ra.requirements_info_id = ri.id
LEFT JOIN requirements_amount ra ON ra.requirements_info_id = ri.id
LEFT JOIN requirements_service rs ON rs.requirements_info_id = ri.id
WHERE ri.user_account_id = #{userAccountId}
WHERE ri.user_account_id = #{userAccountId}
AND ri.id = #{requirementsInfoId}
AND ri.id = #{requirementsInfoId}
</select>
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论