浏览代码

数据表增删改查,首页接口,优惠券领取功能调整

huan.wang@yueguanjia.com 5 年之前
父节点
当前提交
2446aaef1c
共有 42 个文件被更改,包括 2925 次插入22 次删除
  1. 12 0
      src/main/java/com/ygj/yuemum/component/Constant.java
  2. 43 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeCouponRuleController.java
  3. 43 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumCoreController.java
  4. 45 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumExperienceController.java
  5. 43 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumPracticeController.java
  6. 43 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeLearningDetailController.java
  7. 50 0
      src/main/java/com/ygj/yuemum/controller/college/CollegePointsDetailController.java
  8. 55 0
      src/main/java/com/ygj/yuemum/controller/college/CollegeUserPointsController.java
  9. 17 0
      src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumCoreDao.java
  10. 18 0
      src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumExperienceDao.java
  11. 22 0
      src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumPracticeDao.java
  12. 20 0
      src/main/java/com/ygj/yuemum/dao/college/CollegeLearningDetailDao.java
  13. 20 0
      src/main/java/com/ygj/yuemum/dao/college/CollegePointsDetailDao.java
  14. 22 0
      src/main/java/com/ygj/yuemum/dao/college/CollegePresentRuleDao.java
  15. 22 0
      src/main/java/com/ygj/yuemum/dao/college/CollegeUserPointsDao.java
  16. 203 0
      src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumCore.java
  17. 151 0
      src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumExperience.java
  18. 178 0
      src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumPractice.java
  19. 77 0
      src/main/java/com/ygj/yuemum/domain/college/CollegeLearningDetail.java
  20. 77 0
      src/main/java/com/ygj/yuemum/domain/college/CollegePointsDetail.java
  21. 95 0
      src/main/java/com/ygj/yuemum/domain/college/CollegePresentRule.java
  22. 59 0
      src/main/java/com/ygj/yuemum/domain/college/CollegeUserPoints.java
  23. 10 0
      src/main/java/com/ygj/yuemum/domain/coupon/CouponCreate.java
  24. 41 0
      src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumCoreService.java
  25. 42 0
      src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumExperienceService.java
  26. 44 0
      src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumPracticeService.java
  27. 40 0
      src/main/java/com/ygj/yuemum/service/college/CollegeLearningDetailService.java
  28. 38 0
      src/main/java/com/ygj/yuemum/service/college/CollegePointsDetailService.java
  29. 42 0
      src/main/java/com/ygj/yuemum/service/college/CollegePresentRuleService.java
  30. 201 0
      src/main/java/com/ygj/yuemum/service/college/CollegeUserPointsService.java
  31. 55 17
      src/main/java/com/ygj/yuemum/service/coupon/CouponCreateService.java
  32. 10 0
      src/main/java/com/ygj/yuemum/service/global/WeChatInfoService.java
  33. 3 0
      src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java
  34. 4 0
      src/main/resources/application.yml
  35. 251 0
      src/main/resources/mybatis/mapper/college/CollegeCurriculumCoreMapper.xml
  36. 192 0
      src/main/resources/mybatis/mapper/college/CollegeCurriculumExperienceMapper.xml
  37. 228 0
      src/main/resources/mybatis/mapper/college/CollegeCurriculumPracticeMapper.xml
  38. 95 0
      src/main/resources/mybatis/mapper/college/CollegeLearningDetailMapper.xml
  39. 95 0
      src/main/resources/mybatis/mapper/college/CollegePointsDetailMapper.xml
  40. 119 0
      src/main/resources/mybatis/mapper/college/CollegePresentRuleMapper.xml
  41. 83 0
      src/main/resources/mybatis/mapper/college/CollegeUserPointsMapper.xml
  42. 17 5
      src/main/resources/mybatis/mapper/coupon/CouponCreateMapper.xml

+ 12 - 0
src/main/java/com/ygj/yuemum/component/Constant.java

@@ -61,6 +61,8 @@ public class Constant {
     public static String HTTPBANNERIMGURL;
     public static String DIANPINGIMGURL;
     public static String HTTPDIANPINGIMGURL;
+    public static Integer LMP;
+    public static Integer AGE;
 
     //注入
     @Autowired(required = false)
@@ -287,6 +289,16 @@ public class Constant {
         Constant.HTTPDIANPINGIMGURL = HTTPDIANPINGIMGURL;
     }
 
+    @Autowired(required = false)
+    public void getLMP(@Value("${college.LMP}") Integer LMP) {
+        Constant.LMP = LMP;
+    }
+
+    @Autowired(required = false)
+    public void getAGE(@Value("${college.AGE}") Integer AGE) {
+        Constant.AGE = AGE;
+    }
+
 
 
 }

+ 43 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegeCouponRuleController.java

@@ -0,0 +1,43 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegePresentRule;
+import com.ygj.yuemum.service.college.CollegePresentRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegeCouponRuleController {
+
+    @Autowired
+    private CollegePresentRuleService collegePresentRuleService;
+
+    @GetMapping("/getCollegePresentRules")
+    public List<CollegePresentRule> getCollegePresentRules() {
+        return collegePresentRuleService.getCollegePresentRules();
+    }
+
+    @GetMapping("/getCollegePresentRule")
+    public CollegePresentRule getCollegePresentRule(@RequestParam("id") Integer id) {
+        return collegePresentRuleService.getCollegePresentRule(id);
+    }
+
+    @PostMapping("/addCollegePresentRule")
+    public int addCollegePresentRule(@ModelAttribute CollegePresentRule collegePresentRule) {
+        return collegePresentRuleService.addCollegePresentRule(collegePresentRule);
+    }
+
+    @GetMapping("/deleteCollegePresentRule")
+    public int deleteCollegePresentRule(@RequestParam("id") Integer id) {
+        return collegePresentRuleService.deleteCollegePresentRule(id);
+    }
+
+    @PostMapping("/updateCollegePresentRule")
+    public int updateCollegePresentRule(@ModelAttribute CollegePresentRule collegePresentRule) {
+        return collegePresentRuleService.updateCollegePresentRule(collegePresentRule);
+    }
+
+
+}

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

@@ -0,0 +1,43 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumCore;
+import com.ygj.yuemum.service.college.CollegeCurriculumCoreService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegeCurriculumCoreController {
+
+    @Autowired
+    private CollegeCurriculumCoreService collegeCurriculumCoreService;
+
+    @GetMapping("/getCollegeCurriculumCores")
+    public List<CollegeCurriculumCore> getCollegeCurriculumCores() {
+        return collegeCurriculumCoreService.getCollegeCurriculumCores();
+    }
+
+    @GetMapping("/getCollegeCurriculumCore")
+    public CollegeCurriculumCore getCollegeCurriculumCore(@RequestParam("id") Integer id) {
+        return collegeCurriculumCoreService.getCollegeCurriculumCore(id);
+    }
+
+    @PostMapping("/addCollegeCurriculumCore")
+    public int addCollegeCurriculumCore(@ModelAttribute CollegeCurriculumCore collegeCurriculumCore) {
+        return collegeCurriculumCoreService.addCollegeCurriculumCore(collegeCurriculumCore);
+    }
+
+    @GetMapping("/deleteCollegeCurriculumCore")
+    public int deleteCollegeCurriculumCore(@RequestParam("id") Integer id) {
+        return collegeCurriculumCoreService.deleteCollegeCurriculumCore(id);
+    }
+
+    @PostMapping("/updateCollegeCurriculumCore")
+    public int updateCollegeCurriculumCore(@ModelAttribute CollegeCurriculumCore collegeCurriculumCore) {
+        return collegeCurriculumCoreService.updateCollegeCurriculumCore(collegeCurriculumCore);
+    }
+
+
+}

+ 45 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumExperienceController.java

@@ -0,0 +1,45 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumCore;
+import com.ygj.yuemum.domain.college.CollegeCurriculumExperience;
+import com.ygj.yuemum.service.college.CollegeCurriculumCoreService;
+import com.ygj.yuemum.service.college.CollegeCurriculumExperienceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegeCurriculumExperienceController {
+
+    @Autowired
+    private CollegeCurriculumExperienceService collegeCurriculumExperienceService;
+
+    @GetMapping("/getCollegeCurriculumExperiences")
+    public List<CollegeCurriculumExperience> getCollegeCurriculumExperiences() {
+        return collegeCurriculumExperienceService.getCollegeCurriculumExperiences();
+    }
+
+    @GetMapping("/getCollegeCurriculumExperience")
+    public CollegeCurriculumExperience getCollegeCurriculumExperience(@RequestParam("id") Integer id) {
+        return collegeCurriculumExperienceService.getCollegeCurriculumExperience(id);
+    }
+
+    @PostMapping("/addCollegeCurriculumExperience")
+    public int addCollegeCurriculumExperience(@ModelAttribute CollegeCurriculumExperience collegeCurriculumExperience) {
+        return collegeCurriculumExperienceService.addCollegeCurriculumExperience(collegeCurriculumExperience);
+    }
+
+    @GetMapping("/deleteCollegeCurriculumExperience")
+    public int deleteCollegeCurriculumExperience(@RequestParam("id") Integer id) {
+        return collegeCurriculumExperienceService.deleteCollegeCurriculumExperience(id);
+    }
+
+    @PostMapping("/updateCollegeCurriculumExperience")
+    public int updateCollegeCurriculumExperience(@ModelAttribute CollegeCurriculumExperience collegeCurriculumExperience) {
+        return collegeCurriculumExperienceService.updateCollegeCurriculumExperience(collegeCurriculumExperience);
+    }
+
+
+}

+ 43 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegeCurriculumPracticeController.java

@@ -0,0 +1,43 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumPractice;
+import com.ygj.yuemum.service.college.CollegeCurriculumPracticeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegeCurriculumPracticeController {
+
+    @Autowired
+    private CollegeCurriculumPracticeService collegeCurriculumPracticeService;
+
+    @GetMapping("/getCollegeCurriculumPractices")
+    public List<CollegeCurriculumPractice> getCollegeCurriculumPractices() {
+        return collegeCurriculumPracticeService.getCollegeCurriculumPractices();
+    }
+
+    @GetMapping("/getCollegeCurriculumPractice")
+    public CollegeCurriculumPractice getCollegeCurriculumPractice(@RequestParam("id") Integer id) {
+        return collegeCurriculumPracticeService.getCollegeCurriculumPractice(id);
+    }
+
+    @PostMapping("/addCollegeCurriculumPractice")
+    public int addCollegeCurriculumPractice(@ModelAttribute CollegeCurriculumPractice collegeCurriculumPractice) {
+        return collegeCurriculumPracticeService.addCollegeCurriculumPractice(collegeCurriculumPractice);
+    }
+
+    @GetMapping("/deleteCollegeCurriculumPractice")
+    public int deleteCollegeCurriculumPractice(@RequestParam("id") Integer id) {
+        return collegeCurriculumPracticeService.deleteCollegeCurriculumPractice(id);
+    }
+
+    @PostMapping("/updateCollegeCurriculumPractice")
+    public int updateCollegeCurriculumPractice(@ModelAttribute CollegeCurriculumPractice collegeCurriculumPractice) {
+        return collegeCurriculumPracticeService.updateCollegeCurriculumPractice(collegeCurriculumPractice);
+    }
+
+
+}

