Browse Source

悦所3月份送浴盆活动

huan.wang 6 years ago
parent
commit
eb398407f3
39 changed files with 2024 additions and 1264 deletions
  1. 7 0
      pom.xml
  2. 16 0
      src/main/java/com/ygj/yuemum/component/Constant.java
  3. 33 27
      src/main/java/com/ygj/yuemum/controller/admin/BranchesController.java
  4. 55 41
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerApplicantController.java
  5. 67 60
      src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerController.java
  6. 20 0
      src/main/java/com/ygj/yuemum/controller/global/CreatePOPController.java
  7. 2 2
      src/main/java/com/ygj/yuemum/controller/global/WeChatInfoController.java
  8. 27 0
      src/main/java/com/ygj/yuemum/controller/promotion/PromotionDCController.java
  9. 30 0
      src/main/java/com/ygj/yuemum/controller/promotion/PromotionDCUserInfoController.java
  10. 28 28
      src/main/java/com/ygj/yuemum/controller/promotion/PromotionUserInfoController.java
  11. 30 30
      src/main/java/com/ygj/yuemum/controller/wxmini/WXUserController.java
  12. 13 12
      src/main/java/com/ygj/yuemum/dao/admin/BranchesDao.java
  13. 13 0
      src/main/java/com/ygj/yuemum/dao/promotion/PromotionDCDao.java
  14. 16 0
      src/main/java/com/ygj/yuemum/dao/promotion/PromotionDCUserInfoDao.java
  15. 13 12
      src/main/java/com/ygj/yuemum/dao/wxmini/WXUserDao.java
  16. 9 0
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducer.java
  17. 148 140
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java
  18. 49 0
      src/main/java/com/ygj/yuemum/domain/promotion/PromotionDC.java
  19. 113 0
      src/main/java/com/ygj/yuemum/domain/promotion/PromotionDCUserInfo.java
  20. 48 39
      src/main/java/com/ygj/yuemum/domain/wxmini/WXBanner.java
  21. 26 23
      src/main/java/com/ygj/yuemum/service/admin/BranchesService.java
  22. 5 5
      src/main/java/com/ygj/yuemum/service/bizobject/BizObjectApiService.java
  23. 116 111
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroduceLogService.java
  24. 93 90
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java
  25. 130 0
      src/main/java/com/ygj/yuemum/service/global/CreatePOPService.java
  26. 2 2
      src/main/java/com/ygj/yuemum/service/global/WeChatInfoService.java
  27. 7 7
      src/main/java/com/ygj/yuemum/service/order/YSOrderService.java
  28. 23 0
      src/main/java/com/ygj/yuemum/service/promotion/PromotionDCService.java
  29. 48 0
      src/main/java/com/ygj/yuemum/service/promotion/PromotionDCUserInfoService.java
  30. 36 27
      src/main/java/com/ygj/yuemum/service/wxmini/WXUserService.java
  31. 143 136
      src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java
  32. 7 1
      src/main/resources/application.yml
  33. 31 23
      src/main/resources/mybatis/mapper/admin/BranchesMapper.xml
  34. 278 261
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml
  35. 23 4
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml
  36. 31 0
      src/main/resources/mybatis/mapper/promotion/PromotionDCMapper.xml
  37. 97 0
      src/main/resources/mybatis/mapper/promotion/PromotionDCUserInfoMapper.xml
  38. 20 20
      src/main/resources/mybatis/mapper/wxmini/WXBannerMapper.xml
  39. 171 163
      src/main/resources/mybatis/mapper/wxmini/WXUserMapper.xml

+ 7 - 0
pom.xml

@@ -105,6 +105,13 @@
 			<artifactId>pagehelper</artifactId>
 			<version>4.1.6</version>
 		</dependency>
+		<!--emoji-->
+		<dependency>
+			<groupId>com.vdurmont</groupId>
+			<artifactId>emoji-java</artifactId>
+			<version>3.2.0</version>
+		</dependency>
+
 
 		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>

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

@@ -52,6 +52,9 @@ public class Constant {
     public static String MDJAPIURL;
     public static String BIZOBJECTSERVICE;
     public static String BIZUSERSERVICE;
+    public static String LOCALQRCODE;
+    public static String DEMOQRCODE;
+    public static String HTTPOPPQRCODE;
 
     //注入
     @Autowired(required = false)
@@ -235,4 +238,17 @@ public class Constant {
     public void getBIZUSERSERVICE(@Value("${api.BIZUSERSERVICE}") String BIZUSERSERVICE) {
         Constant.BIZUSERSERVICE = BIZUSERSERVICE;
     }
+
+    @Autowired(required = false)
+    public void getLOCALQRCODE(@Value("${file.LOCALQRCODE}") String LOCALQRCODE) {
+        Constant.LOCALQRCODE = LOCALQRCODE;
+    }
+    @Autowired(required = false)
+    public void getDEMOQRCODE(@Value("${file.DEMOQRCODE}") String DEMOQRCODE) {
+        Constant.DEMOQRCODE = DEMOQRCODE;
+    }
+    @Autowired(required = false)
+    public void getHTTPOPPQRCODE(@Value("${file.HTTPOPPQRCODE}") String HTTPOPPQRCODE) {
+        Constant.HTTPOPPQRCODE = HTTPOPPQRCODE;
+    }
 }

+ 33 - 27
src/main/java/com/ygj/yuemum/controller/admin/BranchesController.java

@@ -1,28 +1,34 @@
-package com.ygj.yuemum.controller.admin;
-
-
-import com.ygj.yuemum.domain.admin.Branches;
-import com.ygj.yuemum.service.admin.BranchesService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-@RestController
-public class BranchesController {
-
-    @Autowired
-    private BranchesService branchesService;
-    @GetMapping("/getBranches")
-    public List<Branches> getBranches() {
-        List<Branches> branches = branchesService.getBranches();
-        return branches;
-    }
-    @GetMapping("/getMktBranches")
-    public List<Branches> getMktBranches() {
-        List<Branches> branches = branchesService.getMktBranches();
-        return branches;
-    }
-
+package com.ygj.yuemum.controller.admin;
+
+
+import com.ygj.yuemum.domain.admin.Branches;
+import com.ygj.yuemum.service.admin.BranchesService;
+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;
+
+import java.util.List;
+
+@RestController
+public class BranchesController {
+
+    @Autowired
+    private BranchesService branchesService;
+    @GetMapping("/getBranches")
+    public List<Branches> getBranches() {
+        List<Branches> branches = branchesService.getBranches();
+        return branches;
+    }
+    @GetMapping("/getMktBranches")
+    public List<Branches> getMktBranches() {
+        List<Branches> branches = branchesService.getMktBranches();
+        return branches;
+    }
+
+    @GetMapping("/checkMkt")
+    public List<Branches> checkMkt(@RequestParam("branche_code") String branche_code) {
+        return  branchesService.checkMkt(branche_code);
+    }
+
 }

+ 55 - 41
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerApplicantController.java

@@ -1,42 +1,56 @@
-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);
-    }
-
+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 com.ygj.yuemum.service.wxmini.WXUserService;
+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;
+    @Autowired
+    private WXUserService wxUserService;
+
+    @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);
+    }
+
+    @GetMapping ("/updateDcIntroducerApplicant")
+    public int updateDcIntroducerApplicant(@RequestParam("phone") String phone) {
+        return dcIntroducerApplicantService.updateDcIntroducerApplicant(phone);
+    }
+
+    @GetMapping ("/auditingDC")
+    public int auditingDC(@RequestParam("phone") String phone) {
+        //验证小程序手机号是否授权
+        int checker = wxUserService.checkWXUser(phone);
+        if (checker != 1) {
+            return -9;
+        } else {
+            return dcIntroducerApplicantService.updateDcIntroducerApplicant(phone);
+        }
+    }
+
 }

+ 67 - 60
src/main/java/com/ygj/yuemum/controller/distributionchannel/DcIntroducerController.java

@@ -1,61 +1,68 @@
-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.List;
-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);
-    }
-    @GetMapping("/queryOneDcIntroducer")
-    public DcIntroducer queryOneDcIntroducer(@RequestParam("wv_phone")  String wv_phone) {
-        return dcIntroducerService.queryOneDcIntroducer(wv_phone);
-    }
-
-    @GetMapping("/queryDcIntroducersByUser")
-    public List<DcIntroducer> queryDcIntroducersByUser(@RequestParam("xul_phone")  String xul_phone) {
-        return dcIntroducerService.queryDcIntroducersByUser(xul_phone);
-    }
-
-    @PostMapping("/insertDcIntroducer")
-    public int insertDcIntroducer(@ModelAttribute DcIntroducer dcIntroducer) {
-        return dcIntroducerService.insertDcIntroducer(dcIntroducer);
-    }
-
-    @PostMapping("/updateDcIntroducer")
-    public int updateDcIntroducer(@ModelAttribute DcIntroducer dcIntroducer) {
-        return dcIntroducerService.updateDcIntroducer(dcIntroducer);
-    }
-    @GetMapping("/delAccountNumber")
-    public int delAccountNumber(@RequestParam("wv_phone")  String wv_phone) {
-        return dcIntroducerService.delAccountNumber(wv_phone);
-    }
-
+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.List;
+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);
+    }
+    @GetMapping("/queryOneDcIntroducer")
+    public DcIntroducer queryOneDcIntroducer(@RequestParam("wv_phone")  String wv_phone) {
+        return dcIntroducerService.queryOneDcIntroducer(wv_phone);
+    }
+
+    @GetMapping("/queryDcIntroducersByUser")
+    public List<DcIntroducer> queryDcIntroducersByUser(@RequestParam("xul_phone")  String xul_phone) {
+        return dcIntroducerService.queryDcIntroducersByUser(xul_phone);
+    }
+
+    @PostMapping("/insertDcIntroducer")
+    public int insertDcIntroducer(@ModelAttribute DcIntroducer dcIntroducer) {
+        return dcIntroducerService.insertDcIntroducer(dcIntroducer);
+    }
+
+    @PostMapping("/updateDcIntroducer")
+    public int updateDcIntroducer(@ModelAttribute DcIntroducer dcIntroducer) {
+        return dcIntroducerService.updateDcIntroducer(dcIntroducer);
+    }
+
+    @PostMapping("/updateAccountNumber")
+    public int updateAccountNumber(@ModelAttribute DcIntroducer dcIntroducer) {
+        return dcIntroducerService.updateAccountNumber(dcIntroducer);
+    }
+
+    @GetMapping("/delAccountNumber")
+    public int delAccountNumber(@RequestParam("wv_phone")  String wv_phone) {
+        return dcIntroducerService.delAccountNumber(wv_phone);
+    }
+
+
 }

+ 20 - 0
src/main/java/com/ygj/yuemum/controller/global/CreatePOPController.java

@@ -0,0 +1,20 @@
+package com.ygj.yuemum.controller.global;
+
+import com.ygj.yuemum.service.global.CreatePOPService;
+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 CreatePOPController {
+
+    @Autowired
+    private CreatePOPService createPOPService;
+
+    @GetMapping("/CreatePOP")
+    public String CreatePOP(@RequestParam("wv_phone") String wv_phone) throws Exception {
+        return  createPOPService.CreatePOP(wv_phone);
+    }
+}

+ 2 - 2
src/main/java/com/ygj/yuemum/controller/global/WeChatInfoController.java

@@ -46,7 +46,7 @@ public class WeChatInfoController {
         return saveWeChatInfo.WXSendBookingMessage(customerBooking);
     }
     @GetMapping("/WXSendExtractMessage")
-    public int WXSendExtractMessage(@RequestParam("wue_applysum") String wue_applysum,@RequestParam("wue_phone") String wue_phone,@RequestParam("wue_bank_card") String wue_bank_card) throws IOException {
-        return saveWeChatInfo.WXSendExtractMessage(wue_applysum,wue_phone,wue_bank_card);
+    public int WXSendExtractMessage(@RequestParam("wue_applysum") String wue_applysum,@RequestParam("wue_phone") String wue_phone,@RequestParam("wue_bank_card") String wue_bank_card,@RequestParam("wue_account_name") String wue_account_name) throws IOException {
+        return saveWeChatInfo.WXSendExtractMessage(wue_applysum,wue_phone,wue_bank_card,wue_account_name);
     }
 }

+ 27 - 0
src/main/java/com/ygj/yuemum/controller/promotion/PromotionDCController.java

@@ -0,0 +1,27 @@
+package com.ygj.yuemum.controller.promotion;
+
+
+import com.ygj.yuemum.domain.promotion.PromotionDC;
+import com.ygj.yuemum.service.promotion.PromotionDCService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+public class PromotionDCController {
+
+    @Autowired
+    private PromotionDCService promotionDCService;
+
+    @GetMapping("/getPromotionDC")
+    public PromotionDC getPromotionDC(){
+        return promotionDCService.getPromotionDC();
+    }
+
+    @GetMapping("/getPromotionDCs")
+    public List<PromotionDC> getPromotionDCs(){
+        return promotionDCService.getPromotionDCs();
+    }
+}

+ 30 - 0
src/main/java/com/ygj/yuemum/controller/promotion/PromotionDCUserInfoController.java

