From 3caee5ce51a218f4bc1f3757a4d09b0ed18aa6df Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期一, 06 十一月 2023 14:21:12 +0800
Subject: [PATCH] 后台bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js                              |   13 
 cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/PointsMerchandise.java          |    6 
 cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js                            |    5 
 cloud-server-other/src/main/resources/mapper/BannerMapper.xml                                                   |    2 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_two.html                            |   12 
 cloud-server-course/src/main/resources/mapper/TCoursePackageDiscountMapper.xml                                  |    5 
 cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods.js                                  |    4 
 cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java                             |    2 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_detail_two.html                       |   12 +
 cloud-server-management/src/main/webapp/WEB-INF/view/system/course/course.html                                  |    2 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/coursePackage/coursePackageDiscount.html            |   28 ++
 cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml                                          |    5 
 cloud-server-management/src/main/webapp/static/modular/system/tCoach/tCoach_add.js                              |  151 ++++++++++++++
 cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java                               |    2 
 cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java                    |    2 
 cloud-server-management/src/main/webapp/static/modular/system/tCompetitionAudit/tCompetition.js                 |    4 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoach/TCoach_edit.html                             |   66 ++++--
 cloud-server-management/src/main/webapp/static/modular/system/tDiscount/tDiscount.js                            |    2 
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoachController.java          |    3 
 cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/tDiscount.js                       |    6 
 cloud-server-management/src/main/webapp/static/modular/system/course/course_info.js                             |    2 
 cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java                    |   18 +
 cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage_info.js               |    6 
 cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js                                |    9 
 cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue.js                                     |   17 -
 cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js            |   21 +
 cloud-server-activity/src/main/java/com/dsh/activity/entity/PointsMerchandise.java                              |    7 
 cloud-server-management/src/main/java/com/dsh/course/feignClient/course/model/TCoursePackage.java               |    4 
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java        |   22 ++
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html                             |    6 
 cloud-server-course/src/main/java/com/dsh/course/entity/TCoursePackage.java                                     |    4 
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java |   29 ++
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCoupon.html                                |    9 
 cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js                            |    2 
 cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java                               |    2 
 cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java            |   26 +
 cloud-server-management/src/main/webapp/static/modular/system/course/course.js                                  |    7 
 cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js             |   13 
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java         |   11 
 cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java                |    2 
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_edit.html                             |    1 
 41 files changed, 408 insertions(+), 142 deletions(-)

diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
index 764abaf..3b04617 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -242,10 +242,11 @@
                 String endTime = (String) stringObjectMap.get("endTime");
                 stringObjectMap.put("timeValue",startTime + "至"+endTime);
                 int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
-                        .eq(UserPointsMerchandise::getPointsMerchandiseId, o));
-                int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
                         .eq(UserPointsMerchandise::getPointsMerchandiseId, o)
                         .eq(UserPointsMerchandise::getStatus,2));
+                int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
+                        .eq(UserPointsMerchandise::getPointsMerchandiseId, o)
+                        );
                 stringObjectMap.put("hasExchangeQty",count1);
                 stringObjectMap.put("hasPickQty",count2);
 
@@ -1421,7 +1422,16 @@
 
     @PostMapping("/base/pointMerchars/queryPointMerchaseById")
     public PointsMerchandise queryPointMerchaseById(@RequestBody Integer id){
-        return pmdsService.getById(id);
+        PointsMerchandise byId = pmdsService.getById(id);
+        int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
+                .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId())
+                .eq(UserPointsMerchandise::getStatus,2));
+        int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
+                .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId())
+        );
+        byId.setPickUpQuantity3(count2);
+        byId.setPickUpQuantity4(count1);
+        return byId;
     }
 
     @PostMapping("/base/pointMerchars/getshopName")
