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

@ -23,8 +23,8 @@ public interface LogRecordConstants {
String CRM_CUSTOMER_DELETE_SUCCESS = "删除了客户【{{#customerName}}】"; String CRM_CUSTOMER_DELETE_SUCCESS = "删除了客户【{{#customerName}}】";
String CRM_CUSTOMER_TRANSFER_SUB_TYPE = "转移客户"; String CRM_CUSTOMER_TRANSFER_SUB_TYPE = "转移客户";
String CRM_CUSTOMER_TRANSFER_SUCCESS = "将客户【{{#crmCustomer.name}}】的负责人从【{getAdminUserById{#crmCustomer.ownerUserId}}】变更为了【{getAdminUserById{#reqVO.newOwnerUserId}}】"; String CRM_CUSTOMER_TRANSFER_SUCCESS = "将客户【{{#crmCustomer.name}}】的负责人从【{getAdminUserById{#crmCustomer.ownerUserId}}】变更为了【{getAdminUserById{#reqVO.newOwnerUserId}}】";
String CRM_CUSTOMER_LOCK_SUB_TYPE = "{{#crmCustomer.lockStatus ? '客户' : '锁客户'}}"; String CRM_CUSTOMER_LOCK_SUB_TYPE = "{{#crmCustomer.lockStatus ? '锁客户' : '锁客户'}}";
String CRM_CUSTOMER_LOCK_SUCCESS = "{{#crmCustomer.lockStatus ? '将客户【' + #crmCustomer.name + '】' : '将客户【' + #crmCustomer.name + '】锁'}}"; String CRM_CUSTOMER_LOCK_SUCCESS = "{{#crmCustomer.lockStatus ? '将客户【' + #crmCustomer.name + '】锁' : '将客户【' + #crmCustomer.name + '】锁'}}";
String CRM_CUSTOMER_POOL_SUB_TYPE = "客户放入公海"; String CRM_CUSTOMER_POOL_SUB_TYPE = "客户放入公海";
String CRM_CUSTOMER_POOL_SUCCESS = "将客户【{{#customerName}}】放入了公海"; String CRM_CUSTOMER_POOL_SUCCESS = "将客户【{{#customerName}}】放入了公海";
String CRM_CUSTOMER_RECEIVE_SUB_TYPE = "{{#ownerUserName != null ? '分配客户' : '领取客户'}}"; String CRM_CUSTOMER_RECEIVE_SUB_TYPE = "{{#ownerUserName != null ? '分配客户' : '领取客户'}}";

View File

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

View File

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