From 2abfb67839e1cfa7cbf48124be9024a98fa51032 Mon Sep 17 00:00:00 2001 From: lyd <1419499670@qq.com> Date: Wed, 28 Sep 2022 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/system/rest/ParamController.java | 8 ++++---- .../modules/system/service/dto/ParamDto.java | 8 ++++++-- .../system/service/impl/ParamServiceImpl.java | 17 ++++++++++++----- .../java/org/nl/modules/system/wql/sys.xls | Bin 220160 -> 220160 bytes nladmin-ui/src/api/system/param.js | 6 +++--- nladmin-ui/src/main.js | 3 +++ .../src/views/system/monitor/device/index.vue | 2 +- nladmin-ui/src/views/system/param/index.vue | 6 +++--- 8 files changed, 32 insertions(+), 18 deletions(-) diff --git a/nladmin-system/src/main/java/org/nl/modules/system/rest/ParamController.java b/nladmin-system/src/main/java/org/nl/modules/system/rest/ParamController.java index cb650ea52..d9ae404e6 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/rest/ParamController.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/rest/ParamController.java @@ -73,10 +73,10 @@ public class ParamController { paramService.download(paramService.queryAll(whereJson), response); } - @PostMapping("/getStageCodeByCode") - @Log("根据编码获取舞台编码") - @ApiOperation("根据编码获取舞台编码") - public ResponseEntity getStageCodeByCode(@RequestBody String code) { + @PostMapping("/getValueByCode") + @Log("根据编码获取值") + @ApiOperation("根据编码获取值") + public ResponseEntity getValueByCode(@RequestBody String code) { return new ResponseEntity<>(paramService.findByCode(code), HttpStatus.CREATED); } } diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/dto/ParamDto.java b/nladmin-system/src/main/java/org/nl/modules/system/service/dto/ParamDto.java index 9ac580e26..4c4a961ad 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/dto/ParamDto.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/dto/ParamDto.java @@ -25,11 +25,15 @@ public class ParamDto implements Serializable { private String is_delete; - private String create_by; + private Long create_id; + + private Long update_optid; + + private String create_name; private String create_time; - private String update_by; + private String update_optname; private String update_time; } diff --git a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/ParamServiceImpl.java b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/ParamServiceImpl.java index d06cb1ccd..292052290 100644 --- a/nladmin-system/src/main/java/org/nl/modules/system/service/impl/ParamServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/modules/system/service/impl/ParamServiceImpl.java @@ -2,6 +2,7 @@ package org.nl.modules.system.service.impl; +import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; import com.alibaba.fastjson.JSONArray; @@ -73,11 +74,15 @@ public class ParamServiceImpl implements ParamService { @Transactional(rollbackFor = Exception.class) public void create(ParamDto dto) { String currentUsername = SecurityUtils.getCurrentUsername(); + Long currentId = StpUtil.getLoginIdAsLong(); + String now = DateUtil.now(); dto.setId(IdUtil.simpleUUID()); - dto.setCreate_by(currentUsername); - dto.setUpdate_by(currentUsername); + dto.setCreate_id(currentId); + dto.setUpdate_optid(currentId); + dto.setCreate_name(currentUsername); + dto.setUpdate_optname(currentUsername); dto.setUpdate_time(now); dto.setCreate_time(now); @@ -94,8 +99,10 @@ public class ParamServiceImpl implements ParamService { String currentUsername = SecurityUtils.getCurrentUsername(); String now = DateUtil.now(); + + dto.setUpdate_optid(StpUtil.getLoginIdAsLong()); dto.setUpdate_time(now); - dto.setUpdate_by(currentUsername); + dto.setUpdate_optname(currentUsername); WQLObject wo = WQLObject.getWQLObject("sys_param"); JSONObject json = JSONObject.parseObject( JSONObject.toJSONString(dto)); @@ -122,9 +129,9 @@ public class ParamServiceImpl implements ParamService { map.put("备注", param.getRemark()); map.put("是否启用", param.getIs_active()); map.put("是否删除", param.getIs_delete()); - map.put("创建者", param.getCreate_by()); + map.put("创建者", param.getCreate_name()); map.put("创建时间", param.getCreate_time()); - map.put("修改者", param.getUpdate_by()); + map.put("修改者", param.getUpdate_optname()); map.put("修改时间", param.getUpdate_time()); list.add(map); } diff --git a/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls b/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls index cc0336ee522fe30da2d6ec2b6135b13dbd4959de..ed6deb8e7d0ce4c851532e2187a48c7f22b233ae 100644 GIT binary patch delta 33 ncmZqJ!P~HdcS8;fTfqf}#($TZi&)x=SQvqrX?qb1b6+?B { + this.getValueByCode(this.stageParam).then(res => { if (res.value !== undefined) { crudStage.getNewStageDataByCode(res.value).then(res => { data = JSON.parse(res.stage_data) diff --git a/nladmin-ui/src/views/system/param/index.vue b/nladmin-ui/src/views/system/param/index.vue index a8987f40b..dfc8963c2 100644 --- a/nladmin-ui/src/views/system/param/index.vue +++ b/nladmin-ui/src/views/system/param/index.vue @@ -58,7 +58,7 @@ - +