From 33cc3f5cf1ee7169b9c37fd0461a4ab5ceed4cd1 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期三, 24 七月 2024 17:12:13 +0800
Subject: [PATCH] 7.24.1

---
 ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java  |    2 +-
 ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java |   10 ++++++++--
 ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/userRedRecord.html                            |    2 +-
 ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/userRedRecord.js                            |    1 -
 ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgreementController.java         |    8 ++++----
 5 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java
index fb2a979..1de9759 100644
--- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java
+++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java
@@ -146,10 +146,16 @@
                 Double endMoney = Double.valueOf(String.valueOf(sysRedPacketRecord.getEndMoney()));
                 int i = new BigDecimal(endMoney).subtract(new BigDecimal(startMoney)).intValue();
                 Random random = new Random();
-                int num = random.nextInt(i);
+                int num;
+                if (!startMoney.equals(endMoney)){
+                     num = random.nextInt(i);
+
+                }else {
+                    num = 0;
+                }
                 money = new BigDecimal(startMoney).add(new BigDecimal(num)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
                 v=v-money;
-                if (v<=0){
+                if (v<0){
                     return ResultUtil.success("当前红包为随机红包,可能有部分用户无法领取",null,"当前红包为随机红包,可能有部分用户无法领取");
                 }
             }
diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgreementController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgreementController.java
index 37683fe..9e608f0 100644
--- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgreementController.java
+++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgreementController.java
@@ -82,9 +82,9 @@
      */
     @RequestMapping("/user")
     public String userIndex(Model model) {
-        TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 3));
+        TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 3).eq("language",1));
         model.addAttribute("one",one);
-        TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 3));
+        TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 3).eq("language",1));
         model.addAttribute("two",two);
         return PREFIX + "tAgreementUser.html";
     }
@@ -157,9 +157,9 @@
      */
     @RequestMapping("/showCommonProblem")
     public String showCommonProblem(Model model) {
-        TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 12));
+        TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 12).eq("language",1));
         model.addAttribute("one",one);
-        TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 12));
+        TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 12).eq("language",1));
         model.addAttribute("two",two);
         return PREFIX + "commonProblem.html";
     }
diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java
index b374820..17abe1c 100644
--- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java
+++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java
@@ -107,7 +107,7 @@
         //查询所有专车车型
         Integer objectId = ShiroKit.getUser().getObjectId();
         List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", objectId).ne("state", 3));
-        List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4));
+        List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4).eq("state",1));
         List<TServerCarmodel> serverCarmodels = new ArrayList<>();
         for(TServerCarmodel tsc : modelList){
             boolean b = true;
diff --git a/ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/userRedRecord.html b/ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/userRedRecord.html
index 2fe40db..aeeb4dc 100644
--- a/ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/userRedRecord.html
+++ b/ManagementIGOTravel/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/userRedRecord.html
@@ -25,7 +25,7 @@
                                     <option value="">全部</option>
                                     <option value="1">未使用</option>
                                     <option value="2">已使用</option>
-                                    <option value="3">已过期</option>
+<!--                                    <option value="3">已过期</option>-->
                                 </#SelectCon>
                             </div>
                             <div class="col-sm-3">
diff --git a/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/userRedRecord.js b/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/userRedRecord.js
index e444d4d..9ae4a5b 100644
--- a/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/userRedRecord.js
+++ b/ManagementIGOTravel/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/userRedRecord.js
@@ -18,7 +18,6 @@
             {title: '领取人', field: 'nickName', visible: true, align: 'center', valign: 'middle'},
             {title: '领取人电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
             {title: '领取金额', field: 'money', visible: true, align: 'center', valign: 'middle'},
-            {title: '到期时间', field: 'expirationTime', visible: true, align: 'center', valign: 'middle'},
             // {title: '领取类型', field: 'couponUseType', visible: true, align: 'center', valign: 'middle',
             //     formatter: function (value, row) {
             //         if(value==0){

--
Gitblit v1.7.1