Merge branch 'master-jdk21' of https://gitee.com/zhijiantianya/ruoyi-vue-pro
# Conflicts: # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java
This commit is contained in:
commit
ece338846a
|
@ -71,7 +71,7 @@ public class AreaUtils {
|
|||
* @param id 区域编号
|
||||
* @return 区域
|
||||
*/
|
||||
public static Area parseArea(Integer id) {
|
||||
public static Area getArea(Integer id) {
|
||||
return areas.get(id);
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ public class AreaUtils {
|
|||
*/
|
||||
public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) {
|
||||
for (int i = 0; i < Byte.MAX_VALUE; i++) {
|
||||
Area area = AreaUtils.parseArea(id);
|
||||
Area area = AreaUtils.getArea(id);
|
||||
if (area == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public class IPUtils {
|
|||
* @return 地区
|
||||
*/
|
||||
public static Area getArea(String ip) {
|
||||
return AreaUtils.parseArea(getAreaId(ip));
|
||||
return AreaUtils.getArea(getAreaId(ip));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,6 +82,6 @@ public class IPUtils {
|
|||
* @return 地区
|
||||
*/
|
||||
public static Area getArea(long ip) {
|
||||
return AreaUtils.parseArea(getAreaId(ip));
|
||||
return AreaUtils.getArea(getAreaId(ip));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class AreaUtilsTest {
|
|||
@Test
|
||||
public void testGetArea() {
|
||||
// 调用:北京
|
||||
Area area = AreaUtils.parseArea(110100);
|
||||
Area area = AreaUtils.getArea(110100);
|
||||
// 断言
|
||||
assertEquals(area.getId(), 110100);
|
||||
assertEquals(area.getName(), "北京市");
|
||||
|
|
|
@ -272,7 +272,7 @@ public class CrmCustomerController {
|
|||
List<KeyValue<ExcelColumn, List<String>>> selectMap = new ArrayList<>();
|
||||
// 获取地区下拉数据
|
||||
// TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么?
|
||||
Area area = AreaUtils.parseArea(Area.ID_CHINA);
|
||||
Area area = AreaUtils.getArea(Area.ID_CHINA);
|
||||
selectMap.add(new KeyValue<>(ExcelColumn.G, AreaUtils.getAreaNodePathList(area.getChildren())));
|
||||
// 获取客户所属行业
|
||||
List<String> customerIndustries = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY);
|
||||
|
|
|
@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseRespVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo;
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cn.iocoder.yudao.module.erp.service.stock;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO;
|
||||
import cn.iocoder.yudao.module.erp.dal.mysql.stock.ErpWarehouseMapper;
|
||||
|
|
|
@ -29,7 +29,7 @@ public class AreaController {
|
|||
@GetMapping("/tree")
|
||||
@Operation(summary = "获得地区树")
|
||||
public CommonResult<List<AreaNodeRespVO>> getAreaTree() {
|
||||
Area area = AreaUtils.parseArea(Area.ID_CHINA);
|
||||
Area area = AreaUtils.getArea(Area.ID_CHINA);
|
||||
Assert.notNull(area, "获取不到中国");
|
||||
return success(BeanUtils.toBean(area.getChildren(), AreaNodeRespVO.class));
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
|||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -24,7 +25,8 @@ public class RoleRespVO {
|
|||
@ExcelProperty("角色名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "ADMIN")
|
||||
@Schema(description = "角色标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "admin")
|
||||
@NotBlank(message = "角色标志不能为空")
|
||||
@ExcelProperty("角色标志")
|
||||
private String code;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class AppAreaController {
|
|||
@GetMapping("/tree")
|
||||
@Operation(summary = "获得地区树")
|
||||
public CommonResult<List<AppAreaNodeRespVO>> getAreaTree() {
|
||||
Area area = AreaUtils.parseArea(Area.ID_CHINA);
|
||||
Area area = AreaUtils.getArea(Area.ID_CHINA);
|
||||
Assert.notNull(area, "获取不到中国");
|
||||
return success(BeanUtils.toBean(area.getChildren(), AppAreaNodeRespVO.class));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue