From fa74ca8042141ea7f9a7440ea79296edf812fdc1 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 05 十一月 2025 11:44:17 +0800
Subject: [PATCH] bug修改
---
cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 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 34aa43f..9d89f31 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,7 +1,10 @@
package com.dsh.other.controller;
+import com.dsh.other.entity.SiteBooking;
+import com.dsh.other.service.ISiteBookingService;
import com.dsh.other.util.ResultUtil;
import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -23,11 +26,13 @@
@Api(tags = "硬件方调用 存储玩湃惠民卡使用记录")
@RequestMapping("/base/code")
public class CodeCallBackController {
+ @Autowired
+ private ISiteBookingService siteBookingService;
// 进场二维码新增参数codeType 1=订场 2=散客,3=门票,玩湃惠民卡codeType=4
/**
* 硬件开门后回调 是否可进场检查接口 sid门店id rid场地id
*/
- @PostMapping("/verify")
+ @GetMapping("/verify")
public ResultUtil verify(Integer codeType,Integer dataId, Integer rid, Integer sid) {
System.err.println("硬件开门后回调 校验是否可入场");
System.err.println("codeType:"+codeType);
@@ -38,7 +43,18 @@
// codeType二维码类型1=订场 2=散客,3=门票,玩湃惠民卡codeType=4 234需要校验能否进场
if (codeType==1){
+ // 将订单设置为已核销
+ SiteBooking siteBooking = siteBookingService.getById(dataId);
+ if (siteBooking==null){
+ System.err.println("未查询到订场记录"+dataId);
+ return ResultUtil.error("未查询到订场记录");
+ }else{
+ siteBooking.setStatus(3);
+ siteBookingService.updateById(siteBooking);
+ }
return ResultUtil.success();
+ }else if (codeType == 2){
+
}
return ResultUtil.success();
--
Gitblit v1.7.1