From e7b3a5e891287b1291d2ac38f7c83d5d73bc7906 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 08 十月 2022 08:49:01 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/data/DictController.java | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/lf/server/controller/data/DictController.java b/src/main/java/com/lf/server/controller/data/DictController.java index 4512cbb..8ee5dc5 100644 --- a/src/main/java/com/lf/server/controller/data/DictController.java +++ b/src/main/java/com/lf/server/controller/data/DictController.java @@ -1,7 +1,8 @@ package com.lf.server.controller.data; -import com.lf.server.controller.BaseController; +import com.lf.server.aspect.SysLog; +import com.lf.server.controller.all.BaseController; import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.data.DictEntity; import com.lf.server.service.data.DictService; @@ -19,13 +20,14 @@ * @author SWS + WWW * @date 2022-09.26 */ -@Api(tags = "瀛楀吀绠$悊") +@Api(tags = "鏁版嵁绠$悊\\瀛楀吀绠$悊") @RestController @RequestMapping("/dict") public class DictController extends BaseController { @Autowired DictService dictService; + @SysLog() @ApiOperation(value = "鏌ヨ璁板綍鏁�") @ApiImplicitParams({ @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", required = false, example = "sys_dict") @@ -41,6 +43,7 @@ } } + @SysLog() @ApiOperation(value = "鍒嗛〉鏌ヨ") @ApiImplicitParams({ @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "sys_dict"), @@ -62,6 +65,7 @@ } } + @SysLog() @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") @ApiImplicitParams({ @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "sys_dict"), @@ -88,12 +92,13 @@ } } + @SysLog() @ApiOperation(value = "鎻掑叆瀛楀吀") @ApiImplicitParams({ @ApiImplicitParam(name = "dictEntity", value = "瀛楀吀瀹炰綋绫�", dataType = "com.lf.server.entity.data.DictEntity", paramType = "body", example = "") }) @PostMapping(value = "/insertDict", produces = "application/json; charset=UTF-8") - public ResponseMsg<Integer> insertDict(DictEntity dictEntity) { + public ResponseMsg<Integer> insertDict(@RequestBody DictEntity dictEntity) { try { int count = dictService.insertDict(dictEntity); @@ -103,6 +108,7 @@ } } + @SysLog() @ApiOperation(value = "鎻掑叆澶氭潯瀛楀吀") @ApiImplicitParams({ @ApiImplicitParam(name = "dictEntity", value = "瀛楀吀瀹炰綋绫婚泦鍚�", dataType = "List<DictEntity>", paramType = "body", example = "") @@ -118,6 +124,7 @@ } } + @SysLog() @ApiOperation(value = "鍒犻櫎涓�鏉″瓧鍏�") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "瀛楀吀ID", dataType = "Integer", paramType = "query", example = "1") @@ -133,12 +140,13 @@ } } + @SysLog() @ApiOperation(value = "鍒犻櫎澶氭潯瀛楀吀") @ApiImplicitParams({ @ApiImplicitParam(name = "ids", value = "瀛楀吀ID闆嗗悎", dataType = "List<Integer>", paramType = "query", example = "1,2") }) @GetMapping(value = "/deleteDicts") - public ResponseMsg<Integer> deleteDicts(List<Integer> ids) { + public ResponseMsg<Integer> deleteDicts(@RequestParam List<Integer> ids) { try { if (ids == null || ids.isEmpty()) { return fail("id鏁扮粍涓嶈兘涓虹┖", -1); @@ -152,13 +160,14 @@ } } + @SysLog() @ApiOperation(value = "鏇存柊涓�鏉″瓧鍏�") @ApiImplicitParams({ @ApiImplicitParam(name = "dictEntity", value = "瀛楀吀ID闆嗗悎", dataType = "DictEntity", paramType = "body", example = "") }) @ResponseBody @PostMapping(value = "/updateDict", produces = "application/json; charset=UTF-8") - public ResponseMsg<Integer> updateDict(DictEntity dictEntity) { + public ResponseMsg<Integer> updateDict(@RequestBody DictEntity dictEntity) { try { int count = dictService.updateDict(dictEntity); @@ -168,6 +177,7 @@ } } + @SysLog() @ApiOperation(value = "鏍规嵁ID鏌ヨ瀛楀吀") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "瀛楀吀ID", dataType = "Integer", paramType = "query", example = "1") @@ -183,6 +193,7 @@ } } + @SysLog() @ApiOperation(value = "鏌ヨ鎵�鏈夊瓧鍏�") @GetMapping(value = "/selectDictAll") public ResponseMsg<List<DictEntity>> selectDictAll() { @@ -195,6 +206,7 @@ } } + @SysLog() @ApiOperation(value = "鏌ヨ瀛楀吀涓殑鎵�鏈夎〃鍚�") @GetMapping(value = "/selectDictTab") public ResponseMsg<List<DictEntity>> selectDictTab() { -- Gitblit v1.9.3