From c8332186836b3dfe1fbd32d7bec7cd29a57e1888 Mon Sep 17 00:00:00 2001 From: whycrzh <ruanzhigang@whycst.com> Date: 星期四, 28 一月 2021 10:06:22 +0800 Subject: [PATCH] update swagger online API --- src/main/java/com/fgkj/controller/User_infController.java | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/fgkj/controller/User_infController.java b/src/main/java/com/fgkj/controller/User_infController.java index fdcad4f..04feea9 100644 --- a/src/main/java/com/fgkj/controller/User_infController.java +++ b/src/main/java/com/fgkj/controller/User_infController.java @@ -10,6 +10,7 @@ import com.fgkj.services.User_logService; import com.google.gson.Gson; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -20,7 +21,7 @@ @RequestMapping("userInf") @RestController -@Api +@Api(tags = "userInf鎺ュ彛") public class User_infController{ @Resource private User_infService service; @@ -39,6 +40,7 @@ //娣诲姞鐢ㄦ埛 @PostMapping("/") + @ApiOperation(notes = "",value="娣诲姞鐢ㄦ埛") public ServiceModel add(@RequestBody User_inf uif) { System.out.println("uif = " + uif); uif.setUpassword(ActionUtil.EncryptionMD5(uif.getUpassword()).toString()); @@ -53,6 +55,7 @@ } //淇敼鐢ㄦ埛淇℃伅 @PutMapping("/") + @ApiOperation(notes = "",value="淇敼鐢ㄦ埛淇℃伅") public ServiceModel update(@RequestBody User_inf uif) { ServiceModel model = new ServiceModel(); model = service.update(uif); @@ -66,6 +69,7 @@ } //鍒犻櫎鐢ㄦ埛淇℃伅 @DeleteMapping("/") + @ApiOperation(notes = "",value="鍒犻櫎鐢ㄦ埛淇℃伅") public ServiceModel delete(@RequestBody User_inf uif) { ServiceModel model = new ServiceModel(); if(uif!=null){ @@ -79,12 +83,14 @@ return model; } - @GetMapping("byCondition") + @PostMapping("byCondition") + @ApiOperation(notes = "",value="byCondition") public ServiceModel serchByCondition(@RequestBody User_inf uif) { return service.serchByCondition(uif); } - @GetMapping("all") + @PostMapping("all") + @ApiOperation(notes = "TODO 寰呮祴",value="all") public ServiceModel searchAll(@RequestBody Batt_User_Permit bup) { ServiceModel model = new ServiceModel(); System.out.println("bup = " + bup); @@ -96,7 +102,8 @@ return model; } //鏍规嵁鍛樺伐淇℃伅鍜屽憳宸ョ紪鍙峰幓鍖归厤鍚堥�傜殑鍛樺伐 - @GetMapping("byNameOrId") + @PostMapping("byNameOrId") + @ApiOperation(notes = "",value="鍛樺伐淇℃伅鍜屽憳宸ョ紪鍙峰幓鍖归厤鍚堥�傜殑鍛樺伐") public ServiceModel searchByNameOrId(@RequestBody Batt_User_Permit bup) { ServiceModel model = service.searchByNameOrId(bup); @@ -104,6 +111,7 @@ } //閲嶇疆鐢ㄦ埛瀵嗙爜 @PutMapping("resetPassword") + @ApiOperation(notes = "",value="閲嶇疆鐢ㄦ埛瀵嗙爜") public ServiceModel resetPassword(@RequestBody User_inf uif){ ServiceModel model = new ServiceModel(); model=service.resetPassword(uif); @@ -117,7 +125,8 @@ } //鏍规嵁鐢ㄦ埛鐨刬d鏌ヨ鐢ㄦ埛鎵�鍦ㄧ殑鍖呮満缁� - @GetMapping("byInfo") + @PostMapping("byInfo") + @ApiOperation(notes = "",value="鐢ㄦ埛鐨刬d鏌ヨ鐢ㄦ埛鎵�鍦ㄧ殑鍖呮満缁�") public ServiceModel serchByInfo(@RequestBody User_inf uif){ ServiceModel model=service.serchByInfo(uif); @@ -126,6 +135,7 @@ //娣诲姞鏂扮殑鐢ㄦ埛妯℃澘 @PostMapping("newUser") + @ApiOperation(notes = "",value="娣诲姞鏂扮殑鐢ㄦ埛妯℃澘") public ServiceModel createNewUser(){ User_inf uinf=utilityFactoryService.CreateUinf(); System.out.println("uinf = " + uinf); @@ -141,6 +151,7 @@ //鏇存柊澶氫釜鐢ㄦ埛 @PutMapping("user") + @ApiOperation(notes = "",value="鏇存柊澶氫釜鐢ㄦ埛") public ServiceModel updateUser(@RequestBody List<User_inf> addlist){ Gson gson=ActionUtil.getGson("yyyy-MM-dd"); String msg=""; @@ -171,6 +182,7 @@ //淇敼澶氫釜鐢ㄦ埛 @PostMapping("user") + @ApiOperation(notes = "",value="淇敼澶氫釜鐢ㄦ埛") public ServiceModel addUser(@RequestBody List<Battalarm_data> list){ ServiceModel model = new ServiceModel(); /*if(addjson!=null && addjson.length()>0){ @@ -183,6 +195,7 @@ //淇敼瀵嗙爜 @PutMapping("password") + @ApiOperation(notes = "",value="淇敼瀵嗙爜") public ServiceModel updatePassword(@RequestBody User_inf uif){ ServiceModel model = new ServiceModel(); User_inf uinf=(User_inf)ActionUtil.getUser(); @@ -196,6 +209,7 @@ //鏌ヨ褰撳墠鐢ㄦ埛鐨勪俊鎭� @GetMapping("userFromSession") + @ApiOperation(notes = "",value="鏌ヨ褰撳墠鐢ㄦ埛鐨勪俊鎭�") public ServiceModel serchUserfromSession(){ ServiceModel model = new ServiceModel(); User_inf uif= (User_inf) ActionUtil.getUser(); @@ -208,6 +222,7 @@ //妫�鏌ョ敤鎴风殑瀵嗙爜 @GetMapping("checkUserPass") + @ApiOperation(notes = "",value="妫�鏌ョ敤鎴风殑瀵嗙爜") public ServiceModel checkUserPass(@RequestParam String addjson){ User_inf user = (User_inf)ActionUtil.getUser(); ServiceModel model = new ServiceModel(); @@ -222,6 +237,7 @@ //鏌ヨ褰撳墠鐢ㄦ埛鐨勭敤鎴峰悕 @GetMapping("uName") + @ApiOperation(notes = "",value="鏌ヨ褰撳墠鐢ㄦ埛鐨勭敤鎴峰悕") public ServiceModelImpl searchUname(){ User_inf user = (User_inf)ActionUtil.getUser(); ServiceModelImpl model = new ServiceModelImpl(); @@ -237,13 +253,15 @@ } //鐣岄潰璇锋眰鐩戞祴鏈嶅姟鏄惁鏂紑 - @GetMapping("checkService") + @PostMapping("checkService") + @ApiOperation(notes = "",value="鐣岄潰璇锋眰鐩戞祴鏈嶅姟鏄惁鏂紑") public ServiceModel checkService(@RequestBody ServiceModel model){ return model; } //鍖呮満缁勯噸鍋氾紙绌挎妗嗭級鏌ヨ鎵�鏈夌殑鐢ㄦ埛 @GetMapping("csAll") + @ApiOperation(notes = "",value="鍖呮満缁勯噸鍋氾紙绌挎妗嗭級鏌ヨ鎵�鏈夌殑鐢ㄦ埛") public ServiceModel searchCS_All() { ServiceModel model=service.searchCS_All(); -- Gitblit v1.9.1