充值赠送问题
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user