From 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4 Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期二, 23 二月 2021 17:19:23 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/UserController.java |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/UserController.java b/src/main/java/com/fgkj/controller/UserController.java
index e2b24b2..9e871ff 100644
--- a/src/main/java/com/fgkj/controller/UserController.java
+++ b/src/main/java/com/fgkj/controller/UserController.java
@@ -1,23 +1,25 @@
 package com.fgkj.controller;
 
-import com.fgkj.util.*;
-
 import com.fgkj.dto.ServiceModel;
 import com.fgkj.dto.User;
 import com.fgkj.services.UserService;
 import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
 
 @RequestMapping("user")
 @RestController
-@Api
+@Api(tags = "user鎺ュ彛")
+//Perry TODO
 public class UserController {
 	
-	@Autowired
+	@Resource
 	UserService service;
 	
 	@PostMapping("/")
+	@ApiOperation(notes = "",value="鏂板")
 	public ServiceModel add(@RequestBody User user) {
 		ServiceModel model=  new ServiceModel();
 		model=service.addUser(user);
@@ -25,6 +27,7 @@
 		return model;
 	}
 	@PutMapping("/")
+	@ApiOperation(notes = "",value="淇敼")
 	public ServiceModel update(@RequestBody User user) {
 		ServiceModel model=  new ServiceModel();
 		model=service.updateUser(user);
@@ -32,6 +35,7 @@
 		return model;
 	}
 	@PutMapping("pass")
+	@ApiOperation(notes = "",value="淇敼pass")
 	public ServiceModel updatePass(@RequestBody User user){
 		ServiceModel model=  new ServiceModel();
 		//user.setUpass(ActionUtil.Encryption(user.getUpass()).toString());
@@ -40,6 +44,7 @@
 		return model;
 	}
 	@DeleteMapping("/")
+	@ApiOperation(notes = "",value="鍒犻櫎")
 	public ServiceModel del(@RequestBody User user) {
 		ServiceModel model=  new ServiceModel();
 		model=service.delUser(user);
@@ -48,6 +53,7 @@
 	}
 	
 	@GetMapping("/")
+	@ApiOperation(notes = "",value="鏌ユ壘")
 	public ServiceModel find(@RequestBody User user) {
 		ServiceModel model=  new ServiceModel();
 		model=service.findUser(user);
@@ -55,6 +61,7 @@
 		return model;
 	}
 	@GetMapping("all")
+	@ApiOperation(notes = "",value="all")
 	public ServiceModel findAll() {
 		ServiceModel model=  new ServiceModel();
 		model=service.findUserAll();
@@ -62,6 +69,7 @@
 		return model;
 	}
 	@GetMapping("byInfo")
+	@ApiOperation(notes = "",value="byInfo")
 	public ServiceModel findByInfo(@RequestBody User user){
 		ServiceModel model=  new ServiceModel();
 		model=service.findByInfo(user);
@@ -69,6 +77,7 @@
 		return model;
 	}
 	@GetMapping("byPage")
+	@ApiOperation(notes = "",value="byPage")
 	public ServiceModel findByPage(@RequestParam int currentPage,@RequestParam int pageSize){
 		ServiceModel model=  new ServiceModel();
 		model=service.findByAge(currentPage, pageSize);

--
Gitblit v1.9.1