合同审核完成如果关联商机同步商机状态

This commit is contained in:
hupeng 2025-05-27 14:50:03 +08:00
parent 1cfc0a784b
commit ad2e1f10a2

View File

@ -355,6 +355,14 @@ public class CrmContractServiceImpl implements CrmContractService {
customerDO.setPurchaseTimes(customerDO.getPurchaseTimes() + 1); customerDO.setPurchaseTimes(customerDO.getPurchaseTimes() + 1);
customerDO.setPurchaseTotal(customerDO.getPurchaseTotal().add(crmContractDO.getMoney())); customerDO.setPurchaseTotal(customerDO.getPurchaseTotal().add(crmContractDO.getMoney()));
customerMapper.updateById(customerDO); customerMapper.updateById(customerDO);
if(crmContractDO.getBusinessId() != null && crmContractDO.getBusinessId() > 0){
crmBusinessMapper.update(CrmBusinessDO.builder()
.isEnd(ShopCommonEnum.IS_STATUS_1.getValue())
.remark("合同已签署成交")
.build(),
new LambdaQueryWrapper<CrmBusinessDO>()
.eq(CrmBusinessDO::getId,crmContractDO.getBusinessId()));
}
} }
crmFlowLogDO.setStatus(ShopCommonEnum.IS_STATUS_1.getValue());//审核通过 crmFlowLogDO.setStatus(ShopCommonEnum.IS_STATUS_1.getValue());//审核通过
}else { }else {