From 0ccd94c863ac71b46bff3cc15feabec53650738f Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 11 四月 2025 20:23:52 +0800
Subject: [PATCH] bug修改

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/THuiminAgreementController.java |    3 ++-
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement_add.html            |   21 ++++++++++++++-------
 cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminAgreementController.java                    |    7 +++++--
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement.html                |    2 +-
 cloud-server-management/src/main/webapp/static/modular/system/tPayHuimin/tPayHuimin.js                            |    3 ++-
 5 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminAgreementController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminAgreementController.java
index 9ce9182..34f362a 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminAgreementController.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminAgreementController.java
@@ -41,11 +41,14 @@
     @PostMapping("/base/tHuiminAgreement/selectByObjectType")
     public THuiminAgreement selectByObjectType(@RequestBody HuiminAgreementQuery query) {
         THuiminAgreement huiminAgreement = null;
-        if (query.getObjectType().equals(1)) {
+        if (query.getObjectType().equals(1) && Objects.isNull(query.getOperatorId())) {
             //平台
             huiminAgreement = huiminAgreementService.getOne(new LambdaQueryWrapper<THuiminAgreement>()
                     .isNull(THuiminAgreement::getOperatorId));
-
+        }else if (query.getObjectType().equals(1) && Objects.nonNull(query.getOperatorId())){
+            //平台
+            huiminAgreement = huiminAgreementService.getOne(new LambdaQueryWrapper<THuiminAgreement>()
+                    .eq(THuiminAgreement::getOperatorId, query.getOperatorId()));
         }else if (query.getObjectType().equals(2)) {
             //运营商
             huiminAgreement = huiminAgreementService.getOne(new LambdaQueryWrapper<THuiminAgreement>()
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/THuiminAgreementController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/THuiminAgreementController.java
index e076a00..f3c3549 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/THuiminAgreementController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/THuiminAgreementController.java
@@ -78,9 +78,10 @@
     @RequestMapping(value = "/selectAgreementByOperationId")
     @ResponseBody
     public ResultUtil<THuiminAgreement> selectAgreementByOperationId(Integer operatorId) {
+        Integer objectType = UserExt.getUser().getObjectType();
         HuiminAgreementQuery huiminAgreementQuery = new HuiminAgreementQuery();
         huiminAgreementQuery.setOperatorId(operatorId);
-        huiminAgreementQuery.setObjectType(Objects.isNull(operatorId) ? 1 : 2);
+        huiminAgreementQuery.setObjectType(objectType);
         THuiminAgreement huiminAgreement = huiminAgreementClient.selectByObjectType(huiminAgreementQuery);
         return ResultUtil.success(huiminAgreement);
     }
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement.html
index 7bbd8a5..c6f5f0e 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement.html
@@ -3,7 +3,7 @@
     <div class="col-sm-12">
         <div class="ibox float-e-margins">
             <div class="ibox-title">
-                <h5>惠民卡管理</h5>
+                <h5>惠民卡管理111</h5>
             </div>
             <div class="ibox-content">
                 <div class="row row-lg">
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement_add.html
index e4c1699..731e1fe 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement_add.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminAgreement/tHuiminAgreement_add.html
@@ -78,7 +78,7 @@
             </div>
 
             <div class="row btn-group-m-t">
-                <div class="col-sm-10">
+                <div class="col-sm-10" style="margin-top: 10px;">
                     <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="submitData()"/>
                 </div>
             </div>
@@ -88,6 +88,7 @@
 </div>
 <script src="${ctxPath}/modular/system/tHuiminAgreement/tHuiminAgreement_info.js"></script>
 <script>
+    
     var editor_1 = null;
     var editor_2 = null;
     var editor_3 = null;
@@ -95,11 +96,18 @@
     var editorCounter = 0; // 用于生成唯一ID
 
     $(function () {
-        //初始化编辑器
-        editor_1 = UE.getEditor('editor_1');
-        editor_2 = UE.getEditor('editor_2');
-        editor_3 = UE.getEditor('editor_3');
-
+        var objectType = '${objectType!}';
+       var operatorId;
+        if(objectType == 1){
+            //初始化编辑器
+            editor_1 = UE.getEditor('editor_1');
+            editor_2 = UE.getEditor('editor_2');
+            editor_3 = UE.getEditor('editor_3');
+        }else{
+            editor_3 = UE.getEditor('editor_3');
+            operatorId ='${operatorId!}';
+            console.log("operatorId",operatorId);
+        }
         // 改用全局方法处理删除
         window.deleteTab = function(counter) {
             console.log("全局删除方法被调用,counter =", counter);
@@ -126,7 +134,6 @@
             console.log("编辑器初始化完成,准备加载数据");
             
             // 页面初始化时通过AJAX请求获取协议配置数据
-            var operatorId = $("#operator").val();
             console.log("页面初始化,当前运营商ID:", operatorId);
             
             // 调用接口获取协议配置数据(只回显协议配置,不回显门店无惠民卡介绍页)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tPayHuimin/tPayHuimin.js b/cloud-server-management/src/main/webapp/static/modular/system/tPayHuimin/tPayHuimin.js
index c3cce67..ff7d3a7 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tPayHuimin/tPayHuimin.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tPayHuimin/tPayHuimin.js
@@ -146,7 +146,8 @@
         let operation = function(){
             let ajax = new $ax(Feng.ctxPath + "/tPayHuimin/refund", function () {
                 Feng.success("退款成功!");
-                TPayHuimin.table.refresh();
+                $('#TPayHuiminTable').bootstrapTable('destroy');
+                TPayHuimin.initTable();
             }, function (data) {
                 Feng.error("退款失败!" + data.responseJSON.message + "!");
             });

--
Gitblit v1.7.1