|
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.txz.cif.core.ResultCode;
|
|
|
import com.txz.cif.core.ResultGenerator;
|
|
|
import com.txz.cif.core.ServiceException;
|
|
@@ -157,6 +158,7 @@ public class AccountDubboServiceImpl implements AccountDubboService {
|
|
|
|
|
|
@Override
|
|
|
public Result accomplishGroup(AccomplishParam param) {
|
|
|
+ log.info("accomplishGroup param :"+ JSONObject.toJSONString(param));
|
|
|
// 类型 1001充值 2001提现 3001开团支付 3002参团支付 4001未成团退款 4002成团退款 5001开团红包收益 5002参团红包收益 5003签到红包收益 5004下级红包佣金 5005下下级红包佣金
|
|
|
for (OrderParam orderParam : param.getUserIds()) {
|
|
|
Result result = flowService.refund(RefundParam.builder()
|
|
@@ -172,8 +174,10 @@ public class AccountDubboServiceImpl implements AccountDubboService {
|
|
|
}
|
|
|
|
|
|
if (param.getOpenGroupUserId() != null) {
|
|
|
+ log.info("param.getOpenGroupUserId() :"+ param.getOpenGroupUserId());
|
|
|
// 计算开团红包金额
|
|
|
com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = operatingConfigDubboServiceClient.getConfigByCode("open_red_envelope_rate");
|
|
|
+ log.info("operatingConfigDubboServiceClient.getConfigByCode openRedEnvelopeRate:"+ JSONObject.toJSONString(openRedEnvelopeRate));
|
|
|
String rate = openRedEnvelopeRate.getData().getValueInfo();
|
|
|
BigDecimal amount = param.getAmount().multiply(new BigDecimal(rate)).divide(BigDecimal.valueOf(100), 2, RoundingMode.DOWN);
|
|
|
|
|
@@ -195,7 +199,10 @@ public class AccountDubboServiceImpl implements AccountDubboService {
|
|
|
if (param.getWinnerUserId().compareTo(param.getOpenGroupUserId()) != 0){
|
|
|
param.getUserIds().add(OrderParam.builder().orderNo(param.getWinnerOrderNo()).userId(param.getWinnerUserId()).build());
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = operatingConfigDubboServiceClient.getConfigByCode("join_red_envelope_rate");
|
|
|
+ log.info("operatingConfigDubboServiceClient.getConfigByCode2 openRedEnvelopeRate:"+ JSONObject.toJSONString(openRedEnvelopeRate));
|
|
|
String rate = openRedEnvelopeRate.getData().getValueInfo();
|
|
|
BigDecimal amount = param.getAmount().multiply(new BigDecimal(rate)).divide(BigDecimal.valueOf(100), 2, RoundingMode.DOWN);
|
|
|
// 参团红包
|
|
@@ -206,6 +213,8 @@ public class AccountDubboServiceImpl implements AccountDubboService {
|
|
|
.transTime(param.getTransTime())
|
|
|
.build());
|
|
|
}
|
|
|
+
|
|
|
+ log.info("accomplishGroup end param :"+ JSONObject.toJSONString(param));
|
|
|
return Result.genSuccessResult();
|
|
|
}
|
|
|
|