@@ -1584,7 +1594,7 @@
     @PostMapping("/base/pointMerchars/add")
     public Integer add(@RequestBody PointsMerchandise pointsMerchandise){
         Integer storeId = pointsMerchandise.getShelves();
-        pointsMerchandise.setShelves(2);
+        pointsMerchandise.setShelves(1);
         boolean save = pmdsService.save(pointsMerchandise);
         if(save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType()==2){
             PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore();
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/entity/PointsMerchandise.java b/cloud-server-activity/src/main/java/com/dsh/activity/entity/PointsMerchandise.java
index 4fa8b3b..57341a7 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/entity/PointsMerchandise.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/entity/PointsMerchandise.java
@@ -169,7 +169,12 @@
     private Integer status;
     @TableField("remark")
     private String remark;
-
+    // 已领数量
+    @TableField(exist = false)
+    private Integer pickUpQuantity3;
+    // 已兑换数量
+    @TableField(exist = false)
+    private Integer pickUpQuantity4;
     @Override
     protected Serializable pkVal() {
         return this.id;
diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java b/cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java
index 30d37a5..3424582 100644
--- a/cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java
+++ b/cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java
@@ -622,7 +622,7 @@
                 wrapper.eq(Competition::getProvinceCode,listQuery.getProvinceCode());
             }
             if(ToolUtil.isNotEmpty(listQuery.getCityCode())){
-                wrapper.eq(Competition::getProvinceCode,listQuery.getCityCode());
+                wrapper.eq(Competition::getCityCode,listQuery.getCityCode());
             }
             if(ToolUtil.isNotEmpty(listQuery.getEventName())){
                 wrapper.like(Competition::getName,listQuery.getEventName());
diff --git a/cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java b/cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java
index 86c427a..25c7c31 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java
@@ -452,7 +452,7 @@
     }
 
     @PostMapping("/course/getHours")
-    public String getHours(@RequestBody Integer coursePackageId1){
+    public Integer getHours(@RequestBody Integer coursePackageId1){
         return coursePackageService.getHours(coursePackageId1);
     }
 
diff --git a/cloud-server-course/src/main/java/com/dsh/course/entity/TCoursePackage.java b/cloud-server-course/src/main/java/com/dsh/course/entity/TCoursePackage.java
index 9158eac..fa815d7 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/entity/TCoursePackage.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/entity/TCoursePackage.java
@@ -170,11 +170,11 @@
     @TableField("needNum")
     private Integer needNum;
 
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField("startTime")
     private Date startTime;
 
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField("endTime")
     private Date endTime;
 }
diff --git a/cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java b/cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java
index 3017da9..5b9327a 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java
@@ -44,7 +44,7 @@
 
     List<Map<String, Object>> queryByConfigId(@Param("oneId") Integer oneId);
 
-    String getHours(@Param("coursePackageId") Integer coursePackageId);
+    Integer getHours(@Param("coursePackageId") Integer coursePackageId);
 
 
 
diff --git a/cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java b/cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java
index 672f810..e71d14e 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java
@@ -87,7 +87,7 @@
 
     List<Map<String, Object>> queryByConfigId(Integer oneId);
 
-    String getHours(Integer coursePackageId);
+    Integer getHours(Integer coursePackageId);
 
     ResultUtil paymentCourseCouponList(Integer uid, Integer coursePackagePaymentConfigId);
 
diff --git a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java
index a8a1c42..ebb3217 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java
@@ -358,15 +358,25 @@
     @Override
     public List<DiscountList> queryDiscountListAudit(QueryDiscountList queryDiscountList) {
         Page<DiscountList> discountListPage = new Page<>(queryDiscountList.getOffset(), queryDiscountList.getLimit());
-        List<DiscountList> discountLists = this.baseMapper.queryDiscountListAudit(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds());
+        List<DiscountList> discountLists = this.baseMapper.queryDiscountListAudit(discountListPage,
+                queryDiscountList.getPCode(),
+                queryDiscountList.getCCode(),
+                queryDiscountList.getName(),
+                queryDiscountList.getType(),
+                queryDiscountList.getIds());
         for (DiscountList discountList : discountLists) {
-            List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).ne(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType));
-            long count = tCoursePackageDiscounts.stream().filter(e -> e.getAuditStatus().equals(2)).count();
-            if(count>0){
-                discountList.setStatus(2);
-            }else {
-                discountList.setStatus(1);
-            }
+            List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper
+                    .selectList(new LambdaQueryWrapper<TCoursePackageDiscount>()
+                            .eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId())
+                            .ne(TCoursePackageDiscount::getAuditStatus,2)
+                            .orderByAsc(TCoursePackageDiscount::getType));
+//            long count = tCoursePackageDiscounts.stream()
+//                    .filter(e -> e.getAuditStatus().equals(2)).count();
+//            if(count>0){
+//                discountList.setStatus(2);
+//            }else {
+//                discountList.setStatus(1);
+//            }
             String type="";
             for (int i = 0; i < tCoursePackageDiscounts.size(); i++) {
                 if(tCoursePackageDiscounts.get(i).getType()==1){
diff --git a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
index 33a6525..ced476d 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
@@ -1732,7 +1732,7 @@
     }
 
     @Override
-    public String getHours(Integer coursePackageId) {
+    public Integer getHours(Integer coursePackageId) {
         return this.baseMapper.getHours(coursePackageId);
     }
 
diff --git a/cloud-server-course/src/main/resources/mapper/TCoursePackageDiscountMapper.xml b/cloud-server-course/src/main/resources/mapper/TCoursePackageDiscountMapper.xml
index 273ed49..c2ffe3c 100644
--- a/cloud-server-course/src/main/resources/mapper/TCoursePackageDiscountMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/TCoursePackageDiscountMapper.xml
@@ -37,7 +37,10 @@
 
 
     <select id="queryDiscountListAudit" resultType="com.dsh.course.model.DiscountList">
-        select t1.id,t1.type,t1.auditStatus status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join  t_course_package t2 on t1.coursePackageId = t2.id
+        select t1.id,t1.type,t1.auditStatus status,t2.province pName,t2.city cName,t2.name,
+        t2.storeId,t2.id courseId
+        from t_course_package_discount t1
+        left join  t_course_package t2 on t1.coursePackageId = t2.id
         where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=",">
         #{id}
     </foreach> and t1.auditStatus !=2
diff --git a/cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml b/cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml
index 36d5950..d15825e 100644
--- a/cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml
@@ -132,7 +132,8 @@
     <select id="queryByConfigId" resultType="java.util.Map">
         select id,classHours from t_course_package_payment_config where coursePackageId =#{oneId}
     </select>
-    <select id="getHours" resultType="java.lang.String">
-        select classHours from t_course_package_payment_config where id =#{coursePackageId}
+    <select id="getHours" resultType="java.lang.Integer">
+        select classHours from t_course_package_payment_config where coursePackageId =#{coursePackageId}
     </select>
+
 </mapper>
diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/PointsMerchandise.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/PointsMerchandise.java
index 1e68f6a..8b78abf 100644
--- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/PointsMerchandise.java
+++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/PointsMerchandise.java
@@ -168,6 +168,12 @@
 
     @TableField("status")
     private Integer status;
+    // 已领数量
+    @TableField(exist = false)
+    private Integer pickUpQuantity3;
+    // 已兑换数量
+    @TableField(exist = false)
+    private Integer pickUpQuantity4;
 
     @Override
     protected Serializable pkVal() {
diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/course/model/TCoursePackage.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/course/model/TCoursePackage.java
index 2a4dd9f..790804d 100644
--- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/course/model/TCoursePackage.java
+++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/course/model/TCoursePackage.java
@@ -131,9 +131,9 @@
 
     private Integer type;
     private String holitime;
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date startTime;
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
 
     private Date endTime;
 }
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoachController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoachController.java
index 1e334d4..6b1d951 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoachController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/CoachController.java
@@ -188,10 +188,11 @@
         model.addAttribute("type",0);
         String[] split = data.get(0).getCertificateImg().split(",");
         List<String> pictures = new ArrayList<>(Arrays.asList(split));
-        model.addAttribute("pictures",pictures);
+        model.addAttribute("pictures",data.get(0).getCertificateImg());
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
         String birthday = format.format(data.get(0).getBirthday());
         model.addAttribute("birthday",birthday);
+        model.addAttribute("diploma",data.get(0).getDiploma());
         return PREFIX + "TCoach_edit.html";
     }
     /**
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
index 4bbf06d..f2c32b3 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
@@ -10,6 +10,7 @@
 import com.dsh.course.feignClient.account.CoachClient;
 import com.dsh.course.feignClient.account.model.CityManager;
 import com.dsh.course.feignClient.account.model.Coach;
+import com.dsh.course.feignClient.account.model.CoachSerchVO;
 import com.dsh.course.feignClient.course.*;
 import com.dsh.course.feignClient.course.model.*;
 import com.dsh.course.feignClient.other.model.Site;
@@ -252,8 +253,18 @@
         model.addAttribute("store", list2);
         List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", tCoursePackage.getStoreId()).eq("state", 1));
         model.addAttribute("site", list3);
-        List<Coach> coaches = coachClient.queryCoachByOperatorId(UserExt.getUser().getObjectId());
-        model.addAttribute("coach", coaches);
+        if (UserExt.getUser().getObjectType() == 2){
+            List<Coach> coaches = coachClient.queryCoachByOperatorId(UserExt.getUser().getObjectId());
+            model.addAttribute("coach", coaches);
+        }else{
+            CoachQuery coachQuery = new CoachQuery();
+            coachQuery.setProvince(tCoursePackage.getProvince());
+            coachQuery.setCity(tCoursePackage.getCity());
+            List<CoachSerchVO> coachSerchVOS = coachClient.listAll(coachQuery);
+            model.addAttribute("coach",coachSerchVOS);
+        }
+
+
         List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id);
 
 
@@ -412,6 +423,8 @@
             map.put("coursePackageDiscount", tCoursePackageDiscounts);
             list.add(map);
         }
+        model.addAttribute("role",UserExt.getUser().getObjectType());
+        model.addAttribute("type",tCoursePackage.getType());
         model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list));
         return PREFIX + "coursePackageDiscount.html";
     }
@@ -865,7 +878,8 @@
      */
     @ResponseBody
     @PostMapping("/addCoursePackage")
-    public ResultUtil addCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) throws ParseException {
+    public ResultUtil addCoursePackage(TCoursePackage coursePackage,
+                                       String coursePackagePaymentConfig) throws ParseException {
         String classStartTime = coursePackage.getClassStartTime();
 //        String classEndTime = coursePackage.getClassEndTime();
         Date startDate = null;
@@ -881,7 +895,14 @@
             DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
             startDate = dateFormat.parse(startDateString);
             endDate = dateFormat.parse(endDateString);
-
+            if (coursePackage.getType() == 2){
+                startDate.setHours(0);
+                startDate.setMinutes(0);
+                startDate.setSeconds(0);
+                endDate.setHours(23);
+                endDate.setMinutes(59);
+                endDate.setSeconds(59);
+            }
         }
 
 
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java
index e31e2da..3505c13 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java
@@ -188,7 +188,7 @@
         siteBooking.setId(id);
         siteBooking.setStatus(1);
         siteBooking.setPayType(4);
-        siteBooking.setPayUserId(UserExt.getUser().getObjectId());
+        siteBooking.setPayUserId(UserExt.getUser().getId());
         iSiteBookingService.updateById(siteBooking);
 
         return new ResultUtil<>(0,0,"手动支付成功",null,null);
@@ -954,14 +954,11 @@
 
             if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 1){
                 vo.put("payType","微信");
-            }
-            if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 2){
+            }else if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 2){
                 vo.put("payType","支付宝");
-            }
-            if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 3){
+            }else if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 3){
                 vo.put("payType","玩湃币");
-            }
-            if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 4){
+            }else if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 4){
                 if (vo.get("payUserId")!=null){
                     User payUserId = userService.getById(Integer.parseInt(vo.get("payUserId").toString()));
                     if(payUserId!=null){
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java
index b736e77..bb9f556 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java
@@ -19,6 +19,8 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -138,6 +140,26 @@
      */
     @Override
     public void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) {
+        String holitime = coursePackage.getHolitime();
+        String[] split = holitime.split(" - ");
+        String startTime = split[0];
+        String endTime = split[1];
+        SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            Date parse1 = format1.parse(startTime);
+            parse1.setHours(0);
+            parse1.setMinutes(0);
+            parse1.setSeconds(0);
+            Date parse2 = format2.parse(endTime);
+            parse2.setHours(23);
+            parse2.setMinutes(59);
+            parse2.setSeconds(59);
+            coursePackage.setStartTime(parse1);
+            coursePackage.setEndTime(parse2);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
         coursePackageClient.updateCoursePackage(coursePackage);
         coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId());
         JSONArray jsonArray = JSON.parseArray(coursePackagePaymentConfig);
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/course/course.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/course/course.html
index 7060573..48caecb 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/course/course.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/course/course.html
@@ -37,7 +37,7 @@
                         <div class="hidden-xs" id="managerTableToolbar" role="group">
                             <#button name="添加" icon="fa-plus" clickFun="Course.addCourse()"/>
                             <#button name="编辑" icon="fa-edit" clickFun="Course.editCourse()" space="true"/>
-                            <#button name="删除" icon="fa-remove" clickFun="Course.deleteCourse()" space="true"/>
+                            <#button name="删除" icon="fa-remove" clickFun="Course.delCourse()" space="true"/>
                             <#button name="上架" icon="fa-refresh" clickFun="Course.editCourseState(1)" space="true"/>
                             <#button name="下架" icon="fa-warning" clickFun="Course.editCourseState(2)" space="true"/>
                             <#button name="详情" icon="fa-check-circle" clickFun="Course.detailsCourse()" space="true"/>
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/coursePackage/coursePackageDiscount.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/coursePackage/coursePackageDiscount.html
index e108ca7..4caab09 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/coursePackage/coursePackageDiscount.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/coursePackage/coursePackageDiscount.html
@@ -4,7 +4,31 @@
         <div class="form-horizontal">
             <div class="row">
                 <input type="hidden" id="id" value="${item.id}">
+                <input type="hidden" id="role" value="${role}">
+                <input type="hidden" id="type" value="${type}">
                 <input type="hidden" id="coursePackagePaymentConfig" value='${coursePackagePaymentConfig}'>
+                @if(role==2){
+                <div class="form-group">
+                    <div class="col-sm-2"></div>
+                    <div class="col-sm-10">
+                        <label class="col-sm-2 control-label">审核状态:</label>
+                        <div class="col-sm-4" style="margin-top: 6px;">
+                            <span>审核状态:${type}</span>
+                        </div>
+                    </div>
+                </div>
+                @if(type==3){
+                <div class="form-group">
+                    <div class="col-sm-2"></div>
+                    <div class="col-sm-10">
+                        <label class="col-sm-2 control-label">拒绝理由:</label>
+                        <div class="col-sm-4" style="margin-top: 6px;">
+                            <span>拒绝理由:</span>
+                        </div>
+                    </div>
+                </div>
+                @}
+                @}
                 <div class="form-group">
                     <div class="col-sm-2"></div>
                     <div class="col-sm-10">
@@ -47,9 +71,13 @@
                         <label class="col-sm-2 control-label">*折扣类型:</label>
                         <div class="col-sm-6" id="types" style="margin-top: 6px;">
                             <input type="checkbox" name="type" value="1"> 会员折扣&nbsp;&nbsp;&nbsp;&nbsp;
+                            @if(type!=2){
                             <input type="checkbox" name="type" value="2"> 续课优惠&nbsp;&nbsp;&nbsp;&nbsp;
+                            @}
                             <input type="checkbox" name="type" value="3"> 限时折扣&nbsp;&nbsp;&nbsp;&nbsp;
+                            @if(type!=2){
                             <input type="checkbox" name="type" value="4"> 赠送课时&nbsp;&nbsp;&nbsp;&nbsp;
+                            @}
                         </div>
                     </div>
                 </div>
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoach/TCoach_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoach/TCoach_edit.html
index 1c96079..0723fce 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoach/TCoach_edit.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoach/TCoach_edit.html
@@ -22,6 +22,7 @@
     <div class="ibox-content">
         <div class="form-horizontal" id="carInfoForm">
             <input hidden id="role" value="${role}">
+            <input hidden id="diploma" value="${diploma}">
             @if(objectType==1){
             <div class="form-group" id="provinceCode">
                 <label class="col-sm-3 control-label">*所在省:</label>
@@ -142,30 +143,25 @@
 
 
             <div class="row" id="app1" >
-                <div class="col-sm-6" style="width: 100%">
-                    <div class="form-group" >
-                        <label class="col-sm-3 control-label">*资格证书: </label>
-                        <input style="width: 300px" class="form-control" id="certificate" value="${data.certificate}"  placeholder="请输入资格证书" type="text">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">*资格证书(请上传不超过五张图片): </label>
+                    <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%">
+                        <el-upload
+                                :limit="5"
+                                class="avatar-uploader"
+                                action="/tCouponManage/uploadPic"
+                                list-type="picture-card"
+                                accept="."
+                                :file-list="imageUrl2"
+                                :on-success="handleAvatarSuccess"
+                                :on-remove="handleRemove">
+                            <i class="el-icon-plus"></i>
+                        </el-upload>
+                        <el-dialog :visible.sync="dialogVisible">
+                            <img width="100%" :src="imageUrl2" alt="">
+                        </el-dialog>
                     </div>
-                    <div class="form-group" >
-                        <label class="col-sm-3 control-label"></label>
-                        <div class="col-sm-9">
-                            <el-upload
-                                    :limit="5"
-                                    class="avatar-uploader"
-                                    action="/tCouponManage/uploadPic"
-                                    list-type="picture-card"
-                                    accept=".jpg,.jpeg,.png,.JPG,.JPEG"
-                                    :on-success="handleAvatarSuccess"
-                                    :on-remove="handleRemove">
-                                <i class="el-icon-plus"></i>
-                            </el-upload>
-                            <el-dialog :visible.sync="dialogVisible">
-                                @for(img in pictures){
-                                <img width="100%" src="${img}">
-                                @}
-                                </el-dialog>
-                        </div>            </div>
+                </div>
 
                 </div>
             </div>
@@ -173,7 +169,7 @@
             <div class="row btn-group-m-t">
                 <div class="col-sm-10 col-sm-offset-5" >
                     @if(type!=1){
-                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addSubmit()"/>
+                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.editSubmit()"/>
                     @}
                     <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/>
                 </div>
@@ -188,6 +184,8 @@
 <script src="${ctxPath}/js/elementui/index.js"></script>
 <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css">
 <script>
+    let id = "${pictures}"
+    let obj = []
     var vue2 = new Vue({
         el: '#app1',
         props: {
@@ -200,10 +198,12 @@
         data: {
             autoUpload: true,//自动上传
             imageUrl1: '',//模型数据,用于上传图片完成后图片预览
+            imageUrl2: [],
             dialogVisible: false
         },
         methods: {
             handleAvatarSuccess(res, file) {
+                file.url =file.response
                 TSite.goodsPicArray.push(res);
             },
             beforeAvatarUpload(file) {
@@ -218,8 +218,26 @@
                     return item.uid != file.uid;
                 });
             },
+            changeImg(){
+                console.log("看看id")
+                console.log(id)
+                var i = id.split(",")
+                for (let j = 0; j <i.length; j++) {
+                    let obj={
+                        fileName:i[j],
+                        uuid:i[j],
+                        url:i[j],
+                        response:i[j],
+                    }
+                    this.imageUrl2.push(obj)
+                }
+                console.log(this.imageUrl2)
+            },
         },
         created() {
+            this.changeImg()
+            TSite.goodsPicArray = this.imageUrl2
+            console.log(TSite.goodsPicArray)
         },
     });
 
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCoupon.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCoupon.html
index fa3b465..b49873d 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCoupon.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCoupon.html
@@ -27,6 +27,7 @@
                             <option value="1">积分购买</option>
                             <option value="2">注册赠送</option>
                             <option value="3">自动发券</option>
+                            <option value="4">课包赠送</option>
                         </#SelectCon>
                     </div>
                     <div class="col-sm-3">
@@ -37,13 +38,7 @@
                         <option value="3">已有学员用户</option>
                     </#SelectCon>
                 </div>
-                <div class="col-sm-3">
-                    <#SelectCon id="status" name="活动状态" >
-                    <option value="">全部</option>
-                    <option value="1">未开始</option>
-                    <option value="2">已开始</option>
-                    <option value="3">已结束</option>
-                </#SelectCon>
+
             </div>
                     <div class="col-sm-3">
                 <#SelectCon id="state" name="可售状态" >
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
index 504486a..8094f59 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
@@ -128,10 +128,10 @@
                     <div class="form-group">
                         <div class="initialLevel col-sm-12 control-label form-group">
                             <label class="col-sm-3 control-label">*兑换方式: </label>
-                            <input class="col-sm-1 control-label" onclick="exchangeMethod1()" name="exchangeMethod" type="radio"
+                            <input class="col-sm-1 control-label"  onclick="exchangeMethod1()" name="exchangeMethod" type="radio"
                                    value="1"  style="margin-top: 10px"/>
                             <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分</label>
-                            <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod2()" type="radio"
+                            <input class="col-sm-1 control-label" name="exchangeMethod" checked  onclick="exchangeMethod2()" type="radio"
                                    value="2"  style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/>
                             <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金+积分</label>
                             <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod3()" type="radio"
@@ -146,7 +146,7 @@
             <div class="row" id="needAmount" hidden="hidden">
                 <div class="col-sm-6">
                     <div class="form-group">
-                        <label class="col-sm-3 control-label">*所需现金</label>
+                        <label class="col-sm-3 control-label"  >*所需现金</label>
                         <div class="col-sm-9">
                             <input class="form-control" id="requiredCash" placeholder="请输入所需现金" name="requiredCash" autocomplete="off" type="text"
                                    onkeyup="this.value=this.value.replace(/\D/g,'')">
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 7c62805..c79db46 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
@@ -166,6 +166,18 @@
                         <input class="form-control" id="pickUpQuantity1" name="pickUpQuantity" type="text" value="${item.pickUpQuantity}" readonly>
                     </div>
                 </div>
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">已领数量:</label>
+                    <div class="col-sm-9">
+                        <input class="form-control" id="pickUpQuantity3" name="pickUpQuantity" type="text" value="${item.pickUpQuantity3}" readonly>
+                    </div>
+                </div>
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">已兑换数量:</label>
+                    <div class="col-sm-9">
+                        <input class="form-control" id="pickUpQuantity4" name="pickUpQuantity" type="text" value="${item.pickUpQuantity4}" readonly>
+                    </div>
+                </div>
                 <#input id="startTime1" name="有效期" type="text" value="${sTime} - ${eTime}" readonly="true"/>
 
                 <div class="form-group" style="margin-left:262px">
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_edit.html
index 7852f3e..1af87a0 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_edit.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tGoods/TGoods_edit.html
@@ -71,7 +71,6 @@
                                 </el-dialog>
                             </div>
                         </div>
-
                     </div>
                 </div>
                 <div class="form-group">
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_two.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_two.html
index ab20d27..50c9381 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_two.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_two.html
@@ -4,12 +4,12 @@
         <div class="form-horizontal" id="carInfoForm">
 
 
-            <#avatar id="url" name="图片(推荐像素宽度316px)"/>
+            <#avatar id="url" name="*图片(推荐像素宽度316px)"/>
 
             <div class="input-group" style="margin-left: 342px;">
                 <div class="input-group-btn">
                     <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
-                        跳转模块
+                        *跳转模块
                     </button>
                 </div>
                 <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)">
@@ -25,7 +25,7 @@
             <div class="input-group" style="margin-left: 342px;" id="t1" hidden >
                 <div class="input-group-btn">
                     <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
-                        跳转页面
+                        *跳转页面
                     </button>
                 </div>
                 <select class="form-control" id="page" style="width: 400px;" onchange="updateOne(this)">
@@ -36,7 +36,7 @@
             <div class="input-group" style="margin-left: 342px;" id="t2" >
                 <div class="input-group-btn">
                     <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" >
-                        跳转类型
+                        *跳转类型
                     </button>
                 </div>
                 <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)" >
