| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TIntegralRule; |
| | | import com.ruoyi.other.api.domain.TVip; |
| | | import com.ruoyi.other.service.TVipService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-08-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-vip") |
| | | @RequestMapping("/vip") |
| | | public class TVipController { |
| | | @Autowired |
| | | private TVipService vipService; |
| | | @PostMapping("/saveVip") |
| | | @ApiOperation(value = "会员添加") |
| | | public AjaxResult saveVip(@RequestBody TVip dto) { |
| | | vipService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(value = "会员删除") |
| | | public AjaxResult delete(Integer id) { |
| | | vipService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(value = "会员修改") |
| | | public AjaxResult updateVip(@RequestBody TVip dto) { |
| | | vipService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(value = "会员查看详情") |
| | | public AjaxResult<TVip> getInfo(Integer id) { |
| | | return AjaxResult.ok(vipService.getById(id)); |
| | | } |
| | | @ApiOperation(value = "会员列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageCurr", value = "分页参数,当前页码", required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "分页参数,每页数量",required = true) |
| | | }) |
| | | public AjaxResult<PageInfo<TVip>> pageList(Integer pageCurr,Integer pageSize) { |
| | | return AjaxResult.ok(vipService.pageList(pageCurr,pageSize)); |
| | | } |
| | | |
| | | } |
| | | |