diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java index 34d6288b..6e5800c1 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java @@ -55,14 +55,14 @@ public interface ILawsCommonService { * @Date: 2023/8/24 10:53 * @Description: 获取表单模型 **/ - Map getFormModel(String module, Integer type); + Map getFormModel(String module, String type); /** * @Author: liao * @Date: 2023/8/24 11:49 * @Description: 根据id和模块标识获取信息 **/ - Map getByIdAndModule(String id, String module, Integer type); + Map getByIdAndModule(String id, String module, String type); /** * @Author: liao diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index 5e00287a..d07b2192 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -440,7 +440,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { String id = (String) parameterMap.get(FieldCommon.ID); parameterMap.remove(FieldCommon.ID); // 获取数据库里没修改的数据 - Map oldDataMap = getByIdAndModule(id, module, 2); + Map oldDataMap = getByIdAndModule(id, module, "2"); // 组装更新内容 StringBuilder recordBuffer = new StringBuilder(); @@ -570,7 +570,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { * @Description: 获取表单模型 **/ @Override - public Map getFormModel(String module, Integer type) { + public Map getFormModel(String module, String type) { // 获取操作语言 LanguageEnum language = MessageUtils.getLanguage(); // 获取要操作的表名 @@ -578,7 +578,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { // 获取全部字段 List fieldList = lawsCommonMapper.getFieldList(tableName); // 筛选表单显示的字段 - if (1 == type) { + if ("1".equals(type)) { // 详情显示 fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue() .equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList()); @@ -621,7 +621,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { * @Description: 根据id和模块标识获取信息 **/ @Override - public Map getByIdAndModule(String id, String module, Integer type) { + public Map getByIdAndModule(String id, String module, String type) { if (StringUtils.isBlank(id)) { throw new JeroBootException(ResultCommon.EMPTY_COMMON, "id"); } @@ -630,7 +630,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { // 获取全部字段 List fieldList = lawsCommonMapper.getFieldList(tableName); // 筛选表单显示的字段(传id查表单) - if (1 == type) { + if ("1".equals(type)) { // 详情显示 fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue() .equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList()); diff --git a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsDomesticController.java b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsDomesticController.java index a22207eb..835104c0 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsDomesticController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsDomesticController.java @@ -88,7 +88,7 @@ public class LawsDomesticController { @AutoLog(value = "国内法规标准-获取表单模型") @ApiOperation(value="国内法规标准-获取表单模型", notes="国内法规标准-获取表单模型") @GetMapping(value = "getFormModel") - public Result> getFormModel(@RequestParam(name="type") Integer type) { + public Result> getFormModel(@RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type)); } @@ -96,7 +96,7 @@ public class LawsDomesticController { @ApiOperation(value="国内法规标准-根据id和模块标识获取信息", notes="国内法规标准-根据id和模块标识获取信息") @GetMapping(value = "getByIdAndModule") public Result> getByIdAndModule(@RequestParam(name="id") String id, - @RequestParam(name="type") Integer type) { + @RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type)); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java index 6caed6f3..777f1a8f 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java @@ -98,7 +98,7 @@ public class LawsEnterpriseController { @AutoLog(value = "企业法规标准-获取表单模型") @ApiOperation(value="企业法规标准-获取表单模型", notes="企业法规标准-获取表单模型") @GetMapping(value = "getFormModel") - public Result> getFormModel(@RequestParam(name="type") Integer type) { + public Result> getFormModel(@RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type)); } @@ -106,7 +106,7 @@ public class LawsEnterpriseController { @ApiOperation(value="企业法规标准-根据id和模块标识获取信息", notes="企业法规标准-根据id和模块标识获取信息") @GetMapping(value = "getByIdAndModule") public Result> getByIdAndModule(@RequestParam(name="id") String id, - @RequestParam(name="type") Integer type) { + @RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type)); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsOverseasController.java b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsOverseasController.java index f15cb422..4b4f5e88 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsOverseasController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsOverseasController.java @@ -89,7 +89,7 @@ public class LawsOverseasController { @AutoLog(value = "海外法规标准-获取表单模型") @ApiOperation(value="海外法规标准-获取表单模型", notes="海外法规标准-获取表单模型") @GetMapping(value = "getFormModel") - public Result> getFormModel(@RequestParam(name="type") Integer type) { + public Result> getFormModel(@RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type)); } @@ -97,7 +97,7 @@ public class LawsOverseasController { @ApiOperation(value="海外法规标准-根据id和模块标识获取信息", notes="海外法规标准-根据id和模块标识获取信息") @GetMapping(value = "getByIdAndModule") public Result> getByIdAndModule(@RequestParam(name="id") String id, - @RequestParam(name="type") Integer type) { + @RequestParam(name="type") String type) { return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type)); }