@@ -45,14 +45,14 @@
             </div>
 
             <div class="form-group" id="t3"  >
-                <label class="col-sm-3 control-label">跳转ID:</label>
+                <label class="col-sm-3 control-label">*跳转ID:</label>
                 <div class="col-sm-9">
                     <input class="form-control" id="turnId" name="turnId" type="text" style="width: 400px;">
                 </div>
             </div>
 
             <div class="form-group" id="t4" >
-                <label class="col-sm-3 control-label">排序:</label>
+                <label class="col-sm-3 control-label">*排序:</label>
                 <div class="col-sm-9">
                     <input class="form-control" id="sort" name="sort" type="text" style="width: 400px;">
 
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue.js b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue.js
index 4a36025..4e6252d 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue.js
@@ -22,20 +22,7 @@
         { title: '姓名', field: 'booker', visible: true, align: 'center', valign: 'middle'},
         { title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
         { title: '预约时间段', field: 'times', visible: true, align: 'center', valign: 'middle'},
-        { title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle' , formatter: function(value, row) {
-                switch (value) {
-                    case 1:
-                        return '微信';
-                    case 2:
-                        return '支付宝';
-                    case 3:
-                        return '玩湃币';
-                    case 4:
-                        return '手动支付';
-                    default:
-                        return '';
-                }
-            }},
+        { title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle'},
         {
             title: '金额',
             field: 'money',
@@ -230,7 +217,7 @@
                     Feng.success("手动支付" + "成功!");
                     TStudent.table.refresh();
                 }, function (data) {
-                    Feng.error(state == 1 ? '手动支付' : "下架" + "失败!" + data.responseJSON.message + "!");
+
                 });
                 ajax.start();
                 parent.layer.close(index);
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/course/course.js b/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
index a5a23a8..c1aa138 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
@@ -1,7 +1,7 @@
 /**
  * 系统管理--用户管理的单例对象
  */