+ 43 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegeLearningDetailController.java

@@ -0,0 +1,43 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegeLearningDetail;
+import com.ygj.yuemum.service.college.CollegeLearningDetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegeLearningDetailController {
+
+    @Autowired
+    private CollegeLearningDetailService collegeLearningDetailService;
+
+    @GetMapping("/getCollegeLearningDetails")
+    public List<CollegeLearningDetail> getCollegeLearningDetails() {
+        return collegeLearningDetailService.getCollegeLearningDetails();
+    }
+
+    @GetMapping("/getCollegeLearningDetail")
+    public CollegeLearningDetail getCollegeLearningDetail(@RequestParam("id") Integer id) {
+        return collegeLearningDetailService.getCollegeLearningDetail(id);
+    }
+
+    @PostMapping("/addCollegeLearningDetail")
+    public int addCollegeLearningDetail(@ModelAttribute CollegeLearningDetail collegeLearningDetail) {
+        return collegeLearningDetailService.addCollegeLearningDetail(collegeLearningDetail);
+    }
+
+    @GetMapping("/deleteCollegeLearningDetail")
+    public int deleteCollegeLearningDetail(@RequestParam("id") Integer id) {
+        return collegeLearningDetailService.deleteCollegeLearningDetail(id);
+    }
+
+    @PostMapping("/updateCollegeLearningDetail")
+    public int updateCollegeLearningDetail(@ModelAttribute CollegeLearningDetail collegeLearningDetail) {
+        return collegeLearningDetailService.updateCollegeLearningDetail(collegeLearningDetail);
+    }
+
+
+}

+ 50 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegePointsDetailController.java

@@ -0,0 +1,50 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.ygj.yuemum.domain.college.CollegePointsDetail;
+import com.ygj.yuemum.domain.college.CollegeUserPoints;
+import com.ygj.yuemum.service.college.CollegePointsDetailService;
+import com.ygj.yuemum.service.college.CollegeUserPointsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+public class CollegePointsDetailController {
+
+    @Autowired
+    private CollegePointsDetailService collegePointsDetailService;
+
+    @GetMapping("/getCollegePointsDetails")
+    public List<CollegePointsDetail> getCollegePointsDetails() {
+        return collegePointsDetailService.getCollegePointsDetails();
+    }
+
+    @GetMapping("/getCollegePointsDetail")
+    public CollegePointsDetail getCollegePointsDetail(@RequestParam("id") Integer id) {
+        return collegePointsDetailService.getCollegePointsDetail(id);
+    }
+
+    @PostMapping("/addCollegePointsDetail")
+    public int addCollegePointsDetail(@ModelAttribute CollegePointsDetail collegePointsDetail) {
+        return collegePointsDetailService.addCollegePointsDetail(collegePointsDetail);
+    }
+
+    @GetMapping("/deleteCollegePointsDetail")
+    public int deleteCollegePointsDetail(@RequestParam("id") Integer id) {
+        return collegePointsDetailService.deleteCollegePointsDetail(id);
+    }
+
+    @PostMapping("/updateCollegePointsDetail")
+    public int updateCollegePointsDetail(@ModelAttribute CollegePointsDetail collegePointsDetail) {
+        return collegePointsDetailService.updateCollegePointsDetail(collegePointsDetail);
+    }
+
+    @PostMapping("/College/BasicInfoQuery")
+    public String BasicInfoQuery(@RequestParam("openid") String openid) {
+        return null;
+    }
+
+
+}

+ 55 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegeUserPointsController.java

@@ -0,0 +1,55 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.ygj.yuemum.domain.college.CollegeUserPoints;
+import com.ygj.yuemum.service.college.CollegeUserPointsService;
+import com.ygj.yuemum.service.wxmini.WXContentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class CollegeUserPointsController {
+
+    @Autowired
+    private CollegeUserPointsService collegeUserPointsService;
+
+    @GetMapping("/getCollegeUserPoints")
+    public List<CollegeUserPoints> getCollegeUserPoints() {
+        return collegeUserPointsService.getCollegeUserPoints();
+    }
+
+    @GetMapping("/getCollegeUserPoint")
+    public CollegeUserPoints getCollegeUserPoint(@RequestParam("id") Integer id) {
+        return collegeUserPointsService.getCollegeUserPoint(id);
+    }
+
+    @PostMapping("/addCollegeUserPoints")
+    public int addCollegeUserPoints(@ModelAttribute CollegeUserPoints collegeUserPoints) {
+        return collegeUserPointsService.addCollegeUserPoints(collegeUserPoints);
+    }
+
+    @GetMapping("/deleteCollegeUserPoints")
+    public int deleteCollegeUserPoints(@RequestParam("id") Integer id) {
+        return collegeUserPointsService.deleteCollegeUserPoints(id);
+    }
+
+    @PostMapping("/updateCollegeUserPoints")
+    public int updateCollegeUserPoints(@ModelAttribute CollegeUserPoints collegeUserPoints) {
+        return collegeUserPointsService.updateCollegeUserPoints(collegeUserPoints);
+    }
+    @PostMapping("/College/QueryUserPoints")
+    public String QueryUserPoints(@RequestParam("openid") String openid,@RequestParam("city") String city) {
+        LinkedHashMap<String, Object> orderTemps = collegeUserPointsService.QueryUserPoints(openid,city);
+        String jso = JSONObject.toJSONString(orderTemps, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue);
+        return jso;
+    }
+
+
+}

+ 17 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumCoreDao.java

@@ -0,0 +1,17 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumCore;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegeCurriculumCoreDao {
+
+    List<CollegeCurriculumCore> getAll();
+    CollegeCurriculumCore selectByPrimaryKey(Integer id);
+    int deleteByPrimaryKey(Integer id);
+    int insertSelective(CollegeCurriculumCore record);
+    int updateByPrimaryKeySelective(CollegeCurriculumCore record);
+    List<CollegeCurriculumCore> queryCoreByStep(CollegeCurriculumCore record);
+}

+ 18 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumExperienceDao.java

@@ -0,0 +1,18 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumExperience;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegeCurriculumExperienceDao {
+
+    List<CollegeCurriculumExperience> getAll();
+    CollegeCurriculumExperience selectByPrimaryKey(Integer id);
+    int deleteByPrimaryKey(Integer id);
+    int insertSelective(CollegeCurriculumExperience record);
+    int updateByPrimaryKeySelective(CollegeCurriculumExperience record);
+
+    List<CollegeCurriculumExperience> queryExperienceByStep(CollegeCurriculumExperience record);
+}

+ 22 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegeCurriculumPracticeDao.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegeCurriculumPractice;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegeCurriculumPracticeDao {
+
+    List<CollegeCurriculumPractice> getAll();
+
+    CollegeCurriculumPractice selectByPrimaryKey(Integer id);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CollegeCurriculumPractice record);
+
+    int updateByPrimaryKeySelective(CollegeCurriculumPractice record);
+
+    List<CollegeCurriculumPractice> queryPracticeByStep(CollegeCurriculumPractice record);
+}

+ 20 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegeLearningDetailDao.java

@@ -0,0 +1,20 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegeLearningDetail;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegeLearningDetailDao {
+
+    List<CollegeLearningDetail> getAll();
+
+    CollegeLearningDetail selectByPrimaryKey(Integer id);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CollegeLearningDetail record);
+
+    int updateByPrimaryKeySelective(CollegeLearningDetail record);
+}

+ 20 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegePointsDetailDao.java

@@ -0,0 +1,20 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegePointsDetail;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegePointsDetailDao {
+
+    List<CollegePointsDetail> getAll();
+
+    CollegePointsDetail selectByPrimaryKey(Integer id);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CollegePointsDetail record);
+
+    int updateByPrimaryKeySelective(CollegePointsDetail record);
+}

+ 22 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegePresentRuleDao.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegePresentRule;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegePresentRuleDao {
+
+    List<CollegePresentRule> getAll();
+
+    CollegePresentRule selectByPrimaryKey(Integer id);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CollegePresentRule record);
+
+    int updateByPrimaryKeySelective(CollegePresentRule record);
+
+    List<CollegePresentRule> queryUserReceived(String openid);
+}

+ 22 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegeUserPointsDao.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.dao.college;
+
+import com.ygj.yuemum.domain.college.CollegeUserPoints;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CollegeUserPointsDao {
+
+    List<CollegeUserPoints> getAll();
+
+    CollegeUserPoints selectByPrimaryKey(Integer id);
+
+    CollegeUserPoints queryUserPoints(String openid);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CollegeUserPoints record);
+
+    int updateByPrimaryKeySelective(CollegeUserPoints record);
+}

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

