修改退款逻辑
This commit is contained in:
@@ -556,6 +556,7 @@ public class MerchantOrderController {
|
|||||||
merchantOrder.setStoreName("尖愁");
|
merchantOrder.setStoreName("尖愁");
|
||||||
merchantOrder.setTransDt(new Date());
|
merchantOrder.setTransDt(new Date());
|
||||||
merchantOrder.setCreateDt(new Date());
|
merchantOrder.setCreateDt(new Date());
|
||||||
|
merchantOrder.setAisleSwitch("1");
|
||||||
merchantOrder.setStatus("1");
|
merchantOrder.setStatus("1");
|
||||||
//BigDecimal e=new BigDecimal(merchantOrder.getConsumeFee()).subtract(new BigDecimal(merchantOrder.getConsumeFee()).multiply(new BigDecimal("0.0038")).setScale(2,BigDecimal.ROUND_DOWN)).setScale(2,BigDecimal.ROUND_DOWN);
|
//BigDecimal e=new BigDecimal(merchantOrder.getConsumeFee()).subtract(new BigDecimal(merchantOrder.getConsumeFee()).multiply(new BigDecimal("0.0038")).setScale(2,BigDecimal.ROUND_DOWN)).setScale(2,BigDecimal.ROUND_DOWN);
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
|||||||
import cn.pluss.platform.notice.NoticeService;
|
import cn.pluss.platform.notice.NoticeService;
|
||||||
import cn.pluss.platform.realFans.RealFansService;
|
import cn.pluss.platform.realFans.RealFansService;
|
||||||
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||||
|
import cn.pluss.platform.userAccount.impl.UserAccountFlowServiceImpl;
|
||||||
import cn.pluss.platform.userAccount.impl.UserAccountServiceImpl;
|
import cn.pluss.platform.userAccount.impl.UserAccountServiceImpl;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
import cn.pluss.platform.userIntegral.UserIntegralService;
|
import cn.pluss.platform.userIntegral.UserIntegralService;
|
||||||
@@ -48,6 +49,9 @@ public class RealFansServiceImpl extends ServiceImpl<RealFansMapper, RealFans> i
|
|||||||
@Autowired
|
@Autowired
|
||||||
UserAccountServiceImpl userAccountService;
|
UserAccountServiceImpl userAccountService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
UserAccountFlowServiceImpl userAccountFlowService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeProfit(MerchantOrder order) {
|
public void removeProfit(MerchantOrder order) {
|
||||||
if(ObjectUtil.isEmpty(order)){
|
if(ObjectUtil.isEmpty(order)){
|
||||||
@@ -83,6 +87,10 @@ public class RealFansServiceImpl extends ServiceImpl<RealFansMapper, RealFans> i
|
|||||||
log.info("【去除分润计算完成】开始批量插入分润数据,生成分润的订单编号:{},分润条数:{}", order.getOrderNumber(), profitList.size());
|
log.info("【去除分润计算完成】开始批量插入分润数据,生成分润的订单编号:{},分润条数:{}", order.getOrderNumber(), profitList.size());
|
||||||
try {
|
try {
|
||||||
merchantProfitService.batchInsert(profitList);
|
merchantProfitService.batchInsert(profitList);
|
||||||
|
|
||||||
|
userAccountService.updateBatchById(userAccounts);
|
||||||
|
|
||||||
|
userAccountFlowService.saveBatch(accountFlows);
|
||||||
log.info("【去除分润插入】插入分润成功!");
|
log.info("【去除分润插入】插入分润成功!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -158,10 +166,10 @@ public class RealFansServiceImpl extends ServiceImpl<RealFansMapper, RealFans> i
|
|||||||
MerchantProfit profit = new MerchantProfit(nowUserApp, nowUserApp, order, profitAmt.negate(), profitRate, "5", "1");
|
MerchantProfit profit = new MerchantProfit(nowUserApp, nowUserApp, order, profitAmt.negate(), profitRate, "5", "1");
|
||||||
profits.add(profit);
|
profits.add(profit);
|
||||||
// sendProfitMessage(nowUserApp, profitAmt, order.getOrderNumber());
|
// sendProfitMessage(nowUserApp, profitAmt, order.getOrderNumber());
|
||||||
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,new BigDecimal(userPromotion.getCurrentFee()));
|
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,nowRate);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,new BigDecimal(userPromotion.getCurrentFee()));
|
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,nowRate);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
BigDecimal profitRate = BigDecimal.ZERO;
|
BigDecimal profitRate = BigDecimal.ZERO;
|
||||||
@@ -202,7 +210,7 @@ public class RealFansServiceImpl extends ServiceImpl<RealFansMapper, RealFans> i
|
|||||||
MerchantProfit profit = new MerchantProfit(nowUserApp,nowUserApp , order, profitAmt.abs().negate(), profitRate, "5", "1");
|
MerchantProfit profit = new MerchantProfit(nowUserApp,nowUserApp , order, profitAmt.abs().negate(), profitRate, "5", "1");
|
||||||
profits.add(profit);
|
profits.add(profit);
|
||||||
// sendProfitMessage(nowUserApp, profitAmt, order.getOrderNumber());
|
// sendProfitMessage(nowUserApp, profitAmt, order.getOrderNumber());
|
||||||
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,order.getRefundAmt());
|
createUserV3Profit(order,userPromotion.getParentUserId(),profits,userAccounts,flows,nowRate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user