Shanks 6 vuotta sitten
vanhempi
commit
b4d3d7dbf7
34 muutettua tiedostoa jossa 1822 lisäystä ja 3 poistoa
  1. 11 0
      src/main/java/com/ygj/yuemum/component/Constant.java
  2. 4 0
      src/main/java/com/ygj/yuemum/component/ScheduledService.java
  3. 4 0
      src/main/java/com/ygj/yuemum/controller/admin/JlAdminUserController.java
  4. 41 0
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroduceExtractController.java
  5. 36 0
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroduceLogController.java
  6. 42 0
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerApplicantController.java
  7. 47 0
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerController.java
  8. 19 0
      src/main/java/com/ygj/yuemum/controller/distributionchannel/MiniAppController.java
  9. 2 0
      src/main/java/com/ygj/yuemum/dao/admin/JlAdminUserDao.java
  10. 19 0
      src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroduceLogDao.java
  11. 20 0
      src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerApplicantDao.java
  12. 22 0
      src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerDao.java
  13. 21 0
      src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerExtractDao.java
  14. 12 0
      src/main/java/com/ygj/yuemum/dao/global/MiniAppInfoDao.java
  15. 96 0
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroduceLog.java
  16. 149 0
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducer.java
  17. 113 0
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerApplicant.java
  18. 104 0
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java
  19. 32 0
      src/main/java/com/ygj/yuemum/domain/global/MiniAppInfo.java
  20. 4 0
      src/main/java/com/ygj/yuemum/service/admin/JlAdminUserService.java
  21. 42 0
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroduceLogService.java
  22. 91 0
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java
  23. 45 0
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerExtractService.java
  24. 57 0
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerService.java
  25. 69 0
      src/main/java/com/ygj/yuemum/service/distributionchannel/MiniAppService.java
  26. 25 0
      src/main/java/com/ygj/yuemum/service/global/WeChatInfoService.java
  27. 5 1
      src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java
  28. 8 2
      src/main/resources/application.yml
  29. 6 0
      src/main/resources/mybatis/mapper/admin/JlAdminUserMapper.xml
  30. 124 0
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroduceLogMapper.xml
  31. 137 0
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerApplicantMapper.xml
  32. 152 0
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml
  33. 230 0
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml
  34. 33 0
      src/main/resources/mybatis/mapper/global/MiniAppInfoMapper.xml

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

