Commit d134bfc4a6133c4f5d0af89d808dbe617511d9ff
1 parent
2aade25e
✨ 进一步同步 boot 和 cloud 代码,移除多余无用的类
Showing
10 changed files
with
12 additions
and
13 deletions
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java
| @@ -71,7 +71,7 @@ public class AreaUtils { | @@ -71,7 +71,7 @@ public class AreaUtils { | ||
| 71 | * @param id 区域编号 | 71 | * @param id 区域编号 |
| 72 | * @return 区域 | 72 | * @return 区域 |
| 73 | */ | 73 | */ |
| 74 | - public static Area parseArea(Integer id) { | 74 | + public static Area getArea(Integer id) { |
| 75 | return areas.get(id); | 75 | return areas.get(id); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -193,7 +193,7 @@ public class AreaUtils { | @@ -193,7 +193,7 @@ public class AreaUtils { | ||
| 193 | */ | 193 | */ |
| 194 | public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) { | 194 | public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) { |
| 195 | for (int i = 0; i < Byte.MAX_VALUE; i++) { | 195 | for (int i = 0; i < Byte.MAX_VALUE; i++) { |
| 196 | - Area area = AreaUtils.parseArea(id); | 196 | + Area area = AreaUtils.getArea(id); |
| 197 | if (area == null) { | 197 | if (area == null) { |
| 198 | return null; | 198 | return null; |
| 199 | } | 199 | } |
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/IPUtils.java
| @@ -72,7 +72,7 @@ public class IPUtils { | @@ -72,7 +72,7 @@ public class IPUtils { | ||
| 72 | * @return 地区 | 72 | * @return 地区 |
| 73 | */ | 73 | */ |
| 74 | public static Area getArea(String ip) { | 74 | public static Area getArea(String ip) { |
| 75 | - return AreaUtils.parseArea(getAreaId(ip)); | 75 | + return AreaUtils.getArea(getAreaId(ip)); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| @@ -82,6 +82,6 @@ public class IPUtils { | @@ -82,6 +82,6 @@ public class IPUtils { | ||
| 82 | * @return 地区 | 82 | * @return 地区 |
| 83 | */ | 83 | */ |
| 84 | public static Area getArea(long ip) { | 84 | public static Area getArea(long ip) { |
| 85 | - return AreaUtils.parseArea(getAreaId(ip)); | 85 | + return AreaUtils.getArea(getAreaId(ip)); |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
yudao-framework/yudao-spring-boot-starter-biz-ip/src/test/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtilsTest.java
| @@ -17,7 +17,7 @@ public class AreaUtilsTest { | @@ -17,7 +17,7 @@ public class AreaUtilsTest { | ||
| 17 | @Test | 17 | @Test |
| 18 | public void testGetArea() { | 18 | public void testGetArea() { |
| 19 | // 调用:北京 | 19 | // 调用:北京 |
| 20 | - Area area = AreaUtils.parseArea(110100); | 20 | + Area area = AreaUtils.getArea(110100); |
| 21 | // 断言 | 21 | // 断言 |
| 22 | assertEquals(area.getId(), 110100); | 22 | assertEquals(area.getId(), 110100); |
| 23 | assertEquals(area.getName(), "北京市"); | 23 | assertEquals(area.getName(), "北京市"); |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java
| @@ -272,7 +272,7 @@ public class CrmCustomerController { | @@ -272,7 +272,7 @@ public class CrmCustomerController { | ||
| 272 | List<KeyValue<ExcelColumn, List<String>>> selectMap = new ArrayList<>(); | 272 | List<KeyValue<ExcelColumn, List<String>>> selectMap = new ArrayList<>(); |
| 273 | // 获取地区下拉数据 | 273 | // 获取地区下拉数据 |
| 274 | // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? | 274 | // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? |
| 275 | - Area area = AreaUtils.parseArea(Area.ID_CHINA); | 275 | + Area area = AreaUtils.getArea(Area.ID_CHINA); |
| 276 | selectMap.add(new KeyValue<>(ExcelColumn.G, AreaUtils.getAreaNodePathList(area.getChildren()))); | 276 | selectMap.add(new KeyValue<>(ExcelColumn.G, AreaUtils.getAreaNodePathList(area.getChildren()))); |
| 277 | // 获取客户所属行业 | 277 | // 获取客户所属行业 |
| 278 | List<String> customerIndustries = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); | 278 | List<String> customerIndustries = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java
| @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 10 | -import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO; | 10 | +import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; |
| 11 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; | 11 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; |
| 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseRespVO; | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseRespVO; |
| 13 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; | 13 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/vo/warehouse/ErpWarehouseSaveReqVO.java
| 1 | -package cn.iocoder.yudao.module.erp.controller.admin.stock.vo; | 1 | +package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | 3 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; | 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpWarehouseService.java
| 1 | package cn.iocoder.yudao.module.erp.service.stock; | 1 | package cn.iocoder.yudao.module.erp.service.stock; |
| 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.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO; | 4 | +import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; |
| 5 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; | 5 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; |
| 6 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; | 6 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; |
| 7 | import jakarta.validation.Valid; | 7 | import jakarta.validation.Valid; |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpWarehouseServiceImpl.java
| @@ -4,9 +4,8 @@ import cn.hutool.core.collection.CollUtil; | @@ -4,9 +4,8 @@ import cn.hutool.core.collection.CollUtil; | ||
| 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | -import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO; | 7 | +import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; |
| 8 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; | 8 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; |
| 9 | -import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpProductDO; | ||
| 10 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; | 9 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; |
| 11 | import cn.iocoder.yudao.module.erp.dal.mysql.stock.ErpWarehouseMapper; | 10 | import cn.iocoder.yudao.module.erp.dal.mysql.stock.ErpWarehouseMapper; |
| 12 | import jakarta.annotation.Resource; | 11 | import jakarta.annotation.Resource; |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/AreaController.java
| @@ -29,7 +29,7 @@ public class AreaController { | @@ -29,7 +29,7 @@ public class AreaController { | ||
| 29 | @GetMapping("/tree") | 29 | @GetMapping("/tree") |
| 30 | @Operation(summary = "获得地区树") | 30 | @Operation(summary = "获得地区树") |
| 31 | public CommonResult<List<AreaNodeRespVO>> getAreaTree() { | 31 | public CommonResult<List<AreaNodeRespVO>> getAreaTree() { |
| 32 | - Area area = AreaUtils.parseArea(Area.ID_CHINA); | 32 | + Area area = AreaUtils.getArea(Area.ID_CHINA); |
| 33 | Assert.notNull(area, "获取不到中国"); | 33 | Assert.notNull(area, "获取不到中国"); |
| 34 | return success(BeanUtils.toBean(area.getChildren(), AreaNodeRespVO.class)); | 34 | return success(BeanUtils.toBean(area.getChildren(), AreaNodeRespVO.class)); |
| 35 | } | 35 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/ip/AppAreaController.java
| @@ -26,7 +26,7 @@ public class AppAreaController { | @@ -26,7 +26,7 @@ public class AppAreaController { | ||
| 26 | @GetMapping("/tree") | 26 | @GetMapping("/tree") |
| 27 | @Operation(summary = "获得地区树") | 27 | @Operation(summary = "获得地区树") |
| 28 | public CommonResult<List<AppAreaNodeRespVO>> getAreaTree() { | 28 | public CommonResult<List<AppAreaNodeRespVO>> getAreaTree() { |
| 29 | - Area area = AreaUtils.parseArea(Area.ID_CHINA); | 29 | + Area area = AreaUtils.getArea(Area.ID_CHINA); |
| 30 | Assert.notNull(area, "获取不到中国"); | 30 | Assert.notNull(area, "获取不到中国"); |
| 31 | return success(BeanUtils.toBean(area.getChildren(), AppAreaNodeRespVO.class)); | 31 | return success(BeanUtils.toBean(area.getChildren(), AppAreaNodeRespVO.class)); |
| 32 | } | 32 | } |