| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.pojo.Response; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.db_user.UserInf; |
| | | import com.whyc.service.UserInfService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | @RestController |
| | | @Api(tags = "用户管理") |
| | |
| | | public Response deleteUser(@RequestParam int uid){ |
| | | return service.delUser(uid); |
| | | } |
| | | |
| | | @ApiOperation(value = "将用户添加至100~1000管理员") |
| | | @GetMapping("improveRole") |
| | | public Response improveRole(@RequestParam int uid){ |
| | | return service.improveRole(uid); |
| | | } |
| | | |
| | | @ApiOperation(value = "将管理员变成普通用户") |
| | | @GetMapping("dropRole") |
| | | public Response dropRole(@RequestParam int uid, HttpServletRequest request){ |
| | | return service.dropRole(uid,request); |
| | | } |
| | | |
| | | @GetMapping("getUserNameList") |
| | | @ApiOperation(tags = "操作日志",value = "操作人姓名-查询-操作日志使用") |
| | | public Response getUserNameList(){ |
| | | return service.getUserNameList(); |
| | | } |
| | | |
| | | @GetMapping("resetSnId") |
| | | @ApiOperation(value = "重置密码") |
| | | public Response resetSnId(@RequestParam int uid){ |
| | | return service.resetSnId( uid); |
| | | } |
| | | } |