From 7bb60b7448ce40d28bc9662c7e56477551c98e0b Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期三, 13 三月 2024 09:03:21 +0800
Subject: [PATCH] bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/tHomeModule/tHomeModule.js                 |    7 +++----
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java |   20 ++++++++++++--------
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html                 |    3 +--
 cloud-server-management/src/main/resources/mapper/TStoreMapper.xml                                       |    1 +
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TSiteListOne.html                     |    2 +-
 5 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
index 0023ad3..f31c09d 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
@@ -231,19 +231,23 @@
                 String provinceName = (String) stringObjectMap.get("province");
                 String cityName = (String) stringObjectMap.get("city");
                 stringObjectMap.put("provinceCity",provinceName+cityName);
+
                 Integer managerId = (Integer) stringObjectMap.get("operatorId");
-                if (managerId == null){
+
+                Integer type = (Integer) stringObjectMap.get("type");
+                if (type == 1){
+                    // 平台
                     stringObjectMap.put("account","平台");
                 }else{
-                    if (managerId==0){
-                        stringObjectMap.put("account","平台");
-                    }else{
-                        TOperator operator = operatorService.getOne(new QueryWrapper<TOperator>().eq("id", managerId));
-                        if (ToolUtil.isNotEmpty(operator)){
-                            stringObjectMap.put("account",operator.getName());
-                        }
+                    // 根据门店获取运营商id 查询运营商名称
+
+                    // 查询运营商名称
+                    TOperator operator = operatorService.getOne(new QueryWrapper<TOperator>().eq("id", managerId));
+                    if (ToolUtil.isNotEmpty(operator)){
+                        stringObjectMap.put("account",operator.getName());
                     }
                 }
+
             }
         }
         return storeList;
diff --git a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
index 86ea7ec..0acf2d6 100644
--- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -193,6 +193,7 @@
     </select>
     <select id="querySiteListOfpage" resultType="java.util.Map">
         SELECT t1.id, t1.operatorId, t1.province, t1.city, t2.name,t1.ids,t1.name as siteName
+        ,t2.type as `type`
         from t_site t1
         left join t_store t2 on t1.storeId =t2.id
         where t1.state=1 and t2.state=1 and t1.isCanBeBooked = 0 and t1.reservation=0
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TSiteListOne.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TSiteListOne.html
index 1909287..041a354 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TSiteListOne.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TSiteListOne.html
@@ -87,7 +87,7 @@
         var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
             if(data!=null){
                 $.each(data, function(k,v) {
-                    content += "<option value='"+v.name+"'>"+v.name+"</option>";
+                    content += "<option value='"+v.code+"'>"+v.name+"</option>";
                 });
                 $("#cCode").empty().append(content);
             }
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html
index adb1358..b4fea5d 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html
@@ -77,7 +77,6 @@
                 <label class="col-sm-3 control-label">排序:</label>
                 <div class="col-sm-9" style="display: flex;">
                     <input style="width: 300px" class="form-control" value="${data.sort}" id="sort" name="sort" placeholder="请输入排序" type="number">
-                    <span style="margin-left: 5px;margin-top: 5px">数字越大 权重越大</span>
                 </div>
             </div>
 
@@ -142,7 +141,7 @@
             <div class="form-group"   style="margin-left: 13%;display: inline-flex;margin-top: 16px;" >
                 <label class="col-sm-2 control-label">*内容设置:</label>
                 <div class="col-sm-5" style="margin-left: -35px;">
-                    <textarea type="text/plain" id="editor"  style="height: 300px;width: 800px;">${data.content}</textarea>
+                    <textarea  type="text/plain" id="editor"  style="height: 300px;width: 800px;">${data.content}</textarea>
                 </div>
             </div>
             <div class="row btn-group-m-t">
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tHomeModule/tHomeModule.js b/cloud-server-management/src/main/webapp/static/modular/system/tHomeModule/tHomeModule.js
index 855baa9..f6e7656 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tHomeModule/tHomeModule.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tHomeModule/tHomeModule.js
@@ -240,7 +240,7 @@
     }
     if(name !='0') {
         if ($("#roleType").val() == 1) {
-            if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") {
+            if ($('#type option:selected').text() == "详情"||$('#type option:selected').text() == "指定商品"||$('#type option:selected').text() == "指定折扣") {
                 if ($("#pageId").val() == '') {
                     Feng.info("请输入跳转ID")
                     return;
@@ -248,13 +248,12 @@
             }
         }
     }
-    if ( $("#roleType").val()==1){
-        if($("#content").val()==''){
+        if(data1.content ==''){
             data1.content = $("#content").val();
             Feng.info("请填写内容设置")
             return;
         }
-    }
+
     $.ajax({
         url: Feng.ctxPath + "/tHomeModule/updateHomeModule",
         type: "POST",

--
Gitblit v1.7.1