CRM-客户:日志表达式调整

This commit is contained in:
puhui999
2024-01-06 12:27:30 +08:00
parent a1c17b9b00
commit 269816446a
3 changed files with 5 additions and 5 deletions

View File

@@ -116,7 +116,7 @@ public class CrmCustomerController {
return success(CrmCustomerConvert.INSTANCE.convertPage(pageResult, userMap, deptMap));
}
@GetMapping(value = {"/list-all-simple"})
@GetMapping(value = "/list-all-simple")
@Operation(summary = "获取客户精简信息列表", description = "只包含有读权限的客户,主要用于前端的下拉选项")
public CommonResult<List<CrmCustomerSimpleRespVO>> getSimpleDeptList() {
CrmCustomerPageReqVO reqVO = new CrmCustomerPageReqVO();

View File

@@ -165,7 +165,7 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
// 2. 更新锁定状态
customerMapper.updateById(BeanUtils.toBean(lockReqVO, CrmCustomerDO.class));
// 3. 记录操作日志上下文
// 3. 记录操作日志上下文. tips: 因为这里使用的是老的状态所以记录时反着记录,也就是 lockStatus 为 true 那么就是解锁反之为锁定
LogRecordContext.putVariable("crmCustomer", customer);
}
@@ -301,7 +301,7 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
throw exception(CUSTOMER_IN_POOL, customer.getName());
}
// 负责人已存在
if (customer.getOwnerUserId() != null) {
if (!pool && customer.getOwnerUserId() != null) {
throw exception(CUSTOMER_OWNER_EXISTS, customer.getName());
}
}