| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.pojo.dto.AppUserPageDTO; |
| | | import com.ruoyi.system.pojo.dto.UpdateBalanceDTO; |
| | | import com.ruoyi.system.pojo.vo.AppUserPageVO; |
| | | import com.ruoyi.system.pojo.vo.AppUserVO; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.service.AppUserService; |
| | | import com.ruoyi.system.service.BannerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system/appUser") |
| | | @Api( tags = "后台-系统设置-用户管理") |
| | | @Api( tags = "后台-用户管理") |
| | | public class AppUserController { |
| | | |
| | | @Resource |
| | |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | |
| | | @GetMapping("/detail/{id}") |
| | | @ApiOperation(value = "查看详情") |
| | | @PreAuthorize("@ss.hasPermi('appuser:manage')") |
| | | public R<AppUserVO> detail(@PathVariable("id") String id){ |
| | | return R.ok(appUserService.detail(id)); |
| | | } |
| | | /** |
| | | * 冻结/解冻 |
| | | */ |
| | | @PutMapping("/frozen/{id}") |
| | | @ApiOperation(value = "冻结/解冻") |
| | | @PreAuthorize("@ss.hasPermi('appuser:manage')") |
| | | public R<Void> frozen(@PathVariable("id") String id){ |
| | | appUserService.frozen(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 变更余额 |
| | | */ |
| | | @PutMapping("/balance") |
| | | @ApiOperation(value = "修改余额") |
| | | @PreAuthorize("@ss.hasPermi('appuser:manage')") |
| | | public R<Void> balance(@RequestBody UpdateBalanceDTO dto){ |
| | | appUserService.balance(dto); |
| | | return R.ok(); |
| | | } |
| | | } |