| | |
| | | import com.ruoyi.account.api.dto.SendCouponDto; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TIntegralRule; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Resource |
| | | private TCouponService couponService; |
| | | @PostMapping("/saveVip") |
| | | @ApiOperation(value = "会员添加") |
| | | @ApiOperation(tags = {"管理后台-会员管理"},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); |
| | | @ApiOperation(tags = {"管理后台-会员管理"},value = "会员删除") |
| | | public AjaxResult delete(String ids) { |
| | | vipService.removeBatchByIds(Arrays.asList(ids.split(","))); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(value = "会员修改") |
| | | @ApiOperation(tags = {"管理后台-会员管理"},value = "会员修改") |
| | | public AjaxResult updateVip(@RequestBody TVip dto) { |
| | | vipService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(value = "会员查看详情") |
| | | @ApiOperation(tags = {"管理后台-会员管理"},value = "会员查看详情") |
| | | public AjaxResult<TVip> getInfo(Integer id) { |
| | | return AjaxResult.ok(vipService.getById(id)); |
| | | } |
| | |
| | | public R<TVip> getInfo1(@RequestParam("id")Integer id) { |
| | | return R.ok(vipService.getById(id)); |
| | | } |
| | | @ApiOperation(value = "会员列表分页查询") |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(tags = {"管理后台-会员管理"},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)); |
| | | public AjaxResult<PageInfo<TVip>> pageList(@RequestBody BasePage basePage) { |
| | | return AjaxResult.ok(vipService.pageList(basePage.getPageCurr(), basePage.getPageSize())); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"会员下拉框"},value = "会员列表分页查询") |
| | | @GetMapping(value = "/select") |
| | | public AjaxResult<List<TVip>> select() { |
| | | return AjaxResult.ok(vipService.list()); |
| | | } |
| | | |
| | | //获取会员Map |