Commit 8c9c91f0ca4daed135a02a8fc0d19906449e1d35
1 parent
90f135ad
crm:code review 配置管理
Showing
29 changed files
with
50 additions
and
165 deletions
sql/mysql/crm_data.sql
| @@ -18,6 +18,3 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | @@ -18,6 +18,3 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | ||
| 18 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1399, 6, '支付宝', '6', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:38', '1', '2023-10-18 21:55:38', b'0'); | 18 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1399, 6, '支付宝', '6', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:38', '1', '2023-10-18 21:55:38', b'0'); |
| 19 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1400, 7, '微信支付', '7', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:53', '1', '2023-10-18 21:55:53', b'0'); | 19 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1400, 7, '微信支付', '7', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:55:53', '1', '2023-10-18 21:55:53', b'0'); |
| 20 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1401, 8, '其他', '8', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:56:06', '1', '2023-10-18 21:56:06', b'0'); | 20 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1401, 8, '其他', '8', 'crm_return_type', 0, 'default', '', '', '1', '2023-10-18 21:56:06', '1', '2023-10-18 21:56:06', b'0'); |
| 21 | - | ||
| 22 | - | ||
| 23 | -INSERT INTO `crm_customer_pool_config` (`id`, `enabled`, `contact_expire_days`, `deal_expire_days`, `notify_enabled`, `notify_days`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 1, 15, 30, 1, 3, '1', NOW(), '1', NOW(), b'0', 1); | ||
| 24 | \ No newline at end of file | 21 | \ No newline at end of file |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java
| @@ -5,8 +5,6 @@ import cn.hutool.core.util.NumberUtil; | @@ -5,8 +5,6 @@ import cn.hutool.core.util.NumberUtil; | ||
| 5 | import cn.hutool.core.util.ObjectUtil; | 5 | import cn.hutool.core.util.ObjectUtil; |
| 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 9 | -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | ||
| 10 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 11 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; | 9 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 12 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 10 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| @@ -35,6 +33,8 @@ import java.util.stream.Collectors; | @@ -35,6 +33,8 @@ import java.util.stream.Collectors; | ||
| 35 | import java.util.stream.Stream; | 33 | import java.util.stream.Stream; |
| 36 | 34 | ||
| 37 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 35 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 36 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | ||
| 37 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSetByFlatMap; | ||
| 38 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | 38 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
| 39 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 39 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 40 | 40 | ||
| @@ -46,6 +46,7 @@ public class CrmCustomerController { | @@ -46,6 +46,7 @@ public class CrmCustomerController { | ||
| 46 | 46 | ||
| 47 | @Resource | 47 | @Resource |
| 48 | private CrmCustomerService customerService; | 48 | private CrmCustomerService customerService; |
| 49 | + | ||
| 49 | @Resource | 50 | @Resource |
| 50 | private DeptApi deptApi; | 51 | private DeptApi deptApi; |
| 51 | @Resource | 52 | @Resource |
| @@ -103,11 +104,15 @@ public class CrmCustomerController { | @@ -103,11 +104,15 @@ public class CrmCustomerController { | ||
| 103 | @PreAuthorize("@ss.hasPermission('crm:customer:query')") | 104 | @PreAuthorize("@ss.hasPermission('crm:customer:query')") |
| 104 | public CommonResult<PageResult<CrmCustomerRespVO>> getCustomerPage(@Valid CrmCustomerPageReqVO pageVO) { | 105 | public CommonResult<PageResult<CrmCustomerRespVO>> getCustomerPage(@Valid CrmCustomerPageReqVO pageVO) { |
| 105 | PageResult<CrmCustomerDO> pageResult = customerService.getCustomerPage(pageVO); | 106 | PageResult<CrmCustomerDO> pageResult = customerService.getCustomerPage(pageVO); |
| 106 | - Set<Long> userSet = CollectionUtils.convertSetByFlatMap(pageResult.getList(), i -> Stream.of(NumberUtil.parseLong(i.getCreator()), i.getOwnerUserId())); | ||
| 107 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userSet); | ||
| 108 | - Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(userMap.values().stream().map(AdminUserRespDTO::getDeptId).collect(Collectors.toSet())); | ||
| 109 | - PageResult<CrmCustomerRespVO> pageVo = CrmCustomerConvert.INSTANCE.convertPage(pageResult, userMap, deptMap); | ||
| 110 | - return success(pageVo); | 107 | + if (CollUtil.isEmpty(pageResult.getList())) { |
| 108 | + return success(PageResult.empty(pageResult.getTotal())); | ||
| 109 | + } | ||
| 110 | + // 拼接数据 | ||
| 111 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( | ||
| 112 | + convertSetByFlatMap(pageResult.getList(), user -> Stream.of(NumberUtil.parseLong(user.getCreator()), user.getOwnerUserId()))); | ||
| 113 | + Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap( | ||
| 114 | + convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); | ||
| 115 | + return success(CrmCustomerConvert.INSTANCE.convertPage(pageResult, userMap, deptMap)); | ||
| 111 | } | 116 | } |
| 112 | 117 | ||
| 113 | @GetMapping("/export-excel") | 118 | @GetMapping("/export-excel") |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerLimitConfigController.java
| 1 | package cn.iocoder.yudao.module.crm.controller.admin.customer; | 1 | package cn.iocoder.yudao.module.crm.controller.admin.customer; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.collection.CollUtil; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; | 6 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigPageReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigPageReqVO; |
| 8 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigRespVO; | 8 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigRespVO; |
| 9 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigUpdateReqVO; | 9 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigUpdateReqVO; |
| 10 | -import cn.iocoder.yudao.module.crm.convert.customerlimitconfig.CrmCustomerLimitConfigConvert; | 10 | +import cn.iocoder.yudao.module.crm.convert.customer.CrmCustomerLimitConfigConvert; |
| 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.customerlimitconfig.CrmCustomerLimitConfigDO; | 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.customerlimitconfig.CrmCustomerLimitConfigDO; |
| 12 | import cn.iocoder.yudao.module.crm.service.customerlimitconfig.CrmCustomerLimitConfigService; | 12 | import cn.iocoder.yudao.module.crm.service.customerlimitconfig.CrmCustomerLimitConfigService; |
| 13 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; | 13 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; |
| @@ -24,12 +24,10 @@ import org.springframework.web.bind.annotation.*; | @@ -24,12 +24,10 @@ import org.springframework.web.bind.annotation.*; | ||
| 24 | import javax.annotation.Resource; | 24 | import javax.annotation.Resource; |
| 25 | import javax.validation.Valid; | 25 | import javax.validation.Valid; |
| 26 | import java.util.Collection; | 26 | import java.util.Collection; |
| 27 | -import java.util.HashSet; | ||
| 28 | import java.util.Map; | 27 | import java.util.Map; |
| 29 | -import java.util.Set; | ||
| 30 | -import java.util.stream.Collectors; | ||
| 31 | 28 | ||
| 32 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSetByFlatMap; | ||
| 33 | 31 | ||
| 34 | @Tag(name = "管理后台 - 客户限制配置") | 32 | @Tag(name = "管理后台 - 客户限制配置") |
| 35 | @RestController | 33 | @RestController |
| @@ -39,6 +37,7 @@ public class CrmCustomerLimitConfigController { | @@ -39,6 +37,7 @@ public class CrmCustomerLimitConfigController { | ||
| 39 | 37 | ||
| 40 | @Resource | 38 | @Resource |
| 41 | private CrmCustomerLimitConfigService customerLimitConfigService; | 39 | private CrmCustomerLimitConfigService customerLimitConfigService; |
| 40 | + | ||
| 42 | @Resource | 41 | @Resource |
| 43 | private DeptApi deptApi; | 42 | private DeptApi deptApi; |
| 44 | @Resource | 43 | @Resource |
| @@ -74,8 +73,9 @@ public class CrmCustomerLimitConfigController { | @@ -74,8 +73,9 @@ public class CrmCustomerLimitConfigController { | ||
| 74 | @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:query')") | 73 | @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:query')") |
| 75 | public CommonResult<CrmCustomerLimitConfigRespVO> getCustomerLimitConfig(@RequestParam("id") Long id) { | 74 | public CommonResult<CrmCustomerLimitConfigRespVO> getCustomerLimitConfig(@RequestParam("id") Long id) { |
| 76 | CrmCustomerLimitConfigDO customerLimitConfig = customerLimitConfigService.getCustomerLimitConfig(id); | 75 | CrmCustomerLimitConfigDO customerLimitConfig = customerLimitConfigService.getCustomerLimitConfig(id); |
| 77 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(new HashSet<>(customerLimitConfig.getUserIds())); | ||
| 78 | - Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(new HashSet<>(customerLimitConfig.getDeptIds())); | 76 | + // 拼接数据 |
| 77 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(customerLimitConfig.getUserIds()); | ||
| 78 | + Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(customerLimitConfig.getDeptIds()); | ||
| 79 | return success(CrmCustomerLimitConfigConvert.INSTANCE.convert(customerLimitConfig, userMap, deptMap)); | 79 | return success(CrmCustomerLimitConfigConvert.INSTANCE.convert(customerLimitConfig, userMap, deptMap)); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| @@ -84,10 +84,14 @@ public class CrmCustomerLimitConfigController { | @@ -84,10 +84,14 @@ public class CrmCustomerLimitConfigController { | ||
| 84 | @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:query')") | 84 | @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:query')") |
| 85 | public CommonResult<PageResult<CrmCustomerLimitConfigRespVO>> getCustomerLimitConfigPage(@Valid CrmCustomerLimitConfigPageReqVO pageVO) { | 85 | public CommonResult<PageResult<CrmCustomerLimitConfigRespVO>> getCustomerLimitConfigPage(@Valid CrmCustomerLimitConfigPageReqVO pageVO) { |
| 86 | PageResult<CrmCustomerLimitConfigDO> pageResult = customerLimitConfigService.getCustomerLimitConfigPage(pageVO); | 86 | PageResult<CrmCustomerLimitConfigDO> pageResult = customerLimitConfigService.getCustomerLimitConfigPage(pageVO); |
| 87 | - Set<Long> userIds = CollectionUtils.convertSetByFlatMap(pageResult.getList(), CrmCustomerLimitConfigDO::getUserIds, Collection::stream); | ||
| 88 | - Set<Long> deptIds = CollectionUtils.convertSetByFlatMap(pageResult.getList(), CrmCustomerLimitConfigDO::getDeptIds, Collection::stream); | ||
| 89 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userIds); | ||
| 90 | - Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(deptIds); | 87 | + if (CollUtil.isEmpty(pageResult.getList())) { |
| 88 | + return success(PageResult.empty(pageResult.getTotal())); | ||
| 89 | + } | ||
| 90 | + // 拼接数据 | ||
| 91 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( | ||
| 92 | + convertSetByFlatMap(pageResult.getList(), CrmCustomerLimitConfigDO::getUserIds, Collection::stream)); | ||
| 93 | + Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap( | ||
| 94 | + convertSetByFlatMap(pageResult.getList(), CrmCustomerLimitConfigDO::getDeptIds, Collection::stream)); | ||
| 91 | return success(CrmCustomerLimitConfigConvert.INSTANCE.convertPage(pageResult, userMap, deptMap)); | 95 | return success(CrmCustomerLimitConfigConvert.INSTANCE.convertPage(pageResult, userMap, deptMap)); |
| 92 | } | 96 | } |
| 93 | 97 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerPoolConfigController.java
| @@ -34,6 +34,7 @@ public class CrmCustomerPoolConfigController { | @@ -34,6 +34,7 @@ public class CrmCustomerPoolConfigController { | ||
| 34 | return success(CrmCustomerConvert.INSTANCE.convert(customerPoolConfig)); | 34 | return success(CrmCustomerConvert.INSTANCE.convert(customerPoolConfig)); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | + // TODO @wanwan:这个请求,搞成 save 哈; | ||
| 37 | @PutMapping("/update") | 38 | @PutMapping("/update") |
| 38 | @Operation(summary = "更新客户公海规则设置") | 39 | @Operation(summary = "更新客户公海规则设置") |
| 39 | @PreAuthorize("@ss.hasPermission('crm:customer-pool-config:update')") | 40 | @PreAuthorize("@ss.hasPermission('crm:customer-pool-config:update')") |
| @@ -41,4 +42,5 @@ public class CrmCustomerPoolConfigController { | @@ -41,4 +42,5 @@ public class CrmCustomerPoolConfigController { | ||
| 41 | customerPoolConfigService.updateCustomerPoolConfig(updateReqVO); | 42 | customerPoolConfigService.updateCustomerPoolConfig(updateReqVO); |
| 42 | return success(true); | 43 | return success(true); |
| 43 | } | 44 | } |
| 45 | + | ||
| 44 | } | 46 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerLimitConfigBaseVO.java
| @@ -6,6 +6,7 @@ import lombok.Data; | @@ -6,6 +6,7 @@ import lombok.Data; | ||
| 6 | import javax.validation.constraints.NotNull; | 6 | import javax.validation.constraints.NotNull; |
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | 8 | ||
| 9 | +// TODO @wanwan:vo 下,可以新建一个 limitconfig,放它的 vo; | ||
| 9 | /** | 10 | /** |
| 10 | * 客户限制配置 Base VO,提供给添加、修改、详细的子 VO 使用 | 11 | * 客户限制配置 Base VO,提供给添加、修改、详细的子 VO 使用 |
| 11 | * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | 12 | * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerPoolConfigBaseVO.java
| @@ -12,6 +12,7 @@ import javax.validation.constraints.NotNull; | @@ -12,6 +12,7 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 12 | @Data |
| 13 | public class CrmCustomerPoolConfigBaseVO { | 13 | public class CrmCustomerPoolConfigBaseVO { |
| 14 | 14 | ||
| 15 | + // TODO @wanwan:参数校验 | ||
| 15 | @Schema(description = "是否启用客户公海", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") | 16 | @Schema(description = "是否启用客户公海", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 16 | @NotNull(message = "是否启用客户公海不能为空") | 17 | @NotNull(message = "是否启用客户公海不能为空") |
| 17 | private Boolean enabled; | 18 | private Boolean enabled; |
| @@ -27,4 +28,5 @@ public class CrmCustomerPoolConfigBaseVO { | @@ -27,4 +28,5 @@ public class CrmCustomerPoolConfigBaseVO { | ||
| 27 | 28 | ||
| 28 | @Schema(description = "提前提醒天数", example = "2") | 29 | @Schema(description = "提前提醒天数", example = "2") |
| 29 | private Integer notifyDays; | 30 | private Integer notifyDays; |
| 31 | + | ||
| 30 | } | 32 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerPoolConfigRespVO.java
| @@ -5,6 +5,7 @@ import lombok.Data; | @@ -5,6 +5,7 @@ import lombok.Data; | ||
| 5 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 6 | import lombok.ToString; | 6 | import lombok.ToString; |
| 7 | 7 | ||
| 8 | +// TODO @wanwan:vo 下,可以新建一个 poolconfig,放它的 vo; | ||
| 8 | @Schema(description = "管理后台 - CRM 客户公海规则 Response VO") | 9 | @Schema(description = "管理后台 - CRM 客户公海规则 Response VO") |
| 9 | @Data | 10 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 11 | @EqualsAndHashCode(callSuper = true) |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/customer/CrmCustomerConvert.java
| 1 | package cn.iocoder.yudao.module.crm.convert.customer; | 1 | package cn.iocoder.yudao.module.crm.convert.customer; |
| 2 | 2 | ||
| 3 | -import cn.hutool.core.lang.tree.Node; | ||
| 4 | import cn.hutool.core.util.NumberUtil; | 3 | import cn.hutool.core.util.NumberUtil; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | 5 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| @@ -18,8 +17,6 @@ import org.mapstruct.factory.Mappers; | @@ -18,8 +17,6 @@ import org.mapstruct.factory.Mappers; | ||
| 18 | 17 | ||
| 19 | import java.util.List; | 18 | import java.util.List; |
| 20 | import java.util.Map; | 19 | import java.util.Map; |
| 21 | -import java.util.Objects; | ||
| 22 | -import java.util.Optional; | ||
| 23 | 20 | ||
| 24 | /** | 21 | /** |
| 25 | * 客户 Convert | 22 | * 客户 Convert |
| @@ -65,4 +62,5 @@ public interface CrmCustomerConvert { | @@ -65,4 +62,5 @@ public interface CrmCustomerConvert { | ||
| 65 | CrmCustomerPoolConfigRespVO convert(CrmCustomerPoolConfigDO customerPoolConfig); | 62 | CrmCustomerPoolConfigRespVO convert(CrmCustomerPoolConfigDO customerPoolConfig); |
| 66 | 63 | ||
| 67 | CrmCustomerPoolConfigDO convert(CrmCustomerPoolConfigUpdateReqVO updateReqVO); | 64 | CrmCustomerPoolConfigDO convert(CrmCustomerPoolConfigUpdateReqVO updateReqVO); |
| 65 | + | ||
| 68 | } | 66 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/customerlimitconfig/CrmCustomerLimitConfigConvert.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/customer/CrmCustomerLimitConfigConvert.java
| 1 | -package cn.iocoder.yudao.module.crm.convert.customerlimitconfig; | 1 | +package cn.iocoder.yudao.module.crm.convert.customer; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; |
| @@ -57,9 +57,11 @@ public interface CrmCustomerLimitConfigConvert { | @@ -57,9 +57,11 @@ public interface CrmCustomerLimitConfigConvert { | ||
| 57 | * @param respVo 响应实体 | 57 | * @param respVo 响应实体 |
| 58 | */ | 58 | */ |
| 59 | static void fillNameField(Map<Long, AdminUserRespDTO> userMap, Map<Long, DeptRespDTO> deptMap, CrmCustomerLimitConfigRespVO respVo) { | 59 | static void fillNameField(Map<Long, AdminUserRespDTO> userMap, Map<Long, DeptRespDTO> deptMap, CrmCustomerLimitConfigRespVO respVo) { |
| 60 | + // TODO wanwan:返回 list,具体怎么拼接叫给前端; | ||
| 60 | respVo.setUserNames(respVo.getUserIds().stream().map(userMap::get) | 61 | respVo.setUserNames(respVo.getUserIds().stream().map(userMap::get) |
| 61 | .filter(Objects::nonNull).map(AdminUserRespDTO::getNickname).collect(Collectors.joining(","))); | 62 | .filter(Objects::nonNull).map(AdminUserRespDTO::getNickname).collect(Collectors.joining(","))); |
| 62 | respVo.setDeptNames(respVo.getDeptIds().stream().map(deptMap::get) | 63 | respVo.setDeptNames(respVo.getDeptIds().stream().map(deptMap::get) |
| 63 | .filter(Objects::nonNull).map(DeptRespDTO::getName).collect(Collectors.joining(","))); | 64 | .filter(Objects::nonNull).map(DeptRespDTO::getName).collect(Collectors.joining(","))); |
| 64 | } | 65 | } |
| 66 | + | ||
| 65 | } | 67 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/customer/CrmCustomerPoolConfigDO.java
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/customer/package-info.java deleted
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/customerlimitconfig/CrmCustomerLimitConfigDO.java
| @@ -32,6 +32,8 @@ public class CrmCustomerLimitConfigDO extends BaseDO { | @@ -32,6 +32,8 @@ public class CrmCustomerLimitConfigDO extends BaseDO { | ||
| 32 | private Long id; | 32 | private Long id; |
| 33 | /** | 33 | /** |
| 34 | * 规则类型 | 34 | * 规则类型 |
| 35 | + * | ||
| 36 | + * TODO @wanwan:搞个枚举哈; | ||
| 35 | */ | 37 | */ |
| 36 | private Integer type; | 38 | private Integer type; |
| 37 | /** | 39 | /** |
| @@ -49,7 +51,9 @@ public class CrmCustomerLimitConfigDO extends BaseDO { | @@ -49,7 +51,9 @@ public class CrmCustomerLimitConfigDO extends BaseDO { | ||
| 49 | */ | 51 | */ |
| 50 | private Integer maxCount; | 52 | private Integer maxCount; |
| 51 | /** | 53 | /** |
| 52 | - * 成交客户是否占有拥有客户数(当 type = 1 时) | 54 | + * 成交客户是否占有拥有客户数 |
| 55 | + * | ||
| 56 | + * 当且仅当 {@link #type} 为 1 时,进行使用 | ||
| 53 | */ | 57 | */ |
| 54 | private Boolean dealCountEnabled; | 58 | private Boolean dealCountEnabled; |
| 55 | 59 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerPoolConfigService.java
| @@ -25,4 +25,5 @@ public interface CrmCustomerPoolConfigService { | @@ -25,4 +25,5 @@ public interface CrmCustomerPoolConfigService { | ||
| 25 | * @param saveReqVO 更新信息 | 25 | * @param saveReqVO 更新信息 |
| 26 | */ | 26 | */ |
| 27 | void updateCustomerPoolConfig(@Valid CrmCustomerPoolConfigUpdateReqVO saveReqVO); | 27 | void updateCustomerPoolConfig(@Valid CrmCustomerPoolConfigUpdateReqVO saveReqVO); |
| 28 | + | ||
| 28 | } | 29 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerPoolConfigServiceImpl.java
| @@ -44,6 +44,7 @@ public class CrmCustomerPoolConfigServiceImpl implements CrmCustomerPoolConfigSe | @@ -44,6 +44,7 @@ public class CrmCustomerPoolConfigServiceImpl implements CrmCustomerPoolConfigSe | ||
| 44 | */ | 44 | */ |
| 45 | @Override | 45 | @Override |
| 46 | public void updateCustomerPoolConfig(CrmCustomerPoolConfigUpdateReqVO saveReqVO) { | 46 | public void updateCustomerPoolConfig(CrmCustomerPoolConfigUpdateReqVO saveReqVO) { |
| 47 | + // TODO @wanwan:看下 @AssertTrue 的逻辑; | ||
| 47 | if (BooleanUtil.isTrue(saveReqVO.getEnabled()) && (ObjectUtil.hasNull(saveReqVO.getContactExpireDays(), saveReqVO.getDealExpireDays()))) { | 48 | if (BooleanUtil.isTrue(saveReqVO.getEnabled()) && (ObjectUtil.hasNull(saveReqVO.getContactExpireDays(), saveReqVO.getDealExpireDays()))) { |
| 48 | throw exception(CUSTOMER_POOL_CONFIG_ERROR); | 49 | throw exception(CUSTOMER_POOL_CONFIG_ERROR); |
| 49 | } | 50 | } |
| @@ -60,4 +61,5 @@ public class CrmCustomerPoolConfigServiceImpl implements CrmCustomerPoolConfigSe | @@ -60,4 +61,5 @@ public class CrmCustomerPoolConfigServiceImpl implements CrmCustomerPoolConfigSe | ||
| 60 | // 不存在,则进行插入 | 61 | // 不存在,则进行插入 |
| 61 | customerPoolConfigMapper.insert(CrmCustomerConvert.INSTANCE.convert(saveReqVO)); | 62 | customerPoolConfigMapper.insert(CrmCustomerConvert.INSTANCE.convert(saveReqVO)); |
| 62 | } | 63 | } |
| 64 | + | ||
| 63 | } | 65 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customerlimitconfig/CrmCustomerLimitConfigServiceImpl.java
| @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigPageReqVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigPageReqVO; |
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigUpdateReqVO; | 6 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerLimitConfigUpdateReqVO; |
| 7 | -import cn.iocoder.yudao.module.crm.convert.customerlimitconfig.CrmCustomerLimitConfigConvert; | 7 | +import cn.iocoder.yudao.module.crm.convert.customer.CrmCustomerLimitConfigConvert; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customerlimitconfig.CrmCustomerLimitConfigDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customerlimitconfig.CrmCustomerLimitConfigDO; |
| 9 | import cn.iocoder.yudao.module.crm.dal.mysql.customerlimitconfig.CrmCustomerLimitConfigMapper; | 9 | import cn.iocoder.yudao.module.crm.dal.mysql.customerlimitconfig.CrmCustomerLimitConfigMapper; |
| 10 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; | 10 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/business/CrmBusinessMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.business.CrmBusinessMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/businessstatustype/CrmBusinessStatusTypeMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.businessstatustype.CrmBusinessStatusTypeMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/clue/CrmClueMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.clue.CrmClueMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/contact/ContactMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.contact.ContactMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/customer/CrmCustomerMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.customer.CrmCustomerMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/customer/CrmCustomerPoolConfigMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.customer.CrmCustomerPoolConfigMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/customerlimitconfig/CrmCustomerLimitConfigMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.customerlimitconfig.CrmCustomerLimitConfigMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/product/ProductMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.product.ProductMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/productcategory/ProductCategoryMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.productcategory.ProductCategoryMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/CrmReceivableMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivableMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/CrmReceivablePlanMapper.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivablePlanMapper"> | ||
| 4 | - | ||
| 5 | - <!-- | ||
| 6 | - 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | ||
| 7 | - 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | ||
| 8 | - 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | ||
| 9 | - 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | ||
| 10 | - --> | ||
| 11 | - | ||
| 12 | -</mapper> |
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/customerlimitconfig/CrmCustomerLimitConfigServiceImplTest.java
| @@ -20,6 +20,7 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | @@ -20,6 +20,7 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | ||
| 20 | import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.CUSTOMER_LIMIT_CONFIG_NOT_EXISTS; | 20 | import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.CUSTOMER_LIMIT_CONFIG_NOT_EXISTS; |
| 21 | import static org.junit.jupiter.api.Assertions.*; | 21 | import static org.junit.jupiter.api.Assertions.*; |
| 22 | 22 | ||
| 23 | +// TODO 芋艿:单测后面搞 | ||
| 23 | /** | 24 | /** |
| 24 | * {@link CrmCustomerLimitConfigServiceImpl} 的单元测试类 | 25 | * {@link CrmCustomerLimitConfigServiceImpl} 的单元测试类 |
| 25 | * | 26 | * |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
| @@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; | @@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; | ||
| 6 | import java.util.Collection; | 6 | import java.util.Collection; |
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | import java.util.Map; | 8 | import java.util.Map; |
| 9 | -import java.util.Set; | ||
| 10 | 9 | ||
| 11 | /** | 10 | /** |
| 12 | * 部门 API 接口 | 11 | * 部门 API 接口 |
| @@ -46,7 +45,7 @@ public interface DeptApi { | @@ -46,7 +45,7 @@ public interface DeptApi { | ||
| 46 | * @param ids 部门编号数组 | 45 | * @param ids 部门编号数组 |
| 47 | * @return 部门 Map | 46 | * @return 部门 Map |
| 48 | */ | 47 | */ |
| 49 | - default Map<Long, DeptRespDTO> getDeptMap(Set<Long> ids) { | 48 | + default Map<Long, DeptRespDTO> getDeptMap(Collection<Long> ids) { |
| 50 | List<DeptRespDTO> list = getDeptList(ids); | 49 | List<DeptRespDTO> list = getDeptList(ids); |
| 51 | return CollectionUtils.convertMap(list, DeptRespDTO::getId); | 50 | return CollectionUtils.convertMap(list, DeptRespDTO::getId); |
| 52 | } | 51 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java
| @@ -109,6 +109,7 @@ public class UserController { | @@ -109,6 +109,7 @@ public class UserController { | ||
| 109 | return success(new PageResult<>(userList, pageResult.getTotal())); | 109 | return success(new PageResult<>(userList, pageResult.getTotal())); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | + // TODO @芋艿:看看这里怎么统一调整下;客户的选择组件; | ||
| 112 | @GetMapping("/all") | 113 | @GetMapping("/all") |
| 113 | @Operation(summary = "查询所有用户列表") | 114 | @Operation(summary = "查询所有用户列表") |
| 114 | public CommonResult<List<UserPageItemRespVO>> getAllUser() { | 115 | public CommonResult<List<UserPageItemRespVO>> getAllUser() { |