From 4f5b936c0add754b7bf48196deb4786fdd82675d Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 15 九月 2025 15:43:00 +0800
Subject: [PATCH] bug修改
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_one.html | 9 +++++++--
cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java | 5 ++++-
cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html | 5 +++--
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_one.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_one.html
index 8bff237..129f9ea 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_one.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_one.html
@@ -41,6 +41,8 @@
</style>
<div class="ibox float-e-margins">
<div class="ibox-content">
+ <input id="s1" value="${item.redemptionMethod}" hidden>
+
<div class="form-horizontal" id="carInfoForm">
<div id="b1">
<#input id="name" name="*商品名称:" type="text" value="${item.name}" readonly="true" />
@@ -93,6 +95,8 @@
<div class="col-sm-9">
<input type="radio" name="redemptionMethod" value="1" checked onclick="updateMethod(1)"> 积分
<input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(2)"> 现金+积分
+ <input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(3)"> 现金
+
</div>
</div>
@@ -232,8 +236,8 @@
$("#y4").show()
$("#y3").show()
}else if(e==3){
- $("#y1").hide()
- $("#y2").show()
+ $("#y4").hide()
+ $("#y3").show()
}else if(e==4){
$("#y1").show()
$("#y2").show()
@@ -244,6 +248,7 @@
}
window.onload = function(){
+
var OBJradio=document.getElementsByName("redemptionMethod")
if(OBJradio==1){
$("#y4").show()
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html
index 515ba13..250d1fb 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html
@@ -111,6 +111,7 @@
<div class="col-sm-9">
<input type="radio" name="redemptionMethod" value="1" checked onclick="updateMethod(1)"> 积分
<input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(2)"> 现金+积分
+ <input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(3)"> 现金
</div>
</div>
@@ -234,8 +235,8 @@
$("#y4").show()
$("#y3").show()
}else if(e==3){
- $("#y1").hide()
- $("#y2").show()
+ $("#y4").hide()
+ $("#y3").show()
}else if(e==4){
$("#y1").show()
$("#y2").show()
diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
index 43a29e9..35c530b 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
@@ -67,7 +67,10 @@
Integer id = Integer.valueOf(couponJsonObject.getString("id"));
// 优惠券数量
Integer value = Integer.valueOf(couponJsonObject.getString("value"));
- Coupon coupon = coupons.stream().filter(e -> e.getId().equals(id)).findFirst().orElse(new Coupon());
+ Coupon coupon = coupons.stream().filter(e -> e.getId().equals(id)).findFirst().orElse(null);
+ if (coupon==null){
+ continue;
+ }
CouponVipResp couponVipResp = new CouponVipResp();
couponVipResp.setId(coupon.getId());
couponVipResp.setName(coupon.getName());
--
Gitblit v1.7.1