@@ -0,0 +1,30 @@
+package com.ygj.yuemum.controller.promotion;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.promotion.PromotionDCUserInfo;
+import com.ygj.yuemum.service.promotion.PromotionDCUserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@RestController
+public class PromotionDCUserInfoController {
+
+    @Autowired
+    private PromotionDCUserInfoService promotionDCUserInfoService;
+    @PostMapping("/insertPromotionDCUserInfo")
+    public int insertPromotionDCUserInfo(@ModelAttribute PromotionDCUserInfo promotionDCUserInfo) {
+        return promotionDCUserInfoService.insertPromotionDCUserInfo(promotionDCUserInfo);
+    }
+
+    @PostMapping("/getPromotionDCUserInfos")
+    public String getPromotionDCUserInfos(@ModelAttribute PromotionDCUserInfo promotionDCUserInfo) {
+        Map<String, Object> promotionUserInfos= promotionDCUserInfoService.getPromotionDCUserInfos(promotionDCUserInfo);
+        String jso = JSONObject.toJSONString(promotionUserInfos);
+        return jso;
+    }
+}

+ 28 - 28
src/main/java/com/ygj/yuemum/controller/promotion/PromotionUserInfoController.java

@@ -1,29 +1,29 @@
-package com.ygj.yuemum.controller.promotion;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.ygj.yuemum.domain.promotion.PromotionUserInfo;
-import com.ygj.yuemum.service.promotion.PromotionUserInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.Map;
-
-@RestController
-public class PromotionUserInfoController {
-
-    @Autowired
-    private PromotionUserInfoService promotionUserInfoService;
-    @PostMapping("/getPromotionUserInfos")
-    public String getPromotionUserInfos(@ModelAttribute PromotionUserInfo promotionUserInfo) {
-        Map<String, Object> promotionUserInfos= promotionUserInfoService.getPromotionUserInfos(promotionUserInfo);
-        String jso = JSONObject.toJSONString(promotionUserInfos);
-        return jso;
-    }
-    @PostMapping("/insertPromotionUserInfo")
-    public int insertPromotionUserInfo(@ModelAttribute PromotionUserInfo promotionUserInfo) {
-        return promotionUserInfoService.insertPromotionUserInfo(promotionUserInfo);
-    }
+package com.ygj.yuemum.controller.promotion;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.promotion.PromotionUserInfo;
+import com.ygj.yuemum.service.promotion.PromotionUserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@RestController
+public class PromotionUserInfoController {
+
+    @Autowired
+    private PromotionUserInfoService promotionUserInfoService;
+    @PostMapping("/getPromotionUserInfos")
+    public String getPromotionUserInfos(@ModelAttribute PromotionUserInfo promotionUserInfo) {
+        Map<String, Object> promotionUserInfos= promotionUserInfoService.getPromotionUserInfos(promotionUserInfo);
+        String jso = JSONObject.toJSONString(promotionUserInfos);
+        return jso;
+    }
+    @PostMapping("/insertPromotionUserInfo")
+    public int insertPromotionUserInfo(@ModelAttribute PromotionUserInfo promotionUserInfo) {
+        return promotionUserInfoService.insertPromotionUserInfo(promotionUserInfo);
+    }
 }

+ 30 - 30
src/main/java/com/ygj/yuemum/controller/wxmini/WXUserController.java

@@ -1,31 +1,31 @@
-package com.ygj.yuemum.controller.wxmini;
-
-
-import com.ygj.yuemum.domain.wxmini.WXUser;
-import com.ygj.yuemum.service.wxmini.WXUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-@RestController
-public class WXUserController {
-
-    @Autowired
-    private WXUserService wxUserService;
-    @GetMapping("/getWXUser")
-    public WXUser getWXUser(@RequestParam("xu_openid") String xu_openid) {
-        WXUser wxUser = wxUserService.getWXUser(xu_openid);
-        return wxUser;
-    }
-    @GetMapping("/getWXUserType")
-    public int getWXUserType(@RequestParam("xu_openid") String xu_openid) {
-        return wxUserService.getWXUserType(xu_openid);
-    }
-    @PostMapping("/insertWXUser")
-    public int insertWXUser(@ModelAttribute WXUser wxUser) {
-        return wxUserService.insertWXUser(wxUser);
-    }
-    @PostMapping("/updateWXUser")
-    public int updateWXUser(@ModelAttribute WXUser wxUser) {
-        return wxUserService.updateWXUser(wxUser);
-    }
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.ygj.yuemum.domain.wxmini.WXUser;
+import com.ygj.yuemum.service.wxmini.WXUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+public class WXUserController {
+
+    @Autowired
+    private WXUserService wxUserService;
+    @GetMapping("/getWXUser")
+    public WXUser getWXUser(@RequestParam("xu_openid") String xu_openid) {
+        WXUser wxUser = wxUserService.getWXUser(xu_openid);
+        return wxUser;
+    }
+    @GetMapping("/getWXUserType")
+    public int getWXUserType(@RequestParam("xu_openid") String xu_openid) {
+        return wxUserService.getWXUserType(xu_openid);
+    }
+    @PostMapping("/insertWXUser")
+    public int insertWXUser(@ModelAttribute WXUser wxUser) {
+        return wxUserService.insertWXUser(wxUser);
+    }
+    @PostMapping("/updateWXUser")
+    public int updateWXUser(@ModelAttribute WXUser wxUser) {
+        return wxUserService.updateWXUser(wxUser);
+    }
 }

+ 13 - 12
src/main/java/com/ygj/yuemum/dao/admin/BranchesDao.java

@@ -1,13 +1,14 @@
-package com.ygj.yuemum.dao.admin;
-
-import com.ygj.yuemum.domain.admin.Branches;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface BranchesDao {
-
-    List<Branches> getBranches();
-    List<Branches> getMktBranches();
+package com.ygj.yuemum.dao.admin;
+
+import com.ygj.yuemum.domain.admin.Branches;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface BranchesDao {
+
+    List<Branches> getBranches();
+    List<Branches> getMktBranches();
+    List<Branches> checkMkt(String branche_code);
 }

+ 13 - 0
src/main/java/com/ygj/yuemum/dao/promotion/PromotionDCDao.java

@@ -0,0 +1,13 @@
+package com.ygj.yuemum.dao.promotion;
+
+import com.ygj.yuemum.domain.promotion.PromotionDC;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface PromotionDCDao {
+
+    PromotionDC getPromotionDC();
+    List<PromotionDC> getPromotionDCs();
+}

+ 16 - 0
src/main/java/com/ygj/yuemum/dao/promotion/PromotionDCUserInfoDao.java

@@ -0,0 +1,16 @@
+package com.ygj.yuemum.dao.promotion;
+
+import com.ygj.yuemum.domain.promotion.PromotionDCUserInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface PromotionDCUserInfoDao {
+
+    int insertPromotionDCUserInfo(PromotionDCUserInfo promotionDCUserInfo);
+    int getCheckDCInfo(String pd_phone);
+
+    List<PromotionDCUserInfo> getPromotionDCUserInfos(PromotionDCUserInfo promotionDCUserInfo);
+
+}

+ 13 - 12
src/main/java/com/ygj/yuemum/dao/wxmini/WXUserDao.java

@@ -1,13 +1,14 @@
-package com.ygj.yuemum.dao.wxmini;
-
-import com.ygj.yuemum.domain.wxmini.WXUser;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface WXUserDao {
-
-    WXUser getWXUser(String xu_openid);
-    int insertWXUser(WXUser wxUser);
-    int updateWXUser(WXUser wxUser);
-    int getWXUserType(String xu_openid);
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXUser;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface WXUserDao {
+
+    WXUser getWXUser(String xu_openid);
+    int insertWXUser(WXUser wxUser);
+    int updateWXUser(WXUser wxUser);
+    int getWXUserType(String xu_openid);
+    int checkWXUser(String xu_phone);
 }

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

@@ -23,12 +23,21 @@ public class DcIntroducer {
     private Integer wv_finish_count;
     private Integer wv_consultant;
     private String wv_consultantname;
+    private String wv_account_name;
     private String wv_account_number;
     private String wv_account_bank;
     private String wv_account_number_path;
     private Integer page;
     private Integer limit;
 
+    public String getWv_account_name() {
+        return wv_account_name;
+    }
+
+    public void setWv_account_name(String wv_account_name) {
+        this.wv_account_name = wv_account_name;
+    }
+
     public String getWv_name() {
         return wv_name;
     }

+ 148 - 140
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java

@@ -1,141 +1,149 @@
-package com.ygj.yuemum.domain.distributionchannel;
-
-public class DcIntroducerExtract {
-
-    private Integer id;
-    private String wue_phone;
-    private String wue_phoneOld;
-    private String wue_bank_card;
-    private String wue_orderno;
-    private Integer wue_type;
-    private String wue_applydate;
-    private Float wue_applysum;
-    private String wue_approverdate;
-    private Float wue_approversum;
-    private String wue_approveruser;
-    private String wue_paydate;
-    private String wue_remarks;
-    private Integer page;
-    private Integer limit;
-
-
-    public String getWue_phoneOld() {
-        return wue_phoneOld;
-    }
-
-    public void setWue_phoneOld(String wue_phoneOld) {
-        this.wue_phoneOld = wue_phoneOld;
-    }
-
-    public String getWue_remarks() {
-        return wue_remarks;
-    }
-
-    public void setWue_remarks(String wue_remarks) {
-        this.wue_remarks = wue_remarks;
-    }
-
-    public String getWue_bank_card() {
-        return wue_bank_card;
-    }
-
-    public void setWue_bank_card(String wue_bank_card) {
-        this.wue_bank_card = wue_bank_card;
-    }
-
-    public String getWue_orderno() {
-        return wue_orderno;
-    }
-
-    public void setWue_orderno(String wue_orderno) {
-        this.wue_orderno = wue_orderno;
-    }
-
-    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 Float getWue_applysum() {
-        return wue_applysum;
-    }
-
-    public void setWue_applysum(Float wue_applysum) {
-        this.wue_applysum = wue_applysum;
-    }
-
-    public Float getWue_approversum() {
-        return wue_approversum;
-    }
-
-    public void setWue_approversum(Float 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 String getWue_applydate() {
-        return wue_applydate;
-    }
-
-    public void setWue_applydate(String wue_applydate) {
-        this.wue_applydate = wue_applydate;
-    }
-
-    public String getWue_approverdate() {
-        return wue_approverdate;
-    }
-
-    public void setWue_approverdate(String wue_approverdate) {
-        this.wue_approverdate = wue_approverdate;
-    }
-
-    public String getWue_paydate() {
-        return wue_paydate;
-    }
-
-    public void setWue_paydate(String 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;
-    }
+package com.ygj.yuemum.domain.distributionchannel;
+
+public class DcIntroducerExtract {
+
+    private Integer id;
+    private String wue_phone;
+    private String wue_phoneOld;
+    private String wue_account_name;
+    private String wue_bank_card;
+    private String wue_orderno;
+    private Integer wue_type;
+    private String wue_applydate;
+    private Float wue_applysum;
+    private String wue_approverdate;
+    private Float wue_approversum;
+    private String wue_approveruser;
+    private String wue_paydate;
+    private String wue_remarks;
+    private Integer page;
+    private Integer limit;
+
+    public String getWue_account_name() {
+        return wue_account_name;
+    }
+
+    public void setWue_account_name(String wue_account_name) {
+        this.wue_account_name = wue_account_name;
+    }
+
+    public String getWue_phoneOld() {
+        return wue_phoneOld;
+    }
+
+    public void setWue_phoneOld(String wue_phoneOld) {
+        this.wue_phoneOld = wue_phoneOld;
+    }
+
+    public String getWue_remarks() {
+        return wue_remarks;
+    }
+
+    public void setWue_remarks(String wue_remarks) {
+        this.wue_remarks = wue_remarks;
+    }
+
+    public String getWue_bank_card() {
+        return wue_bank_card;
+    }
+
+    public void setWue_bank_card(String wue_bank_card) {
+        this.wue_bank_card = wue_bank_card;
+    }
+
+    public String getWue_orderno() {
+        return wue_orderno;
+    }
+
+    public void setWue_orderno(String wue_orderno) {
+        this.wue_orderno = wue_orderno;
+    }
+
+    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 Float getWue_applysum() {
+        return wue_applysum;
+    }
+
+    public void setWue_applysum(Float wue_applysum) {
+        this.wue_applysum = wue_applysum;
+    }
+
+    public Float getWue_approversum() {
+        return wue_approversum;
+    }
+
+    public void setWue_approversum(Float 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 String getWue_applydate() {
+        return wue_applydate;
+    }
+
+    public void setWue_applydate(String wue_applydate) {
+        this.wue_applydate = wue_applydate;
+    }
+
+    public String getWue_approverdate() {
+        return wue_approverdate;
+    }
+
+    public void setWue_approverdate(String wue_approverdate) {
+        this.wue_approverdate = wue_approverdate;
+    }
+
+    public String getWue_paydate() {
+        return wue_paydate;
+    }
+
+    public void setWue_paydate(String 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;
+    }
 }

+ 49 - 0
src/main/java/com/ygj/yuemum/domain/promotion/PromotionDC.java

@@ -0,0 +1,49 @@
+package com.ygj.yuemum.domain.promotion;
+
+public class PromotionDC {
+    private Integer id;
+    private String pd_title;
+    private String pd_headimg;
+    private String pd_startdate;
+    private String pd_enddate;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getPd_title() {
+        return pd_title;
+    }
+
+    public void setPd_title(String pd_title) {
+        this.pd_title = pd_title;
+    }
+
+    public String getPd_headimg() {
+        return pd_headimg;
+    }
+
+    public void setPd_headimg(String pd_headimg) {
+        this.pd_headimg = pd_headimg;
+    }
+
+    public String getPd_startdate() {
+        return pd_startdate;
+    }
+
+    public void setPd_startdate(String pd_startdate) {
+        this.pd_startdate = pd_startdate;
+    }
+
+    public String getPd_enddate() {
+        return pd_enddate;
+    }
+
+    public void setPd_enddate(String pd_enddate) {
+        this.pd_enddate = pd_enddate;
+    }
+}

+ 113 - 0
src/main/java/com/ygj/yuemum/domain/promotion/PromotionDCUserInfo.java

@@ -0,0 +1,113 @@
+package com.ygj.yuemum.domain.promotion;
+
+public class PromotionDCUserInfo {
+    private Integer id;
+    private String pd_phone;
+    private Integer pd_prom_id;
+    private String pd_duedate;
+    private Integer pd_city;
+    private String pd_date;
+    private String pd_prom_name;
+    private String pd_cityname;
+    private String pd_dc_phone;
+    private String consultname;
+
+    public String getConsultname() {
+        return consultname;
+    }
+
+    public void setConsultname(String consultname) {
+        this.consultname = consultname;
+    }
+
+    private Integer page;
+    private Integer limit;
+
+    public String getPd_dc_phone() {
+        return pd_dc_phone;
+    }
+
+    public void setPd_dc_phone(String pd_dc_phone) {
+        this.pd_dc_phone = pd_dc_phone;
+    }
+
+    public String getPd_prom_name() {
+        return pd_prom_name;
+    }
+
+    public void setPd_prom_name(String pd_prom_name) {
+        this.pd_prom_name = pd_prom_name;
+    }
+
+    public String getPd_cityname() {
+        return pd_cityname;
+    }
+
+    public void setPd_cityname(String pd_cityname) {
+        this.pd_cityname = pd_cityname;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getPd_phone() {
+        return pd_phone;
+    }
+
+    public void setPd_phone(String pd_phone) {
+        this.pd_phone = pd_phone;
+    }
+
+    public Integer getPd_prom_id() {
+        return pd_prom_id;
+    }
+
+    public void setPd_prom_id(Integer pd_prom_id) {
+        this.pd_prom_id = pd_prom_id;
+    }
+
+    public String getPd_duedate() {
+        return pd_duedate;
+    }
+
+    public void setPd_duedate(String pd_duedate) {
+        this.pd_duedate = pd_duedate;
+    }
+
+    public Integer getPd_city() {
+        return pd_city;
+    }
+
+    public void setPd_city(Integer pd_city) {
+        this.pd_city = pd_city;
+    }
+
+    public String getPd_date() {
+        return pd_date;
+    }
+
+    public void setPd_date(String pd_date) {
+        this.pd_date = pd_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;
+    }
+}

+ 48 - 39
src/main/java/com/ygj/yuemum/domain/wxmini/WXBanner.java

@@ -1,40 +1,49 @@
-package com.ygj.yuemum.domain.wxmini;
-
-public class WXBanner {
-    private Integer id;
-    private Integer wb_seq;
-    private String wb_url;
-    private String wb_href;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getWb_seq() {
-        return wb_seq;
-    }
-
-    public void setWb_seq(Integer wb_seq) {
-        this.wb_seq = wb_seq;
-    }
-
-    public String getWb_url() {
-        return wb_url;
-    }
-
-    public void setWb_url(String wb_url) {
-        this.wb_url = wb_url;
-    }
-
-    public String getWb_href() {
-        return wb_href;
-    }
-
-    public void setWb_href(String wb_href) {
-        this.wb_href = wb_href;
-    }
+package com.ygj.yuemum.domain.wxmini;
+
+public class WXBanner {
+    private Integer id;
+    private Integer wb_seq;
+    private String wb_url;
+    private String wb_href;
+    private Integer wb_href_type;
+
+    public Integer getWb_href_type() {
+        return wb_href_type;
+    }
+
+    public void setWb_href_type(Integer wb_href_type) {
+        this.wb_href_type = wb_href_type;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getWb_seq() {
+        return wb_seq;
+    }
+
+    public void setWb_seq(Integer wb_seq) {
+        this.wb_seq = wb_seq;
+    }
+
+    public String getWb_url() {
+        return wb_url;
+    }
+
+    public void setWb_url(String wb_url) {
+        this.wb_url = wb_url;
+    }
+
+    public String getWb_href() {
+        return wb_href;
+    }
+
+    public void setWb_href(String wb_href) {
+        this.wb_href = wb_href;
+    }
 }

+ 26 - 23
src/main/java/com/ygj/yuemum/service/admin/BranchesService.java

@@ -1,24 +1,27 @@
-package com.ygj.yuemum.service.admin;
-
-import com.ygj.yuemum.dao.admin.BranchesDao;
-import com.ygj.yuemum.domain.admin.Branches;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class BranchesService {
-
-    @Autowired
-
-    private BranchesDao branchesDao;
-
-    public List<Branches> getBranches() {
-        return branchesDao.getBranches();
-    }
-    public List<Branches> getMktBranches() {
-        return branchesDao.getMktBranches();
-    }
-
+package com.ygj.yuemum.service.admin;
+
+import com.ygj.yuemum.dao.admin.BranchesDao;
+import com.ygj.yuemum.domain.admin.Branches;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class BranchesService {
+
+    @Autowired
+
+    private BranchesDao branchesDao;
+
+    public List<Branches> getBranches() {
+        return branchesDao.getBranches();
+    }
+    public List<Branches> getMktBranches() {
+        return branchesDao.getMktBranches();
+    }
+    public List<Branches> checkMkt(String branche_code){
+        return branchesDao.checkMkt(branche_code);
+    }
+
 }

+ 5 - 5
src/main/java/com/ygj/yuemum/service/bizobject/BizObjectApiService.java

@@ -202,7 +202,7 @@ public class BizObjectApiService {
                 "\\\"Matcher\\\":{\\\"Type\\\":\\\"And\\\",\\\"Matchers\\\":[{" +
                 "\\\"Type\\\":\\\"Item\\\"," +
                 "\\\"Name\\\":\\\"ObjectId\\\"," +
-                "\\\"Operator\\\":8," +
+                "\\\"Operator\\\":2," +
                 "\\\"Value\\\":\\\""+bizOd_No+"\\\"," +
                 "}]}}\"}";
         JSONObject map1 = JSON.parseObject(loadBizApi(queryPara));
@@ -273,7 +273,7 @@ public class BizObjectApiService {
                     "\\\"Matcher\\\":{\\\"Type\\\":\\\"And\\\",\\\"Matchers\\\":[{" +
                     "\\\"Type\\\":\\\"Item\\\"," +
                     "\\\"Name\\\":\\\"F2a1a1cd57f654acbb13634c5a6cc9062\\\"," +
-                    "\\\"Operator\\\":8," +
+                    "\\\"Operator\\\":2," +
                     "\\\"Value\\\":\\\"" + idcard + "\\\"," +
                     "}]}}\"}";
             JSONObject map1 = JSON.parseObject(loadBizApi(para));
@@ -297,7 +297,7 @@ public class BizObjectApiService {
         try {
             String para = "{" +
                     "\"ActionName\":\"LoadBizObjects\"," +
-                    "\"SchemaCode\":\"ajxhpu8n5e3n2272xda8k38o3\"," +
+                    "\"SchemaCode\":\"twjff2zg1n2lwdrfkwbqnqne5\"," +
                     "\"BizObject\":\"\"," +
                     "\"BizObjectId\":\"\"," +
                     "\"IsSubmit\":\"\"," +
@@ -309,8 +309,8 @@ public class BizObjectApiService {
                     "\\\"ToRowNum\\\":100," +
                     "\\\"Matcher\\\":{\\\"Type\\\":\\\"And\\\",\\\"Matchers\\\":[{" +
                     "\\\"Type\\\":\\\"Item\\\"," +
-                    "\\\"Name\\\":\\\"F0000016\\\"," +
-                    "\\\"Operator\\\":8," +
+                    "\\\"Name\\\":\\\"F0000005\\\"," +
+                    "\\\"Operator\\\":2," +
                     "\\\"Value\\\":\\\"" + phone + "\\\"," +
                     "}]}}\"}";
             JSONObject map1 = JSON.parseObject(loadBizApi(para));

+ 116 - 111
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroduceLogService.java

@@ -1,112 +1,117 @@
-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 com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
-import com.ygj.yuemum.domain.distributionchannel.DcQueryReport;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-@Service
-public class DcIntroduceLogService {
-
-    @Autowired
-    private DcIntroduceLogDao dcIntroduceLogDao;
-    @Autowired
-    private DcIntroducerService dcIntroducerService;
-
-    //分页
-
-    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 Map<String, Object> getDcReport(DcQueryReport dcQueryReport) {
-        PageHelper.startPage(dcQueryReport.getPage(), dcQueryReport.getLimit());
-        List<DcIntroduceLog> dcIntroduceLogs = dcIntroduceLogDao.getDcReport(dcQueryReport);
-        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 Map<String, Object> queryDcILbyrebate(DcIntroduceLog dcIntroduceLog) {
-        PageHelper.startPage(dcIntroduceLog.getPage(), dcIntroduceLog.getLimit());
-        List<DcIntroduceLog> dcIntroduceLogs = dcIntroduceLogDao.queryDcILbyrebate(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) {
-        if (dcIntroduceLog.getXul_introducer_phone() == null || dcIntroduceLog.getXul_introducer_phone().equals("null") || dcIntroduceLog.getXul_introducer_phone() == "" || dcIntroduceLog.getXul_introducer_phone() == " ") {
-            return 0;
-        } else {
-            int logCount = dcIntroduceLogDao.checkDcIntroducerLogs(dcIntroduceLog);
-            if (logCount == 0) {
-                if (dcIntroduceLog.getXul_event() == 2) { // 手机号授权介绍人注册用户+1
-                    DcIntroducer dcIntroducer = dcIntroducerService.checkDcIntroducers(dcIntroduceLog.getXul_introducer_phone());
-                    if (dcIntroducer != null) {
-                        // 介绍人注册用户+1
-                        dcIntroducer.setWv_register_count(dcIntroducer.getWv_register_count() + 1);
-                        dcIntroducerService.updateDcIntroducer(dcIntroducer);
-                    }
-                }
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-                dcIntroduceLog.setXul_date(sdf.format(new Date()));
-                return dcIntroduceLogDao.insertDcIntroduceLog(dcIntroduceLog);
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    public List<DcIntroduceLog> getDcIntroduceLogs(String phone) {
-        List<DcIntroduceLog> dcIntroduceLog = dcIntroduceLogDao.getDcIntroduceLogs(phone);
-        List<DcIntroduceLog> dcReturn = new ArrayList<>();
-        for (DcIntroduceLog dI : dcIntroduceLog) {
-            if (dI.getXul_event() >= 5) {
-                //取大于5的
-                List<DcIntroduceLog> dcIntroduceLogfile = dcIntroduceLogDao.getDcIntroduceLogFive(dI.getXul_phone());
-                for (DcIntroduceLog idfile : dcIntroduceLogfile) {
-                    dcReturn.add(idfile);
-                }
-            } else {
-                //去等于2的
-                List<DcIntroduceLog> dcIntroduceLogtwo = dcIntroduceLogDao.getDcIntroduceLogTwo(dI.getXul_phone());
-                for (DcIntroduceLog idtwo : dcIntroduceLogtwo) {
-                    dcReturn.add(idtwo);
-                }
-            }
-        }
-        return dcReturn;
-    }
-
-    public int checkFirstDILogs(DcIntroduceLog dcIntroduceLog) {
-        return dcIntroduceLogDao.checkFirstDILogs(dcIntroduceLog);
-    }
-
-    public int updateDcIntroduceLogByPhone(DcIntroduceLog dcIntroduceLog) {
-        return dcIntroduceLogDao.updateDcIntroduceLogByPhone(dcIntroduceLog);
-    }
-
+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 com.ygj.yuemum.domain.distributionchannel.DcIntroducer;
+import com.ygj.yuemum.domain.distributionchannel.DcQueryReport;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+public class DcIntroduceLogService {
+
+    @Autowired
+    private DcIntroduceLogDao dcIntroduceLogDao;
+    @Autowired
+    private DcIntroducerService dcIntroducerService;
+    @Autowired
+    private DcIntroducerApplicantService dcIntroducerApplicantService;
+
+    //分页
+
+    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 Map<String, Object> getDcReport(DcQueryReport dcQueryReport) {
+        PageHelper.startPage(dcQueryReport.getPage(), dcQueryReport.getLimit());
+        List<DcIntroduceLog> dcIntroduceLogs = dcIntroduceLogDao.getDcReport(dcQueryReport);
+        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 Map<String, Object> queryDcILbyrebate(DcIntroduceLog dcIntroduceLog) {
+        PageHelper.startPage(dcIntroduceLog.getPage(), dcIntroduceLog.getLimit());
+        List<DcIntroduceLog> dcIntroduceLogs = dcIntroduceLogDao.queryDcILbyrebate(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) {
+        if (dcIntroduceLog.getXul_introducer_phone() == null || dcIntroduceLog.getXul_introducer_phone().equals("null") || dcIntroduceLog.getXul_introducer_phone() == "" || dcIntroduceLog.getXul_introducer_phone() == " ") {
+            return 0;
+        } else if(dcIntroduceLog.getXul_introducer_phone().equals("99999999999")) {
+            dcIntroducerApplicantService.updateDcIntroducerApplicant(dcIntroduceLog.getXul_phone());
+            return 1;
+        } else {
+            int logCount = dcIntroduceLogDao.checkDcIntroducerLogs(dcIntroduceLog);
+            if (logCount == 0) {
+                if (dcIntroduceLog.getXul_event() == 2) { // 手机号授权介绍人注册用户+1
+                    DcIntroducer dcIntroducer = dcIntroducerService.checkDcIntroducers(dcIntroduceLog.getXul_introducer_phone());
+                    if (dcIntroducer != null) {
+                        // 介绍人注册用户+1
+                        dcIntroducer.setWv_register_count(dcIntroducer.getWv_register_count() + 1);
+                        dcIntroducerService.updateDcIntroducer(dcIntroducer);
+                    }
+                }
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                dcIntroduceLog.setXul_date(sdf.format(new Date()));
+                return dcIntroduceLogDao.insertDcIntroduceLog(dcIntroduceLog);
+            } else {
+                return 0;
+            }
+        }
+    }
+
+    public List<DcIntroduceLog> getDcIntroduceLogs(String phone) {
+        List<DcIntroduceLog> dcIntroduceLog = dcIntroduceLogDao.getDcIntroduceLogs(phone);
+        List<DcIntroduceLog> dcReturn = new ArrayList<>();
+        for (DcIntroduceLog dI : dcIntroduceLog) {
+            if (dI.getXul_event() >= 5) {
+                //取大于5的
+                List<DcIntroduceLog> dcIntroduceLogfile = dcIntroduceLogDao.getDcIntroduceLogFive(dI.getXul_phone());
+                for (DcIntroduceLog idfile : dcIntroduceLogfile) {
+                    dcReturn.add(idfile);
+                }
+            } else {
+                //去等于2的
+                List<DcIntroduceLog> dcIntroduceLogtwo = dcIntroduceLogDao.getDcIntroduceLogTwo(dI.getXul_phone());
+                for (DcIntroduceLog idtwo : dcIntroduceLogtwo) {
+                    dcReturn.add(idtwo);
+                }
+            }
+        }
+        return dcReturn;
+    }
+
+    public int checkFirstDILogs(DcIntroduceLog dcIntroduceLog) {
+        return dcIntroduceLogDao.checkFirstDILogs(dcIntroduceLog);
+    }
+
+    public int updateDcIntroduceLogByPhone(DcIntroduceLog dcIntroduceLog) {
+        return dcIntroduceLogDao.updateDcIntroduceLogByPhone(dcIntroduceLog);
+    }
+
 }

+ 93 - 90
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java

@@ -1,91 +1,94 @@
-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_status(1);
-            dcIntroducer.setWv_Introduction_total(0.00);
-            dcIntroducer.setWv_withdraw_total(0.00);
-            dcIntroducer.setWv_Introduction_count(0);
-            dcIntroducer.setWv_qrcode(qrcodePath);
-            dcIntroducer.setWv_people_count(0);
-            dcIntroducer.setWv_extract_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;
-        }
-
-    }
-
+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(String phone) {
+        try {
+            //生成二维码
+            String qrcodePath = miniAppService.createQrCode(phone);
+            if (qrcodePath.equals("error")) {
+                return 0;
+            }
+            //更新状态
+            DcIntroducer dcIntroducerMgm = dcIntroducerService.checkDcIntroducers(phone);
+            if (dcIntroducerMgm == null) {
+                //insert into DcIntroducer
+                DcIntroducer dcIntroducer = new DcIntroducer();
+                dcIntroducer.setWv_phone(phone);
+                dcIntroducer.setWv_gradeid(1); //再调整
+                dcIntroducer.setWv_status(1);
+                dcIntroducer.setWv_Introduction_total(0.00);
+                dcIntroducer.setWv_withdraw_total(0.00);
+                dcIntroducer.setWv_Introduction_count(0);
+                dcIntroducer.setWv_qrcode(qrcodePath);
+                dcIntroducer.setWv_people_count(0);
+                dcIntroducer.setWv_extract_count(0);
+                dcIntroducer.setWv_register_count(0);
+                dcIntroducer.setWv_finish_count(0);
+                dcIntroducer.setWv_contract_count(0);
+//            dcIntroducer.setWv_consultant();//介绍人顾问
+                dcIntroducerService.insertDcIntroducer(dcIntroducer);
+                return 1;
+            } else {
+                return -99;
+            }
+            //to CRM
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+
+    }
+
 }

+ 130 - 0
src/main/java/com/ygj/yuemum/service/global/CreatePOPService.java

@@ -0,0 +1,130 @@
+package com.ygj.yuemum.service.global;
+
+import com.ygj.yuemum.component.Constant;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+
+@Service
+public class CreatePOPService {
+
+    public static final String LOCALQRCODE = Constant.LOCALQRCODE;
+    public static final String DEMOQRCODE = Constant.DEMOQRCODE;
+    public static final String HTTPOPPQRCODE = Constant.HTTPOPPQRCODE;
+
+
+    public String CreatePOP( String wv_phone) throws Exception {
+        //宠物图片文件
+//        File petImg = new File(iconPath);
+        //二维码图片文件 1
+        File qrCodeImg = new File (LOCALQRCODE+"/"+wv_phone+".png");
+        //背景地址
+        //为了方便演示放在resources中,可根据实际情况(上传后)将背景模板放入单独的资源文件夹或远程资源服务器
+
+        File fileBg = new File(DEMOQRCODE+"/demo.jpg");
+        //1、背景图片输入流
+        FileInputStream fis = new FileInputStream(fileBg);
+        //2、背景图片对象
+        Image srcImg = ImageIO.read(fis);
+        //3、创建画布,根据背景图片的宽高
+        BufferedImage bufferedImage = new BufferedImage(
+                //宽度
+                srcImg.getWidth(null),
+                //高度
+                srcImg.getHeight(null),
+                //图片类型
+                BufferedImage.TYPE_INT_RGB);
+        int width = bufferedImage.getWidth();
+        int height = bufferedImage.getHeight();
+        //4、得到2d画笔对象
+        Graphics2D g = bufferedImage.createGraphics();
+        // 设置对线段的锯齿状边缘处理
+        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        //5、设置画布背景
+        g.drawImage(srcImg.getScaledInstance(width, height, Image.SCALE_SMOOTH), 0, 0, null);
+        //6、```````````开始作画```````````
+//        Font rewardFirstFont = new Font("PingFang SC Bold", Font.PLAIN, 24);
+//        Font rewardLastFont = new Font("PingFang SC Bold", Font.PLAIN, 48);
+//        int rewardFirstWidth = getStringWidth(g, rewardFirstFont, "赏金¥");
+//        int rewardLastWidth = getStringWidth(g, rewardLastFont, "100");
+        //赏金内容
+//        drawString(g, Color.decode("#ffd434"), rewardFirstFont, "赏金¥", (width - rewardFirstWidth - rewardLastWidth) / 2, 550);
+//        drawString(g, Color.decode("#ffd434"), rewardLastFont, "100", (width - rewardLastWidth + rewardFirstWidth) / 2, 550);
+//        //标题
+//        drawString(g, Color.decode("#323232"), new Font("PingFang SC Bold", Font.BOLD, 34), title, 0, 400, width, 12, 5, true);
+//        //把宠物图片和二维码图片划入背景
+//        g.drawImage(ImageIO.read(petImg), 130, 90, 362, 250, null);
+        g.drawImage(ImageIO.read(qrCodeImg), 266, height-235, 220, 220, null);
+        //   ```````````结束作画```````````
+        //7、处理画作
+        g.dispose();
+        //8、得到输出流
+        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        ImageIO.write(bufferedImage, "jpg", os);
+        //9、转成base64编码前端可以直接显示,也可转换成其它形式比如文件
+//        String encodeStr = Base64.getEncoder().encodeToString(os.toByteArray());
+        //保存为图片文件
+        FileUtils.writeByteArrayToFile(new File(DEMOQRCODE+"/"+wv_phone+".jpg"), os.toByteArray());
+        //10、关闭输入输出流
+        fis.close();
+        os.close();
+//        qrCodeImg.delete();
+//        petImg.delete();
+        return HTTPOPPQRCODE+"/"+wv_phone+".jpg";
+
+    }
+
+
+    public static void drawString(Graphics2D g, Color color, Font font, String content, float x, float y) {
+        g.setColor(color);
+        g.setFont(font);
+        g.drawString(content, x, y);
+    }
+    public static void drawString(Graphics2D g, Color color, Font font, String content, float x, float y, int width, int lineWordNum, int linePadding, boolean center) {
+        int num = content.length();
+
+        java.util.List<String> contents = new ArrayList<>();
+        if (num <= lineWordNum) {
+
+            contents.add(content);
+        } else {
+            for (int i = 0; i < num; i += lineWordNum) {
+                contents.add(StringUtils.substring(content, i, i + lineWordNum));
+            }
+
+        }
+        for (int i = 0; i < contents.size(); i++) {
+            String s = contents.get(i);
+            if (i != 0) {
+                y += linePadding + font.getSize();
+            }
+            if (center) {
+                drawCenterString(g, color, font, s, width, y);
+            } else {
+                drawString(g, color, font, s, x, y);
+            }
+        }
+    }
+    public static void drawCenterString(Graphics2D g, Color color, Font font, String content, float y, int width, int lineWordNum, int linePadding) {
+        drawString(g, color, font, content, 0, y, width, lineWordNum, linePadding, true);
+    }
+    public static void drawCenterString(Graphics2D g, Color color, Font font, String content, int width, float y) {
+        int textWidth = getStringWidth(g, font, content);
+
+        drawString(g, color, font, content, (width - textWidth) / 2, y);
+    }
+    public static int getStringWidth(Graphics2D g, Font font, String content) {
+        FontMetrics fm = g.getFontMetrics(font);
+        //获取字符串宽度
+        return fm.stringWidth(content);
+    }
+
+}

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

@@ -82,7 +82,7 @@ public class WeChatInfoService {
     String session_key;
     String openid;
 
-    public int WXSendExtractMessage(String wue_applysum, String wue_phone, String wue_bank_card) throws IOException {
+    public int WXSendExtractMessage(String wue_applysum, String wue_phone, String wue_bank_card,String wue_account_name) throws IOException {
         ObjectMapper mapper = new ObjectMapper();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 //        String resultToken = sendGet("http://yuesuo.yueguanjia.com/modoo-1/getWxPublicSender");
@@ -110,7 +110,7 @@ public class WeChatInfoService {
         mapdata.put("keyword2", keyword2);
 
         TemplateData keyword5 = new TemplateData();
-        keyword5.setValue("手机号:" +wue_phone+ ",银行卡号:" +wue_bank_card+"。请尽快处理!");
+        keyword5.setValue("手机号:" +wue_phone+ ",收款人:"+wue_account_name+",银行卡号:" +wue_bank_card+"。请尽快处理!");
         keyword5.setColor("#173177");
         mapdata.put("remark", keyword5);
 

+ 7 - 7
src/main/java/com/ygj/yuemum/service/order/YSOrderService.java

@@ -1,5 +1,6 @@
 package com.ygj.yuemum.service.order;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -247,6 +248,7 @@ public class YSOrderService {
                     DcIntroducer dcIntroducerNew = new DcIntroducer();
                     dcIntroducerNew.setWv_phone(ysOrder.getOd_phone());
                     dcIntroducerNew.setWv_gradeid(1); //再调整
+                    dcIntroducerNew.setWv_name(ysOrder.getOd_user_name());
                     dcIntroducerNew.setWv_status(1);
                     dcIntroducerNew.setWv_Introduction_total(0.00);
                     dcIntroducerNew.setWv_withdraw_total(0.00);
@@ -258,6 +260,7 @@ public class YSOrderService {
                     dcIntroducerNew.setWv_finish_count(0);
                     dcIntroducerNew.setWv_contract_count(0);
                     dcIntroducerService.insertDcIntroducer(dcIntroducerNew);
+
                     //调用CRM成为介绍人
                     Packages packages = packagesService.getPackageDetail(String.valueOf(ysOrder.getOd_product_id()));
                     float odMdAmount = packages.getP_amount() - ysOrder.getOd_other_discount() - ysOrder.getOd_mgm_discount() - ysOrder.getOd_promotion_discount();
@@ -293,8 +296,8 @@ public class YSOrderService {
                 ysOrderServiceLog.setOd_userid(ysOrder.getOd_user());
                 ysOrderServiceLogService.insertYSOrderServiceLog(ysOrderServiceLog);
                 //氚云调用
-                ysOrder.setOd_biz_user(cp_objectId);
-                bizObjectApiService.createObject(ysOrder,payName);
+//                ysOrder.setOd_biz_user(cp_objectId);
+//                bizObjectApiService.createObject(ysOrder,payName);
             } else {
                 //支付尾款时第三次调用CRM接口
                 ysOrder.setOd_balancepay(ysOrder.getOd_order_pay_amount());
@@ -324,9 +327,6 @@ public class YSOrderService {
                     entity.setContentType("application/json");
                     httpPost.setEntity(entity);
                     HttpResponse resp = client.execute(httpPost);
-                    if(resp.getStatusLine().getStatusCode() != 200) {
-                        return 0;
-                    }
                     HttpEntity he = resp.getEntity();
                     respContent = EntityUtils.toString(he,"UTF-8");
                     org.json.JSONObject jsonObject = new org.json.JSONObject(respContent);
@@ -359,7 +359,7 @@ public class YSOrderService {
                         // 支付尾款 + 推荐金额增加
                         if (dcIntroducer != null) {
                             //增加金额
-                            dcIntroducer.setWv_Introduction_total(dcIntroducer.getWv_Introduction_total() + Double.valueOf(ysOrder.getOd_rebate_amount()));
+                            dcIntroducer.setWv_Introduction_total(dcIntroducer.getWv_Introduction_total() + xul_rebateamount);
                             dcIntroducer.setWv_gradeid(introducerGradeId);
                             //升降级
                             dcIntroducerService.updateDcIntroducer(dcIntroducer);
@@ -367,7 +367,7 @@ public class YSOrderService {
                     }
                 }
                 //氚云调用
-                bizObjectApiService.createSecondPay(ysOrder,payName);
+//                bizObjectApiService.createSecondPay(ysOrder,payName);
             }
             // 更新订单状态,修改订单待付金额
             ysOrder.setOd_status(od_stauts);

+ 23 - 0
src/main/java/com/ygj/yuemum/service/promotion/PromotionDCService.java

@@ -0,0 +1,23 @@
+package com.ygj.yuemum.service.promotion;
+
+import com.ygj.yuemum.dao.promotion.PromotionDCDao;
+import com.ygj.yuemum.domain.promotion.PromotionDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class PromotionDCService {
+
+    @Autowired
+    private PromotionDCDao promotionDCDao;
+    public PromotionDC getPromotionDC() {
+        return promotionDCDao.getPromotionDC();
+    }
+
+    public List<PromotionDC> getPromotionDCs(){
+        return promotionDCDao.getPromotionDCs();
+    }
+
+}

+ 48 - 0
src/main/java/com/ygj/yuemum/service/promotion/PromotionDCUserInfoService.java

@@ -0,0 +1,48 @@
+package com.ygj.yuemum.service.promotion;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.promotion.PromotionDCUserInfoDao;
+import com.ygj.yuemum.domain.promotion.PromotionDCUserInfo;
+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 PromotionDCUserInfoService {
+
+    @Autowired
+    private PromotionDCUserInfoDao promotionDCUserInfoDao;
+
+    public int insertPromotionDCUserInfo(PromotionDCUserInfo promotionDCUserInfo) {
+        // 判断是否领取
+        try {
+            int temp = promotionDCUserInfoDao.getCheckDCInfo(promotionDCUserInfo.getPd_phone());
+            if(temp > 0) {
+                return 99;
+            }
+            promotionDCUserInfoDao.insertPromotionDCUserInfo(promotionDCUserInfo);
+        }catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
+
+    public Map<String, Object> getPromotionDCUserInfos(PromotionDCUserInfo promotionDCUserInfo) {
+        PageHelper.startPage(promotionDCUserInfo.getPage(), promotionDCUserInfo.getLimit());
+        List<PromotionDCUserInfo> promotionDCUserInfos = promotionDCUserInfoDao.getPromotionDCUserInfos(promotionDCUserInfo);
+
+        PageInfo<PromotionDCUserInfo> pageInfo = new PageInfo<PromotionDCUserInfo>(promotionDCUserInfos);
+        long count = pageInfo.getTotal(); //获取总记录数
+
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", promotionDCUserInfos);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+}

+ 36 - 27
src/main/java/com/ygj/yuemum/service/wxmini/WXUserService.java

@@ -1,28 +1,37 @@
-package com.ygj.yuemum.service.wxmini;
-
-import com.ygj.yuemum.dao.wxmini.WXUserDao;
-import com.ygj.yuemum.domain.wxmini.WXUser;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class WXUserService {
-
-    @Autowired
-
-    private WXUserDao wxUserDao;
-
-    public WXUser getWXUser(String xu_openid) {
-        return wxUserDao.getWXUser(xu_openid);
-    }
-    public int insertWXUser(WXUser wxUser){
-        return wxUserDao.insertWXUser(wxUser);
-    }
-    public int updateWXUser(WXUser wxUser){
-        return wxUserDao.updateWXUser(wxUser);
-    }
-    public int getWXUserType(String xu_openid) {
-        return wxUserDao.getWXUserType(xu_openid);
-    }
-
+package com.ygj.yuemum.service.wxmini;
+
+import com.vdurmont.emoji.EmojiParser;
+import com.ygj.yuemum.dao.wxmini.WXUserDao;
+import com.ygj.yuemum.domain.wxmini.WXUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class WXUserService {
+
+    @Autowired
+    private WXUserDao wxUserDao;
+
+    public WXUser getWXUser(String xu_openid) {
+        return wxUserDao.getWXUser(xu_openid);
+    }
+    public int insertWXUser(WXUser wxUser){
+        if(wxUser.getXu_name() != null) {
+            wxUser.setXu_name(EmojiParser.parseToAliases(wxUser.getXu_name()));
+        }
+        return wxUserDao.insertWXUser(wxUser);
+    }
+    public int updateWXUser(WXUser wxUser){
+        if(wxUser.getXu_name() != null) {
+            wxUser.setXu_name(EmojiParser.parseToAliases(wxUser.getXu_name()));
+        }
+        return wxUserDao.updateWXUser(wxUser);
+    }
+    public int getWXUserType(String xu_openid) {
+        return wxUserDao.getWXUserType(xu_openid);
+    }
+    public int checkWXUser(String xu_phone) {
+        return wxUserDao.checkWXUser(xu_phone);
+    }
+
 }

+ 143 - 136
src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java

@@ -1,137 +1,144 @@
-package com.ygj.yuemum.shiro;
-
-import org.apache.shiro.mgt.SecurityManager;
-import org.apache.shiro.session.mgt.SessionManager;
-import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
-import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
-import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-@Configuration
-public class ShiroConfig {
-    @Bean
-    public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
-        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
-        // 必须设置 SecurityManager
-        shiroFilterFactoryBean.setSecurityManager(securityManager);
-        // setLoginUrl 如果不设置值,默认会自动寻找Web工程根目录下的"/login.jsp"页面 或 "/login" 映射
-        shiroFilterFactoryBean.setLoginUrl("/webLogin");
-        // 设置无权限时跳转的 url;
-        shiroFilterFactoryBean.setUnauthorizedUrl("/unauth");
-        // 设置拦截器
-        Map<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
-
-        //小程序开放权限
-        filterChainDefinitionMap.put("/addEquipmenteHireDetail", "anon");
-        filterChainDefinitionMap.put("/addEquipmenteHireHeadOnline", "anon");
-        filterChainDefinitionMap.put("/deleteEquipmenteHireHead", "anon");
-        filterChainDefinitionMap.put("/deleteWXUserDefAddress", "anon");
-        filterChainDefinitionMap.put("/checkStockDate", "anon");
-        filterChainDefinitionMap.put("/getBanners", "anon");
-        filterChainDefinitionMap.put("/getConsultant", "anon");
-        filterChainDefinitionMap.put("/getCustomerEq", "anon");
-        filterChainDefinitionMap.put("/getEquipmentTypes", "anon");
-        filterChainDefinitionMap.put("/getEqUserAddress", "anon");
-        filterChainDefinitionMap.put("/getIndexs", "anon");
-        filterChainDefinitionMap.put("/getMktInfos", "anon");
-        filterChainDefinitionMap.put("/getPackageDetail", "anon");
-        filterChainDefinitionMap.put("/getPackageLists", "anon");
-        filterChainDefinitionMap.put("/getPackageShowname", "anon");
-        filterChainDefinitionMap.put("/getPIClasses", "anon");
-        filterChainDefinitionMap.put("/getPIGroups", "anon");
-        filterChainDefinitionMap.put("/getPIServices", "anon");
-        filterChainDefinitionMap.put("/getPromotions", "anon");
-        filterChainDefinitionMap.put("/getWXCustomerCoupons", "anon");
-        filterChainDefinitionMap.put("/getWxDecrypt", "anon");
-        filterChainDefinitionMap.put("/getWXOpenid", "anon");
-        filterChainDefinitionMap.put("/getWXUserAddress", "anon");
-        filterChainDefinitionMap.put("/getYueSuo", "anon");
-        filterChainDefinitionMap.put("/insertCustomerBooking", "anon");
-        filterChainDefinitionMap.put("/insertEqCustomerBooking", "anon");
-        filterChainDefinitionMap.put("/insertWXUserAddress", "anon");
-        filterChainDefinitionMap.put("/updateWXUser", "anon");
-        filterChainDefinitionMap.put("/updateWXUserAddress", "anon");
-        filterChainDefinitionMap.put("/updateWXUserDefAddress", "anon");
-        filterChainDefinitionMap.put("/WXSendBookingMessage", "anon");
-        filterChainDefinitionMap.put("/WXSendOrderMessage", "anon");
-        filterChainDefinitionMap.put("/WXSendYSOrderMessage", "anon");
-        filterChainDefinitionMap.put("/getEquipmentAmount", "anon");
-        filterChainDefinitionMap.put("/getValidPO", "anon");
-        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("/date_DcIntroducerExtracts", "anon");
-        filterChainDefinitionMap.put("/getAccountNumber", "anon");
-        filterChainDefinitionMap.put("/queryOneDcIntroducerExtract", "anon");
-        filterChainDefinitionMap.put("/insertDcIntroducerExtract", "anon");
-        filterChainDefinitionMap.put("/WXSendExtractMessage", "anon");
-        filterChainDefinitionMap.put("/insertDcIntroduceLog", "anon");
-        filterChainDefinitionMap.put("/getDcIntroducerConsultants", "anon");
-        filterChainDefinitionMap.put("/queryMineOrder", "anon");
-        filterChainDefinitionMap.put("/getYSOrder", "anon");
-        filterChainDefinitionMap.put("/insertYsOrderPay", "anon");
-        filterChainDefinitionMap.put("/checkCustomerPay", "anon");
-        filterChainDefinitionMap.put("/queryYSOrderReturn", "anon");
-        filterChainDefinitionMap.put("/updateEquipmenteHireHeadOnline", "anon");
-        filterChainDefinitionMap.put("/getIndexPromotions", "anon");
-        //萌动开放权限
-        filterChainDefinitionMap.put("/getNewUserCoupon", "anon");
-        filterChainDefinitionMap.put("/getConsultTaskCoupon", "anon");
-        filterChainDefinitionMap.put("/getDetectionTaskCoupon", "anon");
-        filterChainDefinitionMap.put("/getRechargeTaskCoupon", "anon");
-        //文件上传临时解决方案
-        filterChainDefinitionMap.put("/uploadPromotionImg","anon");
-        filterChainDefinitionMap.put("/uploadImg","anon");
-        filterChainDefinitionMap.put("/uploadPayImg","anon");
-        //简历分享问题
-        filterChainDefinitionMap.put("/getWeChatInfo","anon");
-//        //用户,需要角色权限 “user”
-//        filterChainDefinitionMap.put("/user/**", "roles[user]");
-//        //管理员,需要角色权限 “admin”
-//        filterChainDefinitionMap.put("/admin/**", "roles[admin]");
-        //开放登陆接口
-        filterChainDefinitionMap.put("/login", "anon");
-        //其余接口一律拦截
-        //主要这行代码必须放在所有权限设置的最后,不然会导致所有 url 都被拦截
-        filterChainDefinitionMap.put("/**", "authc");
-
-        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
-        return shiroFilterFactoryBean;
-    }
-
-    /**
-     * 自定义身份认证 realm;
-     * <p>
-     * 必须写这个类,并加上 @Bean 注解,目的是注入 CustomRealm,
-     * 否则会影响 CustomRealm类 中其他类的依赖注入
-     */
-    @Bean
-    public CustomRealm customRealm() {
-        return new CustomRealm();
-    }
-    @Bean
-    public SessionManager sessionManager(){
-        ShiroSessionManager shiroSessionManager = new ShiroSessionManager();
-        //这里可以不设置。Shiro有默认的session管理。如果缓存为Redis则需改用Redis的管理
-        shiroSessionManager.setSessionDAO(new EnterpriseCacheSessionDAO());
-        return shiroSessionManager;
-    }
-    @Bean
-    public SecurityManager securityManager(){
-        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
-        securityManager.setRealm(customRealm());
-        //自定义session管理
-        securityManager.setSessionManager(sessionManager());
-        //自定义缓存实现
-//        securityManager.setCacheManager(ehCacheManager());
-        return  securityManager;
-    }
-
+package com.ygj.yuemum.shiro;
+
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.session.mgt.SessionManager;
+import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
+import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
+import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+@Configuration
+public class ShiroConfig {
+    @Bean
+    public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
+        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
+        // 必须设置 SecurityManager
+        shiroFilterFactoryBean.setSecurityManager(securityManager);
+        // setLoginUrl 如果不设置值,默认会自动寻找Web工程根目录下的"/login.jsp"页面 或 "/login" 映射
+        shiroFilterFactoryBean.setLoginUrl("/webLogin");
+        // 设置无权限时跳转的 url;
+        shiroFilterFactoryBean.setUnauthorizedUrl("/unauth");
+        // 设置拦截器
+        Map<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
+
+        //小程序开放权限
+        filterChainDefinitionMap.put("/addEquipmenteHireDetail", "anon");
+        filterChainDefinitionMap.put("/addEquipmenteHireHeadOnline", "anon");
+        filterChainDefinitionMap.put("/deleteEquipmenteHireHead", "anon");
+        filterChainDefinitionMap.put("/deleteWXUserDefAddress", "anon");
+        filterChainDefinitionMap.put("/checkStockDate", "anon");
+        filterChainDefinitionMap.put("/getBanners", "anon");
+        filterChainDefinitionMap.put("/getConsultant", "anon");
+        filterChainDefinitionMap.put("/getCustomerEq", "anon");
+        filterChainDefinitionMap.put("/getEquipmentTypes", "anon");
+        filterChainDefinitionMap.put("/getEqUserAddress", "anon");
+        filterChainDefinitionMap.put("/getIndexs", "anon");
+        filterChainDefinitionMap.put("/getMktInfos", "anon");
+        filterChainDefinitionMap.put("/getPackageDetail", "anon");
+        filterChainDefinitionMap.put("/getPackageLists", "anon");
+        filterChainDefinitionMap.put("/getPackageShowname", "anon");
+        filterChainDefinitionMap.put("/getPIClasses", "anon");
+        filterChainDefinitionMap.put("/getPIGroups", "anon");
+        filterChainDefinitionMap.put("/getPIServices", "anon");
+        filterChainDefinitionMap.put("/getPromotions", "anon");
+        filterChainDefinitionMap.put("/getWXCustomerCoupons", "anon");
+        filterChainDefinitionMap.put("/getWxDecrypt", "anon");
+        filterChainDefinitionMap.put("/getWXOpenid", "anon");
+        filterChainDefinitionMap.put("/getWXUserAddress", "anon");
+        filterChainDefinitionMap.put("/getYueSuo", "anon");
+        filterChainDefinitionMap.put("/insertCustomerBooking", "anon");
+        filterChainDefinitionMap.put("/insertEqCustomerBooking", "anon");
+        filterChainDefinitionMap.put("/insertWXUserAddress", "anon");
+        filterChainDefinitionMap.put("/updateWXUser", "anon");
+        filterChainDefinitionMap.put("/updateWXUserAddress", "anon");
+        filterChainDefinitionMap.put("/updateWXUserDefAddress", "anon");
+        filterChainDefinitionMap.put("/WXSendBookingMessage", "anon");
+        filterChainDefinitionMap.put("/WXSendOrderMessage", "anon");
+        filterChainDefinitionMap.put("/WXSendYSOrderMessage", "anon");
+        filterChainDefinitionMap.put("/getEquipmentAmount", "anon");
+        filterChainDefinitionMap.put("/getValidPO", "anon");
+        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("/date_DcIntroducerExtracts", "anon");
+        filterChainDefinitionMap.put("/getAccountNumber", "anon");
+        filterChainDefinitionMap.put("/queryOneDcIntroducerExtract", "anon");
+        filterChainDefinitionMap.put("/insertDcIntroducerExtract", "anon");
+        filterChainDefinitionMap.put("/WXSendExtractMessage", "anon");
+        filterChainDefinitionMap.put("/insertDcIntroduceLog", "anon");
+        filterChainDefinitionMap.put("/getDcIntroducerConsultants", "anon");
+        filterChainDefinitionMap.put("/queryMineOrder", "anon");
+        filterChainDefinitionMap.put("/getYSOrder", "anon");
+        filterChainDefinitionMap.put("/insertYsOrderPay", "anon");
+        filterChainDefinitionMap.put("/checkCustomerPay", "anon");
+        filterChainDefinitionMap.put("/queryYSOrderReturn", "anon");
+        filterChainDefinitionMap.put("/updateEquipmenteHireHeadOnline", "anon");
+        filterChainDefinitionMap.put("/getIndexPromotions", "anon");
+        filterChainDefinitionMap.put("/CreatePOP", "anon");
+        filterChainDefinitionMap.put("/getPromotionDC", "anon");
+        filterChainDefinitionMap.put("/checkMkt", "anon");
+        filterChainDefinitionMap.put("/getBranches", "anon");
+        filterChainDefinitionMap.put("/insertPromotionDCUserInfo", "anon");
+        filterChainDefinitionMap.put("/updateDcIntroducerApplicant", "anon");
+        filterChainDefinitionMap.put("/updateAccountNumber", "anon");
+        //萌动开放权限
+        filterChainDefinitionMap.put("/getNewUserCoupon", "anon");
+        filterChainDefinitionMap.put("/getConsultTaskCoupon", "anon");
+        filterChainDefinitionMap.put("/getDetectionTaskCoupon", "anon");
+        filterChainDefinitionMap.put("/getRechargeTaskCoupon", "anon");
+        //文件上传临时解决方案
+        filterChainDefinitionMap.put("/uploadPromotionImg","anon");
+        filterChainDefinitionMap.put("/uploadImg","anon");
+        filterChainDefinitionMap.put("/uploadPayImg","anon");
+        //简历分享问题
+        filterChainDefinitionMap.put("/getWeChatInfo","anon");
+//        //用户,需要角色权限 “user”
+//        filterChainDefinitionMap.put("/user/**", "roles[user]");
+//        //管理员,需要角色权限 “admin”
+//        filterChainDefinitionMap.put("/admin/**", "roles[admin]");
+        //开放登陆接口
+        filterChainDefinitionMap.put("/login", "anon");
+        //其余接口一律拦截
+        //主要这行代码必须放在所有权限设置的最后,不然会导致所有 url 都被拦截
+        filterChainDefinitionMap.put("/**", "authc");
+
+        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
+        return shiroFilterFactoryBean;
+    }
+
+    /**
+     * 自定义身份认证 realm;
+     * <p>
+     * 必须写这个类,并加上 @Bean 注解,目的是注入 CustomRealm,
+     * 否则会影响 CustomRealm类 中其他类的依赖注入
+     */
+    @Bean
+    public CustomRealm customRealm() {
+        return new CustomRealm();
+    }
+    @Bean
+    public SessionManager sessionManager(){
+        ShiroSessionManager shiroSessionManager = new ShiroSessionManager();
+        //这里可以不设置。Shiro有默认的session管理。如果缓存为Redis则需改用Redis的管理
+        shiroSessionManager.setSessionDAO(new EnterpriseCacheSessionDAO());
+        return shiroSessionManager;
+    }
+    @Bean
+    public SecurityManager securityManager(){
+        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
+        securityManager.setRealm(customRealm());
+        //自定义session管理
+        securityManager.setSessionManager(sessionManager());
+        //自定义缓存实现
+//        securityManager.setCacheManager(ehCacheManager());
+        return  securityManager;
+    }
+
 }

+ 7 - 1
src/main/resources/application.yml

@@ -51,6 +51,9 @@ file:
   httpqrcode: "http://localhost:8080/MiniProgram/mgm"
   IMGBANKCARD: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/bankCard/"
   HTTPIMGBANKCARD: "http://localhost:8080/MiniProgram/mgm/bankCard/"
+  LOCALQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm"
+  DEMOQRCODE: "C:/apache-tomcat-9.0.14/webapps/MiniProgram/mgm/pop"
+  HTTPOPPQRCODE: "http://192.168.8.14:8080/MiniProgram/mgm/pop"
 #测试
 #file:
 #  ROOT : "/usr/local/apache-tomcat-8.5.30/webapps/resume/img/"
@@ -81,6 +84,9 @@ file:
 #  httpqrcode: "http://yuesuo.yueguanjia.com/MiniProgram/mgm"
 #  IMGBANKCARD: "/usr/local/tomcat/tomcat7/webapps/MiniProgram/mgm/bankCard/"
 #  HTTPIMGBANKCARD: "http://yuesuo.yueguanjia.com/MiniProgram/mgm/bankCard/"
+#  LOCALQRCODE: "/usr/local/tomcat/tomcat7/webapps/MiniProgram/mgm"
+#  DEMOQRCODE: "/usr/local/tomcat/tomcat7/webapps/MiniProgram/mgm/pop"
+#  HTTPOPPQRCODE: "https://yuesuo.yueguanjia.com/MiniProgram/mgm/pop"
 #微信公众号---------------------------------------------------
 wechat:
   APPID : "wx52852a3c47540fad"
@@ -108,7 +114,7 @@ baidu:
   BANKCARD: "https://aip.baidubce.com/rest/2.0/ocr/v1/bankcard"
 api:
   MDJAPIURL: "http://120.55.37.107:8763/introduce/activity"
-  BIZOBJECTSERVICE: "http://192.168.1.24/edw-application-1.0-SNAPSHOT/h3/operateObjects"
+  BIZOBJECTSERVICE: "http://121.199.23.175:8080/edw/h3/operateObjects"
   BIZUSERSERVICE: "https://www.h3yun.com/OpenApi/Invoke"
 #  BIZOBJECTSERVICE: "http://192.168.1.213:8010/h3/operateObjects"
 

+ 31 - 23
src/main/resources/mybatis/mapper/admin/BranchesMapper.xml

@@ -1,24 +1,32 @@
-<?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.admin.BranchesDao" >
-
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.Branches" >
-        <id column="branche_code" property="branche_code" jdbcType="INTEGER" />
-        <result column="branche_name" property="branche_name" jdbcType="VARCHAR" />
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getBranches" resultType="com.ygj.yuemum.domain.admin.Branches" >
-        select
-        branche_code,branche_name
-        from branches
-        where id != 1
-    </select>
-
-    <select id="getMktBranches" resultType="com.ygj.yuemum.domain.admin.Branches" >
-        select
-        branche_code,branche_name
-        from branches
-    </select>
-
+<?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.admin.BranchesDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.Branches" >
+        <id column="branche_code" property="branche_code" jdbcType="INTEGER" />
+        <result column="branche_name" property="branche_name" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getBranches" resultType="com.ygj.yuemum.domain.admin.Branches" >
+        select
+        branche_code,branche_name
+        from branches
+        where id != 1
+        order by 1 asc
+    </select>
+
+    <select id="getMktBranches" resultType="com.ygj.yuemum.domain.admin.Branches" >
+        select
+        branche_code,branche_name
+        from branches
+    </select>
+
+    <select id="checkMkt" resultType="com.ygj.yuemum.domain.admin.Branches" parameterType="java.lang.String">
+        select
+        *
+        from branches
+        where concat(left(branche_code,3),'000') = #{branche_code,jdbcType=INTEGER}
+    </select>
+
 </mapper>

+ 278 - 261
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml

@@ -1,262 +1,279 @@
-<?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_orderno" property="wue_orderno" jdbcType="VARCHAR" />
-        <result column="wue_phone" property="wue_phone" jdbcType="VARCHAR" />
-        <result column="wue_bank_card" property="wue_bank_card" 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="DECIMAL" />
-        <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" />
-        <result column="wue_remarks" property="wue_remarks" jdbcType="VARCHAR" />
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.String">
-        select
-        id,
-        wue_orderno,
-        wue_phone,
-        wue_type,
-        wue_bank_card,
-        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
-        wue_applysum,
-        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
-        wue_approversum,
-        fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
-        wue_remarks
-        from dc_introducer_extract
-        where wue_phone = #{phone,jdbcType=VARCHAR}
-        order by wue_type asc ,id desc
-    </select>
-
-    <select id="queryOneDcIntroducerExtract" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.Integer">
-        select
-        id,
-        wue_orderno,
-        wue_phone,
-        wue_bank_card,
-        wue_type,
-        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
-        wue_applysum,
-        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
-        wue_approversum,
-        fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
-        wue_remarks
-        from dc_introducer_extract
-        where id = #{id,jdbcType=VARCHAR}
-        order by wue_type asc ,id desc
-    </select>
-
-
-    <select id="date_DcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.String">
-        select
-        id,
-        wue_orderno,
-        wue_phone,
-        wue_bank_card,
-        wue_type,
-        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
-        wue_applysum,
-        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
-        wue_approversum,
-        fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
-        wue_remarks
-        from dc_introducer_extract
-        where DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{applydate,jdbcType=VARCHAR}
-        order by wue_type asc ,id desc
-    </select>
-
-    <select id="queryDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract">
-        select
-        id,
-        wue_orderno,
-        wue_phone,
-        wue_bank_card,
-        wue_type,
-        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
-        wue_applysum,
-        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
-        wue_approversum,
-        fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
-        wue_remarks
-        from dc_introducer_extract
-        where 1=1
-        <if test="id != null and id != ''">
-            and id = #{id,jdbcType=INTEGER}
-        </if>
-        <if test="wue_orderno != null and wue_orderno != ''">
-            and wue_orderno = #{wue_orderno,jdbcType=VARCHAR}
-        </if>
-        <if test="wue_phone != null and wue_phone != ''">
-            and wue_phone = #{wue_phone,jdbcType=VARCHAR}
-        </if>
-        <if test="wue_bank_card != null and wue_bank_card != ''">
-            and wue_bank_card like  "%"#{wue_bank_card,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 DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{wue_applydate,jdbcType=DATE}
-        </if>
-        <if test="wue_applysum != null and wue_applysum != ''">
-            and wue_applysum = #{wue_applysum,jdbcType=DECIMAL}
-        </if>
-        <if test="wue_approverdate != null and wue_approverdate != ''">
-            and DATE_FORMAT(wue_approverdate, '%Y-%m-%d') = #{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 DATE_FORMAT(wue_paydate, '%Y-%m-%d') = #{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_orderno != null" >
-                wue_phone = #{wue_orderno,jdbcType=VARCHAR},
-            </if>
-            <if test="wue_bank_card != null" >
-                wue_bank_card = #{wue_bank_card,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=DECIMAL},
-            </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_remarks != null" >
-                wue_remarks = #{wue_remarks,jdbcType=VARCHAR},
-            </if>
-            <if test="wue_paydate != null" >
-                wue_paydate = #{wue_paydate,jdbcType=DATE}
-            </if>
-        </set>
-        where id = #{id,jdbcType=INTEGER}
-    </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_bank_card != null" >
-                wue_bank_card,
-            </if>
-            <if test="wue_orderno != null" >
-                wue_orderno,
-            </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_remarks != null" >
-                wue_remarks,
-            </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_bank_card != null" >
-                #{wue_bank_card,jdbcType=VARCHAR},
-            </if>
-            <if test="wue_orderno != null" >
-                #{wue_orderno,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=DECIMAL},
-            </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_remarks != null" >
-                #{wue_remarks,jdbcType=INTEGER},
-            </if>
-            <if test="wue_paydate != null" >
-                #{wue_paydate,jdbcType=DATE}
-            </if>
-
-        </trim>
-    </insert>
-    <select id="getAESeq" resultType="java.lang.Integer" >
-        select
-        count(1)
-        from dc_introducer_extract
-        where date_format(wue_applydate,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-    </select>
-    <update id="updateIEByPhoneChange" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
-        update dc_introducer_extract
-        <set >
-            <if test="wue_phone != null" >
-                wue_phone = #{wue_phone,jdbcType=VARCHAR},
-            </if>
-        </set>
-        where wue_phone = #{wue_phoneOld,jdbcType=VARCHAR}
-    </update>
-
-
+<?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_orderno" property="wue_orderno" jdbcType="VARCHAR" />
+        <result column="wue_phone" property="wue_phone" jdbcType="VARCHAR" />
+        <result column="wue_account_name" property="wue_account_name" jdbcType="VARCHAR" />
+        <result column="wue_bank_card" property="wue_bank_card" 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="DECIMAL" />
+        <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" />
+        <result column="wue_remarks" property="wue_remarks" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.String">
+        select
+        id,
+        wue_orderno,
+        wue_phone,
+        wue_type,
+        wue_account_name,
+        wue_bank_card,
+        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
+        wue_applysum,
+        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
+        wue_approversum,
+        fgetuser_name(wue_approveruser) wue_approveruser,
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
+        from dc_introducer_extract
+        where wue_phone = #{phone,jdbcType=VARCHAR}
+        order by wue_type asc ,id desc
+    </select>
+
+    <select id="queryOneDcIntroducerExtract" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.Integer">
+        select
+        id,
+        wue_orderno,
+        wue_phone,
+        wue_account_name,
+        wue_bank_card,
+        wue_type,
+        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
+        wue_applysum,
+        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
+        wue_approversum,
+        fgetuser_name(wue_approveruser) wue_approveruser,
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
+        from dc_introducer_extract
+        where id = #{id,jdbcType=VARCHAR}
+        order by wue_type asc ,id desc
+    </select>
+
+
+    <select id="date_DcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="java.lang.String">
+        select
+        id,
+        wue_orderno,
+        wue_phone,
+        wue_account_name,
+        wue_bank_card,
+        wue_type,
+        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
+        wue_applysum,
+        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
+        wue_approversum,
+        fgetuser_name(wue_approveruser) wue_approveruser,
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
+        from dc_introducer_extract
+        where DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{applydate,jdbcType=VARCHAR}
+        order by wue_type asc ,id desc
+    </select>
+
+    <select id="queryDcIntroducerExtracts" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract">
+        select
+        id,
+        wue_orderno,
+        wue_phone,
+        wue_account_name,
+        wue_bank_card,
+        wue_type,
+        DATE_FORMAT(wue_applydate, '%Y-%m-%d') wue_applydate,
+        wue_applysum,
+        DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
+        wue_approversum,
+        fgetuser_name(wue_approveruser) wue_approveruser,
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
+        from dc_introducer_extract
+        where 1=1
+        <if test="id != null and id != ''">
+            and id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="wue_orderno != null and wue_orderno != ''">
+            and wue_orderno = #{wue_orderno,jdbcType=VARCHAR}
+        </if>
+        <if test="wue_phone != null and wue_phone != ''">
+            and wue_phone = #{wue_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="wue_account_name != null and wue_account_name != ''">
+            and wue_account_name like  "%"#{wue_account_name,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="wue_bank_card != null and wue_bank_card != ''">
+            and wue_bank_card like  "%"#{wue_bank_card,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 DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{wue_applydate,jdbcType=DATE}
+        </if>
+        <if test="wue_applysum != null and wue_applysum != ''">
+            and wue_applysum = #{wue_applysum,jdbcType=DECIMAL}
+        </if>
+        <if test="wue_approverdate != null and wue_approverdate != ''">
+            and DATE_FORMAT(wue_approverdate, '%Y-%m-%d') = #{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 DATE_FORMAT(wue_paydate, '%Y-%m-%d') = #{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_orderno != null" >
+                wue_phone = #{wue_orderno,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_account_name != null" >
+                wue_account_name = #{wue_account_name,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_bank_card != null" >
+                wue_bank_card = #{wue_bank_card,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=DECIMAL},
+            </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_remarks != null" >
+                wue_remarks = #{wue_remarks,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_paydate != null" >
+                wue_paydate = #{wue_paydate,jdbcType=DATE}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </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_account_name != null" >
+                wue_account_name,
+            </if>
+            <if test="wue_bank_card != null" >
+                wue_bank_card,
+            </if>
+            <if test="wue_orderno != null" >
+                wue_orderno,
+            </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_remarks != null" >
+                wue_remarks,
+            </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_account_name != null" >
+                #{wue_account_name,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_bank_card != null" >
+                #{wue_bank_card,jdbcType=VARCHAR},
+            </if>
+            <if test="wue_orderno != null" >
+                #{wue_orderno,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=DECIMAL},
+            </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_remarks != null" >
+                #{wue_remarks,jdbcType=INTEGER},
+            </if>
+            <if test="wue_paydate != null" >
+                #{wue_paydate,jdbcType=DATE}
+            </if>
+
+        </trim>
+    </insert>
+    <select id="getAESeq" resultType="java.lang.Integer" >
+        select
+        count(1)
+        from dc_introducer_extract
+        where date_format(wue_applydate,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
+    </select>
+    <update id="updateIEByPhoneChange" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
+        update dc_introducer_extract
+        <set >
+            <if test="wue_phone != null" >
+                wue_phone = #{wue_phone,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where wue_phone = #{wue_phoneOld,jdbcType=VARCHAR}
+    </update>
+
+
 </mapper>

+ 23 - 4
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml

@@ -19,6 +19,7 @@
         <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"/>
+        <result column="wv_account_name" property="wv_account_name" jdbcType="VARCHAR"/>
         <result column="wv_account_number" property="wv_account_number" jdbcType="VARCHAR"/>
         <result column="wv_account_bank" property="wv_account_bank" jdbcType="VARCHAR"/>
         <result column="wv_account_number_path" property="wv_account_number_path" jdbcType="VARCHAR"/>
@@ -50,6 +51,7 @@
         wv_qrcode,
         wv_consultant,
         fgetuser_name(wv_consultant) wv_consultantname,
+        wv_account_name,
         wv_account_number,
         wv_account_bank,
         wv_account_number_path
@@ -79,6 +81,7 @@
         wv_qrcode,
         wv_consultant,
         fgetuser_name(wv_consultant) wv_consultantname,
+        wv_account_name,
         wv_account_number,
         wv_account_bank,
         wv_account_number_path
@@ -136,6 +139,7 @@
         wv_finish_count,
         wv_consultant,
         fgetuser_name (wv_consultant) wv_consultantname,
+        wv_account_name,
         wv_account_number,
         wv_account_bank,
         wv_account_number_path
@@ -183,6 +187,9 @@
         <if test="wv_consultant != null and wv_consultant != ''">
             and wv_consultant = #{wv_consultant,jdbcType=INTEGER}
         </if>
+        <if test="wv_account_name != null and wv_account_name != ''">
+            and wv_account_name = #{wv_account_name,jdbcType=VARCHAR}
+        </if>
         <if test="wv_account_number != null and wv_account_number != ''">
             and wv_account_number = #{wv_account_number,jdbcType=VARCHAR}
         </if>
@@ -237,7 +244,9 @@
             <if test="wv_consultant != null">
                 wv_consultant = #{wv_consultant,jdbcType=INTEGER},
             </if>
-
+            <if test="wv_account_name != null">
+                wv_account_name = #{wv_account_name,jdbcType=VARCHAR},
+            </if>
             <if test="wv_account_number_path != null">
                 wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR},
             </if>
@@ -254,13 +263,16 @@
     <update id="updateAccountNumber" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
         update dc_introducer
         <set>
-            <if test="wv_account_number != null" >
+            <if test="wv_account_name != null  and wv_account_name != ''" >
+                wv_account_name = #{wv_account_name,jdbcType=VARCHAR},
+            </if>
+            <if test="wv_account_number != null and wv_account_number != ''" >
                 wv_account_number = #{wv_account_number,jdbcType=VARCHAR},
             </if>
-            <if test="wv_account_bank != null" >
+            <if test="wv_account_bank != null and wv_account_bank != ''" >
                 wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR},
             </if>
-            <if test="wv_account_number_path != null" >
+            <if test="wv_account_number_path != null and wv_account_number_path != ''" >
                 wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR}
             </if>
         </set>
@@ -271,6 +283,7 @@
     <update id="delAccountNumber" parameterType="java.lang.String">
         update dc_introducer
             set wv_account_number = NULL,
+            wv_account_name = NULL,
             wv_account_bank = NULL,
             wv_account_number_path = NULL
         where wv_phone = #{wv_phone,jdbcType=VARCHAR}
@@ -316,6 +329,9 @@
             <if test="wv_people_count != null">
                 wv_people_count,
             </if>
+            <if test="wv_account_name != null">
+                wv_account_name,
+            </if>
             <if test="wv_account_number != null">
                 wv_account_number,
             </if>
@@ -363,6 +379,9 @@
             <if test="wv_people_count != null">
                 #{wv_people_count,jdbcType=INTEGER},
             </if>
+            <if test="wv_account_name != null">
+                #{wv_account_name,jdbcType=VARCHAR},
+            </if>
             <if test="wv_account_number != null">
                 #{wv_account_number,jdbcType=VARCHAR},
             </if>

+ 31 - 0
src/main/resources/mybatis/mapper/promotion/PromotionDCMapper.xml

@@ -0,0 +1,31 @@
+<?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.promotion.PromotionDCDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.promotion.PromotionDC" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="pd_title" property="pd_title" jdbcType="VARCHAR" />
+        <result column="pd_headimg" property="pd_headimg" jdbcType="VARCHAR" />
+        <result column="pd_startdate" property="pd_startdate" jdbcType="DATE" />
+        <result column="pd_enddate" property="pd_enddate" jdbcType="DATE" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getPromotionDC" resultType="com.ygj.yuemum.domain.promotion.PromotionDC" parameterType="com.ygj.yuemum.domain.promotion.PromotionOffline" >
+        select
+        id,pd_title,pd_headimg,pd_startdate,pd_enddate
+        from promotion_dc
+        where
+         DATE_FORMAT(now(), '%Y-%m-%d')  &gt;=  pd_startdate
+        AND DATE_FORMAT(now(), '%Y-%m-%d')  &lt;=  pd_enddate
+        order by 1 desc limit 1
+    </select>
+
+
+    <select id="getPromotionDCs" resultType="com.ygj.yuemum.domain.promotion.PromotionDC"  >
+        select
+        id,pd_title
+        from promotion_dc
+        order by 1 desc
+    </select>
+</mapper>

+ 97 - 0
src/main/resources/mybatis/mapper/promotion/PromotionDCUserInfoMapper.xml

@@ -0,0 +1,97 @@
+<?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.promotion.PromotionDCUserInfoDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.promotion.PromotionDCUserInfo" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="pd_phone" property="pd_phone" jdbcType="VARCHAR" />
+        <result column="pd_prom_id" property="pd_prom_id" jdbcType="INTEGER" />
+        <result column="pd_duedate" property="pd_duedate" jdbcType="DATE" />
+        <result column="pd_city" property="pd_city" jdbcType="INTEGER" />
+        <result column="pd_date" property="pd_date" jdbcType="DATE" />
+        <result column="pd_dc_phone" property="pd_dc_phone" jdbcType="VARCHAR" />
+    </resultMap>
+
+
+    <select id="getCheckDCInfo" resultType="java.lang.Integer" parameterType="java.lang.String" >
+        select
+        count(1)
+        from promotion_dc_userinfo
+        where pd_phone = #{pd_phone,jdbcType=VARCHAR}
+    </select>
+
+    <!-- 插入一条培训信息 -->
+    <insert id="insertPromotionDCUserInfo" parameterType="com.ygj.yuemum.domain.promotion.PromotionDCUserInfo" >
+        insert into promotion_dc_userinfo
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="pd_phone != null" >
+                pd_phone,
+            </if>
+            <if test="pd_prom_id != null" >
+                pd_prom_id,
+            </if>
+            <if test="pd_duedate != null" >
+                pd_duedate,
+            </if>
+            <if test="pd_city != null" >
+                pd_city,
+            </if>
+            <if test="pd_date != null" >
+                pd_date,
+            </if>
+            <if test="pd_dc_phone != null" >
+                pd_dc_phone
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="pd_phone != null" >
+                #{pd_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="pd_prom_id != null" >
+                #{pd_prom_id,jdbcType=INTEGER},
+            </if>
+            <if test="pd_duedate != null" >
+                #{pd_duedate,jdbcType=DATE},
+            </if>
+            <if test="pd_city != null" >
+                #{pd_city,jdbcType=INTEGER},
+            </if>
+            <if test="pd_date != null" >
+                #{pd_date,jdbcType=DATE},
+            </if>
+            <if test="pd_dc_phone != null" >
+                #{pd_dc_phone,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <select id="getPromotionDCUserInfos" resultType="com.ygj.yuemum.domain.promotion.PromotionDCUserInfo" parameterType="com.ygj.yuemum.domain.promotion.PromotionDCUserInfo">
+        select
+        pd_phone,
+        pd_duedate,
+        pd_date,
+        fgetpromotiondcname(pd_prom_id) pd_prom_name,
+        fgetbranches_name(pd_city) pd_cityname,
+        pd_dc_phone,
+        fgetdcconsultantname(pd_phone) consultname
+        from promotion_dc_userinfo
+        where 1=1
+        <if test="pd_phone != null and pd_phone != ''">
+            and pd_phone = #{pd_phone,jdbcType=VARCHAR}
+        </if>
+        <if test="pd_duedate != null and pd_duedate != ''">
+            and pd_duedate = #{pd_duedate,jdbcType=DATE}
+        </if>
+        <if test="pd_prom_id != null and pd_prom_id != ''">
+            and pd_prom_id = #{pd_prom_id,jdbcType=INTEGER}
+        </if>
+        <if test="pd_date != null and pd_date != ''">
+            and DATE_FORMAT(pd_date,'%Y-%m-%d')  = #{pd_date,jdbcType=DATE}
+        </if>
+        <if test="pd_city != null and pd_city != ''">
+            and pd_city = #{pd_city,jdbcType=INTEGER}
+        </if>
+        order by id desc
+    </select>
+
+</mapper>

+ 20 - 20
src/main/resources/mybatis/mapper/wxmini/WXBannerMapper.xml

@@ -1,21 +1,21 @@
-<?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.wxmini.WXBannerDao" >
-
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXBanner" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="wb_seq" property="wb_seq" jdbcType="INTEGER" />
-        <result column="wb_url" property="wb_url" jdbcType="VARCHAR" />
-        <result column="wb_href" property="wb_href" jdbcType="VARCHAR" />
-
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getBanners" resultType="com.ygj.yuemum.domain.wxmini.WXBanner" >
-        select
-        id,wb_seq,wb_url,wb_href
-        from wx_banner
-        order by wb_seq asc
-    </select>
-
+<?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.wxmini.WXBannerDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXBanner" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="wb_seq" property="wb_seq" jdbcType="INTEGER" />
+        <result column="wb_url" property="wb_url" jdbcType="VARCHAR" />
+        <result column="wb_href" property="wb_href" jdbcType="VARCHAR" />
+        <result column="wb_href_type" property="wb_href_type" jdbcType="INTEGER" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getBanners" resultType="com.ygj.yuemum.domain.wxmini.WXBanner" >
+        select
+        id,wb_seq,wb_url,wb_href,wb_href_type
+        from wx_banner
+        order by wb_seq asc
+    </select>
+
 </mapper>

+ 171 - 163
src/main/resources/mybatis/mapper/wxmini/WXUserMapper.xml

@@ -1,164 +1,172 @@
-<?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.wxmini.WXUserDao">
-
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXUser">
-        <id column="id" property="id" jdbcType="INTEGER"/>
-        <result column="xu_openid" property="xu_openid" jdbcType="VARCHAR"/>
-        <result column="xu_sessionkey" property="xu_sessionkey" jdbcType="VARCHAR"/>
-        <result column="xu_phone" property="xu_phone" jdbcType="VARCHAR"/>
-        <result column="xu_countryCode" property="xu_countryCode" jdbcType="VARCHAR"/>
-        <result column="xu_name" property="xu_name" jdbcType="VARCHAR"/>
-        <result column="xu_avatarUrl" property="xu_avatarUrl" jdbcType="VARCHAR"/>
-        <result column="xu_gender" property="xu_gender" jdbcType="VARCHAR"/>
-        <result column="xu_city" property="xu_city" jdbcType="VARCHAR"/>
-        <result column="xu_province" property="xu_province" jdbcType="VARCHAR"/>
-        <result column="xu_country" property="xu_country" jdbcType="VARCHAR"/>
-        <result column="xu_language" property="xu_language" jdbcType="VARCHAR"/>
-        <result column="xu_ydate" property="xu_ydate" jdbcType="DATE"/>
-        <result column="xu_isauthorize" property="xu_isauthorize" jdbcType="INTEGER"/>
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getWXUser" resultType="com.ygj.yuemum.domain.wxmini.WXUser" parameterType="java.lang.String">
-        select
-        id,xu_openid,xu_sessionkey,xu_phone,xu_name,xu_avatarUrl,xu_gender,xu_city,xu_province,xu_country,xu_language,xu_ydate,xu_isauthorize
-        from wx_user
-        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
-        order by id asc
-    </select>
-
-    <insert id="insertWXUser" parameterType="com.ygj.yuemum.domain.wxmini.WXUser" >
-        insert into wx_user
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-            <if test="xu_openid != null" >
-                xu_openid,
-            </if>
-            <if test="xu_sessionkey != null" >
-                xu_sessionkey,
-            </if>
-            <if test="xu_phone != null" >
-                xu_phone,
-            </if>
-            <if test="xu_name != null" >
-                xu_name,
-            </if>
-            <if test="xu_avatarUrl != null" >
-                xu_avatarUrl,
-            </if>
-            <if test="xu_gender != null" >
-                xu_gender,
-            </if>
-            <if test="xu_city != null" >
-                xu_city,
-            </if>
-            <if test="xu_province != null" >
-                xu_province,
-            </if>
-            <if test="xu_country != null" >
-                xu_country,
-            </if>
-            <if test="xu_language != null" >
-                xu_language,
-            </if>
-            <if test="xu_ydate != null" >
-                xu_ydate,
-            </if>
-            <if test="xu_isauthorize != null" >
-                xu_isauthorize
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-            <if test="xu_openid != null" >
-                #{xu_openid,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_sessionkey != null" >
-                #{xu_sessionkey,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_phone != null" >
-                #{xu_phone,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_name != null" >
-                #{xu_name,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_avatarUrl != null" >
-                #{xu_avatarUrl,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_gender != null" >
-                #{xu_gender,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_city != null" >
-                #{xu_city,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_province != null" >
-                #{xu_province,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_country != null" >
-                #{xu_country,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_language != null" >
-                #{xu_language,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_ydate != null" >
-                #{xu_ydate,jdbcType=DATE},
-            </if>
-            <if test="xu_isauthorize != null" >
-                #{xu_isauthorize,jdbcType=INTEGER}
-            </if>
-        </trim>
-    </insert>
-
-    <update id="updateWXUser" parameterType="com.ygj.yuemum.domain.wxmini.WXUser" >
-        update wx_user
-        <set >
-            <if test="xu_openid != null" >
-                xu_openid = #{xu_openid,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_sessionkey != null" >
-                xu_sessionkey = #{xu_sessionkey,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_phone != null" >
-                xu_phone = #{xu_phone,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_countryCode != null" >
-                xu_countryCode = #{xu_countryCode,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_name != null" >
-                xu_name = #{xu_name,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_avatarUrl != null" >
-                xu_avatarUrl = #{xu_avatarUrl,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_gender != null" >
-                xu_gender = #{xu_gender,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_city != null" >
-                xu_city = #{xu_city,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_province != null" >
-                xu_province = #{xu_province,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_country != null" >
-                xu_country = #{xu_country,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_language != null" >
-                xu_language = #{xu_language,jdbcType=VARCHAR},
-            </if>
-            <if test="xu_ydate != null" >
-                xu_ydate = #{xu_ydate,jdbcType=DATE},
-            </if>
-            <if test="xu_isauthorize != null" >
-                xu_isauthorize = #{xu_isauthorize,jdbcType=INTEGER}
-            </if>
-        </set>
-        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
-    </update>
-
-    <select id="getWXUserType" resultType="com.ygj.yuemum.domain.wxmini.WXUser" parameterType="java.lang.String">
-        select
-        count(1)
-        from wx_user
-        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
-        order by id asc
-    </select>
+<?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.wxmini.WXUserDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXUser">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="xu_openid" property="xu_openid" jdbcType="VARCHAR"/>
+        <result column="xu_sessionkey" property="xu_sessionkey" jdbcType="VARCHAR"/>
+        <result column="xu_phone" property="xu_phone" jdbcType="VARCHAR"/>
+        <result column="xu_countryCode" property="xu_countryCode" jdbcType="VARCHAR"/>
+        <result column="xu_name" property="xu_name" jdbcType="VARCHAR"/>
+        <result column="xu_avatarUrl" property="xu_avatarUrl" jdbcType="VARCHAR"/>
+        <result column="xu_gender" property="xu_gender" jdbcType="VARCHAR"/>
+        <result column="xu_city" property="xu_city" jdbcType="VARCHAR"/>
+        <result column="xu_province" property="xu_province" jdbcType="VARCHAR"/>
+        <result column="xu_country" property="xu_country" jdbcType="VARCHAR"/>
+        <result column="xu_language" property="xu_language" jdbcType="VARCHAR"/>
+        <result column="xu_ydate" property="xu_ydate" jdbcType="DATE"/>
+        <result column="xu_isauthorize" property="xu_isauthorize" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getWXUser" resultType="com.ygj.yuemum.domain.wxmini.WXUser" parameterType="java.lang.String">
+        select
+        id,xu_openid,xu_sessionkey,xu_phone,xu_name,xu_avatarUrl,xu_gender,xu_city,xu_province,xu_country,xu_language,xu_ydate,xu_isauthorize
+        from wx_user
+        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
+        order by id asc
+    </select>
+
+    <insert id="insertWXUser" parameterType="com.ygj.yuemum.domain.wxmini.WXUser" >
+        insert into wx_user
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="xu_openid != null" >
+                xu_openid,
+            </if>
+            <if test="xu_sessionkey != null" >
+                xu_sessionkey,
+            </if>
+            <if test="xu_phone != null" >
+                xu_phone,
+            </if>
+            <if test="xu_name != null" >
+                xu_name,
+            </if>
+            <if test="xu_avatarUrl != null" >
+                xu_avatarUrl,
+            </if>
+            <if test="xu_gender != null" >
+                xu_gender,
+            </if>
+            <if test="xu_city != null" >
+                xu_city,
+            </if>
+            <if test="xu_province != null" >
+                xu_province,
+            </if>
+            <if test="xu_country != null" >
+                xu_country,
+            </if>
+            <if test="xu_language != null" >
+                xu_language,
+            </if>
+            <if test="xu_ydate != null" >
+                xu_ydate,
+            </if>
+            <if test="xu_isauthorize != null" >
+                xu_isauthorize
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="xu_openid != null" >
+                #{xu_openid,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_sessionkey != null" >
+                #{xu_sessionkey,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_phone != null" >
+                #{xu_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_name != null" >
+                #{xu_name,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_avatarUrl != null" >
+                #{xu_avatarUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_gender != null" >
+                #{xu_gender,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_city != null" >
+                #{xu_city,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_province != null" >
+                #{xu_province,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_country != null" >
+                #{xu_country,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_language != null" >
+                #{xu_language,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_ydate != null" >
+                #{xu_ydate,jdbcType=DATE},
+            </if>
+            <if test="xu_isauthorize != null" >
+                #{xu_isauthorize,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateWXUser" parameterType="com.ygj.yuemum.domain.wxmini.WXUser" >
+        update wx_user
+        <set >
+            <if test="xu_openid != null" >
+                xu_openid = #{xu_openid,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_sessionkey != null" >
+                xu_sessionkey = #{xu_sessionkey,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_phone != null" >
+                xu_phone = #{xu_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_countryCode != null" >
+                xu_countryCode = #{xu_countryCode,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_name != null" >
+                xu_name = #{xu_name,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_avatarUrl != null" >
+                xu_avatarUrl = #{xu_avatarUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_gender != null" >
+                xu_gender = #{xu_gender,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_city != null" >
+                xu_city = #{xu_city,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_province != null" >
+                xu_province = #{xu_province,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_country != null" >
+                xu_country = #{xu_country,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_language != null" >
+                xu_language = #{xu_language,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_ydate != null" >
+                xu_ydate = #{xu_ydate,jdbcType=DATE},
+            </if>
+            <if test="xu_isauthorize != null" >
+                xu_isauthorize = #{xu_isauthorize,jdbcType=INTEGER}
+            </if>
+        </set>
+        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
+    </update>
+
+    <select id="getWXUserType" resultType="com.ygj.yuemum.domain.wxmini.WXUser" parameterType="java.lang.String">
+        select
+        count(1)
+        from wx_user
+        where xu_openid = #{xu_openid,jdbcType=VARCHAR}
+        order by id asc
+    </select>
+
+    <select id="checkWXUser" resultType="java.lang.Integer" parameterType="java.lang.String">
+        select
+        count(1)
+        from wx_user
+        where xu_phone = #{xu_phone,jdbcType=VARCHAR}
+        order by id asc
+    </select>
 </mapper>