mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 11:40:05 +08:00
新增客户锁定和解锁 接口
This commit is contained in:
parent
fdaa08c258
commit
0a58790c6b
@ -95,4 +95,12 @@ public class CrmCustomerController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/lock")
|
||||||
|
@Operation(summary = "锁定/解锁")
|
||||||
|
@PreAuthorize("@ss.hasPermission('crm:customer:update')")
|
||||||
|
public CommonResult<Boolean> lockCustomer(@Valid @RequestBody CrmCustomerUpdateReqVO updateReqVO) {
|
||||||
|
customerService.lockCustomer(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -86,4 +86,11 @@ public interface CrmCustomerService {
|
|||||||
*/
|
*/
|
||||||
void transferCustomer(CrmTransferCustomerReqVO reqVO, Long userId);
|
void transferCustomer(CrmTransferCustomerReqVO reqVO, Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁定客户 解锁客户
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void lockCustomer(@Valid CrmCustomerUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -138,4 +138,13 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
|
|||||||
CrmCustomerConvert.INSTANCE.convert(reqVO, userId).setCrmType(CrmEnum.CRM_CUSTOMER.getType()));
|
CrmCustomerConvert.INSTANCE.convert(reqVO, userId).setCrmType(CrmEnum.CRM_CUSTOMER.getType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void lockCustomer(CrmCustomerUpdateReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateCustomerExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
CrmCustomerDO updateObj = CrmCustomerConvert.INSTANCE.convert(updateReqVO);
|
||||||
|
customerMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user