|
|
@@ -117,7 +117,7 @@ public class BasicCorpsProfitChangeController extends BladeController {
|
|
|
CorpsDesc corpsDesc = corpsDescService.getOne(lambdaQueryWrapper);
|
|
|
if (ObjectUtils.isNotNull(corpsDesc)) {
|
|
|
//总返利
|
|
|
- BigDecimal profitReturn = corpsDesc.getProfitReturn().subtract(basicCorpsProfitChange.getChangeProfitReturn());
|
|
|
+ BigDecimal profitReturn = corpsDesc.getProfitReturn().add(basicCorpsProfitChange.getChangeProfitReturn());
|
|
|
//可用返利
|
|
|
BigDecimal surplusProfit = profitReturn.subtract(corpsDesc.getUsedProfit());
|
|
|
corpsDesc.setProfitReturn(profitReturn);
|
|
|
@@ -126,8 +126,8 @@ public class BasicCorpsProfitChangeController extends BladeController {
|
|
|
} else {
|
|
|
R.fail("客户不存在");
|
|
|
}
|
|
|
- basicCorpsProfitChange.setUpdateTime(LocalDateTime.now());
|
|
|
- basicCorpsProfitChange.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ basicCorpsProfitChange.setCreateTime(new Date());
|
|
|
+ basicCorpsProfitChange.setCreateUser(AuthUtil.getUserId());
|
|
|
return R.status(basicCorpsProfitChangeService.saveOrUpdate(basicCorpsProfitChange));
|
|
|
}
|
|
|
|