Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
2024-09-11 11:18:45 +08:00
13 changed files with 306 additions and 100 deletions

View File

@@ -2,6 +2,7 @@ package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
import cn.ysk.cashier.dto.BaseQueryDto;
import cn.ysk.cashier.dto.shop.ShopTableSaleInfoDto;
import cn.ysk.cashier.service.SummaryService;
import lombok.RequiredArgsConstructor;
@@ -23,11 +24,20 @@ public class SummaryController {
@Resource
private SummaryService summaryService;
@GetMapping
private Object shopSummary(@RequestParam Integer shopId) {
return summaryService.selectSummary(shopId);
@PostMapping("/trade")
@AnonymousPostMapping
private Object shopSummaryDate(@RequestBody BaseQueryDto param) {
return summaryService.trade(param);
}
// @GetMapping
// private Object shopSummary(@RequestParam Integer shopId) {
// return summaryService.selectSummary(shopId);
// }
@GetMapping("/date")
private Object shopSummaryDate(@RequestParam Integer shopId, @RequestParam Integer day) {
return summaryService.selectSummaryDate(shopId, day);

View File

@@ -50,8 +50,8 @@ public class TbDeviceStockController {
throw new RuntimeException("请先添加台桌");
}
if (downloadDto.getCount() > (shopTables.size() * 2)) {
throw new RuntimeException("最多可获取台桌数量的2倍");
if (downloadDto.getCount() > 500) {
throw new RuntimeException("最多可获取500个");
}
TbDeviceStock lastRecord = tbDeviceStockService.findLastRecord();