From 02b805779e1c9c7453f4001e975f3d52111ca3cf Mon Sep 17 00:00:00 2001 From: tianwenbo Date: Tue, 7 Mar 2023 16:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91=20NgAlainControll?= =?UTF-8?q?er.java=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ngalain/controller/NgAlainController.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/ngalain/controller/NgAlainController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/ngalain/controller/NgAlainController.java index 2583e907..d02d5860 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/ngalain/controller/NgAlainController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/ngalain/controller/NgAlainController.java @@ -13,11 +13,7 @@ import com.jero.common.system.vo.LoginUser; import com.jero.modules.ngalain.service.NgAlainService; import com.jero.modules.system.service.ISysDictService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.alibaba.fastjson.JSONObject; @@ -52,10 +48,11 @@ public class NgAlainController { return j; } - @RequestMapping(value = "/getDictItems/{dictCode}", method = RequestMethod.GET) +// @RequestMapping(value = "/getDictItems/{dictCode}", method = RequestMethod.GET) + @GetMapping("/getDictItems/{dictCode}") public Object getDictItems(@PathVariable String dictCode) { log.info(" dictCode : "+ dictCode); - Result> result = new Result>(); + Result> result = new Result<>(); List ls = null; try { ls = sysDictService.queryDictItemsByCode(dictCode); @@ -78,7 +75,8 @@ public class NgAlainController { } return dictlist; } - @RequestMapping(value = "/getDictItemsByTable/{table}/{key}/{value}", method = RequestMethod.GET) +// @RequestMapping(value = "/getDictItemsByTable/{table}/{key}/{value}", method = RequestMethod.GET) + @GetMapping("/getDictItemsByTable/{table}/{key}/{value}") public Object getDictItemsByTable(@PathVariable String table,@PathVariable String key,@PathVariable String value) { return this.ngAlainService.getDictByTable(table,key,value); }