Ver Fonte

悦姐ELearning BUG修改

huan.wang@yueguanjia.com há 5 anos atrás
pai
commit
a21b0a5d0f

+ 0 - 1
src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumCoreController.java

@@ -64,7 +64,6 @@ public class CollegeCurriculumCoreController {
         CollegeCurriculumQuery collegeCurriculumQuery = new CollegeCurriculumQuery();
         collegeCurriculumQuery.setId(id);
         collegeCurriculumQuery.setOpenid(openid);
-
         LinkedHashMap<String, Object> orderTemps = collegeCurriculumCoreService.queryUserLearningCoreDetail(collegeCurriculumQuery);
         String jso = JSONObject.toJSONString(orderTemps, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue);
         return jso;

+ 18 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumCore.java

@@ -15,6 +15,7 @@ public class CollegeCurriculumCore {
     private Integer testid;
     private Integer credit;
     private String video_length;
+    private String img_list_href;
     private String img_head_href;
     private String c_desc;
     private String c_content;
@@ -27,9 +28,26 @@ public class CollegeCurriculumCore {
     private String cd_code;
     private String status;
     private String openid;
+    private Integer isbooking;
     private Integer page;
     private Integer limit;
 
+    public String getImg_list_href() {
+        return img_list_href;
+    }
+
+    public void setImg_list_href(String img_list_href) {
+        this.img_list_href = img_list_href;
+    }
+
+    public Integer getIsbooking() {
+        return isbooking;
+    }
+
+    public void setIsbooking(Integer isbooking) {
+        this.isbooking = isbooking;
+    }
+
     public String getSys_type() {
         return sys_type;
     }

+ 18 - 0
src/main/java/com/ygj/yuemum/domain/college/ReturnUserLearningCoreDetail.java

@@ -3,6 +3,7 @@ package com.ygj.yuemum.domain.college;
 public class ReturnUserLearningCoreDetail {
     private String c_code;
     private String c_name;
+    private Integer c_step;
     private Integer pcount;
     private Integer credit;
     private String t_image_href;
@@ -21,9 +22,26 @@ public class ReturnUserLearningCoreDetail {
     private String video_href;
     private  Integer result;
     private Integer status;
+    private Integer isbooking;
     private String rate;
     private String rate_time;
 
+    public Integer getC_step() {
+        return c_step;
+    }
+
+    public void setC_step(Integer c_step) {
+        this.c_step = c_step;
+    }
+
+    public Integer getIsbooking() {
+        return isbooking;
+    }
+
+    public void setIsbooking(Integer isbooking) {
+        this.isbooking = isbooking;
+    }
+
     public Integer getIspositive() {
         return ispositive;
     }

+ 1 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeBookingService.java

@@ -55,6 +55,7 @@ public class CollegeBookingService {
                 collegeLearningDetail.setDate(sdf.format(new Date()));
                 collegeLearningDetail.setStatus(1);
                 collegeLearningDetail.setSys_type("YueLife");
+                collegeLearningDetail.setRate("0");
                 collegeLearningDetailService.addCollegeLearningDetail(collegeLearningDetail);
                 collegeBookingDao.insertSelective(collegeBooking);
                 return 1;

+ 71 - 36
src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumCoreService.java

@@ -84,13 +84,14 @@ public class CollegeCurriculumCoreService {
                     for (CollegeCurriculumCore collegeCurriculumCore : collegeCurriculumCores) {
                         if (collegeCurriculumCore.getStatus() != null && collegeCurriculumCore.getStatus().equals("9")) { //1-已预约,2-学习中,3-已过期, 9-已完成
                             collegeCurriculumCore.setStatus("已完成");
-                        } else if(collegeCurriculumCore.getStatus() != null && collegeCurriculumCore.getStatus().equals("2")){
+                        } else if (collegeCurriculumCore.getStatus() != null && collegeCurriculumCore.getStatus().equals("2")) {
                             collegeCurriculumCore.setStatus("待完成");
                         } else {
                             if (collegeCurriculumCore.getC_step() >= DateUtil.getWeekDiff(dateNow, getDate)) {
                                 collegeCurriculumCore.setStatus("待完成");
                             } else {
                                 collegeCurriculumCore.setStatus("未完成");
+                                collegeCurriculumCore.setCredit(0);
                             }
                         }
                         tableData.put("collegeCurriculumCores_b", collegeCurriculumCores);
@@ -109,6 +110,7 @@ public class CollegeCurriculumCoreService {
                                 collegeCurriculumCore.setStatus("待完成");
                             } else {
                                 collegeCurriculumCore.setStatus("未完成");
+                                collegeCurriculumCore.setCredit(0);
                             }
                         }
                         tableData.put("collegeCurriculumCores_p", collegeCurriculumCore_p);
@@ -135,10 +137,11 @@ public class CollegeCurriculumCoreService {
                         } else if (collegeCurriculumCore.getStatus() != null && collegeCurriculumCore.getStatus().equals("2")) {
                             collegeCurriculumCore.setStatus("待完成");
                         } else {
-                            if (collegeCurriculumCore.getC_step() >= DateUtil.getWeekDiff(dateNow, getDate)) {
+                            if (collegeCurriculumCore.getC_step() >= LMP - DateUtil.getWeekDiff(dateNow, getDate)) {
                                 collegeCurriculumCore.setStatus("待完成");
                             } else {
                                 collegeCurriculumCore.setStatus("未完成");
+                                collegeCurriculumCore.setCredit(0);
                             }
                         }
                     }
@@ -159,8 +162,7 @@ public class CollegeCurriculumCoreService {
         LinkedHashMap<String, Object> tableData = new LinkedHashMap<>();
         LinkedHashMap<String, Object> list = new LinkedHashMap<>();
         ReturnUserLearningCoreDetail returnUserLearningCoreDetail = collegeCurriculumCoreDao.queryUserLearningCoreDetail(collegeCurriculumQuery);
-        tableData.put("curriculumDetail", returnUserLearningCoreDetail);
-        if (returnUserLearningCoreDetail.isIsvideo()) {
+        try {
             list.put("collegeName", returnUserLearningCoreDetail.getC_name());
             list.put("collegeDesc", "文档课件"); //先写死
             list.put("collegeId", returnUserLearningCoreDetail.getId());
@@ -168,33 +170,65 @@ public class CollegeCurriculumCoreService {
                 list.put("collegeStatus", "完成度100%");
                 list.put("collegeFinish", "已完成");
             } else if (returnUserLearningCoreDetail.getStatus() != null && returnUserLearningCoreDetail.getStatus() == 2) {
-                if(returnUserLearningCoreDetail.getRate().equals("100%")) {
+                if (returnUserLearningCoreDetail.getRate().equals("100%")) {
                     list.put("collegeStatus", "完成度100%");
                     list.put("collegeFinish", "已完成");
                 } else {
                     list.put("collegeStatus", "完成度" + returnUserLearningCoreDetail.getRate());
                     list.put("collegeFinish", "未完成");
                 }
-
             } else {
-                list.put("collegeStatus", "完成度0%");
-                list.put("collegeFinish", "未完成");
+                //判断是否已过期
+                WXUser wxUser = wxUserService.getWXUser(collegeCurriculumQuery.getOpenid());
+                if (wxUser != null && wxUser.getXu_content_type() != null && wxUser.getXu_content_date() != null && wxUser.getXu_phone() != null) {
+                    Date dateNow = new Date();
+                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+                    Date getDate = sdf.parse(wxUser.getXu_content_date());
+                    if (wxUser.getXu_content_type().equals("B01")) {
+                        if (returnUserLearningCoreDetail.getC_step() >= DateUtil.getWeekDiff(dateNow, getDate)) {
+                            list.put("collegeStatus", "完成度0%");
+                            list.put("collegeFinish", "未完成");
+                        } else {
+                            list.put("collegeStatus", "完成度0%");
+                            list.put("collegeFinish", "未完成");
+                            returnUserLearningCoreDetail.setCredit(0);
+                        }
+                    } else if (wxUser.getXu_content_type().equals("P01")) {
+                        if (returnUserLearningCoreDetail.getC_step() >= LMP - DateUtil.getWeekDiff(dateNow, getDate)) {
+                            list.put("collegeStatus", "完成度0%");
+                            list.put("collegeFinish", "未完成");
+                        } else {
+                            list.put("collegeStatus", "完成度0%");
+                            list.put("collegeFinish", "未完成");
+                            returnUserLearningCoreDetail.setCredit(0);
+                        }
+                    } else {
+                        return null;
+                    }
+                } else {
+                    return null;
+                }
             }
-        }
-        if (returnUserLearningCoreDetail.isIstest()) {
-            list.put("testName", "本期课程测验");  //先写死
-            list.put("fullCredit", "满分100分"); //先写死
-            list.put("testId", returnUserLearningCoreDetail.getTestid());
-            if (returnUserLearningCoreDetail.getResult() != null) {
-                list.put("testResult", "您的成绩为" + returnUserLearningCoreDetail.getResult() + "分");
-                list.put("testFinish", "已完成");
-            } else {
-                list.put("testResult", "您尚未参与考试");
-                list.put("testFinish", "未完成");
+            tableData.put("curriculumDetail", returnUserLearningCoreDetail);
+            if (returnUserLearningCoreDetail.isIstest()) {
+                list.put("testName", "本期课程测验");  //先写死
+                list.put("fullCredit", "满分100分"); //先写死
+                list.put("testId", returnUserLearningCoreDetail.getTestid());
+                if (returnUserLearningCoreDetail.getResult() != null) {
+                    list.put("testResult", "您的成绩为" + returnUserLearningCoreDetail.getResult() + "分");
+                    list.put("testFinish", "已完成");
+                } else {
+                    list.put("testResult", "您尚未参与考试");
+                    list.put("testFinish", "未完成");
+                }
             }
+            tableData.put("curriculumList", list);
+            return tableData;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return null;
         }
-        tableData.put("curriculumList", list);
-        return tableData;
+
     }
 
     public LinkedHashMap<String, Object> queryCoreDetail(String openid, int id) {
@@ -211,22 +245,22 @@ public class CollegeCurriculumCoreService {
         tableData.put("positive", returnUserLearningCoreDetail.getPositive());
         tableData.put("t_desc", returnUserLearningCoreDetail.getT_desc());
         tableData.put("isvideo", returnUserLearningCoreDetail.isIsvideo());
-        tableData.put("video_length",returnUserLearningCoreDetail.getVideo_length());
+        tableData.put("video_length", returnUserLearningCoreDetail.getVideo_length());
         tableData.put("status", returnUserLearningCoreDetail.getStatus());
         tableData.put("rate", returnUserLearningCoreDetail.getRate());
         tableData.put("countdown", returnUserLearningCoreDetail.getRate_time());
-        tableData.put("video_href",returnUserLearningCoreDetail.getVideo_href());
-        tableData.put("ispositive",returnUserLearningCoreDetail.getIspositive());
-        if(returnUserLearningCoreDetail.getRate_time() != null) {
+        tableData.put("video_href", returnUserLearningCoreDetail.getVideo_href());
+        tableData.put("ispositive", returnUserLearningCoreDetail.getIspositive());
+        if (returnUserLearningCoreDetail.getRate_time() != null) {
             String coreTime[] = returnUserLearningCoreDetail.getVideo_length().split(":");
             int coreHours = Integer.parseInt(coreTime[0]) * 60 * 60;
             int coreMinutes = Integer.parseInt(coreTime[1]) * 60;
-            int coreTimeValue = coreHours+coreMinutes;
+            int coreTimeValue = coreHours + coreMinutes;
 
             String rateTime[] = returnUserLearningCoreDetail.getRate_time().split(":");
             int rateHours = Integer.parseInt(rateTime[0]) * 60 * 60;
             int rateMinutes = Integer.parseInt(rateTime[1]) * 60;
-            int rateTimeValue = rateHours+rateMinutes;
+            int rateTimeValue = rateHours + rateMinutes;
 
             int downTimeValue = coreTimeValue - rateTimeValue;
             tableData.put("rate_time", String.format("%02d", downTimeValue / 3600) + ":" + String.format("%02d", downTimeValue / 60 % 60));
@@ -248,6 +282,7 @@ public class CollegeCurriculumCoreService {
                 collegeLearningDetailNew.setC_code(c_code);
                 collegeLearningDetailNew.setStatus(8);
                 collegeLearningDetailNew.setDate(sdf.format(new Date()));
+                collegeLearningDetailNew.setSys_type("YueSuo");
                 collegeLearningDetailService.addCollegeLearningDetail(collegeLearningDetailNew);
                 collegeCurriculumCoreDao.updatePositive(c_code);
             } catch (Exception ex) {
@@ -267,7 +302,7 @@ public class CollegeCurriculumCoreService {
         collegeLearningDetail.setC_code(c_code);
         collegeLearningDetail.setSys_type("YueSuo");
         CollegeLearningDetail collegeLearningDetailOld = collegeLearningDetailService.checkCoreLearningRate(collegeLearningDetail);
-        if (collegeLearningDetailOld == null || collegeLearningDetailOld.getStatus() ==9) {
+        if (collegeLearningDetailOld == null || collegeLearningDetailOld.getStatus() == 9) {
             return 0;
         } else {
             //加学分 更新日志
@@ -310,21 +345,21 @@ public class CollegeCurriculumCoreService {
             String rTime[] = rate.split(":");
             int rHours = Integer.parseInt(rTime[0]) * 60 * 60;
             int rMinutes = Integer.parseInt(rTime[1]) * 60;
-            int rateNew = rHours+rMinutes;
+            int rateNew = rHours + rMinutes;
 
             String coreTime[] = collegeCurriculumCore.getVideo_length().split(":");
             int coreHours = Integer.parseInt(coreTime[0]) * 60 * 60;
             int coreMinutes = Integer.parseInt(coreTime[1]) * 60;
-            int coreRate = coreHours+coreMinutes;
-            double rateValueTemp = ((double)coreRate - (double)rateNew)/coreRate;
+            int coreRate = coreHours + coreMinutes;
+            double rateValueTemp = ((double) coreRate - (double) rateNew) / coreRate;
             String rateValue;
             if (rateValueTemp >= 1) {
                 rateValue = "100%";
             } else {
-                rateValue = df.format(rateValueTemp*100) + "%";
+                rateValue = df.format(rateValueTemp * 100) + "%";
             }
 
-            if(collegeLearningDetailOld == null) {
+            if (collegeLearningDetailOld == null) {
                 collegeLearningDetail.setRate(rateValue);
                 collegeLearningDetail.setDate(sdf.format(new Date()));
                 collegeLearningDetail.setStatus(2);
@@ -334,10 +369,10 @@ public class CollegeCurriculumCoreService {
                 collegeCurriculumCoreDao.updateCoreCount(c_code);
                 return 1;
             } else {
-                if(collegeLearningDetailOld.getStatus() == 9) {
+                if (collegeLearningDetailOld.getStatus() == 9) {
                     return 0;
                 } else {
-                    if (Double.parseDouble(rateValue.replace("%","")) > Double.parseDouble(collegeLearningDetailOld.getRate().replace("%",""))) {
+                    if (Double.parseDouble(rateValue.replace("%", "")) > Double.parseDouble(collegeLearningDetailOld.getRate().replace("%", ""))) {
                         collegeLearningDetail.setId(collegeLearningDetailOld.getId());
                         collegeLearningDetail.setRate(rateValue);
                         collegeLearningDetail.setStatus(2);
@@ -351,7 +386,7 @@ public class CollegeCurriculumCoreService {
                 }
 
             }
-        }catch (Exception ex) {
+        } catch (Exception ex) {
             ex.printStackTrace();
             return 0;
         }

+ 2 - 1
src/main/java/com/ygj/yuemum/service/eLearning/ELearningService.java

@@ -66,10 +66,11 @@ public class ELearningService {
         LinkedHashMap<String, Object> list = new LinkedHashMap<>();
         ReturnUserLearningCoreDetail returnUserLearningCoreDetail = collegeCurriculumCoreDao.queryCourseworkList(collegeCurriculumQuery);
         tableData.put("curriculumDetail", returnUserLearningCoreDetail);
-        if (returnUserLearningCoreDetail.isIsvideo()) {
+        if (returnUserLearningCoreDetail.isIsvideo()) {  //这个判断有问题!!! 回头改一下 图文课程此值就是false
             list.put("collegeName", returnUserLearningCoreDetail.getC_name());
             list.put("collegeDesc", "文档课件"); //先写死
             list.put("collegeId", returnUserLearningCoreDetail.getId());
+            list.put("isbooking",returnUserLearningCoreDetail.getIsbooking());
             if (returnUserLearningCoreDetail.getStatus() != null && returnUserLearningCoreDetail.getStatus() == 9) {
                 list.put("collegeStatus", "完成度100%");
                 list.put("collegeFinish", "已完成");

+ 61 - 60
src/main/resources/application.yml

@@ -8,9 +8,9 @@ mybatis:
 spring:
   datasource:
     driverClassName: com.mysql.jdbc.Driver
-    url: jdbc:mysql://121.43.235.99:3306/yuemum?useUnicode=true&characterEncoding=utf-8&noDatetimeStringSync=true
-    username: jielin
-    password: jielin123
+    url: jdbc:mysql://218.78.47.145:3306/yuemum?useUnicode=true&characterEncoding=utf-8&noDatetimeStringSync=true&useSSL=false
+    username: root
+    password: Test2020@
   thymeleaf:
     mode: LEGACYHTML5
     prefix: classpath:/templates
@@ -35,66 +35,66 @@ logging:
      com.ygj.yuemum.dao : debug
 #优惠券批次号信息--------------------
 #测试
-#coupon:
-#  NewUserCoupon : "PVP2018051297451"
-#  ConsultTaskCoupon : "PVP2018051273883"
-#  DetectionTaskCoupon : "PVP2018051211608"
-#  RechargeTaskCoupon : "PVP2018051263016"
-#生产
 coupon:
-  NewUserCoupon : "PVP2018051717019"
-  ConsultTaskCoupon : "PVP2018051739929"
-  DetectionTaskCoupon : "PVP2018051713733"
-  RechargeTaskCoupon : "PVP2018051714111"
+  NewUserCoupon : "PVP2018051297451"
+  ConsultTaskCoupon : "PVP2018051273883"
+  DetectionTaskCoupon : "PVP2018051211608"
+  RechargeTaskCoupon : "PVP2018051263016"
+#生产
+#coupon:
+#  NewUserCoupon : "PVP2018051717019"
+#  ConsultTaskCoupon : "PVP2018051739929"
+#  DetectionTaskCoupon : "PVP2018051713733"
+#  RechargeTaskCoupon : "PVP2018051714111"
 #图片上传路径--------------------------
 #本地
-file:
-  ROOT : "C:/apache-tomcat-9.0.14/webapps/resume/img/"
-  ResumeFile : "C:/apache-tomcat-9.0.14/webapps/resume/"
-  httpRoot : "http://localhost:8080/resume/img/"
-  httphtmlRoot : "http://localhost:8080/resume/"
-  modulePath : "C:/apache-tomcat-9.0.14/webapps/resume/resume.html"
-  payvoucher : "C:/apache-tomcat-9.0.14/webapps/payvoucher"
-  httppayvoucher : "http://localhost:8080/payvoucher"
-  promotionvoucher : "C:/apache-tomcat-9.0.14/webapps/MiniProgram/promotion/offline"
-  httppromotionvoucher : "http://localhost:8080/MiniProgram/promotion/offline"
-  qrcode: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm"
-  httpqrcode: "http://127.0.0.1:8080/MiniProgram/mgm"
-  IMGBANKCARD: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/bankCard/"
-  HTTPIMGBANKCARD: "http://127.0.0.1:8080/MiniProgram/mgm/bankCard/"
-  LOCALQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm"
-  DEMOQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/pop"
-  HTTPOPPQRCODE: "http://127.0.0.1:8080/MiniProgram/mgm/pop"
-  TESTQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/promotion/test"
-  HTTTESTQRCODE: "http://127.0.0.1:8080/MiniProgram/promotion/test/dc"
-  BANNERIMGURL: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/index/banner/"
-  HTTPBANNERIMGURL: "http://127.0.0.1:8080/MiniProgram/index/banner/"
-  DIANPINGIMGURL: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/dianping/"
-  HTTPDIANPINGIMGURL: "http://127.0.0.1:8080/MiniProgram/dianping/"
-#测试
 #file:
-#  ROOT : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/img/"
-#  ResumeFile : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/"
-#  httpRoot : "http://192.168.1.24:8182/resume/img/"
-#  httphtmlRoot : "http://192.168.1.24:8182/resume/"
-#  modulePath : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/resume.html"
-#  payvoucher : "/home/tomcat/apache-tomcat-8.5.40/webapps/payvoucher"
-#  httppayvoucher : "http://192.168.1.24:8182/payvoucher"
-#  promotionvoucher : "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/promotion/offline"
-#  httppromotionvoucher : "http://192.168.1.24:8182/MiniProgram/promotion/offline"
-#  qrcode: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm"
-#  httpqrcode: "http://192.168.1.24:8182/MiniProgram/mgm"
-#  IMGBANKCARD: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm/bankCard/"
-#  HTTPIMGBANKCARD: "http://192.168.1.24:8182/MiniProgram/mgm/bankCard/"
-#  LOCALQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm"
-#  DEMOQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm/pop"
-#  HTTPOPPQRCODE: "http://192.168.1.24:8182/MiniProgram/mgm/pop"
-#  TESTQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/promotion/test"
-#  HTTTESTQRCODE: "http://192.168.1.24:8182/MiniProgram/promotion/test/dc"
-#  BANNERIMGURL: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/index/banner/"
-#  HTTPBANNERIMGURL: "http://192.168.1.24:8182/MiniProgram/index/banner/"
-#  DIANPINGIMGURL: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/dianping/"
-#  HTTPDIANPINGIMGURL: "http://192.168.1.24:8182/MiniProgram/dianping/"
+#  ROOT : "C:/apache-tomcat-9.0.14/webapps/resume/img/"
+#  ResumeFile : "C:/apache-tomcat-9.0.14/webapps/resume/"
+#  httpRoot : "http://localhost:8080/resume/img/"
+#  httphtmlRoot : "http://localhost:8080/resume/"
+#  modulePath : "C:/apache-tomcat-9.0.14/webapps/resume/resume.html"
+#  payvoucher : "C:/apache-tomcat-9.0.14/webapps/payvoucher"
+#  httppayvoucher : "http://localhost:8080/payvoucher"
+#  promotionvoucher : "C:/apache-tomcat-9.0.14/webapps/MiniProgram/promotion/offline"
+#  httppromotionvoucher : "http://localhost:8080/MiniProgram/promotion/offline"
+#  qrcode: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm"
+#  httpqrcode: "http://127.0.0.1:8080/MiniProgram/mgm"
+#  IMGBANKCARD: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/bankCard/"
+#  HTTPIMGBANKCARD: "http://127.0.0.1:8080/MiniProgram/mgm/bankCard/"
+#  LOCALQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm"
+#  DEMOQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/pop"
+#  HTTPOPPQRCODE: "http://127.0.0.1:8080/MiniProgram/mgm/pop"
+#  TESTQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/promotion/test"
+#  HTTTESTQRCODE: "http://127.0.0.1:8080/MiniProgram/promotion/test/dc"
+#  BANNERIMGURL: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/index/banner/"
+#  HTTPBANNERIMGURL: "http://127.0.0.1:8080/MiniProgram/index/banner/"
+#  DIANPINGIMGURL: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/dianping/"
+#  HTTPDIANPINGIMGURL: "http://127.0.0.1:8080/MiniProgram/dianping/"
+#测试
+file:
+  ROOT : "/home/tomcat/apache-tomcat-9.0.30/webapps/resume/img/"
+  ResumeFile : "/home/tomcat/apache-tomcat-9.0.30/webapps/resume/"
+  httpRoot : "http://218.78.47.145:3306/resume/img/"
+  httphtmlRoot : "http://218.78.47.145:3306/resume/"
+  modulePath : "/home/tomcat/apache-tomcat-9.0.30/webapps/resume/resume.html"
+  payvoucher : "/home/tomcat/apache-tomcat-9.0.30/webapps/payvoucher"
+  httppayvoucher : "http://218.78.47.145:3306/payvoucher"
+  promotionvoucher : "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/promotion/offline"
+  httppromotionvoucher : "http://218.78.47.145:3306/MiniProgram/promotion/offline"
+  qrcode: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/mgm"
+  httpqrcode: "http://218.78.47.145:3306/MiniProgram/mgm"
+  IMGBANKCARD: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/mgm/bankCard/"
+  HTTPIMGBANKCARD: "http://218.78.47.145:3306/MiniProgram/mgm/bankCard/"
+  LOCALQRCODE: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/mgm"
+  DEMOQRCODE: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/mgm/pop"
+  HTTPOPPQRCODE: "http://218.78.47.145:3306/MiniProgram/mgm/pop"
+  TESTQRCODE: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/promotion/test"
+  HTTTESTQRCODE: "http://218.78.47.145:3306/MiniProgram/promotion/test/dc"
+  BANNERIMGURL: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/index/banner/"
+  HTTPBANNERIMGURL: "http://218.78.47.145:3306/MiniProgram/index/banner/"
+  DIANPINGIMGURL: "/home/tomcat/apache-tomcat-9.0.30/webapps/MiniProgram/dianping/"
+  HTTPDIANPINGIMGURL: "http://218.78.47.145:3306/MiniProgram/dianping/"
 #生产
 #file:
 #  ROOT : "/usr/local/tomcat/tomcat7/webapps/resume/img/"
@@ -146,7 +146,8 @@ baidu:
   BANKCARD: "https://aip.baidubce.com/rest/2.0/ocr/v1/bankcard"
 api:
   MDJAPIURL: "http://120.55.37.107:8763/introduce/activity"
-  BIZOBJECTSERVICE: "http://10.81.168.51:8090/edw/h3/operateObjects"
+  BIZOBJECTSERVICE: "http://47.111.190.117:8090/edw/h3/operateObjects"
+#  BIZOBJECTSERVICE: "http://47.111.190.117:8090/edw/h3/operateObjects"
   BIZUSERSERVICE: "https://www.h3yun.com/OpenApi/Invoke"
 #  BIZOBJECTSERVICE: "http://192.168.1.213:8010/h3/operateObjects"
 college:

+ 33 - 7
src/main/resources/mybatis/mapper/college/CollegeCurriculumCoreMapper.xml

@@ -16,6 +16,7 @@
         <result column="testid" property="testid" jdbcType="INTEGER"/>
         <result column="credit" property="credit" jdbcType="INTEGER"/>
         <result column="video_length" property="video_length" jdbcType="VARCHAR"/>
+        <result column="img_list_href" property="img_list_href" jdbcType="VARCHAR"/>
         <result column="img_head_href" property="img_head_href" jdbcType="VARCHAR"/>
         <result column="c_desc" property="c_desc" jdbcType="VARCHAR"/>
         <result column="c_content" property="c_content" jdbcType="VARCHAR"/>
@@ -25,6 +26,7 @@
         <result column="pcount" property="pcount" jdbcType="INTEGER"/>
         <result column="positive" property="positive" jdbcType="INTEGER"/>
         <result column="negative" property="negative" jdbcType="INTEGER"/>
+        <result column="isbooking" property="isbooking" jdbcType="INTEGER"/>
     </resultMap>
     <!--获取所有数据-->
 
@@ -65,7 +67,9 @@
             ccc.t_desc,
             ccc.isvideo,
             ccc.video_length,
+            ccc.img_list_href,
             ccc.video_href,
+            ccc.isbooking,
             (select status from college_learning_detail where c_code = ccc.c_code and sys_type = 'YueSuo' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1) `status`,
             IFNULL((select rate from college_learning_detail where c_code = ccc.c_code  and sys_type = 'YueSuo' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1),'0%') `rate`,
             IFNULL((select rate_time from college_learning_detail where c_code = ccc.c_code  and sys_type = 'YueSuo' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1),ccc.video_length) `rate_time`,
@@ -96,7 +100,9 @@
         where
         c_type = #{c_type,jdbcType=VARCHAR}
         and
-        FIND_IN_SET(#{c_step,jdbcType=INTEGER},c_step))
+        FIND_IN_SET(#{c_step,jdbcType=INTEGER},c_step)
+        and sys_type = 'YueSuo'
+        )
         and sys_type = 'YueSuo'
         ORDER BY
         c_seq desc
@@ -147,7 +153,7 @@
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
         delete from college_curriculum_core
         where id = #{id,jdbcType=INTEGER}
-        and ccc.sys_type = 'YueSuo'
+        and sys_type = 'YueSuo'
     </delete>
 
     <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore">
@@ -190,6 +196,9 @@
             <if test="video_length != null">
                 video_length,
             </if>
+            <if test="img_list_href != null">
+                img_list_href,
+            </if>
             <if test="img_head_href != null">
                 img_head_href,
             </if>
@@ -218,7 +227,10 @@
                 positive,
             </if>
             <if test="negative != null">
-                negative
+                negative,
+            </if>
+            <if test="isbooking != null">
+                isbooking
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -258,6 +270,9 @@
             <if test="video_length != null">
                 #{video_length,jdbcType=VARCHAR},
             </if>
+            <if test="img_list_href != null">
+                #{img_list_href,jdbcType=VARCHAR},
+            </if>
             <if test="img_head_href != null">
                 #{img_head_href,jdbcType=VARCHAR},
             </if>
@@ -283,7 +298,10 @@
                 #{positive,jdbcType=INTEGER},
             </if>
             <if test="negative != null">
-                #{negative,jdbcType=INTEGER}
+                #{negative,jdbcType=INTEGER},
+            </if>
+            <if test="isbooking != null">
+                #{isbooking,jdbcType=INTEGER}
             </if>
         </trim>
     </insert>
@@ -291,13 +309,13 @@
     <update id="updatePositive" parameterType="java.lang.String">
         update college_curriculum_core set positive = positive +1
         where c_code =  #{c_code,jdbcType=VARCHAR}
-        and ccc.sys_type = 'YueSuo'
+        and sys_type = 'YueSuo'
     </update>
 
     <update id="updateCoreCount" parameterType="java.lang.String">
         update college_curriculum_core set pcount = pcount +1
         where c_code =  #{c_code,jdbcType=VARCHAR}
-        and ccc.sys_type = 'YueSuo'
+        and sys_type = 'YueSuo'
     </update>
 
 
@@ -347,6 +365,9 @@
             <if test="video_length != null">
                 video_length = #{video_length,jdbcType=VARCHAR},
             </if>
+            <if test="img_list_href != null">
+                img_list_href = #{img_list_href,jdbcType=VARCHAR},
+            </if>
             <if test="img_head_href != null">
                 img_head_href = #{img_head_href,jdbcType=VARCHAR},
             </if>
@@ -372,7 +393,10 @@
                 positive = #{positive,jdbcType=INTEGER},
             </if>
             <if test="negative != null">
-                negative = #{negative,jdbcType=INTEGER}
+                negative = #{negative,jdbcType=INTEGER},
+            </if>
+            <if test="isbooking != null">
+                isbooking = #{isbooking,jdbcType=INTEGER}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
@@ -420,6 +444,8 @@
             ccc.isvideo,
             ccc.video_length,
             ccc.video_href,
+            ccc.img_list_href,
+            ccc.isbooking,
             (select status from college_learning_detail where c_code = ccc.id and sys_type = 'YueLife' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1) `status`,
             IFNULL((select rate from college_learning_detail where c_code = ccc.id  and sys_type = 'YueLife' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1),'0%') `rate`,
             IFNULL((select rate_time from college_learning_detail where c_code = ccc.id  and sys_type = 'YueLife' and  `status` != 8 and open_id = #{openid,jdbcType=VARCHAR} order by `status` desc limit 1),ccc.video_length) `rate_time`,