Commit 36a51b68d93972bcb9693df02805ea04cb103c40

Authored by YunaiV
1 parent 6f882ca2

crm:code review 数据权限

yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java
... ... @@ -42,6 +42,7 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
42 42  
43 43 @Resource
44 44 private CrmPermissionService crmPermissionService;
  45 +
45 46 @Resource
46 47 private AdminUserApi adminUserApi;
47 48  
... ... @@ -101,7 +102,7 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
101 102 @Override
102 103 public PageResult<CrmCustomerDO> getCustomerPage(CrmCustomerPageReqVO pageReqVO, Long userId) {
103 104 boolean admin = false;
104   - if (admin) { // 1.1. 情况一: TODO 如果是管理员
  105 + if (admin) { // 1.1. 情况一: TODO 如果是管理员; TODO @puhui999:要不如果是超管,就复用 selectPage;
105 106 customerMapper.selectPageWithAdmin(pageReqVO, userId);
106 107 }
107 108 // 1.2. 情况二:获取当前用户能看的分页数据
... ... @@ -176,7 +177,7 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
176 177 @Override
177 178 @Transactional(rollbackFor = Exception.class)
178 179 public void receiveCustomer(List<Long> ids, Long ownerUserId) {
179   - // 1. 校验存在
  180 + // 1.1 校验存在
180 181 List<CrmCustomerDO> customers = customerMapper.selectBatchIds(ids);
181 182 if (customers.size() != ids.size()) {
182 183 throw exception(CUSTOMER_NOT_EXISTS);
... ...