| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-app-user") |
| | | @Api(tags = "用户管理") |
| | | public class TAppUserController { |
| | | @Resource |
| | | private TAppUserService appUserService; |
| | | |
| | | @ApiOperation(value = "用户管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TAppUser>> pageList(@RequestBody AppUserListQuery query) { |
| | | return R.ok(appUserService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "修改状态") |
| | | @GetMapping(value = "/changeStatus") |
| | | @Log(title = "小程序用户-修改状态", businessType = BusinessType.UPDATE) |
| | | public R pageList(Integer id) { |
| | | TAppUser appUser = appUserService.getById(id); |
| | | appUser.setStatus(appUser.getStatus()==1?2:1); |
| | | appUserService.updateById(appUser); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "查看详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<TAppUser> detail(Integer id) { |
| | | return R.ok(appUserService.getById( id)); |
| | | } |
| | | } |
| | | |