-let Course = {
+var Course = {
     id: "managerTable",//表格id
     seItem: null,		//选中的条目
     table: null,
@@ -99,6 +99,11 @@
  */
 Course.delCourse = function () {
     if (this.check()) {
+        console.log()
+        if (Course.seItem.state == 1){
+            Feng.error("只能删除已下架的视频课");
+            return;
+        }
         let operation = function(){
             let ajax = new $ax(Feng.ctxPath + "/course/delCourse", function () {
                 Feng.success("删除成功!");
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/course/course_info.js b/cloud-server-management/src/main/webapp/static/modular/system/course/course_info.js
index a659869..1117eba 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/course/course_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/course/course_info.js
@@ -104,8 +104,10 @@
     //提交信息
     var ajax = new $ax(Feng.ctxPath + "/course/editCourse", function (data) {
         if(data.code == 200){
+
             window.parent.Course.table.refresh();
             CourseInfo.close();
+
             Feng.success("修改成功!");
         }else{
             Feng.error(data.msg);
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js
index 03693e1..b8a08c7 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageDiscount.js
@@ -405,7 +405,7 @@
     let index = $('#classHours').find('button[checked]').attr('index');
     let obj = CoursePackageDiscount.coursePackagePaymentConfig[index];
     $('#payment').text(obj.payment);
-    $('#cashPayment').text(obj.cashPayment);
+    $('#cashPayment').text(obj.cashPayment+"元");
 
     $('#memberDiscount').html('');
     $('#renewalOffer').html('');
@@ -431,14 +431,21 @@
     let htmlStr = '';
     for (let i = 0; i < CoursePackageDiscount.coursePackagePaymentConfig.length; i++) {
         let obj = CoursePackageDiscount.coursePackagePaymentConfig[i];
-        if(i == 0){
-            htmlStr += '<button checked onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;">' + obj.classHours + '课时</button>&nbsp;&nbsp;&nbsp;&nbsp;';
-        }else{
-            htmlStr += '<button onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;border: none;border-radius: 5px;">' + obj.classHours + '课时</button>&nbsp;&nbsp;&nbsp;&nbsp;';
-        }
+        console.log("看看课程类型")
+        console.log($('#type').val());
+            if(i == 0){
+                htmlStr += '<button checked onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;">' + obj.classHours + '课时</button>&nbsp;&nbsp;&nbsp;&nbsp;';
+            }else{
+                htmlStr += '<button onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;border: none;border-radius: 5px;">' + obj.classHours + '课时</button>&nbsp;&nbsp;&nbsp;&nbsp;';
+            }
+
     }
     $('#classHours').html(htmlStr);
-
+    if ($('#type').val()==2) {
+        var cla = document.getElementById("classHours");
+        console.log("隐藏")
+        cla.style.display="none";
+    }
     $('input[name="type"]').click(function () {
         let v = $(this).val();
         let index = $('#classHours').find('button[checked]').attr('index');
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
index 7f27709..a018859 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
@@ -75,6 +75,10 @@
 
 /**
  * 取消预约
+ * if(CoursePackageStudent.seItem.signInOrNot == 1){
+            Feng.error("不能取消预约操作");
+            return
+        }
  */
 CoursePackageStudent.cancelReservation = function () {
     if (this.check()) {
@@ -82,10 +86,7 @@
             Feng.error("不能重复操作");
             return
         }
-        if(CoursePackageStudent.seItem.signInOrNot == 1){
-            Feng.error("不能取消预约操作");
-            return
-        }
+
         let operation = function(){
             let ajax = new $ax(Feng.ctxPath + "/coursePackage/cancelReservation", function (res) {
                 if(res.code == 200){
@@ -100,7 +101,7 @@
             ajax.set("id", CoursePackageStudent.seItem.id);
             ajax.start();
         };
-        Feng.confirm("是否取消预约",operation);
+        Feng.confirm("是否请假",operation);
     }
 };
 
@@ -112,7 +113,7 @@
             return
         }
         if(CoursePackageStudent.seItem.reservationStatus == 0){
-            Feng.error("该数据已取消预约");
+            Feng.error("当前学员已请假");
             return
         }
         let operation = function(){
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage_info.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage_info.js
index 8752c56..b239a7a 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackage_info.js
@@ -154,7 +154,7 @@
         return
     }
 
-    if (type == 1 ) {
+
 
         var checkboxes1 = document.getElementsByName('payType');
         var isChecked1 = false;
@@ -166,6 +166,8 @@
             }
         }
 
+    console.log("看看选中")
+    console.log(isChecked1)
         if (isChecked1) {
             console.log("At least one checkbox is selected.");
         } else {
@@ -234,7 +236,7 @@
 
         }
 
-
+    if (type == 1 ) {
         var elements1 = document.getElementsByClassName('classNumber');
 
         for (var i = 0; i < elements1.length; i++) {
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCoach/tCoach_add.js b/cloud-server-management/src/main/webapp/static/modular/system/tCoach/tCoach_add.js
index 2209b7b..a5ab2ea 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCoach/tCoach_add.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCoach/tCoach_add.js
@@ -357,9 +357,12 @@
     data.certificate        = $('#certificate').val()
 
     var temp = ""
-    TSite.goodsPicArray.forEach(function (data) {
-        temp = temp+","+data
-    });
+
+    for (let i = 0; i < TSite.goodsPicArray.length; i++) {
+        console.log("循环")
+        console.log(TSite.goodsPicArray[i])
+        temp = temp+","+TSite.goodsPicArray[i];
+    }
     data.certificateImg        = temp
 
     if($("#pCode").val()==''){
@@ -411,13 +414,151 @@
         return;
     }
     if($("#img").val()==''){
+        if ($("#diploma").val()==""){
         Feng.info("请输入毕业证图片")
-        return;
+            return;
+
+        }
+
     }
     if($("#certificate").val()==''){
-        Feng.info("请输入资格证书")
+
+            Feng.info("请输入资格证书")
+            return;
+    }
+    if(TSite.goodsPicArray.length === 0){
+        Feng.info("请上传资格证书图片")
         return;
     }
+    $.ajax({
+        url: Feng.ctxPath + "/tCoach/add" ,
+        type: "POST",
+        data: JSON.stringify(data),
+        contentType: "application/json",
+        success: function (response) {
+            window.parent.TSite.table.refresh();
+            TSite.close();
+            Feng.success("添加成功");
+
+        },
+        error: function (xhr, status, error) {
+            Feng.error("添加失败!" + error);
+        }
+    });
+};
+TSite.editSubmit = function(){
+
+
+    var data = {
+        id:null,
+        province:"",
+        provinceCode:"",
+        city:"",
+        cityCode:"",
+        cityManagerId:null,
+        coachTypeId:null,
+        name:"",
+        birthday:"",
+        gender:null,
+        phone:"",
+        idcard:"",
+        height:null,
+        weight:null,
+        graduateSchool:"",
+        diploma:"",
+        certificate:"",
+        certificateImg:"",
+    };
+    if ($("#dataId").val()!=="undefined"){
+        data.id = $("#dataId").val();
+    }
+    data.provinceCode       = $("#pCode").val()
+    data.province           = $('#pCode option:selected').text();
+    data.cityCode           = $("#cCode").val()
+    data.city               = $('#cCode option:selected').text();
+    data.cityManagerId      = $("#account").val()
+    data.coachTypeId         = $("#coachTypeId").val()
+    data.name               = $("#name").val()
+    data.birthday           = $("#birthday").val()
+    data.gender             = $("#gender").val()
+    data.phone              = $("#phone").val()
+    data.idcard             = $("#idcard").val()
+    data.height             = $("#height").val()
+    data.weight             = $("#weight").val()
+    data.graduateSchool     = $('#graduateSchool').val()
+    data.diploma            = $('#img').val()
+    data.certificate        = $('#certificate').val()
+
+    var temp = ""
+
+    for (let i = 0; i < TSite.goodsPicArray.length; i++) {
+        console.log("循环")
+        console.log(TSite.goodsPicArray[i][`fileName`])
+        temp = temp+","+TSite.goodsPicArray[i][`fileName`];
+    }
+    data.certificateImg        = temp
+
+    if($("#pCode").val()==''){
+        Feng.info("请选择省")
+        return;
+    }
+    if($("#cCode").val()==''){
+        Feng.info("请选择市")
+        return;
+    }
+    if($("#account").val()=='' ){
+        Feng.info("请选择账号")
+        return;
+    }
+    if($("#coachTypeId").val()=='' ){
+        Feng.info("请选择教练类型")
+        return;
+    }
+    if($("#name").val()=='' ){
+        Feng.info("请输入教练名称")
+        return;
+    }
+    if($("#birthday").val()==''){
+        Feng.info("请输入教练生日")
+        return;
+    }
+    if($("#gender").val()=='' ){
+        Feng.info("请选择教练性别")
+        return;
+    }
+    if($("#phone").val()==''){
+        Feng.info("请输入教练电话")
+        return;
+    }
+    if($("#idcard").val()==''){
+        Feng.info("请输入教练身份证号")
+        return;
+    }
+    if($("#height").val()==''){
+        Feng.info("请输入教练身高")
+        return;
+    }
+    if($("#weight").val()==''){
+        Feng.info("请输入教练体重")
+        return;
+    }
+    if($("#graduateSchool").val()==''){
+        Feng.info("请输入毕业院校")
+        return;
+    }
+    if($("#img").val()==''){
+        if ($("#diploma").val()==""){
+        Feng.info("请输入毕业证图片")
+            return;
+
+        }
+
+    }
+    if($("#certificate").val()==''){
+
+            Feng.info("请输入资格证书")
+            return;
+    }
     if(TSite.goodsPicArray.length === 0){
         Feng.info("请上传资格证书图片")
         return;
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetitionAudit/tCompetition.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetitionAudit/tCompetition.js
index b081c78..e6d57fc 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCompetitionAudit/tCompetition.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCompetitionAudit/tCompetition.js
@@ -107,6 +107,10 @@
  */
 TCompetition.openTCompetitionDetail = function () {
     if (this.check()) {
+        if (TCompetition.seItem.auditStatus == 3){
+            Feng.error("当前赛事不可以再审核");
+            return;
+        }
         var index = layer.load(1,{
             type: 1
             , title: '赛事审核'
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
index 7429f89..05e9891 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
@@ -37,18 +37,11 @@
         {title: '发放数量', field: 'quantityIssued', visible: true, align: 'center', valign: 'middle'},
         {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle'},
         {title: '已领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle'},
-        {title: '活动状态', field: 'status', visible: true, align: 'center', valign: 'middle',
-            formatter: function (value, row, index) {
-                return {1: "未开始", 2: "已开始", 3: "已结束"}[value]
-            }},
         {title: '可售状态', field: 'state', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row, index) {
                 return {1: "上架", 2: "下架"}[value]
             }},
-        {title: '审核状态', field: 'auditStatus', visible: true, align: 'center', valign: 'middle',
-            formatter: function (value, row, index) {
-                return {1: "待审核", 2: "已通过",3: "已拒绝"}[value]
-            }},
+
         {title: '发布类型', field: 'publisherType', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row, index) {
                 return {1: "运营商", 2: "平台",3: "门店"}[value]
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
index 5267798..f7fc5e5 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -527,8 +527,6 @@
 
 $(function () {
 
-
-
     getProvince(null);
     radio1();
     var OBJradio = document.getElementsByName("prescription")
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tDiscount/tDiscount.js b/cloud-server-management/src/main/webapp/static/modular/system/tDiscount/tDiscount.js
index 5a3de97..c298a34 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tDiscount/tDiscount.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tDiscount/tDiscount.js
@@ -235,7 +235,7 @@
     queryData['cityCode'] = $("#cCode").val();
     queryData['name'] = $("#name").val();
     queryData['shopName'] = $("#shopName").val();
-    queryData['type'] = $("type").val();
+    queryData['type'] = $("#type").val();
     TCompetition.table.refresh({query: queryData});
 };
 
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/tDiscount.js b/cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/tDiscount.js
index abb94e6..73845ff 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/tDiscount.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tDiscountAudit/tDiscount.js
@@ -22,11 +22,7 @@
         },
         {title:  '课包名称', field: 'name', visible: true, align: 'center', valign: 'middle'
         },
-        {title:  '折扣类型', field: 'type', visible: true, align: 'center', valign: 'middle'
-            ,formatter:function (data) {
-                return{1:"会员折扣",3:"限时折扣",4:"赠送课时"}[data]
-            }
-        },
+        {title:  '折扣类型', field: 'type', visible: true, align: 'center', valign: 'middle'},
         {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'
             ,formatter:function (data) {
                 return{1:"待审核",3:"未通过"}[data]
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js
index 047507f..9144697 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js
@@ -17,7 +17,6 @@
         {field: 'selectItem', checkbox: true},
         {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
         {title: '所在省市', field: 'provinceCity', visible: true, align: 'center', valign: 'middle'},
-        {title: '所属运营商', field: 'accountName', visible: true, align: 'center', valign: 'middle'},
         {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle'},
         {title: '闸机id', field: 'ids', visible: true, align: 'center', valign: 'middle'},
     ];
@@ -78,8 +77,8 @@
  */
 TStoreProvince.search = function () {
     var queryData = {};
-    queryData['provinceId'] = $("#pCode").val();
-    queryData['cityId'] = $("#cCode").val();
+    queryData['provinceId'] = $("#province").val();
+    queryData['cityId'] = $("#city").val();
     queryData['operatorId'] = $("#account").val();
     queryData['storeName'] = $("#storeName").val();
     TStoreProvince.table.refresh({query: queryData});
@@ -90,8 +89,8 @@
  * 重置搜索
  */
 TStoreProvince.resetSearch = function () {
-    $("#pCode").val('')
-    $("#cCode").val('')
+    $("#province").val('')
+    $("#city").val('')
     $("#account").val('')
     $("#storeName").val('')
     TStoreProvince.search();
@@ -105,7 +104,7 @@
     var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getProvince", function(data){
         data.forEach(province => {
             var option = document.createElement("option");
-            option.value = province.id;  // 根据你的数据结构确定省份的id字段
+            option.value = province.code;  // 根据你的数据结构确定省份的id字段
             option.text = province.name;  // 根据你的数据结构确定省份的name字段
             provinceSelect.appendChild(option);
         });
@@ -128,7 +127,7 @@
     var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){
         data.forEach(province => {
             var option = document.createElement("option");
-            option.value = province.id;  // 根据你的数据结构确定省份的id字段
+            option.value = province.code;  // 根据你的数据结构确定省份的id字段
             option.text = province.name;  // 根据你的数据结构确定省份的name字段
             citySelect.appendChild(option);
         });
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods.js
index f00f8ff..5d80600 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods.js
@@ -41,9 +41,9 @@
         },
         {title: '发放数量', field: 'quantityIssued', visible: true, align: 'center', valign: 'middle'
         },
-        {title: '限领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle'
+        {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle'
         },
-        {title: '已领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle'
+        {title: '已领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle'
         },
         {title: '已兑换数量', field: 'hasExchangeQty', visible: true, align: 'center', valign: 'middle'
         },
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js
index 1cd1d4c..dc29b38 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js
@@ -621,7 +621,10 @@
     //     Feng.info("请输入跳转ID")
     //     return;
     // }
-    if ($('#type option:selected').text() == "详情" &&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") {
+    console.log("看看跳转类型")
+    console.log($('#type option:selected').text())
+    if ($('#type option:selected').text() == "详情" || $('#type option:selected').text() == "指定商品"||$('#type option:selected').text() == "指定折扣") {
+
         if ($("#turnId").val() == '') {
             Feng.info("请输入跳转ID")
             return;
diff --git a/cloud-server-other/src/main/resources/mapper/BannerMapper.xml b/cloud-server-other/src/main/resources/mapper/BannerMapper.xml
index d9bbe55..0440c48 100644
--- a/cloud-server-other/src/main/resources/mapper/BannerMapper.xml
+++ b/cloud-server-other/src/main/resources/mapper/BannerMapper.xml
@@ -27,8 +27,8 @@
             <if test="query.state!=null and query.state!= ''">
                 and t_banner.state = #{query.state}
             </if>
-
         </where>
+        order by sort desc, insertTime desc
     </select>
 
     <insert id="createHistory">

--
Gitblit v1.7.1