无关风月
2025-11-11 aba8d209561a130b6d849d96ff202fe172b1ad92
cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java
@@ -7,6 +7,7 @@
import com.dsh.other.service.ISiteService;
import com.dsh.other.util.ResultUtil;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -29,6 +30,7 @@
@RestController
@Api(tags = "硬件方调用 存储玩湃惠民卡使用记录")
@RequestMapping("/base/code")
@Slf4j
public class CodeCallBackController {
    @Autowired
    private ISiteBookingService siteBookingService;
@@ -42,6 +44,7 @@
     */
    @GetMapping("/verify")
    public ResultUtil verify(Integer codeType,String dataId, Integer rid, Integer sid) throws Exception {
        log.info("硬件开门后回调 校验是否可入场");
        System.err.println("硬件开门后回调 校验是否可入场");
        System.err.println("codeType:"+codeType);
        System.err.println("dataId:"+dataId);
@@ -51,7 +54,7 @@
        // codeType二维码类型1=订场 2=散客,3=门票,玩湃惠民卡codeType=4 234需要校验能否进场
        if (codeType==1 || codeType==2){
            // 将订单设置为已核销
            // 将订单设置为已使用
            SiteBooking siteBooking = siteBookingService.getById(Integer.valueOf(dataId));
            if (siteBooking==null){
                System.err.println("未查询到订场记录"+dataId);
@@ -65,10 +68,9 @@
        }
        if (codeType==3){
            //  判断是否能入场 远程调用将门票设置为已使用
            LocalDate now = LocalDate.now();
            Date date1 = new Date();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
            String day = simpleDateFormat.format(now);
            String day = simpleDateFormat.format(date1);
            List<QuerySiteTimes> querySiteTimes = siteService.querySiteTimes(rid, day, null, null, 2);
            Integer flag =0;
@@ -101,6 +103,7 @@
                }
            }
            if (flag==0){
                log.info("该时间段已无空位");
                return ResultUtil.error("该时间段已无空位");
            }else{
                return ResultUtil.success();