!713 新增接口

Merge pull request !713 from Joey/feature/crm
This commit is contained in:
芋道源码 2023-11-03 15:37:55 +00:00 committed by Gitee
commit 9a007de947
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 24 additions and 0 deletions

View File

@ -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);
}
} }

View File

@ -86,4 +86,11 @@ public interface CrmCustomerService {
*/ */
void transferCustomer(CrmCustomerTransferReqVO reqVO, Long userId); void transferCustomer(CrmCustomerTransferReqVO reqVO, Long userId);
/**
* 锁定客户 解锁客户
*
* @param updateReqVO 更新信息
*/
void lockCustomer(@Valid CrmCustomerUpdateReqVO updateReqVO);
} }

View File

@ -142,4 +142,13 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
// 3. TODO 记录转移日志 // 3. TODO 记录转移日志
} }
@Override
public void lockCustomer(CrmCustomerUpdateReqVO updateReqVO) {
// 校验存在
validateCustomerExists(updateReqVO.getId());
// 更新
CrmCustomerDO updateObj = CrmCustomerConvert.INSTANCE.convert(updateReqVO);
customerMapper.updateById(updateObj);
}
} }