充值赠送问题

This commit is contained in:
2026-04-17 13:57:33 +08:00
parent 513baf34cd
commit b22b92c877
3 changed files with 51 additions and 50 deletions

View File

@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
/**
@@ -74,6 +76,16 @@ public class SaleSummaryController {
*/
@GetMapping("/print")
public CzgResult<Void> summaryPrint(SaleSummaryCountParam param) {
LocalDateTime now = LocalDateTime.now();
LocalTime nowTime = now.toLocalTime();
// 起始 00:00结束 05:20
LocalTime start = LocalTime.of(0, 0);
LocalTime end = LocalTime.of(5, 20);
if (nowTime.isAfter(start) && nowTime.isBefore(end)) {
// 在 00:00 ~ 05:20 区间内
return CzgResult.failure("当前时间不支持打印打印时间5点20至24点");
}
if (param.getShopId() == null) {
param.setShopId(StpKit.USER.getShopId());
}