@@ -39,9 +39,20 @@ public class Constant {
     public static String MINIAPPSECRET;
     public static String PROMOTIONVOUCHER;
     public static String HTTPPROMOTIONVOUCHER;
+    public static String QRCODE;
+    public static String HTTPQRCODE;
 
     //注入
     @Autowired(required = false)
+    public void getQrcode(@Value("${file.qrcode}") String QRCODE) {
+        Constant.QRCODE = QRCODE;
+    }
+
+    @Autowired(required = false)
+    public void getHttpQrocde(@Value("${file.httpqrcode}") String HTTPQRCODE) {
+        Constant.HTTPQRCODE = HTTPQRCODE;
+    }
+    @Autowired(required = false)
     public void getNewUserCoupon(@Value("${coupon.NewUserCoupon}") String NEWUSER_COUPON) {
         Constant.NEWUSER_COUPON = NEWUSER_COUPON;
     }

+ 4 - 0
src/main/java/com/ygj/yuemum/component/ScheduledService.java

@@ -13,4 +13,8 @@ public class ScheduledService {
     public void timerCron() {
 //        weChatInfoService.SaveWeChatInfo();
     }
+    @Scheduled(fixedRate = 5400000)
+    public void getMiniAppAccess_token() {
+//        weChatInfoService.SaveMiniAppInfo();
+    }
 }

+ 4 - 0
src/main/java/com/ygj/yuemum/controller/admin/JlAdminUserController.java

@@ -27,6 +27,10 @@ public class JlAdminUserController {
     public List<JlAdminUser> getJlAdminUsers() {
         return jladminuserService.getUsers();
     }
+    @GetMapping("/getConsultants")
+    public List<JlAdminUser> getConsultants() {
+        return jladminuserService.getConsultants();
+    }
 
     @PostMapping("/logIN")
     public int logIN(@ModelAttribute JlAdminUser jladminuser) {

+ 41 - 0
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroduceExtractController.java

@@ -0,0 +1,41 @@
+package com.ygj.yuemum.controller.distributionchannel;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract;
+import com.ygj.yuemum.service.distributionchannel.DcIntroducerExtractService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class DcIntroduceExtractController {
+
+    @Autowired
+    private DcIntroducerExtractService dcIntroducerExtractService;
+
+    @PostMapping ("/queryDcIntroducerExtracts")
+    public String queryDcIntroducerExtracts(@ModelAttribute DcIntroducerExtract dcIntroducerExtract) {
+        Map<String, Object> dcIntroducerExtracts = dcIntroducerExtractService.queryDcIntroducerExtracts(dcIntroducerExtract);
+        String jso = JSONObject.toJSONString(dcIntroducerExtracts);
+        return jso;
+    }
+
+    @PostMapping("/insertDcIntroducerExtract")
+    public int insertDcIntroducerExtract(@ModelAttribute DcIntroducerExtract dcIntroducerExtract) {
+        return dcIntroducerExtractService.insertDcIntroducerExtract(dcIntroducerExtract);
+    }
+
+    @PostMapping("/updateDcIntroducerExtract")
+    public int updateDcIntroducerExtract(@ModelAttribute DcIntroducerExtract dcIntroducerExtract) {
+        return dcIntroducerExtractService.updateDcIntroducerExtract(dcIntroducerExtract);
+    }
+
+    @GetMapping("/getDcIntroducerExtracts")
+    public List<DcIntroducerExtract> getDcIntroducerExtracts(@RequestParam("phone") String phone) {
+        return dcIntroducerExtractService.getDcIntroducerExtracts(phone);
+    }
+
+}

+ 36 - 0
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroduceLogController.java

@@ -0,0 +1,36 @@
+package com.ygj.yuemum.controller.distributionchannel;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog;
+import com.ygj.yuemum.service.distributionchannel.DcIntroduceLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class DcIntroduceLogController {
+
+    @Autowired
+    private DcIntroduceLogService dcIntroduceLogService;
+
+    @PostMapping ("/queryDcIntroduceLogs")
+    public String queryDcIntroduceLogs(@ModelAttribute DcIntroduceLog dcIntroduceLog) {
+        Map<String, Object> queryDcIntroduceLogs = dcIntroduceLogService.queryDcIntroduceLogs(dcIntroduceLog);
+        String jso = JSONObject.toJSONString(queryDcIntroduceLogs);
+        return jso;
+    }
+
+    @PostMapping("/insertDcIntroduceLog")
+    public int insertDcIntroduceLog(@ModelAttribute DcIntroduceLog dcIntroduceLog) {
+        return dcIntroduceLogService.insertDcIntroduceLog(dcIntroduceLog);
+    }
+
+    @GetMapping("/getDcIntroduceLogs")
+    public List<DcIntroduceLog> getDcIntroduceLogs(@RequestParam("phone") String phone) {
+        return dcIntroduceLogService.getDcIntroduceLogs(phone);
+    }
+
+}

+ 42 - 0
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerApplicantController.java

@@ -0,0 +1,42 @@
+package com.ygj.yuemum.controller.distributionchannel;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant;
+import com.ygj.yuemum.service.distributionchannel.DcIntroducerApplicantService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@RestController
+public class DcIntroducerApplicantController {
+
+    @Autowired
+    private DcIntroducerApplicantService dcIntroducerApplicantService;
+
+    @GetMapping("/getDcIntroducerApplicants")
+    public String getDcIntroducerApplicants(@RequestParam("page") Integer page,@RequestParam("limit") Integer limit) {
+        Map<String, Object> wxVipApplicants = dcIntroducerApplicantService.getDcIntroducerApplicants(page,limit);
+        String jso = JSONObject.toJSONString(wxVipApplicants);
+        return jso;
+    }
+
+    @PostMapping ("/queryDcIntroducerApplicants")
+    public String queryDcIntroducerApplicants(@ModelAttribute DcIntroducerApplicant dcIntroducerApplicant) {
+        Map<String, Object> wxVipApplicants = dcIntroducerApplicantService.queryDcIntroducerApplicants(dcIntroducerApplicant);
+        String jso = JSONObject.toJSONString(wxVipApplicants);
+        return jso;
+    }
+
+    @PostMapping("/insertDcIntroducerApplicant")
+    public int insertDcIntroducerApplicant(@ModelAttribute DcIntroducerApplicant dcIntroducerApplicant) {
+        return dcIntroducerApplicantService.insertDcIntroducerApplicant(dcIntroducerApplicant);
+    }
+
+    @PostMapping("/updateDcIntroducerApplicant")
+    public int updateDcIntroducerApplicant(@ModelAttribute DcIntroducerApplicant dcIntroducerApplicant) {
+        return dcIntroducerApplicantService.updateDcIntroducerApplicant(dcIntroducerApplicant);
+    }
+
+}

+ 47 - 0
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerController.java

@@ -0,0 +1,47 @@
+package com.ygj.yuemum.controller.distributionchannel;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
+import com.ygj.yuemum.service.distributionchannel.DcIntroducerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@RestController
+public class DcIntroducerController {
+
+    @Autowired
+    private DcIntroducerService dcIntroducerService;
+
+    @GetMapping("/getDcIntroducers")
+    public String getDcIntroducers(@RequestParam("page") Integer page,@RequestParam("limit") Integer limit) {
+        Map<String, Object> wxVips = dcIntroducerService.getDcIntroducers(page,limit);
+        String jso = JSONObject.toJSONString(wxVips);
+        return jso;
+    }
+
+    @PostMapping ("/queryDcIntroducers")
+    public String queryDcIntroducers(@ModelAttribute DcIntroducer wxVip) {
+        Map<String, Object> wxVips = dcIntroducerService.queryDcIntroducers(wxVip);
+        String jso = JSONObject.toJSONString(wxVips);
+        return jso;
+    }
+
+    @GetMapping("/checkDcIntroducers")
+    public DcIntroducer checkDcIntroducers(@RequestParam("wv_phone")  String wv_phone) {
+        return dcIntroducerService.checkDcIntroducers(wv_phone);
+    }
+
+    @PostMapping("/insertDcIntroducer")
+    public int insertDcIntroducer(@ModelAttribute DcIntroducer wxVip) {
+        return dcIntroducerService.insertDcIntroducer(wxVip);
+    }
+
+    @PostMapping("/updateDcIntroducer")
+    public int updateDcIntroducer(@ModelAttribute DcIntroducer wxVip) {
+        return dcIntroducerService.updateDcIntroducer(wxVip);
+    }
+
+}

+ 19 - 0
src/main/java/com/ygj/yuemum/controller/distributionchannel/MiniAppController.java

@@ -0,0 +1,19 @@
+package com.ygj.yuemum.controller.distributionchannel;
+
+import com.ygj.yuemum.service.distributionchannel.MiniAppService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class MiniAppController {
+    @Autowired
+    private MiniAppService miniAppService;
+
+    @GetMapping("/createQrCode")
+    public String createQrCode(@RequestParam("phone")  String phone) {
+        return miniAppService.createQrCode(phone);
+    }
+
+}

+ 2 - 0
src/main/java/com/ygj/yuemum/dao/admin/JlAdminUserDao.java

@@ -17,6 +17,8 @@ public interface JlAdminUserDao {
     List<JlAdminUser>queryAdminUsers(JlAdminUser jlAdminUser);
     int logIN(JlAdminUser jlAdminUser);
 
+    List<JlAdminUser> getConsultants();
+
     /**
      * 根据id删除某个用户信息
      * @param id

+ 19 - 0
src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroduceLogDao.java

@@ -0,0 +1,19 @@
+package com.ygj.yuemum.dao.distributionchannel;
+
+import com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface DcIntroduceLogDao {
+
+
+    int insertDcIntroduceLog(DcIntroduceLog dcIntroduceLog);
+
+    List<DcIntroduceLog> queryDcIntroduceLogs(DcIntroduceLog dcIntroduceLog);
+
+    List<DcIntroduceLog> getDcIntroduceLogs(String phone);
+
+
+}

+ 20 - 0
src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerApplicantDao.java

@@ -0,0 +1,20 @@
+package com.ygj.yuemum.dao.distributionchannel;
+
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface DcIntroducerApplicantDao {
+
+    List<DcIntroducerApplicant> getDcIntroducerApplicants();
+
+    int updateDcIntroducerApplicant(DcIntroducerApplicant dcIntroducerApplicant);
+
+    int insertDcIntroducerApplicant(DcIntroducerApplicant dcIntroducerApplicant);
+
+    List<DcIntroducerApplicant> queryDcIntroducerApplicants(DcIntroducerApplicant dcIntroducerApplicant);
+
+
+}

+ 22 - 0
src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerDao.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.dao.distributionchannel;
+
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface DcIntroducerDao {
+
+    List<DcIntroducer> getDcIntroducers();
+
+    int updateDcIntroducer(DcIntroducer wxVip);
+
+    int insertDcIntroducer(DcIntroducer wxVip);
+
+    List<DcIntroducer> queryDcIntroducers(DcIntroducer dcIntroducer);
+
+    DcIntroducer checkDcIntroducers(String wv_phone);
+
+
+}

+ 21 - 0
src/main/java/com/ygj/yuemum/dao/distributionchannel/DcIntroducerExtractDao.java

@@ -0,0 +1,21 @@
+package com.ygj.yuemum.dao.distributionchannel;
+
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface DcIntroducerExtractDao {
+
+    List<DcIntroducerExtract> getDcIntroducerExtracts(String phone);
+
+    int updateDcIntroducerExtract(DcIntroducerExtract dcIntroducerExtract);
+
+    int insertDcIntroducerExtract(DcIntroducerExtract dcIntroducerExtract);
+
+    List<DcIntroducerExtract> queryDcIntroducerExtracts(DcIntroducerExtract dcIntroducerExtract);
+
+
+
+}

+ 12 - 0
src/main/java/com/ygj/yuemum/dao/global/MiniAppInfoDao.java

@@ -0,0 +1,12 @@
+package com.ygj.yuemum.dao.global;
+
+import com.ygj.yuemum.domain.global.MiniAppInfo;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface MiniAppInfoDao {
+
+    MiniAppInfo getMiniAppInfo();
+
+    int updateMiniAppInfo(MiniAppInfo miniAppInfo);
+}

+ 96 - 0
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroduceLog.java

@@ -0,0 +1,96 @@
+package com.ygj.yuemum.domain.distributionchannel;
+
+public class DcIntroduceLog {
+
+
+    private Integer page;
+    private Integer limit;
+    private Integer id;
+    private String xul_openid;
+    private String xul_phone;
+    private Integer xul_event;
+    private String xul_date;
+    private String xul_introducer_phone;
+    private Integer xul_pm_type;
+    private String xul_orderno;
+
+    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;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getXul_openid() {
+        return xul_openid;
+    }
+
+    public void setXul_openid(String xul_openid) {
+        this.xul_openid = xul_openid;
+    }
+
+    public String getXul_phone() {
+        return xul_phone;
+    }
+
+    public void setXul_phone(String xul_phone) {
+        this.xul_phone = xul_phone;
+    }
+
+    public Integer getXul_event() {
+        return xul_event;
+    }
+
+    public void setXul_event(Integer xul_event) {
+        this.xul_event = xul_event;
+    }
+
+    public String getXul_date() {
+        return xul_date;
+    }
+
+    public void setXul_date(String xul_date) {
+        this.xul_date = xul_date;
+    }
+
+    public String getXul_introducer_phone() {
+        return xul_introducer_phone;
+    }
+
+    public void setXul_introducer_phone(String xul_introducer_phone) {
+        this.xul_introducer_phone = xul_introducer_phone;
+    }
+
+    public Integer getXul_pm_type() {
+        return xul_pm_type;
+    }
+
+    public void setXul_pm_type(Integer xul_pm_type) {
+        this.xul_pm_type = xul_pm_type;
+    }
+
+    public String getXul_orderno() {
+        return xul_orderno;
+    }
+
+    public void setXul_orderno(String xul_orderno) {
+        this.xul_orderno = xul_orderno;
+    }
+}

+ 149 - 0
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducer.java

@@ -0,0 +1,149 @@
+package com.ygj.yuemum.domain.distributionchannel;
+
+public class DcIntroducer {
+
+    private Integer id;
+    private String wv_phone;
+    private Integer wv_gradeid;
+    private Integer wv_Introduction_total;
+    private Integer wv_withdraw_total;
+    private Integer wv_Introduction_count;
+    private Integer wv_order_count;
+    private String wv_qrcode;
+    private Integer wv_extract_count;
+    private Integer wv_people_count;
+    private Integer wv_register_count;
+    private Integer wv_contract_count;
+    private Integer wv_finish_count;
+    private Integer wv_consultant;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getWv_phone() {
+        return wv_phone;
+    }
+
+    public void setWv_phone(String wv_phone) {
+        this.wv_phone = wv_phone;
+    }
+
+    public Integer getWv_gradeid() {
+        return wv_gradeid;
+    }
+
+    public void setWv_gradeid(Integer wv_gradeid) {
+        this.wv_gradeid = wv_gradeid;
+    }
+
+    public Integer getWv_Introduction_total() {
+        return wv_Introduction_total;
+    }
+
+    public void setWv_Introduction_total(Integer wv_Introduction_total) {
+        this.wv_Introduction_total = wv_Introduction_total;
+    }
+
+    public Integer getWv_withdraw_total() {
+        return wv_withdraw_total;
+    }
+
+    public void setWv_withdraw_total(Integer wv_withdraw_total) {
+        this.wv_withdraw_total = wv_withdraw_total;
+    }
+
+    public Integer getWv_Introduction_count() {
+        return wv_Introduction_count;
+    }
+
+    public void setWv_Introduction_count(Integer wv_Introduction_count) {
+        this.wv_Introduction_count = wv_Introduction_count;
+    }
+
+    public Integer getWv_order_count() {
+        return wv_order_count;
+    }
+
+    public void setWv_order_count(Integer wv_order_count) {
+        this.wv_order_count = wv_order_count;
+    }
+
+    public String getWv_qrcode() {
+        return wv_qrcode;
+    }
+
+    public void setWv_qrcode(String wv_qrcode) {
+        this.wv_qrcode = wv_qrcode;
+    }
+
+    public Integer getWv_extract_count() {
+        return wv_extract_count;
+    }
+
+    public void setWv_extract_count(Integer wv_extract_count) {
+        this.wv_extract_count = wv_extract_count;
+    }
+
+    public Integer getWv_people_count() {
+        return wv_people_count;
+    }
+
+    public void setWv_people_count(Integer wv_people_count) {
+        this.wv_people_count = wv_people_count;
+    }
+
+    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;
+    }
+
+    public Integer getWv_register_count() {
+        return wv_register_count;
+    }
+
+    public void setWv_register_count(Integer wv_register_count) {
+        this.wv_register_count = wv_register_count;
+    }
+
+    public Integer getWv_contract_count() {
+        return wv_contract_count;
+    }
+
+    public void setWv_contract_count(Integer wv_contract_count) {
+        this.wv_contract_count = wv_contract_count;
+    }
+
+    public Integer getWv_finish_count() {
+        return wv_finish_count;
+    }
+
+    public void setWv_finish_count(Integer wv_finish_count) {
+        this.wv_finish_count = wv_finish_count;
+    }
+
+    public Integer getWv_consultant() {
+        return wv_consultant;
+    }
+
+    public void setWv_consultant(Integer wv_consultant) {
+        this.wv_consultant = wv_consultant;
+    }
+}

+ 113 - 0
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerApplicant.java

@@ -0,0 +1,113 @@
+package com.ygj.yuemum.domain.distributionchannel;
+
+public class DcIntroducerApplicant {
+
+    private Integer id;
+    private String wva_phone;
+    private String wva_apply_date;
+    private Integer wva_auditor;
+    private String wva_auditor_name;
+    private String wva_approve_date;
+    private Integer wva_status;
+    private String wva_remarks;
+    private Integer wva_consultant;
+    private String wva_consultant_name;
+    private Integer limit;
+    private Integer page;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getWva_phone() {
+        return wva_phone;
+    }
+
+    public void setWva_phone(String wva_phone) {
+        this.wva_phone = wva_phone;
+    }
+
+    public String getWva_apply_date() {
+        return wva_apply_date;
+    }
+
+    public void setWva_apply_date(String wva_apply_date) {
+        this.wva_apply_date = wva_apply_date;
+    }
+
+    public Integer getWva_auditor() {
+        return wva_auditor;
+    }
+
+    public void setWva_auditor(Integer wva_auditor) {
+        this.wva_auditor = wva_auditor;
+    }
+
+    public String getWva_auditor_name() {
+        return wva_auditor_name;
+    }
+
+    public void setWva_auditor_name(String wva_auditor_name) {
+        this.wva_auditor_name = wva_auditor_name;
+    }
+
+    public String getWva_approve_date() {
+        return wva_approve_date;
+    }
+
+    public void setWva_approve_date(String wva_approve_date) {
+        this.wva_approve_date = wva_approve_date;
+    }
+
+    public Integer getWva_status() {
+        return wva_status;
+    }
+
+    public void setWva_status(Integer wva_status) {
+        this.wva_status = wva_status;
+    }
+
+    public String getWva_remarks() {
+        return wva_remarks;
+    }
+
+    public void setWva_remarks(String wva_remarks) {
+        this.wva_remarks = wva_remarks;
+    }
+
+    public Integer getWva_consultant() {
+        return wva_consultant;
+    }
+
+    public void setWva_consultant(Integer wva_consultant) {
+        this.wva_consultant = wva_consultant;
+    }
+
+    public String getWva_consultant_name() {
+        return wva_consultant_name;
+    }
+
+    public void setWva_consultant_name(String wva_consultant_name) {
+        this.wva_consultant_name = wva_consultant_name;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+}

+ 104 - 0
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java

@@ -0,0 +1,104 @@
+package com.ygj.yuemum.domain.distributionchannel;
+
+public class DcIntroducerExtract {
+
+    private Integer id;
+    private String wue_phone;
+    private Integer wue_type;
+    private Integer wue_applydate;
+    private Integer wue_applysum;
+    private Integer wue_approverdate;
+    private Integer wue_approversum;
+    private String wue_approveruser;
+    private Integer wue_paydate;
+    private Integer page;
+    private Integer limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getWue_phone() {
+        return wue_phone;
+    }
+
+    public void setWue_phone(String wue_phone) {
+        this.wue_phone = wue_phone;
+    }
+
+    public Integer getWue_type() {
+        return wue_type;
+    }
+
+    public void setWue_type(Integer wue_type) {
+        this.wue_type = wue_type;
+    }
+
+    public Integer getWue_applydate() {
+        return wue_applydate;
+    }
+
+    public void setWue_applydate(Integer wue_applydate) {
+        this.wue_applydate = wue_applydate;
+    }
+
+    public Integer getWue_applysum() {
+        return wue_applysum;
+    }
+
+    public void setWue_applysum(Integer wue_applysum) {
+        this.wue_applysum = wue_applysum;
+    }
+
+    public Integer getWue_approverdate() {
+        return wue_approverdate;
+    }
+
+    public void setWue_approverdate(Integer wue_approverdate) {
+        this.wue_approverdate = wue_approverdate;
+    }
+
+    public Integer getWue_approversum() {
+        return wue_approversum;
+    }
+
+    public void setWue_approversum(Integer wue_approversum) {
+        this.wue_approversum = wue_approversum;
+    }
+
+    public String getWue_approveruser() {
+        return wue_approveruser;
+    }
+
+    public void setWue_approveruser(String wue_approveruser) {
+        this.wue_approveruser = wue_approveruser;
+    }
+
+    public Integer getWue_paydate() {
+        return wue_paydate;
+    }
+
+    public void setWue_paydate(Integer wue_paydate) {
+        this.wue_paydate = wue_paydate;
+    }
+
+    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;
+    }
+}

+ 32 - 0
src/main/java/com/ygj/yuemum/domain/global/MiniAppInfo.java

@@ -0,0 +1,32 @@
+package com.ygj.yuemum.domain.global;
+
+public class MiniAppInfo {
+    private String access_token;
+    private String jsapi_ticket;
+    private String update_time;
+
+
+    public String getUpdate_time() {
+        return update_time;
+    }
+
+    public void setUpdate_time(String update_time) {
+        this.update_time = update_time;
+    }
+
+    public String getAccess_token() {
+        return access_token;
+    }
+
+    public void setAccess_token(String access_token) {
+        this.access_token = access_token;
+    }
+
+    public String getJsapi_ticket() {
+        return jsapi_ticket;
+    }
+
+    public void setJsapi_ticket(String jsapi_ticket) {
+        this.jsapi_ticket = jsapi_ticket;
+    }
+}

+ 4 - 0
src/main/java/com/ygj/yuemum/service/admin/JlAdminUserService.java

@@ -24,6 +24,10 @@ public class JlAdminUserService {
         List<JlAdminUser> jladminusers = jladminuserdao.getAll();
         return jladminusers;
     }
+    public List<JlAdminUser> getConsultants() {
+        List<JlAdminUser> jladminusers = jladminuserdao.getConsultants();
+        return jladminusers;
+    }
 
     public Map<String, Object> queryAdminUsers(JlAdminUser jlAdminUser) {
         PageHelper.startPage(jlAdminUser.getPage(), jlAdminUser.getLimit());

+ 42 - 0
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroduceLogService.java

@@ -0,0 +1,42 @@
+package com.ygj.yuemum.service.distributionchannel;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.distributionchannel.DcIntroduceLogDao;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class DcIntroduceLogService {
+
+    @Autowired
+    private DcIntroduceLogDao dcIntroduceLogDao;
+
+    //分页
+
+    public Map<String, Object> queryDcIntroduceLogs(DcIntroduceLog dcIntroduceLog) {
+        PageHelper.startPage(dcIntroduceLog.getPage(), dcIntroduceLog.getLimit());
+        List<DcIntroduceLog> dcIntroduceLogs = dcIntroduceLogDao.queryDcIntroduceLogs(dcIntroduceLog);
+        PageInfo<DcIntroduceLog> pageInfo = new PageInfo<DcIntroduceLog>(dcIntroduceLogs);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroduceLogs);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
+    public int insertDcIntroduceLog(DcIntroduceLog dcIntroduceLog) {
+        return dcIntroduceLogDao.insertDcIntroduceLog(dcIntroduceLog);
+    }
+
+    public List<DcIntroduceLog> getDcIntroduceLogs(String phone) {
+        return dcIntroduceLogDao.getDcIntroduceLogs(phone);
+    }
+
+}

+ 91 - 0
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java

@@ -0,0 +1,91 @@
+package com.ygj.yuemum.service.distributionchannel;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.distributionchannel.DcIntroducerApplicantDao;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class DcIntroducerApplicantService {
+
+    @Autowired
+    private DcIntroducerApplicantDao dcIntroducerApplicantDao;
+    @Autowired
+    private DcIntroducerService dcIntroducerService;
+    @Autowired
+    private MiniAppService miniAppService;
+
+    //分页
+    public Map<String, Object> getDcIntroducerApplicants(int page, int limit) {
+        PageHelper.startPage(page, limit);
+        List<DcIntroducerApplicant> dcIntroducerApplicants = dcIntroducerApplicantDao.getDcIntroducerApplicants();
+        PageInfo<DcIntroducerApplicant> pageInfo = new PageInfo<DcIntroducerApplicant>(dcIntroducerApplicants);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroducerApplicants);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public Map<String, Object> queryDcIntroducerApplicants(DcIntroducerApplicant dcIntroducerApplicant) {
+        PageHelper.startPage(dcIntroducerApplicant.getPage(), dcIntroducerApplicant.getLimit());
+        List<DcIntroducerApplicant> dcIntroducerApplicants = dcIntroducerApplicantDao.queryDcIntroducerApplicants(dcIntroducerApplicant);
+        PageInfo<DcIntroducerApplicant> pageInfo = new PageInfo<DcIntroducerApplicant>(dcIntroducerApplicants);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroducerApplicants);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
+    public int insertDcIntroducerApplicant(DcIntroducerApplicant dcIntroducerApplicant) {
+        return dcIntroducerApplicantDao.insertDcIntroducerApplicant(dcIntroducerApplicant);
+    }
+
+    public int updateDcIntroducerApplicant(DcIntroducerApplicant dcIntroducerApplicant) {
+        try {
+            //生成二维码
+            String qrcodePath = miniAppService.createQrCode(dcIntroducerApplicant.getWva_phone());
+            if (qrcodePath.equals("error")) {
+                return 9;
+            }
+            //更新状态
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            dcIntroducerApplicant.setWva_approve_date(sdf.format(new Date()));
+            dcIntroducerApplicantDao.updateDcIntroducerApplicant(dcIntroducerApplicant);
+            //insert into DcIntroducer
+            DcIntroducer dcIntroducer = new DcIntroducer();
+            dcIntroducer.setWv_phone(dcIntroducerApplicant.getWva_phone());
+            dcIntroducer.setWv_gradeid(1); //再调整
+            dcIntroducer.setWv_Introduction_total(0);
+            dcIntroducer.setWv_withdraw_total(0);
+            dcIntroducer.setWv_Introduction_count(0);
+            dcIntroducer.setWv_qrcode(qrcodePath);
+            dcIntroducer.setWv_people_count(0);
+            dcIntroducer.setWv_extract_count(0);
+            dcIntroducer.setWv_order_count(0);
+            dcIntroducer.setWv_register_count(0);
+            dcIntroducer.setWv_finish_count(0);
+            dcIntroducer.setWv_contract_count(0);
+//            dcIntroducer.setWv_consultant();//介绍人顾问
+            dcIntroducerService.insertDcIntroducer(dcIntroducer);
+            //to CRM
+            return 1;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+
+    }
+
+}

+ 45 - 0
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerExtractService.java

@@ -0,0 +1,45 @@
+package com.ygj.yuemum.service.distributionchannel;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.distributionchannel.DcIntroducerExtractDao;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class DcIntroducerExtractService {
+
+    @Autowired
+    private DcIntroducerExtractDao dcIntroducerExtractDao;
+
+    public List<DcIntroducerExtract> getDcIntroducerExtracts(String phone) {
+        return dcIntroducerExtractDao.getDcIntroducerExtracts(phone);
+    }
+
+    public Map<String, Object> queryDcIntroducerExtracts(DcIntroducerExtract dcIntroducerExtract) {
+        PageHelper.startPage(dcIntroducerExtract.getPage(), dcIntroducerExtract.getLimit());
+        List<DcIntroducerExtract> dcIntroducerExtracts = dcIntroducerExtractDao.queryDcIntroducerExtracts(dcIntroducerExtract);
+        PageInfo<DcIntroducerExtract> pageInfo = new PageInfo<DcIntroducerExtract>(dcIntroducerExtracts);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroducerExtracts);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
+    public int insertDcIntroducerExtract(DcIntroducerExtract dcIntroducerExtract) {
+        return dcIntroducerExtractDao.insertDcIntroducerExtract(dcIntroducerExtract);
+    }
+
+    public int updateDcIntroducerExtract(DcIntroducerExtract dcIntroducerExtract) {
+        return dcIntroducerExtractDao.updateDcIntroducerExtract(dcIntroducerExtract);
+    }
+
+
+}

+ 57 - 0
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerService.java

@@ -0,0 +1,57 @@
+package com.ygj.yuemum.service.distributionchannel;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.distributionchannel.DcIntroducerDao;
+import com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class DcIntroducerService {
+
+    @Autowired
+    private DcIntroducerDao dcIntroducerDao;
+
+    //分页
+    public Map<String, Object> getDcIntroducers(int page, int limit) {
+        PageHelper.startPage(page, limit);
+        List<DcIntroducer> dcIntroducers = dcIntroducerDao.getDcIntroducers();
+        PageInfo<DcIntroducer> pageInfo = new PageInfo<DcIntroducer>(dcIntroducers);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroducers);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public Map<String, Object> queryDcIntroducers(DcIntroducer wxVip) {
+        PageHelper.startPage(wxVip.getPage(), wxVip.getLimit());
+        List<DcIntroducer> dcIntroducers = dcIntroducerDao.queryDcIntroducers(wxVip);
+        PageInfo<DcIntroducer> pageInfo = new PageInfo<DcIntroducer>(dcIntroducers);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", dcIntroducers);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
+    public int insertDcIntroducer(DcIntroducer dcIntroducer) {
+        return dcIntroducerDao.insertDcIntroducer(dcIntroducer);
+    }
+
+    public int updateDcIntroducer(DcIntroducer dcIntroducer) {
+        return dcIntroducerDao.updateDcIntroducer(dcIntroducer);
+    }
+
+    public DcIntroducer checkDcIntroducers(String wv_phone) {
+        //从CRM里面获取推荐人等级
+        return dcIntroducerDao.checkDcIntroducers(wv_phone);
+    }
+
+}

+ 69 - 0
src/main/java/com/ygj/yuemum/service/distributionchannel/MiniAppService.java

@@ -0,0 +1,69 @@
+package com.ygj.yuemum.service.distributionchannel;
+
+import com.alibaba.fastjson.JSON;
+import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.dao.global.MiniAppInfoDao;
+import com.ygj.yuemum.domain.global.MiniAppInfo;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.protocol.HTTP;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+@Service
+public class MiniAppService {
+    @Autowired
+    private MiniAppInfoDao miniAppInfoDao;
+    public static final String qrcode = Constant.QRCODE;
+    public static final String httpqrcode = Constant.HTTPQRCODE;
+    public String createQrCode(String phone) {
+        try {
+            MiniAppInfo miniAppInfo = miniAppInfoDao.getMiniAppInfo();
+            String access_token = miniAppInfo.getAccess_token();
+            // 创建httpclient对象
+            CloseableHttpClient httpClient = HttpClients.createDefault();
+            // 创建post方式请求对象
+            HttpPost httpPost = new HttpPost("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + access_token );
+            Map<String, Object> paras = new HashMap<>();
+            paras.put("scene",phone);
+            paras.put("page","pages/index/index");
+            paras.put("width","1280px");
+            paras.put("auto_color", true);
+            String jsonstr = JSON.toJSONString(paras);
+            StringEntity stringEntity = new StringEntity(jsonstr);
+            stringEntity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
+            stringEntity.setContentEncoding("utf-8");
+            httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json");
+            httpPost.setEntity(stringEntity);
+            stringEntity.setContentType("image/png");
+            CloseableHttpResponse response = httpClient.execute(httpPost);
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+                InputStream inputStream = response.getEntity().getContent();
+                FileOutputStream out = new FileOutputStream(qrcode + "/" + phone + ".png");
+                //保存到数据库
+                byte[] buffer = new byte[8192];
+                int bytesRead = 0;
+                while((bytesRead = inputStream.read(buffer, 0, 8192)) != -1) {
+                    out.write(buffer, 0, bytesRead);
+                }
+                out.flush();
+                out.close();
+            } else {
+                return "error";
+            }
+            return httpqrcode + "/" + phone + ".png";
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return "error";
+        }
+    }
+}

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

@@ -3,8 +3,10 @@ package com.ygj.yuemum.service.global;
 import com.alibaba.fastjson.JSON;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.dao.global.MiniAppInfoDao;
 import com.ygj.yuemum.dao.global.WeChatInfoDao;
 import com.ygj.yuemum.domain.customer.CustomerBooking;
+import com.ygj.yuemum.domain.global.MiniAppInfo;
 import com.ygj.yuemum.domain.global.TemplateData;
 import com.ygj.yuemum.domain.global.WeChatInfo;
 import com.ygj.yuemum.domain.global.WechatTemplate;
@@ -44,6 +46,8 @@ public class WeChatInfoService {
     @Autowired
     private WeChatInfoDao weChatInfoDao;
     @Autowired
+    private MiniAppInfoDao miniAppInfoDao;
+    @Autowired
     private WXUserService wxUserService;
     public String APPID = Constant.APPID;
     public String APPSECRET = Constant.APPSECRET;
@@ -216,6 +220,27 @@ public class WeChatInfoService {
         return 1;
     }
 
+    public int SaveMiniAppInfo() {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            //access_token
+            String resultToken = sendGet(ACCESS_TOKEN_URL + "?grant_type=" + GRANT_TYPE + "&appid=" + MINIAPPID + "&secret=" + MINIAPPSECRET);
+            Map mapToken = JSON.parseObject(resultToken);
+            access_Token = String.valueOf(mapToken.get("access_token"));
+            expires_in = String.valueOf(mapToken.get("expires_in"));
+            //保存到数据库中
+            MiniAppInfo miniAppInfo = new MiniAppInfo();
+            miniAppInfo.setAccess_token(access_Token);
+            miniAppInfo.setJsapi_ticket(jsapi_Ticket);
+            miniAppInfo.setUpdate_time(dateFormat.format(new Date()));
+            miniAppInfoDao.updateMiniAppInfo(miniAppInfo);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
+
     public Map<String, String> getWXOpenid(String js_code) {
         Map<String, String> result = new HashMap<>();
         String resultToken = sendGet(JSCODE2SESSION + "?grant_type=authorization_code" + "&appid=" + MINIAPPID + "&secret=" + MINIAPPSECRET + "&js_code=" + js_code);

+ 5 - 1
src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java

@@ -62,6 +62,9 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/getValidPosition", "anon");
         filterChainDefinitionMap.put("/getWxPosition", "anon");
         filterChainDefinitionMap.put("/insertPromotionUserInfo", "anon");
+        filterChainDefinitionMap.put("/checkDcIntroducers", "anon");
+        filterChainDefinitionMap.put("/getDcIntroduceLogs", "anon");
+        filterChainDefinitionMap.put("/getDcIntroducerExtracts", "anon");
         //萌动开放权限
         filterChainDefinitionMap.put("/getNewUserCoupon", "anon");
         filterChainDefinitionMap.put("/getConsultTaskCoupon", "anon");
@@ -71,7 +74,8 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/uploadPromotionImg","anon");
         filterChainDefinitionMap.put("/uploadImg","anon");
         filterChainDefinitionMap.put("/uploadPayImg","anon");
-
+        //简历分享问题
+        filterChainDefinitionMap.put("/getWeChatInfo","anon");
 //        //用户,需要角色权限 “user”
 //        filterChainDefinitionMap.put("/user/**", "roles[user]");
 //        //管理员,需要角色权限 “admin”

+ 8 - 2
src/main/resources/application.yml

@@ -2,8 +2,8 @@ server:
   port: 8888
 mybatis:
   config-location: classpath:mybatis/mybatis-config.xml
-  mapper-locations: mybatis/mapper/admin/*.xml,mybatis/mapper/maternitymatron/*.xml,mybatis/mapper/coupon/*.xml,mybatis/mapper/global/*.xml,mybatis/mapper/customer/*.xml,mybatis/mapper/modoo/*.xml,mybatis/mapper/order/*.xml,mybatis/mapper/equipment/*.xml,mybatis/mapper/pay/*.xml,mybatis/mapper/wxmini/*.xml,mybatis/mapper/promotion/*.xml
-  mybatis.type-aliases-package: com.ygj.yuemum.domain/admin,com.ygj.yuemum.domain/maternitymatron,com.ygj.yuemum.domain/coupon,com.ygj.yuemum.domain/global,com.ygj.yuemum.domain/customer,com.ygj.yuemum.domain/modoo,com.ygj.yuemum.domain/order,com.ygj.yuemum.domain/equipment,com.ygj.yuemum.domain/pay,com.ygj.yuemum.domain/wxmini,com.ygj.yuemum.domain/promotion
+  mapper-locations: mybatis/mapper/*/*.xml
+  mybatis.type-aliases-package: com.ygj.yuemum.*/*
   log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 spring:
   datasource:
@@ -47,6 +47,8 @@ file:
   httppayvoucher : "http://localhost:8080/payvoucher"
   promotionvoucher : "D:/apache-tomcat-9.0.6/webapps/MiniProgram/promotion/offline"
   httppromotionvoucher : "http://localhost:8080/MiniProgram/promotion/offline"
+  qrcode: "D:/apache-tomcat-9.0.6/webapps/MiniProgram/mgm"
+  httpqrcode: "http://localhost:8080/MiniProgram/mgm"
 #测试
 #file:
 #  ROOT : "/usr/local/apache-tomcat-8.5.30/webapps/resume/img/"
@@ -58,6 +60,8 @@ file:
 #  httppayvoucher : "http://192.168.1.24/payvoucher"
 #  promotionvoucher : "/usr/local/apache-tomcat-8.5.30/webapps/promotion/offline"
 #  httppromotionvoucher : "http://192.168.1.24/MiniProgram/promotion/offline"
+#  qrcode: "/usr/local/apache-tomcat-8.5.30/webapps/MiniProgram/mgm"
+#  httpqrcode: "http://192.168.1.24/MiniProgram/mgm"
 #生产
 #file:
 #  ROOT : "/usr/local/tomcat/tomcat7/webapps/resume/img/"
@@ -69,6 +73,8 @@ file:
 #  httppayvoucher : "http://yuesuo.yueguanjia.com/payvoucher"
 #  promotionvoucher : "/usr/local/tomcat/tomcat7/webapps/MiniProgram/promotion/offline"
 #  httppromotionvoucher : "http://yuesuo.yueguanjia.com/MiniProgram/promotion/offline"
+#  qrcode: "/usr/local/tomcat/tomcat7/webapps/MiniProgram/mgm"
+#  httpqrcode: "http://yuesuo.yueguanjia.com/MiniProgram/mgm"
 #微信公众号---------------------------------------------------
 wechat:
   APPID : "wx52852a3c47540fad"

+ 6 - 0
src/main/resources/mybatis/mapper/admin/JlAdminUserMapper.xml

@@ -35,6 +35,12 @@
         from jl_admin_user
         where username =  #{username,jdbcType=VARCHAR}
     </select>
+    <select id="getConsultants"  resultMap="BaseResultMap" >
+        select
+        *
+        from jl_admin_user
+        where role =  3
+    </select>
     <select id="getRolePermissionCount"  resultType="java.lang.Integer" parameterType="java.lang.Integer">
         select
         count(1)

+ 124 - 0
src/main/resources/mybatis/mapper/distributionchannel/DcIntroduceLogMapper.xml

@@ -0,0 +1,124 @@
+<?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.distributionchannel.DcIntroduceLogDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog">
+        <result column="id" property="id" jdbcType="INTEGER"/>
+        <result column="xul_openid" property="xul_openid" jdbcType="VARCHAR"/>
+        <result column="xul_phone" property="xul_phone" jdbcType="VARCHAR"/>
+        <result column="xul_event" property="xul_event" jdbcType="INTEGER"/>
+        <result column="xul_date" property="xul_date" jdbcType="DATE"/>
+        <result column="xul_introducer_phone" property="xul_introducer_phone" jdbcType="VARCHAR"/>
+        <result column="xul_pm_type" property="xul_pm_type" jdbcType="INTEGER"/>
+        <result column="xul_orderno" property="xul_orderno" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <!--获取所有数据-->
+
+    <select id="queryDcIntroduceLogs" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog"
+            parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog">
+        select
+        id,
+        xul_openid,
+        xul_phone,
+        xul_event,
+        xul_date,
+        xul_introducer_phone,
+        xul_pm_type,
+        xul_orderno
+        from dc_introduce_log
+        where 1=1
+        <if test="xul_openid != null and xul_openid != ''">
+            and xul_openid = #{xul_openid,jdbcType=VARCHAR}
+        </if>
+        <if test="xul_phone != null and xul_phone != ''">
+            and xul_phone = #{xul_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="xul_event != null and xul_event != ''">
+            and xul_event = #{xul_event,jdbcType=INTEGER}
+        </if>
+        <if test="xul_date != null and xul_date != ''">
+            and xul_date = #{xul_date,jdbcType=DATE}
+        </if>
+        <if test="xul_introducer_phone != null and xul_introducer_phone != ''">
+            and xul_introducer_phone = #{xul_introducer_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="xul_pm_type != null and xul_pm_type != ''">
+            and xul_pm_type = #{xul_pm_type,jdbcType=INTEGER}
+        </if>
+        <if test="xul_orderno != null and xul_orderno != ''">
+            and xul_orderno = #{xul_orderno,jdbcType=VARCHAR}
+        </if>
+        order by xul_event desc, id desc , xul_pm_type asc
+    </select>
+
+
+    <select id="getDcIntroduceLogs" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog"
+            parameterType="java.lang.String">
+        SELECT
+          xul_phone,
+          DATE_FORMAT(min(xul_date), '%Y-%m-%d') xul_date,
+          max(xul_event) xul_event,
+          max(xul_pm_type) xul_pm_type
+        FROM
+            dc_introduce_log
+        WHERE
+            xul_introducer_phone = #{phone,jdbcType=VARCHAR}
+            and xul_event>= 2
+        GROUP BY
+            xul_phone
+        order by xul_event desc, id desc , xul_pm_type asc
+    </select>
+
+    <insert id="insertDcIntroduceLog" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog">
+        insert into dc_introduce_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="xul_openid != null">
+                xul_openid,
+            </if>
+            <if test="xul_phone != null">
+                xul_phone,
+            </if>
+            <if test="xul_event != null">
+                xul_event,
+            </if>
+            <if test="xul_date != null">
+                xul_date,
+            </if>
+            <if test="xul_introducer_phone != null">
+                xul_introducer_phone,
+            </if>
+            <if test="xul_pm_type != null">
+                xul_pm_type,
+            </if>
+            <if test="xul_orderno != null">
+                xul_orderno
+            </if>
+
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="xul_openid != null">
+                #{xul_openid,jdbcType=VARCHAR},
+            </if>
+            <if test="xul_phone != null">
+                #{xul_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="xul_event != null">
+                #{xul_event,jdbcType=INTEGER},
+            </if>
+            <if test="xul_date != null">
+                #{xul_date,jdbcType=DATE},
+            </if>
+            <if test="xul_introducer_phone != null">
+                #{xul_introducer_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="xul_pm_type != null">
+                #{xul_pm_type,jdbcType=INTEGER},
+            </if>
+            <if test="xul_orderno != null">
+                #{xul_orderno,jdbcType=VARCHAR}
+            </if>
+
+        </trim>
+    </insert>
+</mapper>

+ 137 - 0
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerApplicantMapper.xml

@@ -0,0 +1,137 @@
+<?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.distributionchannel.DcIntroducerApplicantDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant" >
+        <result column="id" property="id" jdbcType="INTEGER" />
+        <result column="wva_phone" property="wva_phone" jdbcType="VARCHAR" />
+        <result column="wva_apply_date" property="wva_apply_date" jdbcType="DATE" />
+        <result column="wva_auditor" property="wva_auditor" jdbcType="INTEGER" />
+        <result column="wva_consultant" property="wva_consultant" jdbcType="VARCHAR" />
+        <result column="wva_approve_date" property="wva_approve_date" jdbcType="DATE" />
+        <result column="wva_status" property="wva_status" jdbcType="INTEGER" />
+        <result column="wva_remarks" property="wva_remarks" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getDcIntroducerApplicants" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant">
+        select
+        *
+        from dc_introducer_applicant
+        order by id desc
+    </select>
+
+    <select id="queryDcIntroducerApplicants" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant">
+        select
+        id,
+        wva_phone,
+        wva_apply_date,
+        fgetuser_name(wva_auditor) wva_auditor_name,
+        wva_approve_date,
+        fgetuser_name(wva_consultant) wva_consultant_name,
+        wva_status,
+        wva_remarks
+        from dc_introducer_applicant
+        where 1=1
+        <if test="wva_phone != null and wva_phone != ''">
+            and wva_phone = #{wva_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="wva_apply_date != null and wva_apply_date != ''">
+            and DATE_FORMAT(wva_apply_date, '%Y-%m-%d') = #{wva_apply_date,jdbcType=DATE}
+        </if>
+        <if test="wva_auditor != null and wva_auditor != ''">
+            and wva_auditor = #{wva_auditor,jdbcType=INTEGER}
+        </if>
+        <if test="wva_approve_date != null and wva_approve_date != ''">
+            and DATE_FORMAT(wva_approve_date, '%Y-%m-%d') = #{wva_approve_date,jdbcType=DATE}
+        </if>
+        <if test="wva_consultant != null and wva_consultant != ''">
+            and wva_consultant = #{wva_consultant,jdbcType=INTEGER}
+        </if>
+        <if test="wva_status != null and wva_status != ''">
+            and wva_status = #{wva_status,jdbcType=INTEGER}
+        </if>
+        <if test="wva_remarks != null and wva_remarks != ''">
+            and wva_remarks = #{wva_remarks,jdbcType=VARCHAR}
+        </if>
+        order by wva_status asc , id desc
+    </select>
+
+    <update id="updateDcIntroducerApplicant" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant" >
+        update dc_introducer_applicant
+        <set >
+            <if test="wva_phone != null" >
+                wva_phone = #{wva_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wva_consultant != null" >
+                wva_consultant = #{wva_consultant,jdbcType=VARCHAR},
+            </if>
+            <if test="wva_apply_date != null" >
+                wva_apply_date = #{wva_apply_date,jdbcType=DATE},
+            </if>
+            <if test="wva_auditor != null" >
+                wva_auditor = #{wva_auditor,jdbcType=INTEGER},
+            </if>
+            <if test="wva_approve_date != null" >
+                wva_approve_date = #{wva_approve_date,jdbcType=DATE},
+            </if>
+            <if test="wva_status != null" >
+                wva_status = #{wva_status,jdbcType=INTEGER},
+            </if>
+            <if test="wva_remarks != null" >
+                wva_remarks = #{wva_remarks,jdbcType=VARCHAR}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+    <insert id="insertDcIntroducerApplicant" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerApplicant" >
+        insert into dc_introducer_applicant
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wva_phone != null" >
+                wva_phone,
+            </if>
+            <if test="wva_apply_date != null" >
+                wva_apply_date,
+            </if>
+            <if test="wva_auditor != null" >
+                wva_auditor,
+            </if>
+            <if test="wva_consultant != null" >
+                wva_consultant,
+            </if>
+            <if test="wva_approve_date != null" >
+                wva_approve_date,
+            </if>
+            <if test="wva_status != null" >
+                wva_status,
+            </if>
+            <if test="wva_remarks != null" >
+                wva_remarks
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wva_phone != null" >
+                #{wva_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wva_apply_date != null" >
+                #{wva_apply_date,jdbcType=DATE},
+            </if>
+            <if test="wva_auditor != null" >
+                #{wva_auditor,jdbcType=INTEGER},
+            </if>
+            <if test="wva_consultant != null" >
+                #{wva_consultant,jdbcType=VARCHAR},
+            </if>
+            <if test="wva_approve_date != null" >
+                #{wva_approve_date,jdbcType=DATE},
+            </if>
+            <if test="wva_status != null" >
+                #{wva_status,jdbcType=INTEGER},
+            </if>
+            <if test="wva_remarks != null" >
+                #{wva_remarks,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+</mapper>

+ 152 - 0
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml

@@ -0,0 +1,152 @@
+<?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.distributionchannel.DcIntroducerExtractDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
+        <result column="id" property="id" jdbcType="INTEGER" />
+        <result column="wue_phone" property="wue_phone" jdbcType="VARCHAR" />
+        <result column="wue_type" property="wue_type" jdbcType="INTEGER" />
+        <result column="wue_applydate" property="wue_applydate" jdbcType="DATE" />
+        <result column="wue_applysum" property="wue_applysum" jdbcType="INTEGER" />
+        <result column="wue_approverdate" property="wue_approverdate" jdbcType="DATE" />
+        <result column="wue_approversum" property="wue_approversum" jdbcType="INTEGER" />
+        <result column="wue_approveruser" property="wue_approveruser" jdbcType="INTEGER" />
+        <result column="wue_paydate" property="wue_paydate" jdbcType="DATE" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.String">
+        select
+        *
+        from dc_introducer_extract
+        where wue_phone = #{phone,jdbcType=VARCHAR}
+        order by id desc
+    </select>
+
+    <select id="queryDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract">
+        select
+        id,
+        wue_phone,
+        wue_type,
+        wue_applydate,
+        wue_applysum,
+        wue_approverdate,
+        wue_approversum,
+        fgetuser_name(wue_approveruser) wue_approveruser,
+        wue_paydate
+        from dc_introducer_extract
+        where 1=1
+        <if test="wue_phone != null and wue_phone != ''">
+            and wue_phone = #{wue_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="wue_type != null and wue_type != ''">
+            and wue_type = #{wue_type,jdbcType=INTEGER}
+        </if>
+        <if test="wue_applydate != null and wue_applydate != ''">
+            and wue_applydate = #{wue_applydate,jdbcType=DATE}
+        </if>
+        <if test="wue_applysum != null and wue_applysum != ''">
+            and wue_applysum = #{wue_applysum,jdbcType=INTEGER}
+        </if>
+        <if test="wue_approverdate != null and wue_approverdate != ''">
+            and wue_approverdate = #{wue_approverdate,jdbcType=DATE}
+        </if>
+        <if test="wue_approversum != null and wue_approversum != ''">
+            and wue_approversum = #{wue_approversum,jdbcType=INTEGER}
+        </if>
+        <if test="wue_approveruser != null and wue_approveruser != ''">
+            and wue_approveruser = #{wue_approveruser,jdbcType=INTEGER}
+        </if>
+        <if test="wue_paydate != null and wue_paydate != ''">
+            and wue_paydate = #{wue_paydate,jdbcType=DATE}
+        </if>
+        order by id desc
+    </select>
+
+    <update id="updateDcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
+        update dc_introducer_extract
+        <set >
+            <if test="wue_phone != null" >
+                wue_phone = #{wue_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_type != null" >
+                wue_type = #{wue_type,jdbcType=INTEGER},
+            </if>
+            <if test="wue_applydate != null" >
+                wue_applydate = #{wue_applydate,jdbcType=DATE},
+            </if>
+            <if test="wue_applysum != null" >
+                wue_applysum = #{wue_applysum,jdbcType=INTEGER},
+            </if>
+            <if test="wue_approverdate != null" >
+                wue_approverdate = #{wue_approverdate,jdbcType=DATE},
+            </if>
+            <if test="wue_approversum != null" >
+                wue_approversum = #{wue_approversum,jdbcType=INTEGER},
+            </if>
+            <if test="wue_approveruser != null" >
+                wue_approveruser = #{wue_approveruser,jdbcType=INTEGER},
+            </if>
+            <if test="wue_paydate != null" >
+                wue_paydate = #{wue_paydate,jdbcType=DATE}
+            </if>
+        </set>
+    </update>
+
+    <insert id="insertDcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
+        insert into dc_introducer_extract
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wue_phone != null" >
+                wue_phone,
+            </if>
+            <if test="wue_type != null" >
+                wue_type,
+            </if>
+            <if test="wue_applydate != null" >
+                wue_applydate,
+            </if>
+            <if test="wue_applysum != null" >
+                wue_applysum,
+            </if>
+            <if test="wue_approverdate != null" >
+                wue_approverdate,
+            </if>
+            <if test="wue_approversum != null" >
+                wue_approversum,
+            </if>
+            <if test="wue_approveruser != null" >
+                wue_approveruser,
+            </if>
+            <if test="wue_paydate != null" >
+                wue_paydate
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wue_phone != null" >
+                #{wue_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_type != null" >
+                #{wue_type,jdbcType=INTEGER},
+            </if>
+            <if test="wue_applydate != null" >
+                #{wue_applydate,jdbcType=DATE},
+            </if>
+            <if test="wue_applysum != null" >
+                #{wue_applysum,jdbcType=INTEGER},
+            </if>
+            <if test="wue_approverdate != null" >
+                #{wue_approverdate,jdbcType=DATE},
+            </if>
+            <if test="wue_approversum != null" >
+                #{wue_approversum,jdbcType=INTEGER},
+            </if>
+            <if test="wue_approveruser != null" >
+                #{wue_approveruser,jdbcType=INTEGER},
+            </if>
+            <if test="wue_paydate != null" >
+                #{wue_paydate,jdbcType=DATE}
+            </if>
+
+        </trim>
+    </insert>
+</mapper>

+ 230 - 0
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml

@@ -0,0 +1,230 @@
+<?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.distributionchannel.DcIntroducerDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
+        <result column="id" property="id" jdbcType="INTEGER" />
+        <result column="wv_phone" property="wv_phone" jdbcType="VARCHAR" />
+        <result column="wv_gradeid" property="wv_gradeid" jdbcType="INTEGER" />
+        <result column="wv_Introduction_total" property="wv_Introduction_total" jdbcType="INTEGER" />
+        <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="INTEGER" />
+        <result column="wv_Introduction_count" property="wv_Introduction_count" jdbcType="INTEGER" />
+        <result column="wv_order_count" property="wv_order_count" jdbcType="INTEGER" />
+        <result column="wv_extract_count" property="wv_extract_count" jdbcType="INTEGER" />
+        <result column="wv_qrcode" property="wv_qrcode" jdbcType="VARCHAR" />
+        <result column="wv_people_count" property="wv_people_count" jdbcType="INTEGER" />
+        <result column="wv_register_count" property="wv_register_count" jdbcType="INTEGER" />
+        <result column="wv_contract_count" property="wv_contract_count" jdbcType="INTEGER" />
+        <result column="wv_finish_count" property="wv_finish_count" jdbcType="INTEGER" />
+        <result column="wv_consultant" property="wv_consultant" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
+        select
+        *
+        from dc_introducer
+        order by id desc
+    </select>
+
+    <select id="checkDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="java.lang.String">
+        select
+        *
+        from dc_introducer
+        where wv_phone = #{wv_phone,jdbcType=VARCHAR}
+        order by id desc
+    </select>
+
+
+
+    <select id="queryDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
+        select
+        id,
+        wv_phone,
+        wv_gradeid,
+        wv_Introduction_total,
+        wv_withdraw_total,
+        wv_Introduction_count,
+        wv_extract_count,
+        wv_qrcode,
+        wv_order_count,
+        wv_people_count,
+        wv_register_count,
+        wv_contract_count,
+        wv_finish_count,
+        wv_consultant
+        from dc_introducer
+        where 1=1
+        <if test="wv_phone != null and wv_phone != ''">
+            and wv_phone = #{wv_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="wv_gradeid != null and wv_gradeid != ''">
+            and wv_gradeid = #{wv_gradeid,jdbcType=INTEGER}
+        </if>
+        <if test="wv_Introduction_total != null and wv_Introduction_total != ''">
+            and wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER}
+        </if>
+        <if test="wv_withdraw_total != null and wv_withdraw_total != ''">
+            and wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER}
+        </if>
+        <if test="wv_Introduction_count != null and wv_Introduction_count != ''">
+            and wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_qrcode != null and wv_qrcode != ''">
+            and wv_qrcode = #{wv_qrcode,jdbcType=INTEGER}
+        </if>
+        <if test="wv_order_count != null and wv_order_count != ''">
+            and wv_order_count = #{wv_order_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_people_count != null and wv_people_count != ''">
+            and wv_people_count = #{wv_people_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_extract_count != null and wv_extract_count != ''">
+            and wv_extract_count = #{wv_extract_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_register_count != null and wv_register_count != ''">
+            and wv_register_count = #{wv_register_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_contract_count != null and wv_contract_count != ''">
+            and wv_contract_count = #{wv_contract_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_finish_count != null and wv_finish_count != ''">
+            and wv_finish_count = #{wv_finish_count,jdbcType=INTEGER}
+        </if>
+        <if test="wv_consultant != null and wv_consultant != ''">
+            and wv_consultant = #{wv_consultant,jdbcType=INTEGER}
+        </if>
+        order by id desc
+    </select>
+
+    <update id="updateDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
+        update dc_introducer
+        <set >
+            <if test="wv_phone != null" >
+                wv_phone = #{wv_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_gradeid != null" >
+                wv_gradeid = #{wv_gradeid,jdbcType=INTEGER},
+            </if>
+            <if test="wv_Introduction_total != null" >
+                wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER},
+            </if>
+            <if test="wv_withdraw_total != null" >
+                wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER},
+            </if>
+            <if test="wv_Introduction_count != null" >
+                wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_order_count != null" >
+                wv_order_count = #{wv_order_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_extract_count != null" >
+                wv_extract_count = #{wv_extract_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_qrcode != null" >
+                wv_qrcode = #{wv_qrcode,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_register_count != null" >
+                wv_register_count = #{wv_register_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_contract_count != null" >
+                wv_contract_count = #{wv_contract_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_finish_count != null" >
+                wv_finish_count = #{wv_finish_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_people_count != null" >
+                wv_people_count = #{wv_people_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_consultant != null" >
+                wv_consultant = #{wv_consultant,jdbcType=INTEGER}
+            </if>
+        </set>
+    </update>
+
+    <insert id="insertDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
+        insert into dc_introducer
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wv_phone != null" >
+                wv_phone,
+            </if>
+            <if test="wv_gradeid != null" >
+                wv_gradeid,
+            </if>
+            <if test="wv_Introduction_total != null" >
+                wv_Introduction_total,
+            </if>
+            <if test="wv_withdraw_total != null" >
+                wv_withdraw_total,
+            </if>
+            <if test="wv_Introduction_count != null" >
+                wv_Introduction_count,
+            </if>
+            <if test="wv_order_count != null" >
+                wv_order_count,
+            </if>
+            <if test="wv_extract_count != null" >
+                wv_extract_count,
+            </if>
+            <if test="wv_qrcode != null" >
+                wv_qrcode,
+            </if>
+            <if test="wv_register_count != null" >
+                wv_register_count,
+            </if>
+            <if test="wv_contract_count != null" >
+                wv_contract_count,
+            </if>
+            <if test="wv_finish_count != null" >
+                wv_finish_count,
+            </if>
+            <if test="wv_people_count != null" >
+                wv_people_count,
+            </if>
+            <if test="wv_consultant != null" >
+                wv_consultant
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wv_phone != null" >
+                #{wv_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_gradeid != null" >
+                #{wv_gradeid,jdbcType=INTEGER},
+            </if>
+            <if test="wv_Introduction_total != null" >
+                #{wv_Introduction_total,jdbcType=INTEGER},
+            </if>
+            <if test="wv_withdraw_total != null" >
+                #{wv_withdraw_total,jdbcType=INTEGER},
+            </if>
+            <if test="wv_extract_count != null" >
+                #{wv_extract_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_order_count != null" >
+                #{wv_order_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_Introduction_count != null" >
+                #{wv_Introduction_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_qrcode != null" >
+                #{wv_qrcode,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_register_count != null" >
+                #{wv_register_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_contract_count != null" >
+                #{wv_contract_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_finish_count != null" >
+                #{wv_finish_count,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_people_count != null" >
+                #{wv_people_count,jdbcType=INTEGER},
+            </if>
+            <if test="wv_consultant != null" >
+                #{wv_consultant,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+</mapper>

+ 33 - 0
src/main/resources/mybatis/mapper/global/MiniAppInfoMapper.xml

@@ -0,0 +1,33 @@
+<?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.global.MiniAppInfoDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.global.WeChatInfo" >
+        <result column="access_token" property="access_token" jdbcType="VARCHAR" />
+        <result column="jsapi_ticket" property="jsapi_ticket" jdbcType="VARCHAR" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getMiniAppInfo" resultType="com.ygj.yuemum.domain.global.MiniAppInfo">
+        select
+        access_token,jsapi_ticket
+        from miniappinfo
+    </select>
+
+    <update id="updateMiniAppInfo" parameterType="com.ygj.yuemum.domain.global.MiniAppInfo" >
+        update miniappinfo
+        <set >
+            <if test="access_token != null" >
+                access_token = #{access_token,jdbcType=VARCHAR},
+            </if>
+            <if test="jsapi_ticket != null" >
+                jsapi_ticket = #{jsapi_ticket,jdbcType=VARCHAR},
+            </if>
+            <if test="update_time != null" >
+                update_time = #{update_time,jdbcType=DATE}
+            </if>
+        </set>
+    </update>
+
+</mapper>