|
@@ -352,19 +352,23 @@ public class UserApiController extends AbstractApiController {
|
|
|
}
|
|
|
//TODO 直推红包
|
|
|
|
|
|
- try{}catch (Exception)
|
|
|
- com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = configDubboServiceClient.getConfigByCode("invited_amount");
|
|
|
- log.info("operatingConfigDubboServiceClient.getConfigByCode openRedEnvelopeRate:"+ JSONObject.toJSONString(openRedEnvelopeRate));
|
|
|
- String amountStr = openRedEnvelopeRate.getData().getValueInfo();
|
|
|
- BigDecimal amount = new BigDecimal(amountStr).setScale(2,RoundingMode.DOWN);
|
|
|
+ try{
|
|
|
|
|
|
- // 直推红包
|
|
|
- com.txz.cif.dto.Result result1 = redEnvelopeService.addRedEnvelope(RedEnvelopeParam.builder()
|
|
|
- .amount(amount).bizType(BizTypeEnum.PROMOTION_COMMISSION.getKey())
|
|
|
- .userIds(CollUtil.newArrayList(OrderParam.builder().userId(puser.getId()).orderNo(params.getPhone()).build()))
|
|
|
- .transTime(DateUtil.date())
|
|
|
- .build());
|
|
|
- // }
|
|
|
+ com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = configDubboServiceClient.getConfigByCode("invited_amount");
|
|
|
+ log.info("operatingConfigDubboServiceClient.getConfigByCode openRedEnvelopeRate:"+ JSONObject.toJSONString(openRedEnvelopeRate));
|
|
|
+ String amountStr = openRedEnvelopeRate.getData().getValueInfo();
|
|
|
+ BigDecimal amount = new BigDecimal(amountStr).setScale(2,RoundingMode.DOWN);
|
|
|
+
|
|
|
+ // 直推红包
|
|
|
+ com.txz.cif.dto.Result result1 = redEnvelopeService.addRedEnvelope(RedEnvelopeParam.builder()
|
|
|
+ .amount(amount).bizType(BizTypeEnum.PROMOTION_COMMISSION.getKey())
|
|
|
+ .userIds(CollUtil.newArrayList(OrderParam.builder().userId(puser.getId()).orderNo(params.getPhone()).build()))
|
|
|
+ .transTime(DateUtil.date())
|
|
|
+ .build());
|
|
|
+ // }
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("直推红包新增异常",e);
|
|
|
+ }
|
|
|
}
|
|
|
if (StrUtil.isBlank(user.getHeadPic())) {
|
|
|
String zm = user.getName().substring(0, 1).toUpperCase();
|