mirror of
https://gitee.com/guchengwuyue/crm.git
synced 2026-06-05 18:25:44 +08:00
线索与客户领取增加已经被领取判断
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package co.yixiang.yshop.module.crm.service.crmclues;
|
||||
|
||||
import co.yixiang.yshop.framework.common.enums.ShopCommonEnum;
|
||||
import co.yixiang.yshop.framework.common.exception.ErrorCode;
|
||||
import co.yixiang.yshop.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import co.yixiang.yshop.module.crm.controller.admin.crmcustomer.vo.CrmCustomerSaveReqVO;
|
||||
import co.yixiang.yshop.module.crm.dal.dataobject.crmcustomer.CrmCustomerDO;
|
||||
@ -122,6 +123,9 @@ public class CrmCluesServiceImpl implements CrmCluesService {
|
||||
@Override
|
||||
public void receiveClues(Long id) {
|
||||
CrmCluesDO crmCluesDO = cluesMapper.selectById(id);
|
||||
if(crmCluesDO.getOwnerUserId() > 0){
|
||||
throw exception(new ErrorCode(202603130, "线索已领取"));
|
||||
}
|
||||
if (crmCluesDO == null) {
|
||||
throw exception(CLUES_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@ -137,6 +137,9 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void receiveCustomer(Long id) {
|
||||
CrmCustomerDO customerDO = customerMapper.selectById(id);
|
||||
if(customerDO.getOwnerUserId() > 0){
|
||||
throw exception(new ErrorCode(202603131, "客户已领取"));
|
||||
}
|
||||
if(customerDO == null){
|
||||
throw exception(CUSTOMER_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user