From b5461281830016c00f33319c4711593aea3a0075 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 12 Nov 2024 19:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/device/controller/PqDevController.java | 8 ++++---- .../device/device/pojo/param/PqDevParam.java | 6 +++--- .../device/device/service/IPqDevService.java | 6 +++--- .../device/service/impl/PqDevServiceImpl.java | 6 +++--- .../dictionary/controller/DictDataController.java | 6 +++--- .../dictionary/controller/DictPqController.java | 4 ++-- .../dictionary/controller/DictTreeController.java | 2 +- .../dictionary/controller/DictTypeController.java | 6 +++--- .../dictionary/pojo/param/DictDataParam.java | 15 ++------------- .../system/dictionary/pojo/param/DictPqParam.java | 4 ++-- .../dictionary/pojo/param/DictTreeParam.java | 2 +- .../dictionary/pojo/param/DictTypeParam.java | 4 ++-- .../dictionary/service/IDictDataService.java | 6 +++--- .../system/dictionary/service/IDictPqService.java | 8 ++++++-- .../dictionary/service/IDictTreeService.java | 2 +- .../dictionary/service/IDictTypeService.java | 6 +++--- .../service/impl/DictDataServiceImpl.java | 10 +++++----- .../service/impl/DictPqServiceImpl.java | 8 ++++---- .../service/impl/DictTreeServiceImpl.java | 4 ++-- .../service/impl/DictTypeServiceImpl.java | 10 +++++----- 20 files changed, 58 insertions(+), 65 deletions(-) diff --git a/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java b/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java index 96579570..2f0cd157 100644 --- a/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java +++ b/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java @@ -51,7 +51,7 @@ public class PqDevController extends BaseController { @PostMapping("/list") @ApiOperation("分页查询被检设备") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public HttpResult> list(@RequestBody @Validated PqDevParam.PqDevQueryParam queryParam) { + public HttpResult> list(@RequestBody @Validated PqDevParam.QueryParam queryParam) { String methodDescribe = getMethodDescribe("list"); LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam); Page result = pqDevService.listPqDevs(queryParam); @@ -77,7 +77,7 @@ public class PqDevController extends BaseController { @PutMapping("/update") @ApiOperation("修改被检设备") @ApiImplicitParam(name = "updateParam", value = "被检设备", required = true) - public HttpResult update(@RequestBody @Validated PqDevParam.PqDevUpdateParam updateParam) { + public HttpResult update(@RequestBody @Validated PqDevParam.UpdateParam updateParam) { String methodDescribe = getMethodDescribe("update"); LogUtil.njcnDebug(log, "{},修改数据为:{}", methodDescribe, updateParam); boolean result = pqDevService.updatePqDev(updateParam); @@ -143,7 +143,7 @@ public class PqDevController extends BaseController { @PostMapping("/export") @ApiOperation("导出被检设备数据") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public void export(@RequestBody @Validated PqDevParam.PqDevQueryParam queryParam) { + public void export(@RequestBody @Validated PqDevParam.QueryParam queryParam) { pqDevService.exportPqDevData(queryParam); } @@ -175,7 +175,7 @@ public class PqDevController extends BaseController { @ApiImplicitParam(name = "planId", value = "计划id", required = true), @ApiImplicitParam(name = "pqDevId", value = "被检设备id", required = true) }) - public HttpResult bindPlan(@RequestBody @Validated PqDevParam.PqDevBindPlanParam bindPlanParam) { + public HttpResult bindPlan(@RequestBody @Validated PqDevParam.BindPlanParam bindPlanParam) { String methodDescribe = getMethodDescribe("bindPlan"); LogUtil.njcnDebug(log, "{},绑定计划数据为:planId={}, pqDevId={}", methodDescribe, bindPlanParam.getPlanId(), String.join(StrUtil.COMMA, bindPlanParam.getPqDevIds())); boolean result = pqDevService.bindPlan(bindPlanParam.getPlanId(), bindPlanParam.getPqDevIds()); diff --git a/device/src/main/java/com/njcn/gather/device/device/pojo/param/PqDevParam.java b/device/src/main/java/com/njcn/gather/device/device/pojo/param/PqDevParam.java index f5589d48..16f17dff 100644 --- a/device/src/main/java/com/njcn/gather/device/device/pojo/param/PqDevParam.java +++ b/device/src/main/java/com/njcn/gather/device/device/pojo/param/PqDevParam.java @@ -133,7 +133,7 @@ public class PqDevParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class PqDevUpdateParam extends PqDevParam { + public static class UpdateParam extends PqDevParam { @ApiModelProperty("id") @NotBlank(message = DeviceValidMessage.ID_NOT_BLANK) @@ -147,7 +147,7 @@ public class PqDevParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class PqDevQueryParam extends BaseParam { + public static class QueryParam extends BaseParam { @ApiModelProperty("名称") @Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DeviceValidMessage.NAME_FORMAT_ERROR) private String name; @@ -157,7 +157,7 @@ public class PqDevParam { } @Data - public static class PqDevBindPlanParam { + public static class BindPlanParam { @ApiModelProperty("planId") @NotNull(message = DeviceValidMessage.PLAN_ID_NOT_NULL) @Pattern(regexp = PatternRegex.SYSTEM_ID, message = DeviceValidMessage.ID_FORMAT_ERROR) diff --git a/device/src/main/java/com/njcn/gather/device/device/service/IPqDevService.java b/device/src/main/java/com/njcn/gather/device/device/service/IPqDevService.java index 3dbec517..76e0b6cc 100644 --- a/device/src/main/java/com/njcn/gather/device/device/service/IPqDevService.java +++ b/device/src/main/java/com/njcn/gather/device/device/service/IPqDevService.java @@ -20,7 +20,7 @@ public interface IPqDevService extends IService { * @param queryParam 查询参数 * @return 分页数据,包含被检设备列表 */ - Page listPqDevs(PqDevParam.PqDevQueryParam queryParam); + Page listPqDevs(PqDevParam.QueryParam queryParam); /** * 新增被检设备信息 @@ -36,7 +36,7 @@ public interface IPqDevService extends IService { * @param updateParam 被检设备信息 * @return 修改成功返回true,否则返回false */ - boolean updatePqDev(PqDevParam.PqDevUpdateParam updateParam); + boolean updatePqDev(PqDevParam.UpdateParam updateParam); /** * 删除被检设备信息 @@ -63,7 +63,7 @@ public interface IPqDevService extends IService { * * @param queryParam 查询参数 */ - void exportPqDevData(PqDevParam.PqDevQueryParam queryParam); + void exportPqDevData(PqDevParam.QueryParam queryParam); /** diff --git a/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java b/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java index 30d8992d..a61735d9 100644 --- a/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java +++ b/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java @@ -35,7 +35,7 @@ import java.util.stream.Collectors; public class PqDevServiceImpl extends ServiceImpl implements IPqDevService { @Override - public Page listPqDevs(PqDevParam.PqDevQueryParam queryParam) { + public Page listPqDevs(PqDevParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "pq_dev.name", queryParam.getName()) @@ -71,7 +71,7 @@ public class PqDevServiceImpl extends ServiceImpl implements } @Override - public boolean updatePqDev(PqDevParam.PqDevUpdateParam updateParam) { + public boolean updatePqDev(PqDevParam.UpdateParam updateParam) { PqDev pqDev = new PqDev(); BeanUtil.copyProperties(updateParam, pqDev); if (Objects.nonNull(pqDev.getSeries())) { @@ -113,7 +113,7 @@ public class PqDevServiceImpl extends ServiceImpl implements } @Override - public void exportPqDevData(PqDevParam.PqDevQueryParam queryParam) { + public void exportPqDevData(PqDevParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "pq_dev.name", queryParam.getName()) diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictDataController.java b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictDataController.java index 530b00ce..a1288f35 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictDataController.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictDataController.java @@ -48,7 +48,7 @@ public class DictDataController extends BaseController { @PostMapping("/listByTypeId") @ApiOperation("根据字典类型id查询字典数据") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public HttpResult> listByTypeId(@RequestBody @Validated DictDataParam.DicTypeIdQueryParam queryParam) { + public HttpResult> listByTypeId(@RequestBody @Validated DictDataParam.QueryParam queryParam) { String methodDescribe = getMethodDescribe("listByTypeId"); LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam); Page result = dictDataService.getDictDataByTypeId(queryParam); @@ -82,7 +82,7 @@ public class DictDataController extends BaseController { @PutMapping("/update") @ApiOperation("修改字典数据") @ApiImplicitParam(name = "updateParam", value = "字典数据", required = true) - public HttpResult update(@RequestBody @Validated DictDataParam.DictDataUpdateParam updateParam) { + public HttpResult update(@RequestBody @Validated DictDataParam.UpdateParam updateParam) { String methodDescribe = getMethodDescribe("update"); LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, updateParam); boolean result = dictDataService.updateDictData(updateParam); @@ -152,7 +152,7 @@ public class DictDataController extends BaseController { @PostMapping("/export") @ApiOperation("导出字典数据") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public void export(@RequestBody @Validated DictDataParam.DicTypeIdQueryParam queryParam) { + public void export(@RequestBody @Validated DictDataParam.QueryParam queryParam) { dictDataService.exportDictData(queryParam); } } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictPqController.java b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictPqController.java index 58469820..8a50b324 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictPqController.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictPqController.java @@ -40,7 +40,7 @@ public class DictPqController extends BaseController { @PostMapping("/list") @ApiOperation("查询电能质量指标字典") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public HttpResult> list(@RequestBody @Validated DictPqParam.DictPqQueryParam queryParam) { + public HttpResult> list(@RequestBody @Validated DictPqParam.QueryParam queryParam) { String methodDescribe = getMethodDescribe("list"); LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam); Page result = dictPqService.listDictPqs(queryParam); @@ -65,7 +65,7 @@ public class DictPqController extends BaseController { @PutMapping("/update") @ApiOperation("更新电能质量指标字典") @ApiImplicitParam(name = "updateParam", value = "更新参数", required = true) - public HttpResult update(@RequestBody @Validated DictPqParam.DictPqUpdateParam updateParam) { + public HttpResult update(@RequestBody @Validated DictPqParam.UpdateParam updateParam) { String methodDescribe = getMethodDescribe("update"); LogUtil.njcnDebug(log, "{},更新数据为:{}", methodDescribe, updateParam); boolean result = dictPqService.updateDictPq(updateParam); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTreeController.java b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTreeController.java index ce44c00a..6e204071 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTreeController.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTreeController.java @@ -66,7 +66,7 @@ public class DictTreeController extends BaseController { @PutMapping("/update") @ApiOperation("修改") @ApiImplicitParam(name = "dicParam", value = "数据", required = true) - public HttpResult update(@RequestBody @Validated DictTreeParam.DictTreeUpdateParam dicParam) { + public HttpResult update(@RequestBody @Validated DictTreeParam.UpdateParam dicParam) { String methodDescribe = getMethodDescribe("update"); LogUtil.njcnDebug(log, "{},更新的信息为:{}", methodDescribe,dicParam); boolean result = dictTreeService.updateDictTree(dicParam); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTypeController.java b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTypeController.java index f75502d7..a7269dbb 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTypeController.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/controller/DictTypeController.java @@ -44,7 +44,7 @@ public class DictTypeController extends BaseController { @PostMapping("/list") @ApiOperation("查询字典类型") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public HttpResult> list(@RequestBody @Validated DictTypeParam.DictTypeQueryParam queryParam) { + public HttpResult> list(@RequestBody @Validated DictTypeParam.QueryParam queryParam) { String methodDescribe = getMethodDescribe("list"); LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam); Page result = dictTypeService.listDictTypes(queryParam); @@ -80,7 +80,7 @@ public class DictTypeController extends BaseController { @PutMapping("/update") @ApiOperation("修改字典类型") @ApiImplicitParam(name = "updateParam", value = "字典类型数据", required = true) - public HttpResult update(@RequestBody @Validated DictTypeParam.DictTypeUpdateParam updateParam) { + public HttpResult update(@RequestBody @Validated DictTypeParam.UpdateParam updateParam) { String methodDescribe = getMethodDescribe("update"); LogUtil.njcnDebug(log, "{},字典类型数据为:{}", methodDescribe, updateParam); boolean result = dictTypeService.updateDictType(updateParam); @@ -110,7 +110,7 @@ public class DictTypeController extends BaseController { @PostMapping("/export") @ApiOperation("导出字典类型数据") @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true) - public void export(@RequestBody @Validated DictTypeParam.DictTypeQueryParam queryParam) { + public void export(@RequestBody @Validated DictTypeParam.QueryParam queryParam) { dictTypeService.exportDictType(queryParam); } } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java index d2e4953d..02e57a7d 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java @@ -59,7 +59,7 @@ public class DictDataParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictDataUpdateParam extends DictDataParam { + public static class UpdateParam extends DictDataParam { /** * 表Id @@ -68,17 +68,6 @@ public class DictDataParam { @NotBlank(message = SystemValidMessage.ID_NOT_BLANK) @Pattern(regexp = PatternRegex.SYSTEM_ID, message = SystemValidMessage.ID_FORMAT_ERROR) private String id; - } - - /** - * 分页查询实体 - */ - @Data - @EqualsAndHashCode(callSuper = true) - public static class DictDataQueryParam extends BaseParam { - - - } /** @@ -86,7 +75,7 @@ public class DictDataParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DicTypeIdQueryParam extends BaseParam { + public static class QueryParam extends BaseParam { @ApiModelProperty("字典类型id") @NotBlank(message = SystemValidMessage.DICT_TYPE_ID_NOT_BLANK) @Pattern(regexp = PatternRegex.SYSTEM_ID, message = SystemValidMessage.DICT_TYPE_ID_FORMAT_ERROR) diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictPqParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictPqParam.java index acf9005e..c0116c26 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictPqParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictPqParam.java @@ -113,7 +113,7 @@ public class DictPqParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictPqUpdateParam extends DictPqParam { + public static class UpdateParam extends DictPqParam { @ApiModelProperty("id") @NotBlank(message = SystemValidMessage.ID_NOT_BLANK) @@ -127,7 +127,7 @@ public class DictPqParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictPqQueryParam extends BaseParam { + public static class QueryParam extends BaseParam { @ApiModelProperty("名称") private String name; diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java index 5d7ca0f9..25d8c515 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java @@ -63,7 +63,7 @@ public class DictTreeParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictTreeUpdateParam extends DictTreeParam { + public static class UpdateParam extends DictTreeParam { @ApiModelProperty("id") diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java index c5dcff9b..ff67b369 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java @@ -57,7 +57,7 @@ public class DictTypeParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictTypeUpdateParam extends DictTypeParam { + public static class UpdateParam extends DictTypeParam { @ApiModelProperty("id") @@ -72,7 +72,7 @@ public class DictTypeParam { */ @Data @EqualsAndHashCode(callSuper = true) - public static class DictTypeQueryParam extends BaseParam { + public static class QueryParam extends BaseParam { @ApiModelProperty("名称") private String name; diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictDataService.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictDataService.java index 9117f02b..7192455b 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictDataService.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictDataService.java @@ -24,7 +24,7 @@ public interface IDictDataService extends IService { * @param queryParam 查询参数 * @return 操作结果 */ - Page getDictDataByTypeId(DictDataParam.DicTypeIdQueryParam queryParam); + Page getDictDataByTypeId(DictDataParam.QueryParam queryParam); /** * 新增数据字典 @@ -39,7 +39,7 @@ public interface IDictDataService extends IService { * @param updateParam 字典数据 * @return 操作结果 */ - boolean updateDictData(DictDataParam.DictDataUpdateParam updateParam); + boolean updateDictData(DictDataParam.UpdateParam updateParam); /** * 批量逻辑删除字典数据 @@ -73,5 +73,5 @@ public interface IDictDataService extends IService { * 导出字典数据 * @param queryParam 查询参数 */ - void exportDictData(DictDataParam.DicTypeIdQueryParam queryParam); + void exportDictData(DictDataParam.QueryParam queryParam); } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictPqService.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictPqService.java index 97d862d3..5c2555c6 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictPqService.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictPqService.java @@ -13,13 +13,15 @@ import java.util.List; public interface IDictPqService extends IService { /** * 分页查询电能质量指标字典列表 + * * @param queryParam 查询参数 * @return 电能质量指标字典分页列表 */ - Page listDictPqs(DictPqParam.DictPqQueryParam queryParam); + Page listDictPqs(DictPqParam.QueryParam queryParam); /** * 新增电能质量指标字典 + * * @param dictPqParam 电能质量指标字典类型 * @return 操作结果 */ @@ -27,13 +29,15 @@ public interface IDictPqService extends IService { /** * 修改电能质量指标字典 + * * @param updateParam 电能质量指标字典类型 * @return 操作结果 */ - boolean updateDictPq(DictPqParam.DictPqUpdateParam updateParam); + boolean updateDictPq(DictPqParam.UpdateParam updateParam); /** * 删除电能质量指标字典 + * * @param ids id集合 * @return 操作结果 */ diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTreeService.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTreeService.java index 4f91e855..02b8417d 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTreeService.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTreeService.java @@ -22,7 +22,7 @@ public interface IDictTreeService extends IService { boolean addDictTree(DictTreeParam dictTreeParam); - boolean updateDictTree(DictTreeParam dictTreeParam); + boolean updateDictTree(DictTreeParam.UpdateParam param); boolean deleteDictTree(String id); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTypeService.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTypeService.java index 547b4c2a..0cacd425 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTypeService.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/IDictTypeService.java @@ -18,7 +18,7 @@ public interface IDictTypeService extends IService { * @param queryParam 查询参数 * @return 字典列表 */ - Page listDictTypes(DictTypeParam.DictTypeQueryParam queryParam); + Page listDictTypes(DictTypeParam.QueryParam queryParam); /** * 新增字典类型数据 @@ -34,7 +34,7 @@ public interface IDictTypeService extends IService { * @param updateParam 字典类型数据 * @return 操作结果 */ - boolean updateDictType(DictTypeParam.DictTypeUpdateParam updateParam); + boolean updateDictType(DictTypeParam.UpdateParam updateParam); /** * 批量逻辑删除字典类型数据 @@ -47,5 +47,5 @@ public interface IDictTypeService extends IService { * 导出字典类型数据 * @param queryParam 查询参数 */ - public void exportDictType(DictTypeParam.DictTypeQueryParam queryParam); + public void exportDictType(DictTypeParam.QueryParam queryParam); } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java index 52466a6f..54bc758d 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java @@ -42,7 +42,7 @@ import java.util.stream.Collectors; public class DictDataServiceImpl extends ServiceImpl implements IDictDataService { @Override - public Page getDictDataByTypeId(DictDataParam.DicTypeIdQueryParam queryParam) { + public Page getDictDataByTypeId(DictDataParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_data.name", queryParam.getName()) @@ -76,7 +76,7 @@ public class DictDataServiceImpl extends ServiceImpl i @Override - public boolean updateDictData(DictDataParam.DictDataUpdateParam updateParam) { + public boolean updateDictData(DictDataParam.UpdateParam updateParam) { checkDicDataName(updateParam, true); DictData dictData = new DictData(); BeanUtil.copyProperties(updateParam, dictData); @@ -140,7 +140,7 @@ public class DictDataServiceImpl extends ServiceImpl i } @Override - public void exportDictData(DictDataParam.DicTypeIdQueryParam queryParam) { + public void exportDictData(DictDataParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_data.name", queryParam.getName()) @@ -172,8 +172,8 @@ public class DictDataServiceImpl extends ServiceImpl i .eq(DictData::getState, DataStateEnum.ENABLE.getCode()); //更新的时候,需排除当前记录 if (isExcludeSelf) { - if (dictDataParam instanceof DictDataParam.DictDataUpdateParam) { - dictDataLambdaQueryWrapper.ne(DictData::getId, ((DictDataParam.DictDataUpdateParam) dictDataParam).getId()); + if (dictDataParam instanceof DictDataParam.UpdateParam) { + dictDataLambdaQueryWrapper.ne(DictData::getId, ((DictDataParam.UpdateParam) dictDataParam).getId()); } } int countByAccount = this.count(dictDataLambdaQueryWrapper); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictPqServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictPqServiceImpl.java index acbcc9ba..f8a0eed9 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictPqServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictPqServiceImpl.java @@ -29,7 +29,7 @@ import java.util.List; public class DictPqServiceImpl extends ServiceImpl implements IDictPqService { @Override - public Page listDictPqs(DictPqParam.DictPqQueryParam queryParam) { + public Page listDictPqs(DictPqParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_pq.name", queryParam.getName()) @@ -62,7 +62,7 @@ public class DictPqServiceImpl extends ServiceImpl impleme } @Override - public boolean updateDictPq(DictPqParam.DictPqUpdateParam updateParam) { + public boolean updateDictPq(DictPqParam.UpdateParam updateParam) { checkDicPqName(updateParam, true); DictPq dictPq = new DictPq(); BeanUtil.copyProperties(updateParam, dictPq); @@ -92,8 +92,8 @@ public class DictPqServiceImpl extends ServiceImpl impleme .eq(DictPq::getState, DataStateEnum.ENABLE.getCode()); //更新的时候,需排除当前记录 if (isExcludeSelf) { - if (dictPqParam instanceof DictPqParam.DictPqUpdateParam) { - dictPqLambdaQueryWrapper.ne(DictPq::getId, ((DictPqParam.DictPqUpdateParam) dictPqParam).getId()); + if (dictPqParam instanceof DictPqParam.UpdateParam) { + dictPqLambdaQueryWrapper.ne(DictPq::getId, ((DictPqParam.UpdateParam) dictPqParam).getId()); } } int countByAccount = this.count(dictPqLambdaQueryWrapper); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTreeServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTreeServiceImpl.java index 3943d928..b73f90c0 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTreeServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTreeServiceImpl.java @@ -66,10 +66,10 @@ public class DictTreeServiceImpl extends ServiceImpl i } @Override - public boolean updateDictTree(DictTreeParam dictTreeParam) { + public boolean updateDictTree(DictTreeParam.UpdateParam param) { boolean result; DictTree dictTree = new DictTree(); - BeanUtils.copyProperties(dictTreeParam, dictTree); + BeanUtils.copyProperties(param, dictTree); result = this.updateById(dictTree); // if (result) { // refreshDictTreeCache(); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java index 2a1a1510..e4612e65 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java @@ -32,7 +32,7 @@ import java.util.List; public class DictTypeServiceImpl extends ServiceImpl implements IDictTypeService { @Override - public Page listDictTypes(DictTypeParam.DictTypeQueryParam queryParam) { + public Page listDictTypes(DictTypeParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_type.name", queryParam.getName()) @@ -62,7 +62,7 @@ public class DictTypeServiceImpl extends ServiceImpl i } @Override - public boolean updateDictType(DictTypeParam.DictTypeUpdateParam updateParam) { + public boolean updateDictType(DictTypeParam.UpdateParam updateParam) { checkDicTypeName(updateParam, true); DictType dictType = new DictType(); BeanUtil.copyProperties(updateParam, dictType); @@ -78,7 +78,7 @@ public class DictTypeServiceImpl extends ServiceImpl i } @Override - public void exportDictType(DictTypeParam.DictTypeQueryParam queryParam) { + public void exportDictType(DictTypeParam.QueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_type.name", queryParam.getName()) @@ -108,8 +108,8 @@ public class DictTypeServiceImpl extends ServiceImpl i .eq(DictType::getState, DataStateEnum.ENABLE.getCode()); //更新的时候,需排除当前记录 if (isExcludeSelf) { - if (dictTypeParam instanceof DictTypeParam.DictTypeUpdateParam) { - dictTypeLambdaQueryWrapper.ne(DictType::getId, ((DictTypeParam.DictTypeUpdateParam) dictTypeParam).getId()); + if (dictTypeParam instanceof DictTypeParam.UpdateParam) { + dictTypeLambdaQueryWrapper.ne(DictType::getId, ((DictTypeParam.UpdateParam) dictTypeParam).getId()); } } int countByAccount = this.count(dictTypeLambdaQueryWrapper);