查询导出充值记录
This commit is contained in:
@@ -2,6 +2,9 @@ package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.ysk.cashier.annotation.AnonymousAccess;
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||
import cn.ysk.cashier.dto.shop.TbShopRechargeListDto;
|
||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.mybatis.service.TbMShopUserService;
|
||||
@@ -20,10 +23,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-01
|
||||
**/
|
||||
* @author lyf
|
||||
* @website https://eladmin.vip
|
||||
* @date 2024-03-01
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/user管理")
|
||||
@@ -41,35 +44,35 @@ public class TbShopUserController {
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询/shop/user")
|
||||
public ResponseEntity<Object> queryTbShopUser(TbShopUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
public ResponseEntity<Object> queryTbShopUser(TbShopUserQueryCriteria criteria, Pageable pageable) {
|
||||
return new ResponseEntity<>(tbShopUserService.queryAll(criteria, pageable), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("queryAllShopUser")
|
||||
@ApiOperation("查询商家用户")
|
||||
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria),HttpStatus.OK);
|
||||
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) {
|
||||
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("summary")
|
||||
@ApiOperation("查询会员概述")
|
||||
public ResponseEntity<Object> summary(TbShopUserQueryCriteria criteria){
|
||||
public ResponseEntity<Object> summary(TbShopUserQueryCriteria criteria) {
|
||||
if (StrUtil.isBlank(criteria.getShopId())) {
|
||||
throw new BadRequestException("店铺id不为空");
|
||||
}
|
||||
return new ResponseEntity<>(tbMShopUserService.summary(criteria),HttpStatus.OK);
|
||||
return new ResponseEntity<>(tbMShopUserService.summary(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增/shop/user")
|
||||
public ResponseEntity<Object> createTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
return new ResponseEntity<>(tbShopUserService.create(resources),HttpStatus.CREATED);
|
||||
public ResponseEntity<Object> createTbShopUser(@Validated @RequestBody TbShopUser resources) {
|
||||
return new ResponseEntity<>(tbShopUserService.create(resources), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改/shop/user")
|
||||
public ResponseEntity<Object> updateTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
public ResponseEntity<Object> updateTbShopUser(@Validated @RequestBody TbShopUser resources) {
|
||||
tbShopUserService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
@@ -80,4 +83,16 @@ public class TbShopUserController {
|
||||
tbShopUserService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/recharge")
|
||||
@ApiOperation("充值记录")
|
||||
public ResponseEntity<Object> rechargeList(TbShopRechargeListDto criteria, Pageable pageable) {
|
||||
return new ResponseEntity<>(tbShopUserService.rechargeList(criteria, pageable), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/recharge/download")
|
||||
@ApiOperation("导出充值记录")
|
||||
public void rechargeListDownload(HttpServletResponse response, @RequestBody TbShopRechargeListDto criteria) throws IOException {
|
||||
tbShopUserService.rechargeListDownload(response, criteria);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user