📖 CRM:code review 线索模块

This commit is contained in:
YunaiV 2024-01-09 21:58:50 +08:00
parent 6a93484260
commit 722b33513c

View File

@ -135,6 +135,7 @@ public class CrmClueServiceImpl implements CrmClueService {
if (CollUtil.isEmpty(clues)) {
throw exception(CLUE_NOT_EXISTS);
}
// TODO @min如果已经转化则不能重复转化
// 遍历线索创建对应的客户
clues.forEach(clue -> {
@ -142,6 +143,7 @@ public class CrmClueServiceImpl implements CrmClueService {
customerService.createCustomer(CrmCustomerConvert.INSTANCE.convert(clue), userId);
// 更新线索状态
// TODO @min新建一个 CrmClueDO 去更新尽量规避直接用原本的对象去更新因为这样万一并发更新会存在覆盖的问题
// TODO @puhui999如果有跟进记录需要一起转过去
clue.setTransformStatus(Boolean.TRUE);
clueMapper.updateById(clue);
});