Commit 4f6f132face8030590b657c2bf9985f2fc6dbe41
1 parent
bf720882
♻️ refactor(mes): 移除无用的客户列表接口和相关代码
清理不再使用的客户精简列表接口及其相关实现,优化代码结构,提升可维护性。
Showing
4 changed files
with
4 additions
and
28 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/client/MesMdClientController.java
| 1 | 1 | package cn.iocoder.yudao.module.mes.controller.admin.md.client; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
| 4 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | + | |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -32,7 +32,7 @@ import java.util.List; |
| 32 | 32 | |
| 33 | 33 | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| 34 | 34 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 35 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 35 | + | |
| 36 | 36 | |
| 37 | 37 | @Tag(name = "管理后台 - MES 客户") |
| 38 | 38 | @RestController |
| ... | ... | @@ -84,14 +84,6 @@ public class MesMdClientController { |
| 84 | 84 | return success(BeanUtils.toBean(pageResult, MesMdClientRespVO.class)); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - @GetMapping("/simple-list") | |
| 88 | - @Operation(summary = "获得客户精简列表", description = "只包含被开启的客户,主要用于前端的下拉选项") | |
| 89 | - public CommonResult<List<MesMdClientRespVO>> getClientSimpleList() { | |
| 90 | - List<MesMdClientDO> list = clientService.getClientListByStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 91 | - return success(convertList(list, client -> new MesMdClientRespVO() | |
| 92 | - .setId(client.getId()).setName(client.getName()).setCode(client.getCode()))); | |
| 93 | - } | |
| 94 | - | |
| 95 | 87 | @GetMapping("/export-excel") |
| 96 | 88 | @Operation(summary = "导出客户 Excel") |
| 97 | 89 | @PreAuthorize("@ss.hasPermission('mes:md-client:export')") | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/md/client/MesMdClientMapper.java
| ... | ... | @@ -7,7 +7,8 @@ import cn.iocoder.yudao.module.mes.controller.admin.md.client.vo.MesMdClientPage |
| 7 | 7 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.client.MesMdClientDO; |
| 8 | 8 | import org.apache.ibatis.annotations.Mapper; |
| 9 | 9 | |
| 10 | -import java.util.List; | |
| 10 | + | |
| 11 | + | |
| 11 | 12 | |
| 12 | 13 | /** |
| 13 | 14 | * MES 客户 Mapper |
| ... | ... | @@ -40,8 +41,4 @@ public interface MesMdClientMapper extends BaseMapperX<MesMdClientDO> { |
| 40 | 41 | return selectOne(MesMdClientDO::getNickname, nickname); |
| 41 | 42 | } |
| 42 | 43 | |
| 43 | - default List<MesMdClientDO> selectListByStatus(Integer status) { | |
| 44 | - return selectList(MesMdClientDO::getStatus, status); | |
| 45 | - } | |
| 46 | - | |
| 47 | 44 | } | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/client/MesMdClientService.java
| ... | ... | @@ -60,14 +60,6 @@ public interface MesMdClientService { |
| 60 | 60 | PageResult<MesMdClientDO> getClientPage(MesMdClientPageReqVO pageReqVO); |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | - * 获得指定状态的客户列表 | |
| 64 | - * | |
| 65 | - * @param status 状态 | |
| 66 | - * @return 客户列表 | |
| 67 | - */ | |
| 68 | - List<MesMdClientDO> getClientListByStatus(Integer status); | |
| 69 | - | |
| 70 | - /** | |
| 71 | 63 | * 获得客户列表 |
| 72 | 64 | * |
| 73 | 65 | * @param ids 编号列表 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/md/client/MesMdClientServiceImpl.java
| ... | ... | @@ -139,11 +139,6 @@ public class MesMdClientServiceImpl implements MesMdClientService { |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | @Override |
| 142 | - public List<MesMdClientDO> getClientListByStatus(Integer status) { | |
| 143 | - return clientMapper.selectListByStatus(status); | |
| 144 | - } | |
| 145 | - | |
| 146 | - @Override | |
| 147 | 142 | public List<MesMdClientDO> getClientList(Collection<Long> ids) { |
| 148 | 143 | if (CollUtil.isEmpty(ids)) { |
| 149 | 144 | return Collections.emptyList(); | ... | ... |