From 7a8af8c19b40b8028e25ee0b669463d06f723a30 Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期一, 21 九月 2026 15:57:24 +0800
Subject: [PATCH] bug:测试问题统一修改

---
 cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java |   42 ++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java
index fd18f40..ccf038e 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java
@@ -1,9 +1,11 @@
 package com.dsh.other.controller;
 
 import com.dsh.other.entity.SiteBooking;
+import com.dsh.other.entity.TSiteBookingUse;
 import com.dsh.other.feignclient.activity.UserCouponClient;
 import com.dsh.other.model.QuerySiteTimes;
 import com.dsh.other.service.ISiteBookingService;
+import com.dsh.other.service.ISiteBookingUseService;
 import com.dsh.other.service.ISiteService;
 import com.dsh.other.util.ResultUtil;
 import io.swagger.annotations.Api;
@@ -38,6 +40,8 @@
     private ISiteService siteService;
     @Autowired
     private UserCouponClient userCouponClient;
+    @Autowired
+    private ISiteBookingUseService siteBookingUseService;
     // 进场二维码新增参数codeType 1=订场 2=散客,3=门票,玩湃惠民卡codeType=4
     /**
      * 硬件开门后回调 是否可进场检查接口 sid门店id rid场地id
@@ -67,7 +71,24 @@
                 siteBooking.setStatus(3);
                 siteBookingService.updateById(siteBooking);
             }
-            return ResultUtil.success();
+            if (siteBooking.getStoreId()==9939 && codeType==2){
+                TSiteBookingUse siteBookingUse = siteBookingUseService.lambdaQuery()
+                        .eq(TSiteBookingUse::getDataId, dataId)
+                        .eq(TSiteBookingUse::getType, 1)
+                        .last("limit 1")
+                        .one();
+                if (siteBookingUse!=null){
+                    // 已经使用过了 不开门
+                    return ResultUtil.error("已使用");
+                }
+                TSiteBookingUse siteBookingUse1 = new TSiteBookingUse();
+                siteBookingUse1.setDataId(dataId);
+                siteBookingUse1.setType(1);
+                siteBookingUse1.setInsertTime(date);
+                siteBookingUseService.save(siteBookingUse1);
+                return ResultUtil.success();
+            }
+
         }
         if (codeType==3){
             //  判断是否能入场 远程调用将门票设置为已使用
@@ -88,7 +109,24 @@
             }else{
                 // 远程调用 将门票设置为已使用
                 userCouponClient.changeTicketStatus(dataId,sid,rid);
-                return ResultUtil.success();
+                if (sid==9939){
+                    TSiteBookingUse siteBookingUse = siteBookingUseService.lambdaQuery()
+                            .eq(TSiteBookingUse::getDataId, dataId)
+                            .eq(TSiteBookingUse::getType, 2)
+                            .last("limit 1")
+                            .one();
+                    if (siteBookingUse!=null){
+                        // 已经使用过了 不开门
+                        return ResultUtil.error("已使用");
+                    }
+                    TSiteBookingUse siteBookingUse2 = new TSiteBookingUse();
+                    siteBookingUse2.setDataId(dataId);
+                    siteBookingUse2.setType(2);
+                    siteBookingUse2.setInsertTime(date);
+                    siteBookingUseService.save(siteBookingUse2);
+                    return ResultUtil.success();
+                }
+
             }
         }
         if (codeType==4){

--
Gitblit v1.7.1