@@ -0,0 +1,203 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegeCurriculumCore {
+
+    private Integer id;
+    private String c_code;
+    private String c_name;
+    private String c_type;
+    private Integer c_step;
+    private Integer isvideo;
+    private String video_href;
+    private Integer istest;
+    private Integer testid;
+    private Integer credit;
+    private Integer video_length;
+    private String img_head_href;
+    private String c_desc;
+    private String c_content;
+    private String t_image_href;
+    private String t_name;
+    private String t_desc;
+    private Integer pcount;
+    private Integer positive;
+    private Integer negative;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getPcount() {
+        return pcount;
+    }
+
+    public void setPcount(Integer pcount) {
+        this.pcount = pcount;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getC_code() {
+        return c_code;
+    }
+
+    public void setC_code(String c_code) {
+        this.c_code = c_code;
+    }
+
+    public String getC_name() {
+        return c_name;
+    }
+
+    public void setC_name(String c_name) {
+        this.c_name = c_name;
+    }
+
+    public String getC_type() {
+        return c_type;
+    }
+
+    public void setC_type(String c_type) {
+        this.c_type = c_type;
+    }
+
+    public Integer getC_step() {
+        return c_step;
+    }
+
+    public void setC_step(Integer c_step) {
+        this.c_step = c_step;
+    }
+
+    public Integer getIsvideo() {
+        return isvideo;
+    }
+
+    public void setIsvideo(Integer isvideo) {
+        this.isvideo = isvideo;
+    }
+
+    public String getVideo_href() {
+        return video_href;
+    }
+
+    public void setVideo_href(String video_href) {
+        this.video_href = video_href;
+    }
+
+    public Integer getIstest() {
+        return istest;
+    }
+
+    public void setIstest(Integer istest) {
+        this.istest = istest;
+    }
+
+    public Integer getTestid() {
+        return testid;
+    }
+
+    public void setTestid(Integer testid) {
+        this.testid = testid;
+    }
+
+    public Integer getCredit() {
+        return credit;
+    }
+
+    public void setCredit(Integer credit) {
+        this.credit = credit;
+    }
+
+    public Integer getVideo_length() {
+        return video_length;
+    }
+
+    public void setVideo_length(Integer video_length) {
+        this.video_length = video_length;
+    }
+
+    public String getImg_head_href() {
+        return img_head_href;
+    }
+
+    public void setImg_head_href(String img_head_href) {
+        this.img_head_href = img_head_href;
+    }
+
+    public String getC_desc() {
+        return c_desc;
+    }
+
+    public void setC_desc(String c_desc) {
+        this.c_desc = c_desc;
+    }
+
+    public String getC_content() {
+        return c_content;
+    }
+
+    public void setC_content(String c_content) {
+        this.c_content = c_content;
+    }
+
+    public String getT_image_href() {
+        return t_image_href;
+    }
+
+    public void setT_image_href(String t_image_href) {
+        this.t_image_href = t_image_href;
+    }
+
+    public String getT_name() {
+        return t_name;
+    }
+
+    public void setT_name(String t_name) {
+        this.t_name = t_name;
+    }
+
+    public String getT_desc() {
+        return t_desc;
+    }
+
+    public void setT_desc(String t_desc) {
+        this.t_desc = t_desc;
+    }
+
+    public Integer getPositive() {
+        return positive;
+    }
+
+    public void setPositive(Integer positive) {
+        this.positive = positive;
+    }
+
+    public Integer getNegative() {
+        return negative;
+    }
+
+    public void setNegative(Integer negative) {
+        this.negative = negative;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}

+ 151 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumExperience.java

@@ -0,0 +1,151 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegeCurriculumExperience {
+
+    private Integer id;
+    private String c_code;
+    private String c_name;
+    private String c_type;
+    private Integer c_step;
+    private String c_desc;
+    private String c_content;
+    private String city;
+    private String m_name;
+    private String m_address;
+    private Integer latitude;
+    private Integer longitude;
+    private Integer credit;
+    private String qrcode;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getC_code() {
+        return c_code;
+    }
+
+    public void setC_code(String c_code) {
+        this.c_code = c_code;
+    }
+
+    public String getC_name() {
+        return c_name;
+    }
+
+    public void setC_name(String c_name) {
+        this.c_name = c_name;
+    }
+
+    public String getC_type() {
+        return c_type;
+    }
+
+    public void setC_type(String c_type) {
+        this.c_type = c_type;
+    }
+
+    public Integer getC_step() {
+        return c_step;
+    }
+
+    public void setC_step(Integer c_step) {
+        this.c_step = c_step;
+    }
+
+    public String getC_desc() {
+        return c_desc;
+    }
+
+    public void setC_desc(String c_desc) {
+        this.c_desc = c_desc;
+    }
+
+    public String getC_content() {
+        return c_content;
+    }
+
+    public void setC_content(String c_content) {
+        this.c_content = c_content;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getM_name() {
+        return m_name;
+    }
+
+    public void setM_name(String m_name) {
+        this.m_name = m_name;
+    }
+
+    public String getM_address() {
+        return m_address;
+    }
+
+    public void setM_address(String m_address) {
+        this.m_address = m_address;
+    }
+
+    public Integer getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(Integer latitude) {
+        this.latitude = latitude;
+    }
+
+    public Integer getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(Integer longitude) {
+        this.longitude = longitude;
+    }
+
+    public Integer getCredit() {
+        return credit;
+    }
+
+    public void setCredit(Integer credit) {
+        this.credit = credit;
+    }
+
+    public String getQrcode() {
+        return qrcode;
+    }
+
+    public void setQrcode(String qrcode) {
+        this.qrcode = qrcode;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}
+
+

+ 178 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegeCurriculumPractice.java

@@ -0,0 +1,178 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegeCurriculumPractice {
+
+    private Integer id;
+    private String c_code;
+    private String c_name;
+    private String c_type;
+    private Integer c_step;
+    private String c_desc;
+    private String c_content;
+    private String city;
+    private String branches;
+    private String address;
+    private String startdate;
+    private String enddate;
+    private String deadline;
+    private Integer maximum;
+    private Integer pcount;
+    private Integer credit;
+    private String qrcode;
+    private Integer page;
+    private Integer limit;
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public Integer getPcount() {
+        return pcount;
+    }
+
+    public void setPcount(Integer pcount) {
+        this.pcount = pcount;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getC_code() {
+        return c_code;
+    }
+
+    public void setC_code(String c_code) {
+        this.c_code = c_code;
+    }
+
+    public String getC_name() {
+        return c_name;
+    }
+
+    public void setC_name(String c_name) {
+        this.c_name = c_name;
+    }
+
+    public String getC_type() {
+        return c_type;
+    }
+
+    public void setC_type(String c_type) {
+        this.c_type = c_type;
+    }
+
+    public Integer getC_step() {
+        return c_step;
+    }
+
+    public void setC_step(Integer c_step) {
+        this.c_step = c_step;
+    }
+
+    public String getC_desc() {
+        return c_desc;
+    }
+
+    public void setC_desc(String c_desc) {
+        this.c_desc = c_desc;
+    }
+
+    public String getC_content() {
+        return c_content;
+    }
+
+    public void setC_content(String c_content) {
+        this.c_content = c_content;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getBranches() {
+        return branches;
+    }
+
+    public void setBranches(String branches) {
+        this.branches = branches;
+    }
+
+    public String getStartdate() {
+        return startdate;
+    }
+
+    public void setStartdate(String startdate) {
+        this.startdate = startdate;
+    }
+
+    public String getEnddate() {
+        return enddate;
+    }
+
+    public void setEnddate(String enddate) {
+        this.enddate = enddate;
+    }
+
+    public String getDeadline() {
+        return deadline;
+    }
+
+    public void setDeadline(String deadline) {
+        this.deadline = deadline;
+    }
+
+    public Integer getMaximum() {
+        return maximum;
+    }
+
+    public void setMaximum(Integer maximum) {
+        this.maximum = maximum;
+    }
+
+    public Integer getCredit() {
+        return credit;
+    }
+
+    public void setCredit(Integer credit) {
+        this.credit = credit;
+    }
+
+    public String getQrcode() {
+        return qrcode;
+    }
+
+    public void setQrcode(String qrcode) {
+        this.qrcode = qrcode;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}
+
+

+ 77 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegeLearningDetail.java

@@ -0,0 +1,77 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegeLearningDetail {
+
+    private Integer id;
+    private String open_id;
+    private String c_code;
+    private Integer status;
+    private String date;
+    private Integer credit;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOpen_id() {
+        return open_id;
+    }
+
+    public void setOpen_id(String open_id) {
+        this.open_id = open_id;
+    }
+
+    public String getC_code() {
+        return c_code;
+    }
+
+    public void setC_code(String c_code) {
+        this.c_code = c_code;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Integer getCredit() {
+        return credit;
+    }
+
+    public void setCredit(Integer credit) {
+        this.credit = credit;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}

+ 77 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegePointsDetail.java

@@ -0,0 +1,77 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegePointsDetail {
+
+    private Integer id;
+    private String openid;
+    private Integer event_code;
+    private String context;
+    private Integer credit;
+    private String date;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
+    public Integer getEvent_code() {
+        return event_code;
+    }
+
+    public void setEvent_code(Integer event_code) {
+        this.event_code = event_code;
+    }
+
+    public String getContext() {
+        return context;
+    }
+
+    public void setContext(String context) {
+        this.context = context;
+    }
+
+    public Integer getCredit() {
+        return credit;
+    }
+
+    public void setCredit(Integer credit) {
+        this.credit = credit;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}

+ 95 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegePresentRule.java

@@ -0,0 +1,95 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegePresentRule {
+
+    private Integer id;
+    private Integer seq;
+    private Integer value;
+    private String name;
+    private Integer type;
+    private int coupon_cid;
+    private String present_name;
+    private Integer received;
+    private Integer page;
+    private Integer limit;
+
+    public String getPresent_name() {
+        return present_name;
+    }
+
+    public void setPresent_name(String present_name) {
+        this.present_name = present_name;
+    }
+
+    public Integer getReceived() {
+        return received;
+    }
+
+    public void setReceived(Integer received) {
+        this.received = received;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public void setValue(Integer value) {
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public int getCoupon_cid() {
+        return coupon_cid;
+    }
+
+    public void setCoupon_cid(int coupon_cid) {
+        this.coupon_cid = coupon_cid;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}

+ 59 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegeUserPoints.java

@@ -0,0 +1,59 @@
+package com.ygj.yuemum.domain.college;
+
+public class CollegeUserPoints {
+
+    private Integer id;
+    private String openid;
+    private Integer credit_total;
+    private Integer credit_available;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
+    public Integer getCredit_total() {
+        return credit_total;
+    }
+
+    public void setCredit_total(Integer credit_total) {
+        this.credit_total = credit_total;
+    }
+
+    public Integer getCredit_available() {
+        return credit_available;
+    }
+
+    public void setCredit_available(Integer credit_available) {
+        this.credit_available = credit_available;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+}

+ 10 - 0
src/main/java/com/ygj/yuemum/domain/coupon/CouponCreate.java

@@ -13,11 +13,21 @@ public class CouponCreate {
     private String syncmodoodate;
     private Integer syncmodoo;
     private String usercode;
+    private boolean cb_type;
     private Integer page;
     private Integer limit;
     private String cb_packages;
     private String cb_citys;
 
+
+    public boolean isCb_type() {
+        return cb_type;
+    }
+
+    public void setCb_type(boolean cb_type) {
+        this.cb_type = cb_type;
+    }
+
     public String getCb_packages() {
         return cb_packages;
     }

+ 41 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumCoreService.java

@@ -0,0 +1,41 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegeCurriculumCoreDao;
+import com.ygj.yuemum.domain.college.CollegeCurriculumCore;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegeCurriculumCoreService {
+
+    @Autowired
+    private CollegeCurriculumCoreDao collegeCurriculumCoreDao;
+
+    public List<CollegeCurriculumCore> getCollegeCurriculumCores() {
+        List<CollegeCurriculumCore> collegeCurriculumCores = collegeCurriculumCoreDao.getAll();
+        return collegeCurriculumCores;
+    }
+
+    public CollegeCurriculumCore getCollegeCurriculumCore(Integer id) {
+        CollegeCurriculumCore collegeCurriculumCores = collegeCurriculumCoreDao.selectByPrimaryKey(id);
+        return collegeCurriculumCores;
+    }
+
+    public int addCollegeCurriculumCore(CollegeCurriculumCore collegeCurriculumCore) {
+        return collegeCurriculumCoreDao.insertSelective(collegeCurriculumCore);
+    }
+
+    public int deleteCollegeCurriculumCore(Integer id) {
+        return collegeCurriculumCoreDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegeCurriculumCore(CollegeCurriculumCore collegeCurriculumCore) {
+        return collegeCurriculumCoreDao.updateByPrimaryKeySelective(collegeCurriculumCore);
+    }
+    public List<CollegeCurriculumCore> queryCoreByStep(CollegeCurriculumCore collegeCurriculumCore) {
+        return collegeCurriculumCoreDao.queryCoreByStep(collegeCurriculumCore);
+    }
+
+}

+ 42 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumExperienceService.java

@@ -0,0 +1,42 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegeCurriculumExperienceDao;
+import com.ygj.yuemum.domain.college.CollegeCurriculumExperience;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegeCurriculumExperienceService {
+
+    @Autowired
+    private CollegeCurriculumExperienceDao collegeCurriculumExperienceDao;
+
+    public List<CollegeCurriculumExperience> getCollegeCurriculumExperiences() {
+        List<CollegeCurriculumExperience> collegeCurriculumExperiences = collegeCurriculumExperienceDao.getAll();
+        return collegeCurriculumExperiences;
+    }
+
+    public CollegeCurriculumExperience getCollegeCurriculumExperience(Integer id) {
+        CollegeCurriculumExperience collegeCurriculumExperience = collegeCurriculumExperienceDao.selectByPrimaryKey(id);
+        return collegeCurriculumExperience;
+    }
+
+    public int addCollegeCurriculumExperience(CollegeCurriculumExperience collegeCurriculumExperience) {
+        return collegeCurriculumExperienceDao.insertSelective(collegeCurriculumExperience);
+    }
+
+    public int deleteCollegeCurriculumExperience(Integer id) {
+        return collegeCurriculumExperienceDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegeCurriculumExperience(CollegeCurriculumExperience collegeCurriculumExperience) {
+        return collegeCurriculumExperienceDao.updateByPrimaryKeySelective(collegeCurriculumExperience);
+    }
+
+    public List<CollegeCurriculumExperience> queryExperienceByStep(CollegeCurriculumExperience collegeCurriculumExperience) {
+        return collegeCurriculumExperienceDao.queryExperienceByStep(collegeCurriculumExperience);
+    }
+
+}

+ 44 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeCurriculumPracticeService.java

@@ -0,0 +1,44 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegeCurriculumExperienceDao;
+import com.ygj.yuemum.dao.college.CollegeCurriculumPracticeDao;
+import com.ygj.yuemum.domain.college.CollegeCurriculumExperience;
+import com.ygj.yuemum.domain.college.CollegeCurriculumPractice;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegeCurriculumPracticeService {
+
+    @Autowired
+    private CollegeCurriculumPracticeDao collegeCurriculumPracticeDao;
+
+    public List<CollegeCurriculumPractice> getCollegeCurriculumPractices() {
+        List<CollegeCurriculumPractice> collegeCurriculumPractices = collegeCurriculumPracticeDao.getAll();
+        return collegeCurriculumPractices;
+    }
+
+    public CollegeCurriculumPractice getCollegeCurriculumPractice(Integer id) {
+        CollegeCurriculumPractice collegeCurriculumPractice = collegeCurriculumPracticeDao.selectByPrimaryKey(id);
+        return collegeCurriculumPractice;
+    }
+
+    public int addCollegeCurriculumPractice(CollegeCurriculumPractice collegeCurriculumPractice) {
+        return collegeCurriculumPracticeDao.insertSelective(collegeCurriculumPractice);
+    }
+
+    public int deleteCollegeCurriculumPractice(Integer id) {
+        return collegeCurriculumPracticeDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegeCurriculumPractice(CollegeCurriculumPractice collegeCurriculumPractice) {
+        return collegeCurriculumPracticeDao.updateByPrimaryKeySelective(collegeCurriculumPractice);
+    }
+
+    public List<CollegeCurriculumPractice> queryPracticeByStep(CollegeCurriculumPractice collegeCurriculumPractice) {
+        return collegeCurriculumPracticeDao.queryPracticeByStep(collegeCurriculumPractice);
+    }
+
+}

+ 40 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeLearningDetailService.java

@@ -0,0 +1,40 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegeCurriculumCoreDao;
+import com.ygj.yuemum.dao.college.CollegeLearningDetailDao;
+import com.ygj.yuemum.domain.college.CollegeCurriculumCore;
+import com.ygj.yuemum.domain.college.CollegeLearningDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegeLearningDetailService {
+
+    @Autowired
+    private CollegeLearningDetailDao collegeLearningDetailDao;
+
+    public List<CollegeLearningDetail> getCollegeLearningDetails() {
+        List<CollegeLearningDetail> collegeLearningDetails = collegeLearningDetailDao.getAll();
+        return collegeLearningDetails;
+    }
+
+    public CollegeLearningDetail getCollegeLearningDetail(Integer id) {
+        CollegeLearningDetail collegeCurriculumCores = collegeLearningDetailDao.selectByPrimaryKey(id);
+        return collegeCurriculumCores;
+    }
+
+    public int addCollegeLearningDetail(CollegeLearningDetail collegeLearningDetail) {
+        return collegeLearningDetailDao.insertSelective(collegeLearningDetail);
+    }
+
+    public int deleteCollegeLearningDetail(Integer id) {
+        return collegeLearningDetailDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegeLearningDetail(CollegeLearningDetail collegeLearningDetail) {
+        return collegeLearningDetailDao.updateByPrimaryKeySelective(collegeLearningDetail);
+    }
+
+}

+ 38 - 0
src/main/java/com/ygj/yuemum/service/college/CollegePointsDetailService.java

@@ -0,0 +1,38 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegePointsDetailDao;
+import com.ygj.yuemum.domain.college.CollegePointsDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegePointsDetailService {
+
+    @Autowired
+    private CollegePointsDetailDao collegePointsDetailDao;
+
+    public List<CollegePointsDetail> getCollegePointsDetails() {
+        List<CollegePointsDetail> collegeUserPoints = collegePointsDetailDao.getAll();
+        return collegeUserPoints;
+    }
+
+    public CollegePointsDetail getCollegePointsDetail(Integer id) {
+        CollegePointsDetail collegeUserPoints = collegePointsDetailDao.selectByPrimaryKey(id);
+        return collegeUserPoints;
+    }
+
+    public int addCollegePointsDetail(CollegePointsDetail collegePointsDetail) {
+        return collegePointsDetailDao.insertSelective(collegePointsDetail);
+    }
+
+    public int deleteCollegePointsDetail(Integer id) {
+        return collegePointsDetailDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegePointsDetail(CollegePointsDetail collegePointsDetail) {
+        return collegePointsDetailDao.updateByPrimaryKeySelective(collegePointsDetail);
+    }
+
+}

+ 42 - 0
src/main/java/com/ygj/yuemum/service/college/CollegePresentRuleService.java

@@ -0,0 +1,42 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.dao.college.CollegePresentRuleDao;
+import com.ygj.yuemum.domain.college.CollegePresentRule;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CollegePresentRuleService {
+
+    @Autowired
+    private CollegePresentRuleDao collegePresentRuleDao;
+
+    public List<CollegePresentRule> getCollegePresentRules() {
+        List<CollegePresentRule> collegePresentRules = collegePresentRuleDao.getAll();
+        return collegePresentRules;
+    }
+
+    public CollegePresentRule getCollegePresentRule(Integer id) {
+        CollegePresentRule collegePresentRule = collegePresentRuleDao.selectByPrimaryKey(id);
+        return collegePresentRule;
+    }
+
+    public int addCollegePresentRule(CollegePresentRule collegeUserPoints) {
+        return collegePresentRuleDao.insertSelective(collegeUserPoints);
+    }
+
+    public int deleteCollegePresentRule(Integer id) {
+        return collegePresentRuleDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegePresentRule(CollegePresentRule collegeUserPoints) {
+        return collegePresentRuleDao.updateByPrimaryKeySelective(collegeUserPoints);
+    }
+
+    public List<CollegePresentRule> queryUserReceived(String openid) {
+        return collegePresentRuleDao.queryUserReceived(openid);
+    }
+
+}

+ 201 - 0
src/main/java/com/ygj/yuemum/service/college/CollegeUserPointsService.java

@@ -0,0 +1,201 @@
+package com.ygj.yuemum.service.college;
+
+import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.controller.global.WeChatInfoController;
+import com.ygj.yuemum.dao.college.CollegeUserPointsDao;
+import com.ygj.yuemum.domain.college.*;
+import com.ygj.yuemum.domain.customer.CustomerBooking;
+import com.ygj.yuemum.domain.wxmini.WXUser;
+import com.ygj.yuemum.service.coupon.CouponCreateService;
+import com.ygj.yuemum.service.customer.CustomerBookingService;
+import com.ygj.yuemum.service.wxmini.WXUserService;
+import com.ygj.yuemum.utils.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+@Service
+public class CollegeUserPointsService {
+
+    @Autowired
+    private CollegeUserPointsDao collegeUserPointsDao;
+    @Autowired
+    private WXUserService wxUserService;
+    @Autowired
+    private CollegePresentRuleService collegePresentRuleService;
+    @Autowired
+    private CollegeCurriculumCoreService collegeCurriculumCoreService;
+    @Autowired
+    private CollegeCurriculumPracticeService collegeCurriculumPracticeService;
+    @Autowired
+    private CollegeCurriculumExperienceService collegeCurriculumExperienceService;
+    @Autowired
+    private CollegePointsDetailService collegePointsDetailService;
+    @Autowired
+    private CustomerBookingService customerBookingService;
+    @Autowired
+    private WeChatInfoController weChatInfoController;
+    @Autowired
+    private CouponCreateService couponCreateService;
+
+
+
+    public Integer LMP = Constant.LMP;
+    public Integer AGE = Constant.AGE;
+
+    public List<CollegeUserPoints> getCollegeUserPoints() {
+        List<CollegeUserPoints> collegeUserPoints = collegeUserPointsDao.getAll();
+        return collegeUserPoints;
+    }
+
+    public CollegeUserPoints getCollegeUserPoint(Integer id) {
+        CollegeUserPoints collegeUserPoints = collegeUserPointsDao.selectByPrimaryKey(id);
+        return collegeUserPoints;
+    }
+
+    public int addCollegeUserPoints(CollegeUserPoints collegeUserPoints) {
+        return collegeUserPointsDao.insertSelective(collegeUserPoints);
+    }
+
+    public int deleteCollegeUserPoints(Integer id) {
+        return collegeUserPointsDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateCollegeUserPoints(CollegeUserPoints collegeUserPoints) {
+        return collegeUserPointsDao.updateByPrimaryKeySelective(collegeUserPoints);
+    }
+
+    public LinkedHashMap<String, Object> QueryUserPoints(String openid,String city) {
+        LinkedHashMap<String, Object> tableData = new LinkedHashMap<>();
+        WXUser wxUser = wxUserService.getWXUser(openid);
+        tableData.put("stage", null);
+        tableData.put("stage_date", null);
+        if (wxUser != null && wxUser.getXu_content_type() != null && wxUser.getXu_content_date() != null &&wxUser.getXu_phone() != null) {
+            try {
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+                SimpleDateFormat ldf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Date dateNow = new Date();
+                Date getDate = sdf.parse(wxUser.getXu_content_date());
+                CollegeCurriculumCore collegeCurriculumCoreQuery = new CollegeCurriculumCore();
+                CollegeCurriculumPractice collegeCurriculumPracticeQuery = new CollegeCurriculumPractice();
+                CollegeCurriculumExperience collegeCurriculumExperienceQuery = new CollegeCurriculumExperience();
+                CollegePointsDetail collegePointsDetail = new CollegePointsDetail();
+                if (wxUser.getXu_content_type().equals("B01")) { //育儿
+                    if (DateUtil.getMonthDiff(dateNow, getDate) + 1 < 0) {
+                        //不在育儿期内
+                        return tableData;
+                    } else if (DateUtil.getMonthDiff(dateNow, getDate) + 1 > AGE) {
+                        //超过育儿期
+                        return tableData;
+                    } else {
+                        tableData.put("stage_step", DateUtil.getMonthDiff(dateNow, getDate) + 1);
+                        collegeCurriculumCoreQuery.setC_type("B01");
+                        collegeCurriculumCoreQuery.setC_step(DateUtil.getMonthDiff(dateNow, getDate) + 1);
+                        collegeCurriculumPracticeQuery.setC_type("B01");
+                        collegeCurriculumPracticeQuery.setC_step(DateUtil.getMonthDiff(dateNow, getDate) + 1);
+                        collegeCurriculumExperienceQuery.setC_type("B01");
+                        collegeCurriculumExperienceQuery.setC_step(DateUtil.getMonthDiff(dateNow, getDate) + 1);
+                    }
+                } else if (wxUser.getXu_content_type().equals("P01")) { //孕周
+                    if (DateUtil.getWeekDiff(dateNow, getDate) < 0) {
+                        // 不在孕周内
+                        return tableData;
+                    } else if (DateUtil.getWeekDiff(dateNow, getDate) > LMP) {
+                        //超过孕周
+                        return tableData;
+                    } else {
+                        tableData.put("stage_step", DateUtil.getWeekDiff(dateNow, getDate));
+                        collegeCurriculumCoreQuery.setC_type("P01");
+                        collegeCurriculumCoreQuery.setC_step(DateUtil.getWeekDiff(dateNow, getDate));
+                        collegeCurriculumPracticeQuery.setC_type("P01");
+                        collegeCurriculumPracticeQuery.setC_step(DateUtil.getWeekDiff(dateNow, getDate));
+                        collegeCurriculumExperienceQuery.setC_type("P01");
+                        collegeCurriculumExperienceQuery.setC_step(DateUtil.getWeekDiff(dateNow, getDate));
+                    }
+                } else {
+                    return tableData;
+                }
+                tableData.put("stage", wxUser.getXu_content_type());
+                tableData.put("stage_date", wxUser.getXu_content_date());
+                tableData.put("avatar_url",wxUser.getXu_avatarUrl());
+                //查询学分
+                int point_available = 0;
+                CollegeUserPoints collegeUserPoints = collegeUserPointsDao.queryUserPoints(openid);
+                if (collegeUserPoints == null) {
+                    CollegeUserPoints collegeUserPointsNew = new CollegeUserPoints();
+                    collegeUserPointsNew.setOpenid(openid);
+                    collegeUserPointsNew.setCredit_total(0);
+                    collegeUserPointsNew.setCredit_available(0);
+                    collegeUserPointsDao.insertSelective(collegeUserPointsNew);
+                    tableData.put("credit", 0);
+                } else {
+                    tableData.put("credit", collegeUserPoints.getCredit_total());
+                    point_available = collegeUserPoints.getCredit_available();
+                }
+                //礼品领取情况
+                List<CollegePresentRule> collegePresentRules =  collegePresentRuleService.queryUserReceived(openid);
+                for(CollegePresentRule collegePresentRule:collegePresentRules) {
+                    if(collegePresentRule.getReceived() != 1 && point_available >= collegePresentRule.getValue()) {
+                        //返回礼品内容
+                        tableData.put("surprise", "true");
+                        tableData.put("surprise_type", collegePresentRule.getType());
+                        tableData.put("surprise_name", collegePresentRule.getPresent_name());
+                        //自动发放礼品
+                        if (collegePresentRule.getType() == 1) {
+                            // 实物生成一条预约信息并发送通知
+                            CustomerBooking customerBooking = new CustomerBooking();
+                            customerBooking.setBk_branches_id(Integer.valueOf(city));
+                            customerBooking.setBk_phone(wxUser.getXu_phone());
+                            customerBooking.setBk_date(ldf.format(new Date()));
+                            customerBooking.setBk_type(6);
+                            customerBooking.setBk_desc(collegePresentRule.getPresent_name());
+                            customerBookingService.insertCustomerBooking(customerBooking);
+                            weChatInfoController.WXSendBookingMessage(customerBooking);
+                            collegePointsDetail.setContext(collegePresentRule.getPresent_name());
+                        } else {
+                            //优惠券领取接口  ???
+                            String cb_code = couponCreateService.couponIssue(collegePresentRule.getCoupon_cid(),wxUser.getXu_phone());
+                            collegePointsDetail.setContext(collegePresentRule.getPresent_name()+":"+cb_code);
+                        }
+                        //保存领取日志
+                        collegePointsDetail.setOpenid(openid);
+                        collegePointsDetail.setDate(ldf.format(new Date()));
+                        collegePointsDetail.setEvent_code(4);
+                        collegePointsDetail.setCredit(collegePresentRule.getValue() * -1);
+                        collegePointsDetailService.addCollegePointsDetail(collegePointsDetail);
+                        //更新学分
+                        collegeUserPoints.setCredit_available(collegeUserPoints.getCredit_available() - collegePresentRule.getValue());
+                        collegeUserPointsDao.updateByPrimaryKeySelective(collegeUserPoints);
+                        break;
+                    }
+                }
+                tableData.put("present_received", collegePresentRules);
+                //常规课
+                List<CollegeCurriculumCore> collegeCurriculumCores = collegeCurriculumCoreService.queryCoreByStep(collegeCurriculumCoreQuery);
+                tableData.put("college_core",collegeCurriculumCores);
+                //实践课
+                collegeCurriculumPracticeQuery.setDeadline(sdf.format(new Date()));
+                collegeCurriculumPracticeQuery.setCity(city);
+                collegeCurriculumPracticeQuery.setStartdate(sdf.format(new Date()));
+                List<CollegeCurriculumPractice> collegeCurriculumPractices = collegeCurriculumPracticeService.queryPracticeByStep(collegeCurriculumPracticeQuery);
+                tableData.put("college_practice",collegeCurriculumPractices);
+                //体验课
+                collegeCurriculumExperienceQuery.setCity(city);
+                List<CollegeCurriculumExperience> collegeCurriculumExperiences = collegeCurriculumExperienceService.queryExperienceByStep(collegeCurriculumExperienceQuery);
+                tableData.put("college_experience",collegeCurriculumExperiences);
+                return tableData;
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                return tableData;
+            }
+        } else {
+            tableData.put("Tips", "请授权微信小程序用");
+            return tableData;
+        }
+    }
+
+}

+ 55 - 17
src/main/java/com/ygj/yuemum/service/coupon/CouponCreateService.java

@@ -5,6 +5,8 @@ import com.github.pagehelper.PageInfo;
 import com.ygj.yuemum.dao.coupon.CouponCreateDao;
 import com.ygj.yuemum.domain.coupon.Coupon;
 import com.ygj.yuemum.domain.coupon.CouponCreate;
+import com.ygj.yuemum.domain.customer.CustomerCoupon;
+import com.ygj.yuemum.service.customer.CustomerCouponService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -18,6 +20,8 @@ public class CouponCreateService {
     private CouponCreateDao couponCreateDao;
     @Autowired
     private CouponService couponService;
+    @Autowired
+    private CustomerCouponService customerCouponService;
 
     //分页
     public Map<String, Object> getCouponCreates(int page, int limit) {
@@ -43,25 +47,59 @@ public class CouponCreateService {
             couponCreate.setCc_status(1);
             couponCreate.setCc_createdate(String.valueOf(sdf.format(new Date())));
             couponCreateDao.insertSelective(couponCreate);
-            //取数量 生成优惠券
-            for(int i=0;i<couponCreate.getCc_quantity();i++){
-                Coupon coupon = new  Coupon();
-                coupon.setCp_code(UUID.randomUUID().toString().replace("-", ""));
+            if (!couponCreate.isCb_type()) {
+                //取数量 生成优惠券
+                for (int i = 0; i < couponCreate.getCc_quantity(); i++) {
+                    Coupon coupon = new Coupon();
+                    coupon.setCp_code(UUID.randomUUID().toString().replace("-", ""));
+                    coupon.setCb_code(couponCreate.getCb_code());
+                    coupon.setCc_code(ccpmid);
+                    coupon.setCp_amount(couponCreate.getCc_amount());
+                    coupon.setCp_startdate(couponCreate.getCc_startdate());
+                    coupon.setCp_enddate(couponCreate.getCc_enddate());
+                    coupon.setCp_status(1);
+                    if (couponService.addCoupon(coupon) != 1) {
+                        return 0;
+                    }
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
+
+    public String couponIssue(int coupon_cid,String phone) {
+        try {
+            CouponCreate couponCreate = couponCreateDao.selectByPrimaryKey(coupon_cid);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            if (couponCreate.isCb_type()) {
+                Coupon coupon = new Coupon();
+                String cp_code = UUID.randomUUID().toString().replace("-", "");
+                coupon.setCp_code(cp_code);
                 coupon.setCb_code(couponCreate.getCb_code());
-                coupon.setCc_code(ccpmid);
+                coupon.setCc_code(coupon_cid);
                 coupon.setCp_amount(couponCreate.getCc_amount());
                 coupon.setCp_startdate(couponCreate.getCc_startdate());
                 coupon.setCp_enddate(couponCreate.getCc_enddate());
                 coupon.setCp_status(1);
-                if(couponService.addCoupon(coupon) !=1){
-                    return 0;
-                }
+                couponService.addCoupon(coupon);
+                CustomerCoupon customerCoupon = new CustomerCoupon();
+                customerCoupon.setCm_phone(phone);
+                customerCoupon.setCb_code(couponCreate.getCb_code());
+                customerCoupon.setCc_code(cp_code);
+                customerCoupon.setCp_status(2);
+                customerCoupon.setCc_getdate(sdf.format( new Date()));
+                customerCoupon.setCc_getchannel(2);
+                customerCouponService.addCustomerCoupon(customerCoupon);
+                return cp_code;
             }
-        }catch (Exception ex) {
+        } catch (Exception ex) {
             ex.printStackTrace();
-            return 0;
+            return null;
         }
-        return 1;
+        return null;
     }
 
     public int deleteCouponCreate(Integer id) {
@@ -70,9 +108,9 @@ public class CouponCreateService {
 
     public int disableCouponCreate(Integer id) {
         try {
-            int tempa = couponCreateDao.disableCouponCreate(id);
-            int tempb = couponService.disableCoupon(id);
-        }catch (Exception ex){
+            couponCreateDao.disableCouponCreate(id);
+            couponService.disableCoupon(id);
+        } catch (Exception ex) {
             ex.printStackTrace();
             return 0;
         }
@@ -81,9 +119,9 @@ public class CouponCreateService {
 
     public int enableCouponCreate(Integer id) {
         try {
-            int tempa = couponCreateDao.enableCouponCreate(id);
-            int tempb = couponService.enableCoupon(id);
-        }catch (Exception ex){
+            couponCreateDao.enableCouponCreate(id);
+            couponService.enableCoupon(id);
+        } catch (Exception ex) {
             ex.printStackTrace();
             return 0;
         }

+ 10 - 0
src/main/java/com/ygj/yuemum/service/global/WeChatInfoService.java

@@ -238,6 +238,9 @@ public class WeChatInfoService {
         } else if (customerBooking.getBk_type().equals(2) && customerBooking.getBk_introducer_phone() != null && customerBooking.getBk_introducer_phone() != "") {
             first.setValue("月嫂预约信息!介绍人手机:" + customerBooking.getBk_introducer_phone() + ",介绍人顾问:" + customerBooking.getBk_introducer_consultant() + "!");
             first.setColor("#173177");
+        } else if (customerBooking.getBk_type().equals(6) && customerBooking.getBk_introducer_phone() != null && customerBooking.getBk_introducer_phone() != "") {
+            first.setValue("超级学院礼品领取!介绍人手机:" + customerBooking.getBk_introducer_phone() + ",介绍人顾问:" + customerBooking.getBk_introducer_consultant() + "!");
+            first.setColor("#173177");
         } else {
             first.setValue("预约信息!");
             first.setColor("#173177");
@@ -257,6 +260,12 @@ public class WeChatInfoService {
             keyword4.setColor("#173177");
             mapData.put("keyword4", keyword4);
         }
+        if (customerBooking.getBk_type().equals(5)) {
+            TemplateData keyword4 = new TemplateData();
+            keyword4.setValue("超级学院礼物领取,礼品名称:" + customerBooking.getBk_desc());
+            keyword4.setColor("#173177");
+            mapData.put("keyword4", keyword4);
+        }
         if (customerBooking.getBk_type().equals(4)) {
             TemplateData keyword4 = new TemplateData();
             keyword4.setValue("顾问预约," + "预产期:" + customerBooking.getBk_duedate());
@@ -280,6 +289,7 @@ public class WeChatInfoService {
             keyword5.setValue("用户选择偏好,请在智慧悦所管理系统中查询!");
             keyword5.setColor("#173177");
             mapData.put("remark", keyword5);
+
         } else {
             TemplateData keyword5 = new TemplateData();
             keyword5.setValue("请尽快安排跟进!");

+ 3 - 0
src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java

@@ -117,6 +117,9 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/uploadDianPingImg","anon");
         //简历分享问题
         filterChainDefinitionMap.put("/getWeChatInfo","anon");
+        //超人妈妈学院
+        filterChainDefinitionMap.put("/College/QueryUserPoints","anon");
+
 //        //用户,需要角色权限 “user”
 //        filterChainDefinitionMap.put("/user/**", "roles[user]");
 //        //管理员,需要角色权限 “admin”

+ 4 - 0
src/main/resources/application.yml

@@ -149,5 +149,9 @@ api:
   BIZOBJECTSERVICE: "http://10.81.168.51:8090/edw/h3/operateObjects"
   BIZUSERSERVICE: "https://www.h3yun.com/OpenApi/Invoke"
 #  BIZOBJECTSERVICE: "http://192.168.1.213:8010/h3/operateObjects"
+college:
+  LMP: 43
+  AGE: 12
+
 
 

+ 251 - 0
src/main/resources/mybatis/mapper/college/CollegeCurriculumCoreMapper.xml

@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegeCurriculumCoreDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="c_code" property="c_code" jdbcType="INTEGER" />
+        <result column="c_name" property="c_name" jdbcType="VARCHAR" />
+        <result column="c_type" property="c_type" jdbcType="VARCHAR" />
+        <result column="c_step" property="c_step" jdbcType="INTEGER" />
+        <result column="isvideo" property="isvideo" jdbcType="INTEGER" />
+        <result column="video_href" property="video_href" jdbcType="VARCHAR" />
+        <result column="istest" property="istest" jdbcType="INTEGER" />
+        <result column="testid" property="testid" jdbcType="INTEGER" />
+        <result column="credit" property="credit" jdbcType="INTEGER" />
+        <result column="video_length" property="video_length" jdbcType="INTEGER" />
+        <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" />
+        <result column="t_image_href" property="t_image_href" jdbcType="VARCHAR" />
+        <result column="t_name" property="t_name" jdbcType="VARCHAR" />
+        <result column="t_desc" property="t_desc" jdbcType="VARCHAR" />
+        <result column="pcount" property="pcount" jdbcType="INTEGER" />
+        <result column="positive" property="positive" jdbcType="INTEGER" />
+        <result column="negative" property="negative" jdbcType="INTEGER" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
+        select
+        *
+        from college_curriculum_core
+        order by id desc
+    </select>
+
+
+    <select id="queryCoreByStep" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore">
+        select
+        *
+        from college_curriculum_core
+        where
+            FIND_IN_SET(#{c_step,jdbcType=VARCHAR},c_step) >0
+        and
+            c_type = #{c_type,jdbcType=VARCHAR}
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_curriculum_core
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_curriculum_core
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
+        insert into college_curriculum_core
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                c_code,
+            </if>
+            <if test="c_name != null" >
+                c_name,
+            </if>
+            <if test="c_type != null" >
+                c_type,
+            </if>
+            <if test="c_step != null" >
+                c_step,
+            </if>
+            <if test="isvideo != null" >
+                isvideo,
+            </if>
+            <if test="video_href != null" >
+                video_href,
+            </if>
+
+            <if test="istest != null" >
+                istest,
+            </if>
+            <if test="testid != null" >
+                testid,
+            </if>
+            <if test="credit != null" >
+                credit,
+            </if>
+            <if test="video_length != null" >
+                video_length,
+            </if>
+            <if test="img_head_href != null" >
+                img_head_href,
+            </if>
+            <if test="c_desc != null" >
+                c_desc,
+            </if>
+            <if test="c_content != null" >
+                c_content,
+            </if>
+            <if test="t_image_href != null" >
+                t_image_href,
+            </if>
+            <if test="t_name != null" >
+                t_name,
+            </if>
+            <if test="video_href != null" >
+                video_href,
+            </if>
+            <if test="t_desc != null" >
+                t_desc,
+            </if>
+            <if test="pcount != null" >
+                pcount,
+            </if>
+            <if test="positive != null" >
+                positive,
+            </if>
+            <if test="negative != null" >
+                negative
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="isvideo != null" >
+                #{isvideo,jdbcType=INTEGER},
+            </if>
+            <if test="video_href != null" >
+                #{video_href,jdbcType=VARCHAR},
+            </if>
+            <if test="istest != null" >
+                #{istest,jdbcType=INTEGER},
+            </if>
+            <if test="testid != null" >
+                #{testid,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="video_length != null" >
+                #{video_length,jdbcType=INTEGER},
+            </if>
+            <if test="img_head_href != null" >
+                #{img_head_href,jdbcType=VARCHAR},
+            </if>
+            <if test="c_desc != null" >
+                #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="t_image_href != null" >
+                #{t_image_href,jdbcType=VARCHAR},
+            </if>
+            <if test="t_name != null" >
+                #{t_name,jdbcType=VARCHAR},
+            </if>
+            <if test="t_desc != null" >
+                #{t_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="pcount != null" >
+                #{pcount,jdbcType=VARCHAR},
+            </if>
+            <if test="positive != null" >
+                #{positive,jdbcType=INTEGER},
+            </if>
+            <if test="negative != null" >
+                #{negative,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumCore" >
+        update college_curriculum_core
+        <set >
+            <if test="c_code != null" >
+                c_code = #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                c_name = #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                c_type = #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                c_step = #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="isvideo != null" >
+                isvideo = #{isvideo,jdbcType=INTEGER},
+            </if>
+            <if test="video_href != null" >
+                video_href = #{video_href,jdbcType=VARCHAR},
+            </if>
+            <if test="istest != null" >
+                istest = #{istest,jdbcType=INTEGER},
+            </if>
+            <if test="testid != null" >
+                testid = #{testid,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                credit = #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="video_length != null" >
+                video_length = #{video_length,jdbcType=INTEGER},
+            </if>
+            <if test="img_head_href != null" >
+                img_head_href = #{img_head_href,jdbcType=VARCHAR},
+            </if>
+            <if test="c_desc != null" >
+                c_desc = #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                c_content = #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="t_image_href != null" >
+                t_image_href = #{t_image_href,jdbcType=VARCHAR},
+            </if>
+            <if test="t_name != null" >
+                t_name = #{t_name,jdbcType=VARCHAR},
+            </if>
+            <if test="t_desc != null" >
+                t_desc = #{t_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="pcount != null" >
+                pcount = #{pcount,jdbcType=INTEGER},
+            </if>
+            <if test="positive != null" >
+                positive = #{positive,jdbcType=INTEGER},
+            </if>
+            <if test="negative != null" >
+                negative = #{negative,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 192 - 0
src/main/resources/mybatis/mapper/college/CollegeCurriculumExperienceMapper.xml

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegeCurriculumExperienceDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="c_code" property="c_code" jdbcType="INTEGER" />
+        <result column="c_name" property="c_name" jdbcType="VARCHAR" />
+        <result column="c_type" property="c_type" jdbcType="VARCHAR" />
+        <result column="c_step" property="c_step" jdbcType="INTEGER" />
+        <result column="c_desc" property="c_desc" jdbcType="VARCHAR" />
+        <result column="c_content" property="c_content" jdbcType="VARCHAR" />
+        <result column="city" property="city" jdbcType="VARCHAR" />
+        <result column="m_name" property="m_name" jdbcType="VARCHAR" />
+        <result column="m_address" property="m_address" jdbcType="VARCHAR" />
+        <result column="latitude" property="latitude" jdbcType="VARCHAR" />
+        <result column="longitude" property="longitude" jdbcType="VARCHAR" />
+        <result column="credit" property="credit" jdbcType="INTEGER" />
+        <result column="qrcode" property="qrcode" jdbcType="VARCHAR" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" >
+        select
+        *
+        from college_curriculum_experience
+        order by id desc
+    </select>
+
+    <select id="queryExperienceByStep" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience">
+        select
+        *
+        from college_curriculum_experience
+        where 1=1
+        <if test="c_step != null and c_step != ''">
+            and FIND_IN_SET(#{c_step,jdbcType=VARCHAR},c_step) >0
+        </if>
+        <if test="c_type != null and c_type != ''">
+            and c_type = #{c_type,jdbcType=VARCHAR}
+        </if>
+        <if test="city != null and city != ''">
+            and city = #{city,jdbcType=VARCHAR}
+        </if>
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_curriculum_experience
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_curriculum_experience
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" >
+        insert into college_curriculum_experience
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                c_code,
+            </if>
+            <if test="c_name != null" >
+                c_name,
+            </if>
+            <if test="c_type != null" >
+                c_type,
+            </if>
+            <if test="c_step != null" >
+                c_step,
+            </if>
+            <if test="c_desc != null" >
+                c_desc,
+            </if>
+            <if test="c_content != null" >
+                c_content,
+            </if>
+            <if test="city != null" >
+                city,
+            </if>
+            <if test="m_name != null" >
+                m_name,
+            </if>
+            <if test="m_address != null" >
+                m_address,
+            </if>
+            <if test="latitude != null" >
+                latitude,
+            </if>
+            <if test="longitude != null" >
+                longitude,
+            </if>
+            <if test="credit != null" >
+                credit,
+            </if>
+            <if test="qrcode != null" >
+                qrcode
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="c_desc != null" >
+                #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="m_name != null" >
+                #{m_name,jdbcType=VARCHAR},
+            </if>
+            <if test="m_address != null" >
+                #{m_address,jdbcType=VARCHAR},
+            </if>
+            <if test="latitude != null" >
+                #{latitude,jdbcType=INTEGER},
+            </if>
+            <if test="longitude != null" >
+                #{longitude,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="qrcode != null" >
+                #{qrcode,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumExperience" >
+        update college_curriculum_experience
+        <set >
+            <if test="c_code != null" >
+                c_code = #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                c_name = #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                c_type = #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                c_step = #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="c_desc != null" >
+                c_desc = #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                c_content = #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                city = #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="m_name != null" >
+                m_name = #{m_name,jdbcType=VARCHAR},
+            </if>
+            <if test="m_address != null" >
+                m_address = #{m_address,jdbcType=VARCHAR},
+            </if>
+            <if test="latitude != null" >
+                latitude = #{latitude,jdbcType=INTEGER},
+            </if>
+            <if test="longitude != null" >
+                longitude = #{longitude,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                credit = #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="qrcode != null" >
+                qrcode = #{qrcode,jdbcType=VARCHAR}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 228 - 0
src/main/resources/mybatis/mapper/college/CollegeCurriculumPracticeMapper.xml

@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegeCurriculumPracticeDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="c_code" property="c_code" jdbcType="INTEGER" />
+        <result column="c_name" property="c_name" jdbcType="VARCHAR" />
+        <result column="c_type" property="c_type" jdbcType="VARCHAR" />
+        <result column="c_step" property="c_step" jdbcType="INTEGER" />
+        <result column="c_desc" property="c_desc" jdbcType="VARCHAR" />
+        <result column="c_content" property="c_content" jdbcType="VARCHAR" />
+        <result column="city" property="city" jdbcType="VARCHAR" />
+        <result column="branches" property="branches" jdbcType="VARCHAR" />
+        <result column="address" property="address" jdbcType="VARCHAR" />
+        <result column="startdate" property="startdate" jdbcType="VARCHAR" />
+        <result column="enddate" property="enddate" jdbcType="VARCHAR" />
+        <result column="deadline" property="deadline" jdbcType="VARCHAR" />
+        <result column="maximum" property="maximum" jdbcType="INTEGER" />
+        <result column="pcount" property="pcount" jdbcType="INTEGER" />
+        <result column="credit" property="credit" jdbcType="INTEGER" />
+        <result column="qrcode" property="qrcode" jdbcType="VARCHAR" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" >
+        select
+        *
+        from college_curriculum_practice
+        order by id desc
+    </select>
+
+    <select id="queryPracticeByStep" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice">
+        select
+        *
+        from college_curriculum_practice
+        where 1=1
+        <if test="c_step != null and c_step != ''">
+            and FIND_IN_SET(#{c_step,jdbcType=VARCHAR},c_step) >0
+        </if>
+        <if test="c_type != null and c_type != ''">
+            and c_type = #{c_type,jdbcType=VARCHAR}
+        </if>
+        <if test="city != null and city != ''">
+            and city = #{city,jdbcType=VARCHAR}
+        </if>
+        <if test="startdate != null and startdate != ''">
+            and DATE_FORMAT(#{startdate,jdbcType=DATE},'%Y-%m-%d') BETWEEN startdate AND  enddate
+        </if>
+        <if test="deadline != null and deadline != ''">
+            and DATE_FORMAT(deadline,'%Y-%m-%d') &gt;= DATE_FORMAT(#{deadline,jdbcType=DATE},'%Y-%m-%d')
+        </if>
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_curriculum_practice
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_curriculum_practice
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" >
+        insert into college_curriculum_practice
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                c_code,
+            </if>
+            <if test="c_name != null" >
+                c_name,
+            </if>
+            <if test="c_type != null" >
+                c_type,
+            </if>
+            <if test="c_step != null" >
+                c_step,
+            </if>
+            <if test="c_desc != null" >
+                c_desc,
+            </if>
+            <if test="c_content != null" >
+                c_content,
+            </if>
+            <if test="city != null" >
+                city,
+            </if>
+            <if test="branches != null" >
+                branches,
+            </if>
+            <if test="address != null" >
+                address,
+            </if>
+            <if test="startdate != null" >
+                startdate,
+            </if>
+            <if test="enddate != null" >
+                enddate,
+            </if>
+            <if test="deadline != null" >
+                deadline,
+            </if>
+            <if test="maximum != null" >
+                maximum,
+            </if>
+            <if test="pcount != null" >
+                pcount,
+            </if>
+            <if test="credit != null" >
+                credit,
+            </if>
+            <if test="qrcode != null" >
+                qrcode
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="c_code != null" >
+                #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="c_desc != null" >
+                #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="branches != null" >
+                #{branches,jdbcType=VARCHAR},
+            </if>
+            <if test="address != null" >
+                #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="startdate != null" >
+                #{startdate,jdbcType=VARCHAR},
+            </if>
+            <if test="enddate != null" >
+                #{enddate,jdbcType=VARCHAR},
+            </if>
+            <if test="deadline != null" >
+                #{deadline,jdbcType=VARCHAR},
+            </if>
+            <if test="maximum != null" >
+                #{maximum,jdbcType=INTEGER},
+            </if>
+            <if test="pcount != null" >
+                #{pcount,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="qrcode != null" >
+                #{qrcode,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeCurriculumPractice" >
+        update college_curriculum_practice
+        <set >
+            <if test="c_code != null" >
+                c_code = #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="c_name != null" >
+                c_name = #{c_name,jdbcType=VARCHAR},
+            </if>
+            <if test="c_type != null" >
+                c_type = #{c_type,jdbcType=VARCHAR},
+            </if>
+            <if test="c_step != null" >
+                c_step = #{c_step,jdbcType=INTEGER},
+            </if>
+            <if test="c_desc != null" >
+                c_desc = #{c_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="c_content != null" >
+                c_content = #{c_content,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                city = #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="branches != null" >
+                branches = #{branches,jdbcType=VARCHAR},
+            </if>
+            <if test="address != null" >
+                address = #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="startdate != null" >
+                startdate = #{startdate,jdbcType=VARCHAR},
+            </if>
+            <if test="enddate != null" >
+                enddate = #{enddate,jdbcType=VARCHAR},
+            </if>
+            <if test="deadline != null" >
+                deadline = #{deadline,jdbcType=VARCHAR},
+            </if>
+            <if test="maximum != null" >
+                maximum = #{maximum,jdbcType=INTEGER},
+            </if>
+            <if test="pcount != null" >
+                pcount = #{pcount,jdbcType=INTEGER},
+            </if>
+            <if test="credit != null" >
+                credit = #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="qrcode != null" >
+                qrcode = #{qrcode,jdbcType=VARCHAR}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 95 - 0
src/main/resources/mybatis/mapper/college/CollegeLearningDetailMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegeLearningDetailDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeLearningDetail" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="open_id" property="open_id" jdbcType="VARCHAR" />
+        <result column="c_code" property="c_code" jdbcType="VARCHAR" />
+        <result column="status" property="status" jdbcType="INTEGER" />
+        <result column="date" property="date" jdbcType="VARCHAR" />
+        <result column="credit" property="credit" jdbcType="INTEGER" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeLearningDetail" >
+        select
+        *
+        from college_learning_detail
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeLearningDetail" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_learning_detail
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_learning_detail
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeLearningDetail" >
+        insert into college_learning_detail
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="open_id != null" >
+                open_id,
+            </if>
+            <if test="c_code != null" >
+                c_code,
+            </if>
+            <if test="status != null" >
+                status,
+            </if>
+            <if test="date != null" >
+                `date`,
+            </if>
+            <if test="credit != null" >
+                credit
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="open_id != null" >
+                #{open_id,jdbcType=VARCHAR},
+            </if>
+            <if test="c_code != null" >
+                #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="status != null" >
+                #{status,jdbcType=INTEGER},
+            </if>
+            <if test="date != null" >
+                #{date,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null" >
+                #{credit,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeLearningDetail" >
+        update college_learning_detail
+        <set >
+            <if test="open_id != null" >
+                open_id = #{open_id,jdbcType=VARCHAR},
+            </if>
+            <if test="c_code != null" >
+                c_code = #{c_code,jdbcType=VARCHAR},
+            </if>
+            <if test="status != null" >
+                status = #{status,jdbcType=INTEGER},
+            </if>
+            <if test="date != null" >
+                `date` = #{date,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null" >
+                credit = #{credit,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 95 - 0
src/main/resources/mybatis/mapper/college/CollegePointsDetailMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegePointsDetailDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegePointsDetail" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="openid" property="openid" jdbcType="VARCHAR" />
+        <result column="event_code" property="event_code" jdbcType="INTEGER" />
+        <result column="context" property="context" jdbcType="VARCHAR" />
+        <result column="credit" property="credit" jdbcType="INTEGER" />
+        <result column="date" property="date" jdbcType="VARCHAR" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegePointsDetail" >
+        select
+        *
+        from college_points_detail
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegePointsDetail" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_points_detail
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_points_detail
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegePointsDetail" >
+        insert into college_points_detail
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="openid != null" >
+                openid,
+            </if>
+            <if test="event_code != null" >
+                event_code,
+            </if>
+            <if test="context != null" >
+                context,
+            </if>
+            <if test="credit != null" >
+                credit,
+            </if>
+            <if test="date != null" >
+                date
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="openid != null" >
+                #{openid,jdbcType=VARCHAR},
+            </if>
+            <if test="event_code != null" >
+                #{event_code,jdbcType=INTEGER},
+            </if>
+            <if test="context != null" >
+                #{context,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null" >
+                #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="date != null" >
+                #{date,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegePointsDetail" >
+        update college_points_detail
+        <set >
+            <if test="openid != null" >
+                openid = #{openid,jdbcType=VARCHAR},
+            </if>
+            <if test="event_code != null" >
+                event_code = #{event_num,jdbcType=INTEGER},
+            </if>
+            <if test="context != null" >
+                context = #{context,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null" >
+                credit = #{credit,jdbcType=INTEGER},
+            </if>
+            <if test="date != null" >
+                `date` = #{date,jdbcType=VARCHAR}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 119 - 0
src/main/resources/mybatis/mapper/college/CollegePresentRuleMapper.xml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegePresentRuleDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegePresentRule">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="seq" property="seq" jdbcType="INTEGER"/>
+        <result column="value" property="value" jdbcType="INTEGER"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="type" property="type" jdbcType="INTEGER"/>
+        <result column="coupon_cid" property="coupon_cid" jdbcType="VARCHAR"/>
+        <result column="present_name" property="present_name" jdbcType="VARCHAR"/>
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegePresentRule">
+        select
+        *
+        from college_present_rule
+        order by id desc
+    </select>
+
+
+    <select id="queryUserReceived" resultType="com.ygj.yuemum.domain.college.CollegePresentRule" parameterType="java.lang.String">
+        SELECT
+	college_present_rule.*,
+    IF
+	    ( tt.context > 0, 1, 0 ) as received
+    FROM
+	    college_present_rule
+	LEFT JOIN ( SELECT context FROM college_points_detail WHERE openid = #{openid,jdbcType=VARCHAR}
+	and event_code = 4) AS tt
+	ON college_present_rule.id = tt.context
+	order by seq asc
+    </select>
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegePresentRule"
+            parameterType="java.lang.Integer">
+        select
+        *
+        from college_present_rule
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from college_present_rule
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegePresentRule">
+        insert into college_present_rule
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="seq != null">
+                seq,
+            </if>
+            <if test="value != null">
+                `value`,
+            </if>
+            <if test="name != null">
+                `name`,
+            </if>
+            <if test="type != null">
+                `type`,
+            </if>
+            <if test="coupon_cid != null">
+                coupon_cid,
+            </if>
+            <if test="present_name != null">
+                present_name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="seq != null">
+                #{seq,jdbcType=INTEGER},
+            </if>
+            <if test="value != null">
+                #{value,jdbcType=INTEGER},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="type != null">
+                #{type,jdbcType=INTEGER},
+            </if>
+            <if test="coupon_cid != null">
+                #{coupon_cid,jdbcType=VARCHAR},
+            </if>
+            <if test="present_name != null">
+                #{present_name,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegePresentRule">
+        update college_present_rule
+        <set>
+            <if test="seq != null">
+                seq = #{seq,jdbcType=INTEGER},
+            </if>
+            <if test="value != null">
+                `value` = #{value,jdbcType=INTEGER},
+            </if>
+            <if test="name != null">
+                `name` = #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="type != null">
+                `type` = #{type,jdbcType=INTEGER},
+            </if>
+            <if test="coupon_cid != null">
+                coupon_cid = #{coupon_cid,jdbcType=INTEGER},
+            </if>
+            <if test="present_name != null">
+                present_name = #{present_name,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 83 - 0
src/main/resources/mybatis/mapper/college/CollegeUserPointsMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.college.CollegeUserPointsDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.college.CollegeUserPoints" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="openid" property="openid" jdbcType="VARCHAR" />
+        <result column="credit_total" property="credit_total" jdbcType="INTEGER" />
+        <result column="credit_available" property="credit_available" jdbcType="INTEGER" />
+    </resultMap>
+    <!--获取所有数据-->
+
+    <select id="getAll" resultType="com.ygj.yuemum.domain.college.CollegeUserPoints" >
+        select
+        *
+        from college_user_points
+        order by id desc
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegeUserPoints" parameterType="java.lang.Integer" >
+        select
+        *
+        from college_user_points
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+
+    <select id="queryUserPoints" resultType="com.ygj.yuemum.domain.college.CollegeUserPoints" parameterType="java.lang.String" >
+        select
+        *
+        from college_user_points
+        where openid = #{openid,jdbcType=VARCHAR}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from college_user_points
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.college.CollegeUserPoints" >
+        insert into college_user_points
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="openid != null" >
+                openid,
+            </if>
+            <if test="credit_total != null" >
+                credit_total,
+            </if>
+            <if test="credit_available != null" >
+                credit_available
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="openid != null" >
+                #{openid,jdbcType=VARCHAR},
+            </if>
+            <if test="credit_total != null" >
+                #{credit_total,jdbcType=INTEGER},
+            </if>
+            <if test="credit_available != null" >
+                #{credit_available,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.college.CollegeUserPoints" >
+        update college_user_points
+        <set >
+            <if test="openid != null" >
+                openid = #{openid,jdbcType=VARCHAR},
+            </if>
+            <if test="credit_total != null" >
+                credit_total = #{credit_total,jdbcType=INTEGER},
+            </if>
+            <if test="credit_available != null" >
+                credit_available = #{credit_available,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+</mapper>

+ 17 - 5
src/main/resources/mybatis/mapper/coupon/CouponCreateMapper.xml

@@ -15,10 +15,11 @@
         <result column="syncmodoodate" property="syncmodoodate" jdbcType="DATE" />
         <result column="syncmodoo" property="syncmodoo" jdbcType="VARCHAR" />
         <result column="usercode" property="usercode" jdbcType="VARCHAR" />
+        <result column="cb_type" property="cb_type" jdbcType="BIT" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-      id,cb_code,cb_name,cc_quantity,cc_amount,cc_createdate,cc_startdate,cc_enddate,cc_status,syncmodoodate,syncmodoo,usercode
+      id,cb_code,cc_quantity,cc_amount,cc_createdate,cc_startdate,cc_enddate,cc_status,syncmodoodate,syncmodoo,usercode,cb_type
     </sql>
 
     <!--获取所有数据-->
@@ -37,9 +38,11 @@
             cc_createdate,
             cc_amount,
             cc_quantity,
-            cc_status
+            cc_status,
+            cb_type
         FROM
             coupon_create
+        order by id desc
     </select>
 
 
@@ -95,7 +98,10 @@
                 cc_createdate,
             </if>
             <if test="cc_status != null" >
-                cc_status
+                cc_status,
+            </if>
+            <if test="cb_type != null" >
+                cb_type
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -118,7 +124,10 @@
                 #{cc_createdate,jdbcType=DATE},
             </if>
             <if test="cc_status != null" >
-                #{cc_status,jdbcType=INTEGER}
+                #{cc_status,jdbcType=INTEGER},
+            </if>
+            <if test="cb_type != null" >
+                #{cb_type,jdbcType=BIT}
             </if>
         </trim>
     </insert>
@@ -148,8 +157,11 @@
             <if test="usercode != null" >
                 usercode = #{usercode,jdbcType=VARCHAR},
             </if>
+            <if test="cb_type != null" >
+                cb_type = #{cb_type,jdbcType=BIT},
+            </if>
             <if test="date != null" >
-                date = #{date,jdbcType=DATE}
+                `date` = #{date,jdbcType=DATE}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}