浏览代码

点评,内容,选月嫂功能开发

huan.wang 6 年之前
父节点
当前提交
b7e238ceb9
共有 66 个文件被更改,包括 5684 次插入3758 次删除
  1. 473 473
      src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java
  2. 38 37
      src/main/java/com/ygj/yuemum/controller/global/PackageItemController.java
  3. 46 46
      src/main/java/com/ygj/yuemum/controller/global/PackagesController.java
  4. 3 3
      src/main/java/com/ygj/yuemum/controller/global/WeChatInfoController.java
  5. 258 188
      src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java
  6. 10 0
      src/main/java/com/ygj/yuemum/controller/wxmini/WXContentController.java
  7. 5 4
      src/main/java/com/ygj/yuemum/controller/wxmini/WXDianpingController.java
  8. 45 0
      src/main/java/com/ygj/yuemum/controller/wxmini/WXMMSearchAnswerController.java
  9. 50 0
      src/main/java/com/ygj/yuemum/controller/wxmini/WXMMSearchQuestionController.java
  10. 31 0
      src/main/java/com/ygj/yuemum/controller/wxmini/WXMMUserSearchController.java
  11. 24 0
      src/main/java/com/ygj/yuemum/controller/wxmini/WXMMUserSearchDetailController.java
  12. 22 21
      src/main/java/com/ygj/yuemum/controller/wxmini/WXMktInfoController.java
  13. 14 14
      src/main/java/com/ygj/yuemum/dao/global/PackageItemDao.java
  14. 1 1
      src/main/java/com/ygj/yuemum/dao/global/PackagesDao.java
  15. 43 39
      src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserDao.java
  16. 1 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXContentDao.java
  17. 1 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXContentTypeDao.java
  18. 24 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXMMSearchAnswerDao.java
  19. 21 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXMMSearchQuestionDao.java
  20. 18 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXMMUserSearchDao.java
  21. 17 0
      src/main/java/com/ygj/yuemum/dao/wxmini/WXMMUserSearchDetailDao.java
  22. 11 11
      src/main/java/com/ygj/yuemum/dao/wxmini/WXMktInfoDao.java
  23. 75 66
      src/main/java/com/ygj/yuemum/domain/global/PackageItem.java
  24. 9 0
      src/main/java/com/ygj/yuemum/domain/global/Packages.java
  25. 345 308
      src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUser.java
  26. 330 304
      src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUserInfo.java
  27. 103 103
      src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUser.java
  28. 288 261
      src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUserStock.java
  29. 193 166
      src/main/java/com/ygj/yuemum/domain/utils/AddMMInfo.java
  30. 11 0
      src/main/java/com/ygj/yuemum/domain/wxmini/WXDianPing.java
  31. 58 0
      src/main/java/com/ygj/yuemum/domain/wxmini/WXMMSearchAnswer.java
  32. 105 0
      src/main/java/com/ygj/yuemum/domain/wxmini/WXMMSearchQuestion.java
  33. 87 0
      src/main/java/com/ygj/yuemum/domain/wxmini/WXMMUserSearch.java
  34. 77 0
      src/main/java/com/ygj/yuemum/domain/wxmini/WXMMUserSearchDetail.java
  35. 147 130
      src/main/java/com/ygj/yuemum/domain/wxmini/WXUser.java
  36. 65 65
      src/main/java/com/ygj/yuemum/service/customer/CustomerBookingService.java
  37. 98 98
      src/main/java/com/ygj/yuemum/service/distributionchannel/MiniAppService.java
  38. 31 31
      src/main/java/com/ygj/yuemum/service/global/PackageItemService.java
  39. 2 2
      src/main/java/com/ygj/yuemum/service/global/PackagesService.java
  40. 20 4
      src/main/java/com/ygj/yuemum/service/global/WeChatInfoService.java
  41. 193 150
      src/main/java/com/ygj/yuemum/service/maternitymatron/JlServiceUserService.java
  42. 50 3
      src/main/java/com/ygj/yuemum/service/wxmini/WXContentService.java
  43. 4 0
      src/main/java/com/ygj/yuemum/service/wxmini/WXContentTypeService.java
  44. 14 1
      src/main/java/com/ygj/yuemum/service/wxmini/WXDianPingService.java
  45. 47 0
      src/main/java/com/ygj/yuemum/service/wxmini/WXMMSearchAnswerService.java
  46. 62 0
      src/main/java/com/ygj/yuemum/service/wxmini/WXMMSearchQuestionService.java
  47. 27 0
      src/main/java/com/ygj/yuemum/service/wxmini/WXMMUserSearchDetailService.java
  48. 44 0
      src/main/java/com/ygj/yuemum/service/wxmini/WXMMUserSearchService.java
  49. 21 21
      src/main/java/com/ygj/yuemum/service/wxmini/WXMktInfoService.java
  50. 7 0
      src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java
  51. 83 0
      src/main/java/com/ygj/yuemum/utils/DateUtil.java
  52. 64 64
      src/main/java/com/ygj/yuemum/utils/IDcard.java
  53. 22 13
      src/main/resources/application.yml
  54. 7 1
      src/main/resources/mybatis/mapper/customer/CustomerBookingMapper.xml
  55. 48 42
      src/main/resources/mybatis/mapper/global/PackageItemMapper.xml
  56. 3 3
      src/main/resources/mybatis/mapper/global/PackagesMapper.xml
  57. 408 378
      src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserInfoMapper.xml
  58. 903 683
      src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml
  59. 26 0
      src/main/resources/mybatis/mapper/wxmini/WXContentMapper.xml
  60. 9 0
      src/main/resources/mybatis/mapper/wxmini/WXContentTypeMapper.xml
  61. 108 0
      src/main/resources/mybatis/mapper/wxmini/WXMMSearchAnswerMapper.xml
  62. 121 0
      src/main/resources/mybatis/mapper/wxmini/WXMMSearchQuestionMapper.xml
  63. 85 0
      src/main/resources/mybatis/mapper/wxmini/WXMMUserSearchDetailMapper.xml
  64. 86 0
      src/main/resources/mybatis/mapper/wxmini/WXMMUserSearchMapper.xml
  65. 32 22
      src/main/resources/mybatis/mapper/wxmini/WXMktInfoMapper.xml
  66. 10 2
      src/main/resources/mybatis/mapper/wxmini/WXUserMapper.xml

+ 473 - 473
src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java

@@ -1,474 +1,474 @@
-package com.ygj.yuemum.controller.admin;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ygj.yuemum.component.Constant;
-import com.ygj.yuemum.domain.admin.Photo;
-import com.ygj.yuemum.domain.admin.Resume;
-import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
-import com.ygj.yuemum.domain.pay.CustomerPayVoucher;
-import com.ygj.yuemum.service.admin.PhotoService;
-import com.ygj.yuemum.service.admin.ResumeService;
-import com.ygj.yuemum.service.maternitymatron.JlServiceUserService;
-import com.ygj.yuemum.service.pay.CustomerPayVoucherService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.ResourceLoader;
-import org.springframework.util.ResourceUtils;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.*;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-
-@RestController
-public class ImageUploadController {
-    @Autowired
-    private PhotoService photoService;
-    @Autowired
-    private JlServiceUserService jlServiceUserService;
-    @Autowired
-    private ResumeService resumeService;
-    @Autowired
-    private CustomerPayVoucherService customerPayVoucherService;
-    private ResourceLoader resourceLoader;
-
-    public static final String ROOT = Constant.ROOT;
-    public static final String ResumeFile = Constant.RESUMEFILE;
-    public static final String httpRoot = Constant.HTTPROOT;
-    public static final String httphtmlRoot = Constant.HTTPHTMLROOT;
-    public static final String modulePath = Constant.MODULEPATH;
-    public static final String payvoucher = Constant.PAYVOUCHER;
-    public static final String httppayvoucher = Constant.HTTPPAYVOUCHER;
-    public static final String promotionvoucher = Constant.PROMOTIONVOUCHER;
-    public static final String httppromotionvoucher = Constant.HTTPPROMOTIONVOUCHER;
-
-    @RequestMapping(value = "/upload", method = RequestMethod.GET)
-    public String upload() {
-        return "/fileupload";
-    }
-
-    @RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
-    @ResponseBody
-    public int uploadImg(@RequestParam("file") MultipartFile file,
-                         @RequestParam(value = "id") Integer id,
-                         @RequestParam(value = "type") Integer type) {
-//       照片类型 1:display 2:certificate 3:comment 4:service 5:meal
-        String folder = "";
-        int dot = file.getOriginalFilename().lastIndexOf('.');
-        String newName = file.getOriginalFilename().substring(dot);
-        String path = ROOT + getpathtype(type) + "Img";
-        Photo photo = new Photo();
-        if (file.isEmpty()) {
-            return 0;
-        }
-        Date date = new Date();
-        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
-        File dest = new File(path + "/" + getpathtype(type) + id + type + sdf.format(date) + newName);
-
-        try {
-            file.transferTo(dest); //保存文件
-            photo.setServant_code(id);
-            photo.setPhoto_type(type);
-            photo.setPhoto_name(getpathtype(type) + id + type + sdf.format(date) + newName);
-            photo.setPhoto_path(httpRoot+ getpathtype(type) + "Img/"+dest.getName());
-            photoService.addPhoto(photo);
-            return 1;
-        } catch (IllegalStateException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-            return 0;
-        } catch (IOException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-            return 0;
-        }
-    }
-
-    @PostMapping("/deletePhoto")
-    public int deletePhoto(@ModelAttribute Photo photo) throws ParseException {
-        try {
-            String path = ROOT+ getpathtype(photo.getPhoto_type()) +"Img/"+ photo.getPhoto_name();
-            File dest = new File(path);
-            dest.delete();
-            return photoService.deletePhoto(photo);
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-    @PostMapping("/queryPhoto")
-    public String queryPhoto(@ModelAttribute Photo photo) throws ParseException {
-        List<Photo> photos= photoService.queryPhoto(photo);
-        String jso = JSONObject.toJSONString(photos);
-        jso = jso.replaceAll("photo_path","url");
-        jso = jso.replaceAll("servant_code","name");
-        return jso;
-    }
-
-
-    @PostMapping("/createResume")
-    public String createResume(@ModelAttribute Photo photo) {
-        String urlName = "";
-        try {
-            JlServiceUser jlServiceUser  = jlServiceUserService.getResume(photo.getServant_code());
-            urlName = String.valueOf(jlServiceUser.getId());
-            File file = ResourceUtils.getFile(modulePath);
-            BufferedReader br = new BufferedReader(new FileReader(file));
-            Resume resume =new Resume();
-            Resume resumeold = new Resume();
-            StringBuilder stringHtml = new StringBuilder();
-            String str = "";
-            String photoDisplay ="";
-            String certificate ="";
-            String certificatehref ="";
-            String service ="";
-            String servicehref ="";
-            String meal = "";
-            String mealhref = "";
-            String comment ="";
-            String littcomm = "";
-            if(photo.getComment() == null){
-                photo.setComment(" ");
-            }
-            List<Photo> photos = photoService.queryPhoto(photo);
-            if(photos.size() > 0 ) {
-                int stepcertificate = 0;
-                int stepservice = 0;
-                int stepmeal = 0;
-                String certificatestart = "<div class=\"resume-certificate-image\">"+ "\r\n"
-                        +"<span class=\"resume-item-title\">相关证件</span>"+ "\r\n"
-                        +"<div class=\"lb_gl_certificate\">"+ "\r\n"
-                        +"<div class=\"container\">"+ "\r\n"
-                        +"<div class=\"pictureSlider-certificate poster-main \">"+ "\r\n"
-                        +"<div class=\"left-modal modal-certificate\"></div>"+ "\r\n"
-                        +"<ul id=\"zturn-certificate\" class=\"poster-list\">"+ "\r\n"
-                        +"<div class=\"poster-btn poster-certificate-prev-btn certificate\"></div>"+ "\r\n";
-                String certificateend = "<div class=\"poster-btn poster-certificate-next-btn\"></div>"+ "\r\n"
-                        +"</ul>"+ "\r\n"
-                        +"<div class=\"right-modal modal-certificate\"></div>"+ "\r\n"
-                        +"<div class=\"indicator-list indicator-list-cer\">"+ "\r\n"
-                        +"$cfstyle"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n";
-                String mealstart = "<div class=\"resume-service-image\">"+ "\r\n"
-                        +"<span class=\"resume-item-title\">月子餐照片</span>"+ "\r\n"
-                        +"<div class=\"lb_gl\">"+ "\r\n"
-                        +"<div class=\"container\">"+ "\r\n"
-                        +"<div class=\"pictureSlider poster-main poster-main-yzfood\">"+ "\r\n"
-                        +"<div class=\"left-modal\"></div>"+ "\r\n"
-                        +"<ul id=\"yzfood\" class=\"poster-list\">"+ "\r\n"
-                        +"<div class=\"poster-btn poster-prev-btn poster-prev-btn-yzfood\"></div>"+ "\r\n";
-                String mealend = "<div class=\"poster-btn poster-next-btn poster-next-btn-yzfood\"></div>"+ "\r\n"
-                        +"</ul>"+ "\r\n"
-                        +"<div class=\"right-modal\"></div>"+ "\r\n"
-                        +"<div class=\"indicator-list indicator-list-service\">"+ "\r\n"
-                        +"$smstyle"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n";
-                String commentstart = "<div class=\"resume-comments\">" + "\r\n"
-                        + "<span class=\"resume-item-title\">最新评论</span>" + "\r\n"
-                        + "<div class=\"resume-comments-div\" id=\"resume-comments\">" + "\r\n"
-                        + "<div class=\"box_4\" id=\"box-comments\">" + "\r\n"
-                        + "<div class=\"roll\" id=\"roll\">" + "\r\n"
-                        + "<div class=\"roll_list\">" + "\r\n"
-                        + "<div class=\"ul_box\" id=\"ul_box\">" + "\r\n";
-                String commentend = "</div>"
-                        + "<div class=\"ul_box\" id=\"ul_box2\"></div>"
-                        + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>";
-                String servicestart = "<div class=\"resume-service-image\">"+ "\r\n"
-                        +"<span class=\"resume-item-title\">服务照片</span>"+ "\r\n"
-                        +"<div class=\"left-modal\" id=\"left-modal-service\"></div>"+ "\r\n"
-                        +"<div class=\"lb_gl\">"+ "\r\n"
-                        +"<div class=\"container\">"+ "\r\n"
-                        +"<div class=\"pictureSlider poster-main poster-main-services\">"+ "\r\n"
-                        +"<ul id=\"zturn\" class=\"poster-list\">"+ "\r\n"
-                        +"<div class=\"poster-btn poster-prev-btn poster-prev-btn-service\"></div>"+ "\r\n";
-                String serviceend = "<div class=\"poster-btn poster-next-btn poster-next-btn-service\"></div>"+ "\r\n"
-                        +"</ul>"+ "\r\n"
-                        +"<div class=\"right-modal\"></div>"+ "\r\n"
-                        +"<div class=\"indicator-list indicator-list-service\">"+ "\r\n"
-                        +"$scstyle"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n"
-                        +"</div>"+ "\r\n";
-
-                for (Photo onePhoto : photos) {
-                    if (onePhoto.getPhoto_type() == 1) {
-                        if (onePhoto.getPhoto_path() != null) {
-                            photoDisplay = "<image class=\"resume-header-left-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n";
-                        }
-                    }
-                    if (onePhoto.getPhoto_type() == 2) {
-                        if (onePhoto.getPhoto_path() != null) {
-                            certificate = certificate + "<li class=\"poster-item zturn-item\">" + "\r\n"
-                                    + "<image class=\"zturn-item-image-cer\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
-                                    + "</li>" + "\r\n";
-                            if (stepcertificate == 0) {
-                                certificatehref = certificatehref + "<a href=\"javascript:void(0);\" value='" + stepcertificate + "' class=\"indicator-list-item selected\"></a>" + "\r\n";
-                            } else {
-                                certificatehref = certificatehref + "<a href=\"javascript:void(0);\" value='" + stepcertificate + "' class=\"indicator-list-item \"></a>" + "\r\n";
-                            }
-                            stepcertificate++;
-                        }
-                    }
-                    if (onePhoto.getPhoto_type() == 4) {
-                        if (onePhoto.getPhoto_path() != null) {
-                            service = service + "<li class=\"poster-item zturn-item\">" + "\r\n"
-                                    + "<image class=\"zturn-item-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
-                                    + "</li>" + "\r\n";
-                            if (stepservice == 0) {
-                                servicehref = servicehref + " <a href=\"javascript:void(0);\" value='" + stepservice + "' class=\"indicator-list-item-service selected\"></a>" + "\r\n";
-                            } else {
-                                servicehref = servicehref + " <a href=\"javascript:void(0);\" value='" + stepservice + "' class=\"indicator-list-item-service\"></a>" + "\r\n";
-                            }
-                            stepservice++;
-                        }
-                    }
-                    if (onePhoto.getPhoto_type() == 5) {
-                        if (onePhoto.getPhoto_path() != null) {
-                            meal = meal + "<li class=\"poster-item zturn-item\">" + "\r\n"
-                                    + "<image class=\"zturn-item-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
-                                    + "</li>" + "\r\n";
-                            if (stepmeal == 0) {
-                                mealhref = mealhref + " <a href=\"javascript:void(0);\" value='" + stepmeal + "' class=\"indicator-list-item-yzfood selected\"></a>" + "\r\n";
-                            } else {
-                                mealhref = mealhref + " <a href=\"javascript:void(0);\" value='" + stepmeal + "' class=\"indicator-list-item-yzfood\"></a>" + "\r\n";
-                            }
-                            stepmeal++;
-                        }
-                    }
-                    if (onePhoto.getPhoto_type() == 3) {
-                        comment = comment + "<a href=\"\"><img src='" + onePhoto.getPhoto_path() + "'/></a>" + "\r\n";
-                        littcomm = littcomm + "<image class=\"resume-comments-list\" src=\"" + onePhoto.getPhoto_path() + "\"/>";
-                    }
-                }
-                if (comment != "") {
-                    comment = commentstart + comment + commentend;
-                }
-                if (meal != "") {
-                    meal = mealstart + meal + mealend;
-                }
-                if (service != "") {
-                    service = servicestart + service + serviceend;
-                }
-                if (certificate != "") {
-                    certificate = certificatestart + certificate + certificateend;
-                }
-            }
-            while((str = br.readLine())!=null){
-                str = str.replace("$name",jlServiceUser.getTruename());
-                str = str.replace("$np",jlServiceUser.getNp());
-                str = str.replace("$age",jlServiceUser.getAge()+"岁");
-                str = str.replace("$ethnicgroup",jlServiceUser.getEthnicgroup());
-                str = str.replace("$constellation",jlServiceUser.getConstellation());
-                str = str.replace("$seniority",jlServiceUser.getSeniority());
-                str = str.replace("$babynumber",jlServiceUser.getBabynumber());
-                str = str.replace("$education",jlServiceUser.getEducation());
-                str = str.replace("$weight",jlServiceUser.getWeight());
-                str = str.replace("$marriage",jlServiceUser.getMarriage());
-                str = str.replace("$highlight",jlServiceUser.getHighlight());
-                str = str.replace("$resumecomment",photo.getComment());
-                str = str.replace("$zodiac","属"+jlServiceUser.getZodiac());
-                str = str.replace("$height",jlServiceUser.getHeight());
-                str = str.replace("$starts",jlServiceUser.getGender());
-                str = str.replace("$display",photoDisplay);
-                str = str.replace("$credentials",certificate);
-                str = str.replace("$cfstyle",certificatehref);
-                str = str.replace("$service",service);
-                str = str.replace("$scstyle",servicehref);
-                str = str.replace("$meal",meal);
-                str = str.replace("$smstyle",mealhref);
-                str = str.replace("$comment",comment);
-                str = str.replace("$littcomm",littcomm);
-                str = str.replace("$ystitle","悦所-月嫂简历:"+jlServiceUser.getTruename());
-                str = str.replace("$yuesaohref",httphtmlRoot+ urlName + ".html");
-                stringHtml.append(str+"\r\n");
-            }
-            resumeold = resumeService.getResume(photo.getServant_code());
-            if(resumeold != null) {
-                resumeService.deleteResume(resumeold.getId());
-                File fileDel = new File(resumeold.getRqcode_path());
-                if (file.exists()) {
-                    fileDel.delete();
-                }
-            }
-            resume.setServant_code(photo.getServant_code());
-            resume.setResume_comment(photo.getComment());
-            resume.setResume_path(httphtmlRoot+ urlName + ".html");
-            resume.setRqcode_path(ResumeFile+urlName + ".html");
-            resumeService.addResume(resume);
-            File newResume = new File(ResumeFile + urlName + ".html");
-            FileWriter fileWriter = new FileWriter(newResume);
-            fileWriter.write(stringHtml.toString());
-            fileWriter.close();
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return "error";
-        }
-        return httphtmlRoot+urlName+".html";
-    }
-    public String getpathtype(int type){
-        switch (type) {
-            case 1:
-               return "display";
-            case 2:
-                return "certificate";
-            case 3:
-                return  "comment";
-            case 4:
-                return "service";
-            case 5:
-                return "meal";
-        }
-        return "error";
-    }
-    @GetMapping("/reBulidResume")
-    public int reBulidResume(@RequestParam("servant_code") String servant_code) {
-        return photoService.reBuildResume(servant_code);
-    }
-
-    @RequestMapping(value = "/uploadPayImg", method = RequestMethod.POST)
-    @ResponseBody
-    public int uploadPayImg(@RequestParam("file") MultipartFile file,
-                            @RequestParam(value = "eh_code") String eh_code,
-                            @RequestParam(value = "cv_orderstaus") Integer cv_orderstaus) {
-        int dot = file.getOriginalFilename().lastIndexOf('.');
-        String newName = file.getOriginalFilename().substring(dot);
-        CustomerPayVoucher customerPayVoucher  = new CustomerPayVoucher();
-        if (file.isEmpty()) {
-            return 0;
-        }
-        Date date = new Date();
-        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
-        File dest = new File(payvoucher + "/" + eh_code + sdf.format(date) +newName);
-        // 删除
-        try {
-            file.transferTo(dest); //保存文件
-            customerPayVoucher.setEh_code(eh_code);
-            customerPayVoucher.setCv_filename(eh_code + sdf.format(date) +newName);
-            customerPayVoucher.setCv_orderstaus(cv_orderstaus);
-            customerPayVoucher.setCv_filepath(httppayvoucher + "/"+ eh_code + sdf.format(date) +newName);
-            customerPayVoucherService.insertCustomerPayVoucher(customerPayVoucher);
-            return 1;
-        } catch (IllegalStateException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-            return 0;
-        } catch (IOException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-            return 0;
-        }
-    }
-    @GetMapping("/deletePayPhoto")
-    public int deletePayPhoto(@RequestParam("cv_filename") String cv_filename) throws ParseException {
-        try {
-            String path = payvoucher + "/"+ cv_filename;
-            File dest = new File(path);
-            dest.delete();
-            return customerPayVoucherService.deleteCustomerPayVoucher(cv_filename);
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-
-    @GetMapping("/deleteCustomerPayVoucherAll")
-    public int deleteCustomerPayVoucherAll(@RequestParam("eh_code") String eh_code) throws ParseException {
-        try {
-            List<CustomerPayVoucher> customerPays= customerPayVoucherService.selectCustomerPayVoucher(eh_code);
-            for(CustomerPayVoucher cpv:customerPays){
-                String path =  payvoucher + "/"+ cpv.getCv_filename();
-                File dest = new File(path);
-                dest.delete();
-            }
-            return customerPayVoucherService.deleteCustomerPayVoucherAll(eh_code);
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-
-    @GetMapping ("/queryPayPhoto")
-    public String queryPayPhoto(@RequestParam("eh_code") String eh_code) throws ParseException {
-        List<CustomerPayVoucher> customerPays= customerPayVoucherService.selectCustomerPayVoucher(eh_code);
-        String jso = JSONObject.toJSONString(customerPays);
-        jso = jso.replaceAll("cv_filepath","url");
-        jso = jso.replaceAll("cv_filename","name");
-        return jso;
-    }
-
-
-    @PostMapping ("/queryOrderPayPhoto")
-    public String queryOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
-        List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
-        String jso = JSONObject.toJSONString(customerPays);
-        jso = jso.replaceAll("cv_filepath","url");
-        jso = jso.replaceAll("cv_filename","name");
-        return jso;
-    }
-
-    @PostMapping("/deleteOrderPayPhoto")
-    public int deleteOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
-        try {
-            List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
-            for(CustomerPayVoucher cpv:customerPays){
-                String path =  payvoucher + "/"+ cpv.getCv_filename();
-                File dest = new File(path);
-                dest.delete();
-            }
-            return customerPayVoucherService.deleteOrderPayPhoto(customerPayVoucher);
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-
-    @RequestMapping(value = "/uploadPromotionImg", method = RequestMethod.POST)
-    @ResponseBody
-    public String uploadPromotionImg(@RequestParam(value = "file", required = false) MultipartFile file) {
-        int dot = file.getOriginalFilename().lastIndexOf('.');
-        String newName = file.getOriginalFilename().substring(dot);
-        if (file.isEmpty()) {
-            return "";
-        }
-        Date date = new Date();
-        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
-        String fileUrl = promotionvoucher + "/"  + sdf.format(date) +newName;
-        String httpfileUrl = httppromotionvoucher + "/"  + sdf.format(date) +newName;
-        File dest = new File(fileUrl);
-        // 删除
-        try {
-            file.transferTo(dest); //保存文件
-            return httpfileUrl;
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            return "";
-        }
-    }
-    @GetMapping("/deletePromotionImg")
-    public int deletePromotionImg(@RequestParam("cv_filename") String cv_filename) throws ParseException {
-        try {
-            String path = promotionvoucher + "/"+ cv_filename;
-            File dest = new File(path);
-            dest.delete();
-            return 1 ;
-        } catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-
+package com.ygj.yuemum.controller.admin;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.domain.admin.Photo;
+import com.ygj.yuemum.domain.admin.Resume;
+import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.pay.CustomerPayVoucher;
+import com.ygj.yuemum.service.admin.PhotoService;
+import com.ygj.yuemum.service.admin.ResumeService;
+import com.ygj.yuemum.service.maternitymatron.JlServiceUserService;
+import com.ygj.yuemum.service.pay.CustomerPayVoucherService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.util.ResourceUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+
+@RestController
+public class ImageUploadController {
+    @Autowired
+    private PhotoService photoService;
+    @Autowired
+    private JlServiceUserService jlServiceUserService;
+    @Autowired
+    private ResumeService resumeService;
+    @Autowired
+    private CustomerPayVoucherService customerPayVoucherService;
+    private ResourceLoader resourceLoader;
+
+    public static final String ROOT = Constant.ROOT;
+    public static final String ResumeFile = Constant.RESUMEFILE;
+    public static final String httpRoot = Constant.HTTPROOT;
+    public static final String httphtmlRoot = Constant.HTTPHTMLROOT;
+    public static final String modulePath = Constant.MODULEPATH;
+    public static final String payvoucher = Constant.PAYVOUCHER;
+    public static final String httppayvoucher = Constant.HTTPPAYVOUCHER;
+    public static final String promotionvoucher = Constant.PROMOTIONVOUCHER;
+    public static final String httppromotionvoucher = Constant.HTTPPROMOTIONVOUCHER;
+
+    @RequestMapping(value = "/upload", method = RequestMethod.GET)
+    public String upload() {
+        return "/fileupload";
+    }
+
+    @RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
+    @ResponseBody
+    public int uploadImg(@RequestParam("file") MultipartFile file,
+                         @RequestParam(value = "id") Integer id,
+                         @RequestParam(value = "type") Integer type) {
+//       照片类型 1:display 2:certificate 3:comment 4:service 5:meal
+        String folder = "";
+        int dot = file.getOriginalFilename().lastIndexOf('.');
+        String newName = file.getOriginalFilename().substring(dot);
+        String path = ROOT + getpathtype(type) + "Img";
+        Photo photo = new Photo();
+        if (file.isEmpty()) {
+            return 0;
+        }
+        Date date = new Date();
+        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        File dest = new File(path + "/" + getpathtype(type) + id + type + sdf.format(date) + newName);
+
+        try {
+            file.transferTo(dest); //保存文件
+            photo.setServant_code(id);
+            photo.setPhoto_type(type);
+            photo.setPhoto_name(getpathtype(type) + id + type + sdf.format(date) + newName);
+            photo.setPhoto_path(httpRoot+ getpathtype(type) + "Img/"+dest.getName());
+            photoService.addPhoto(photo);
+            return 1;
+        } catch (IllegalStateException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return 0;
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @PostMapping("/deletePhoto")
+    public int deletePhoto(@ModelAttribute Photo photo) throws ParseException {
+        try {
+            String path = ROOT+ getpathtype(photo.getPhoto_type()) +"Img/"+ photo.getPhoto_name();
+            File dest = new File(path);
+            dest.delete();
+            return photoService.deletePhoto(photo);
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+    @PostMapping("/queryPhoto")
+    public String queryPhoto(@ModelAttribute Photo photo) throws ParseException {
+        List<Photo> photos= photoService.queryPhoto(photo);
+        String jso = JSONObject.toJSONString(photos);
+        jso = jso.replaceAll("photo_path","url");
+        jso = jso.replaceAll("servant_code","name");
+        return jso;
+    }
+
+
+    @PostMapping("/createResume")
+    public String createResume(@ModelAttribute Photo photo) {
+        String urlName = "";
+        try {
+            JlServiceUser jlServiceUser  = jlServiceUserService.getResume(photo.getServant_code());
+            urlName = String.valueOf(jlServiceUser.getId());
+            File file = ResourceUtils.getFile(modulePath);
+            BufferedReader br = new BufferedReader(new FileReader(file));
+            Resume resume =new Resume();
+            Resume resumeold = new Resume();
+            StringBuilder stringHtml = new StringBuilder();
+            String str = "";
+            String photoDisplay ="";
+            String certificate ="";
+            String certificatehref ="";
+            String service ="";
+            String servicehref ="";
+            String meal = "";
+            String mealhref = "";
+            String comment ="";
+            String littcomm = "";
+            if(photo.getComment() == null){
+                photo.setComment(" ");
+            }
+            List<Photo> photos = photoService.queryPhoto(photo);
+            if(photos.size() > 0 ) {
+                int stepcertificate = 0;
+                int stepservice = 0;
+                int stepmeal = 0;
+                String certificatestart = "<div class=\"resume-certificate-image\">"+ "\r\n"
+                        +"<span class=\"resume-item-title\">相关证件</span>"+ "\r\n"
+                        +"<div class=\"lb_gl_certificate\">"+ "\r\n"
+                        +"<div class=\"container\">"+ "\r\n"
+                        +"<div class=\"pictureSlider-certificate poster-main \">"+ "\r\n"
+                        +"<div class=\"left-modal modal-certificate\"></div>"+ "\r\n"
+                        +"<ul id=\"zturn-certificate\" class=\"poster-list\">"+ "\r\n"
+                        +"<div class=\"poster-btn poster-certificate-prev-btn certificate\"></div>"+ "\r\n";
+                String certificateend = "<div class=\"poster-btn poster-certificate-next-btn\"></div>"+ "\r\n"
+                        +"</ul>"+ "\r\n"
+                        +"<div class=\"right-modal modal-certificate\"></div>"+ "\r\n"
+                        +"<div class=\"indicator-list indicator-list-cer\">"+ "\r\n"
+                        +"$cfstyle"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n";
+                String mealstart = "<div class=\"resume-service-image\">"+ "\r\n"
+                        +"<span class=\"resume-item-title\">月子餐照片</span>"+ "\r\n"
+                        +"<div class=\"lb_gl\">"+ "\r\n"
+                        +"<div class=\"container\">"+ "\r\n"
+                        +"<div class=\"pictureSlider poster-main poster-main-yzfood\">"+ "\r\n"
+                        +"<div class=\"left-modal\"></div>"+ "\r\n"
+                        +"<ul id=\"yzfood\" class=\"poster-list\">"+ "\r\n"
+                        +"<div class=\"poster-btn poster-prev-btn poster-prev-btn-yzfood\"></div>"+ "\r\n";
+                String mealend = "<div class=\"poster-btn poster-next-btn poster-next-btn-yzfood\"></div>"+ "\r\n"
+                        +"</ul>"+ "\r\n"
+                        +"<div class=\"right-modal\"></div>"+ "\r\n"
+                        +"<div class=\"indicator-list indicator-list-service\">"+ "\r\n"
+                        +"$smstyle"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n";
+                String commentstart = "<div class=\"resume-comments\">" + "\r\n"
+                        + "<span class=\"resume-item-title\">最新评论</span>" + "\r\n"
+                        + "<div class=\"resume-comments-div\" id=\"resume-comments\">" + "\r\n"
+                        + "<div class=\"box_4\" id=\"box-comments\">" + "\r\n"
+                        + "<div class=\"roll\" id=\"roll\">" + "\r\n"
+                        + "<div class=\"roll_list\">" + "\r\n"
+                        + "<div class=\"ul_box\" id=\"ul_box\">" + "\r\n";
+                String commentend = "</div>"
+                        + "<div class=\"ul_box\" id=\"ul_box2\"></div>"
+                        + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>" + "\r\n" + "</div>";
+                String servicestart = "<div class=\"resume-service-image\">"+ "\r\n"
+                        +"<span class=\"resume-item-title\">服务照片</span>"+ "\r\n"
+                        +"<div class=\"left-modal\" id=\"left-modal-service\"></div>"+ "\r\n"
+                        +"<div class=\"lb_gl\">"+ "\r\n"
+                        +"<div class=\"container\">"+ "\r\n"
+                        +"<div class=\"pictureSlider poster-main poster-main-services\">"+ "\r\n"
+                        +"<ul id=\"zturn\" class=\"poster-list\">"+ "\r\n"
+                        +"<div class=\"poster-btn poster-prev-btn poster-prev-btn-service\"></div>"+ "\r\n";
+                String serviceend = "<div class=\"poster-btn poster-next-btn poster-next-btn-service\"></div>"+ "\r\n"
+                        +"</ul>"+ "\r\n"
+                        +"<div class=\"right-modal\"></div>"+ "\r\n"
+                        +"<div class=\"indicator-list indicator-list-service\">"+ "\r\n"
+                        +"$scstyle"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n"
+                        +"</div>"+ "\r\n";
+
+                for (Photo onePhoto : photos) {
+                    if (onePhoto.getPhoto_type() == 1) {
+                        if (onePhoto.getPhoto_path() != null) {
+                            photoDisplay = "<image class=\"resume-header-left-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n";
+                        }
+                    }
+                    if (onePhoto.getPhoto_type() == 2) {
+                        if (onePhoto.getPhoto_path() != null) {
+                            certificate = certificate + "<li class=\"poster-item zturn-item\">" + "\r\n"
+                                    + "<image class=\"zturn-item-image-cer\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
+                                    + "</li>" + "\r\n";
+                            if (stepcertificate == 0) {
+                                certificatehref = certificatehref + "<a href=\"javascript:void(0);\" value='" + stepcertificate + "' class=\"indicator-list-item selected\"></a>" + "\r\n";
+                            } else {
+                                certificatehref = certificatehref + "<a href=\"javascript:void(0);\" value='" + stepcertificate + "' class=\"indicator-list-item \"></a>" + "\r\n";
+                            }
+                            stepcertificate++;
+                        }
+                    }
+                    if (onePhoto.getPhoto_type() == 4) {
+                        if (onePhoto.getPhoto_path() != null) {
+                            service = service + "<li class=\"poster-item zturn-item\">" + "\r\n"
+                                    + "<image class=\"zturn-item-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
+                                    + "</li>" + "\r\n";
+                            if (stepservice == 0) {
+                                servicehref = servicehref + " <a href=\"javascript:void(0);\" value='" + stepservice + "' class=\"indicator-list-item-service selected\"></a>" + "\r\n";
+                            } else {
+                                servicehref = servicehref + " <a href=\"javascript:void(0);\" value='" + stepservice + "' class=\"indicator-list-item-service\"></a>" + "\r\n";
+                            }
+                            stepservice++;
+                        }
+                    }
+                    if (onePhoto.getPhoto_type() == 5) {
+                        if (onePhoto.getPhoto_path() != null) {
+                            meal = meal + "<li class=\"poster-item zturn-item\">" + "\r\n"
+                                    + "<image class=\"zturn-item-image\" src='" + onePhoto.getPhoto_path() + "'></image>" + "\r\n"
+                                    + "</li>" + "\r\n";
+                            if (stepmeal == 0) {
+                                mealhref = mealhref + " <a href=\"javascript:void(0);\" value='" + stepmeal + "' class=\"indicator-list-item-yzfood selected\"></a>" + "\r\n";
+                            } else {
+                                mealhref = mealhref + " <a href=\"javascript:void(0);\" value='" + stepmeal + "' class=\"indicator-list-item-yzfood\"></a>" + "\r\n";
+                            }
+                            stepmeal++;
+                        }
+                    }
+                    if (onePhoto.getPhoto_type() == 3) {
+                        comment = comment + "<a href=\"\"><img src='" + onePhoto.getPhoto_path() + "'/></a>" + "\r\n";
+                        littcomm = littcomm + "<image class=\"resume-comments-list\" src=\"" + onePhoto.getPhoto_path() + "\"/>";
+                    }
+                }
+                if (comment != "") {
+                    comment = commentstart + comment + commentend;
+                }
+                if (meal != "") {
+                    meal = mealstart + meal + mealend;
+                }
+                if (service != "") {
+                    service = servicestart + service + serviceend;
+                }
+                if (certificate != "") {
+                    certificate = certificatestart + certificate + certificateend;
+                }
+            }
+            while((str = br.readLine())!=null){
+                str = str.replace("$name",jlServiceUser.getTruename());
+                str = str.replace("$np",jlServiceUser.getNp());
+                str = str.replace("$age",jlServiceUser.getAge()+"岁");
+                str = str.replace("$ethnicgroup",jlServiceUser.getEthnicgroup());
+                str = str.replace("$constellation",jlServiceUser.getConstellation());
+                str = str.replace("$seniority",jlServiceUser.getSeniority());
+                str = str.replace("$babynumber",jlServiceUser.getBabynumber());
+                str = str.replace("$education",jlServiceUser.getEducation());
+                str = str.replace("$weight",jlServiceUser.getWeight());
+                str = str.replace("$marriage",jlServiceUser.getMarriage());
+                str = str.replace("$highlight",jlServiceUser.getHighlight());
+                str = str.replace("$resumecomment",photo.getComment());
+                str = str.replace("$zodiac","属"+jlServiceUser.getZodiac());
+                str = str.replace("$height",jlServiceUser.getHeight());
+                str = str.replace("$starts",String.valueOf(jlServiceUser.getGender()));
+                str = str.replace("$display",photoDisplay);
+                str = str.replace("$credentials",certificate);
+                str = str.replace("$cfstyle",certificatehref);
+                str = str.replace("$service",service);
+                str = str.replace("$scstyle",servicehref);
+                str = str.replace("$meal",meal);
+                str = str.replace("$smstyle",mealhref);
+                str = str.replace("$comment",comment);
+                str = str.replace("$littcomm",littcomm);
+                str = str.replace("$ystitle","悦所-月嫂简历:"+jlServiceUser.getTruename());
+                str = str.replace("$yuesaohref",httphtmlRoot+ urlName + ".html");
+                stringHtml.append(str+"\r\n");
+            }
+            resumeold = resumeService.getResume(photo.getServant_code());
+            if(resumeold != null) {
+                resumeService.deleteResume(resumeold.getId());
+                File fileDel = new File(resumeold.getRqcode_path());
+                if (file.exists()) {
+                    fileDel.delete();
+                }
+            }
+            resume.setServant_code(photo.getServant_code());
+            resume.setResume_comment(photo.getComment());
+            resume.setResume_path(httphtmlRoot+ urlName + ".html");
+            resume.setRqcode_path(ResumeFile+urlName + ".html");
+            resumeService.addResume(resume);
+            File newResume = new File(ResumeFile + urlName + ".html");
+            FileWriter fileWriter = new FileWriter(newResume);
+            fileWriter.write(stringHtml.toString());
+            fileWriter.close();
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return "error";
+        }
+        return httphtmlRoot+urlName+".html";
+    }
+    public String getpathtype(int type){
+        switch (type) {
+            case 1:
+               return "display";
+            case 2:
+                return "certificate";
+            case 3:
+                return  "comment";
+            case 4:
+                return "service";
+            case 5:
+                return "meal";
+        }
+        return "error";
+    }
+    @GetMapping("/reBulidResume")
+    public int reBulidResume(@RequestParam("servant_code") String servant_code) {
+        return photoService.reBuildResume(servant_code);
+    }
+
+    @RequestMapping(value = "/uploadPayImg", method = RequestMethod.POST)
+    @ResponseBody
+    public int uploadPayImg(@RequestParam("file") MultipartFile file,
+                            @RequestParam(value = "eh_code") String eh_code,
+                            @RequestParam(value = "cv_orderstaus") Integer cv_orderstaus) {
+        int dot = file.getOriginalFilename().lastIndexOf('.');
+        String newName = file.getOriginalFilename().substring(dot);
+        CustomerPayVoucher customerPayVoucher  = new CustomerPayVoucher();
+        if (file.isEmpty()) {
+            return 0;
+        }
+        Date date = new Date();
+        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        File dest = new File(payvoucher + "/" + eh_code + sdf.format(date) +newName);
+        // 删除
+        try {
+            file.transferTo(dest); //保存文件
+            customerPayVoucher.setEh_code(eh_code);
+            customerPayVoucher.setCv_filename(eh_code + sdf.format(date) +newName);
+            customerPayVoucher.setCv_orderstaus(cv_orderstaus);
+            customerPayVoucher.setCv_filepath(httppayvoucher + "/"+ eh_code + sdf.format(date) +newName);
+            customerPayVoucherService.insertCustomerPayVoucher(customerPayVoucher);
+            return 1;
+        } catch (IllegalStateException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return 0;
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return 0;
+        }
+    }
+    @GetMapping("/deletePayPhoto")
+    public int deletePayPhoto(@RequestParam("cv_filename") String cv_filename) throws ParseException {
+        try {
+            String path = payvoucher + "/"+ cv_filename;
+            File dest = new File(path);
+            dest.delete();
+            return customerPayVoucherService.deleteCustomerPayVoucher(cv_filename);
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
+    @GetMapping("/deleteCustomerPayVoucherAll")
+    public int deleteCustomerPayVoucherAll(@RequestParam("eh_code") String eh_code) throws ParseException {
+        try {
+            List<CustomerPayVoucher> customerPays= customerPayVoucherService.selectCustomerPayVoucher(eh_code);
+            for(CustomerPayVoucher cpv:customerPays){
+                String path =  payvoucher + "/"+ cpv.getCv_filename();
+                File dest = new File(path);
+                dest.delete();
+            }
+            return customerPayVoucherService.deleteCustomerPayVoucherAll(eh_code);
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
+    @GetMapping ("/queryPayPhoto")
+    public String queryPayPhoto(@RequestParam("eh_code") String eh_code) throws ParseException {
+        List<CustomerPayVoucher> customerPays= customerPayVoucherService.selectCustomerPayVoucher(eh_code);
+        String jso = JSONObject.toJSONString(customerPays);
+        jso = jso.replaceAll("cv_filepath","url");
+        jso = jso.replaceAll("cv_filename","name");
+        return jso;
+    }
+
+
+    @PostMapping ("/queryOrderPayPhoto")
+    public String queryOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
+        List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
+        String jso = JSONObject.toJSONString(customerPays);
+        jso = jso.replaceAll("cv_filepath","url");
+        jso = jso.replaceAll("cv_filename","name");
+        return jso;
+    }
+
+    @PostMapping("/deleteOrderPayPhoto")
+    public int deleteOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
+        try {
+            List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
+            for(CustomerPayVoucher cpv:customerPays){
+                String path =  payvoucher + "/"+ cpv.getCv_filename();
+                File dest = new File(path);
+                dest.delete();
+            }
+            return customerPayVoucherService.deleteOrderPayPhoto(customerPayVoucher);
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
+    @RequestMapping(value = "/uploadPromotionImg", method = RequestMethod.POST)
+    @ResponseBody
+    public String uploadPromotionImg(@RequestParam(value = "file", required = false) MultipartFile file) {
+        int dot = file.getOriginalFilename().lastIndexOf('.');
+        String newName = file.getOriginalFilename().substring(dot);
+        if (file.isEmpty()) {
+            return "";
+        }
+        Date date = new Date();
+        DateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        String fileUrl = promotionvoucher + "/"  + sdf.format(date) +newName;
+        String httpfileUrl = httppromotionvoucher + "/"  + sdf.format(date) +newName;
+        File dest = new File(fileUrl);
+        // 删除
+        try {
+            file.transferTo(dest); //保存文件
+            return httpfileUrl;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return "";
+        }
+    }
+    @GetMapping("/deletePromotionImg")
+    public int deletePromotionImg(@RequestParam("cv_filename") String cv_filename) throws ParseException {
+        try {
+            String path = promotionvoucher + "/"+ cv_filename;
+            File dest = new File(path);
+            dest.delete();
+            return 1 ;
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
 }

+ 38 - 37
src/main/java/com/ygj/yuemum/controller/global/PackageItemController.java

@@ -1,38 +1,39 @@
-package com.ygj.yuemum.controller.global;
-
-
-import com.ygj.yuemum.domain.global.PackageItem;
-import com.ygj.yuemum.service.global.PackageItemService;
-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 PackageItemController {
-
-    @Autowired
-    private PackageItemService packageItemService;
-    @GetMapping("/getPackageItems")
-    public List<PackageItem> getPackageSelect() {
-        List<PackageItem> packageItems = packageItemService.getPackageItems();
-        return packageItems;
-    }
-    @GetMapping("/getPIGroups")
-    public List<PackageItem> getPIGroups() {
-        List<PackageItem> packageItems = packageItemService.getPIGroups();
-        return packageItems;
-    }
-    @GetMapping("/getPIClasses")
-    public List<PackageItem> getPIClasses() {
-        List<PackageItem> packageItems = packageItemService.getPIClasses();
-        return packageItems;
-    }
-    @GetMapping("/getPIServices")
-    public List<PackageItem> getPIServices() {
-        List<PackageItem> packageItems = packageItemService.getPIServices();
-        return packageItems;
-    }
-
+package com.ygj.yuemum.controller.global;
+
+
+import com.ygj.yuemum.domain.global.PackageItem;
+import com.ygj.yuemum.service.global.PackageItemService;
+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 PackageItemController {
+
+    @Autowired
+    private PackageItemService packageItemService;
+    @GetMapping("/getPackageItems")
+    public List<PackageItem> getPackageSelect() {
+        List<PackageItem> packageItems = packageItemService.getPackageItems();
+        return packageItems;
+    }
+    @GetMapping("/getPIGroups")
+    public List<PackageItem> getPIGroups(@RequestParam("p_branches") String p_branches) {
+        List<PackageItem> packageItems = packageItemService.getPIGroups(p_branches);
+        return packageItems;
+    }
+    @GetMapping("/getPIClasses")
+    public List<PackageItem> getPIClasses(@RequestParam("p_branches") String p_branches) {
+        List<PackageItem> packageItems = packageItemService.getPIClasses(p_branches);
+        return packageItems;
+    }
+    @GetMapping("/getPIServices")
+    public List<PackageItem> getPIServices(@RequestParam("p_branches") String p_branches) {
+        List<PackageItem> packageItems = packageItemService.getPIServices(p_branches);
+        return packageItems;
+    }
+
 }

+ 46 - 46
src/main/java/com/ygj/yuemum/controller/global/PackagesController.java

@@ -1,47 +1,47 @@
-package com.ygj.yuemum.controller.global;
-
-
-import com.ygj.yuemum.domain.global.Packages;
-import com.ygj.yuemum.service.global.PackagesService;
-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 PackagesController {
-
-    @Autowired
-    private PackagesService packagesService;
-    @GetMapping("/getPackageSelect")
-    public List<Packages> getPackageSelect() {
-        List<Packages> packages = packagesService.getPackageSelect();
-        return packages;
-    }
-
-    @GetMapping("/getPackageAll")
-    public List<Packages> getPackageAll() {
-        List<Packages> packages = packagesService.getPackageAll();
-        return packages;
-    }
-
-    @GetMapping("/getPackageShowname")
-    public List<Packages> getPackageShowname() {
-        List<Packages> packages = packagesService.getPackageShowname();
-        return packages;
-    }
-    @GetMapping("/getPackageLists")
-    public List<Packages> getPackageLists() {
-        List<Packages> packages = packagesService.getPackageLists();
-        return packages;
-    }
-    @GetMapping("/getPackageDetail")
-    public Packages getPackageDetail(@RequestParam("p_code") String p_code) {
-        Packages packager = packagesService.getPackageDetail(p_code);
-        return packager;
-    }
-
-
+package com.ygj.yuemum.controller.global;
+
+
+import com.ygj.yuemum.domain.global.Packages;
+import com.ygj.yuemum.service.global.PackagesService;
+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 PackagesController {
+
+    @Autowired
+    private PackagesService packagesService;
+    @GetMapping("/getPackageSelect")
+    public List<Packages> getPackageSelect() {
+        List<Packages> packages = packagesService.getPackageSelect();
+        return packages;
+    }
+
+    @GetMapping("/getPackageAll")
+    public List<Packages> getPackageAll() {
+        List<Packages> packages = packagesService.getPackageAll();
+        return packages;
+    }
+
+    @GetMapping("/getPackageShowname")
+    public List<Packages> getPackageShowname() {
+        List<Packages> packages = packagesService.getPackageShowname();
+        return packages;
+    }
+    @GetMapping("/getPackageLists")
+    public List<Packages> getPackageLists(@RequestParam("p_branches") String p_branches) {
+        List<Packages> packages = packagesService.getPackageLists(p_branches);
+        return packages;
+    }
+    @GetMapping("/getPackageDetail")
+    public Packages getPackageDetail(@RequestParam("p_code") String p_code) {
+        Packages packager = packagesService.getPackageDetail(p_code);
+        return packager;
+    }
+
+
 }

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

@@ -37,12 +37,12 @@ public class WeChatInfoController {
         return saveWeChatInfo.WXSendOrderMessage(orderno,total,date);
     }
 
-    @GetMapping("/WXSendYSOrderMessage")//订单
-    public int WXSendYSOrderMessage(@RequestParam("orderno") String orderno,@RequestParam("od_cityid") Integer od_cityid,@RequestParam("total") String total,@RequestParam("date") String date,@RequestParam("type") String type) throws IOException {
+    @PostMapping("/WXSendYSOrderMessage")//订单
+    public int WXSendYSOrderMessage(@RequestParam("orderno") String orderno,@RequestParam("od_cityid") Integer od_cityid,@RequestParam("total") String total,@RequestParam("date") String date,@RequestParam("type") String type) {
         return saveWeChatInfo.WXSendYSOrderMessage(orderno,od_cityid,total,date,type);
     }
     @PostMapping("/WXSendBookingMessage") //预约
-    public int WXSendBookingMessage(@ModelAttribute CustomerBooking customerBooking) throws IOException {
+    public int WXSendBookingMessage(@ModelAttribute CustomerBooking customerBooking) {
         return saveWeChatInfo.WXSendBookingMessage(customerBooking);
     }
     @GetMapping("/WXSendExtractMessage") //提现

+ 258 - 188
src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java

@@ -1,189 +1,259 @@
-package com.ygj.yuemum.controller.maternitymatron;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.ygj.yuemum.domain.maternitymatron.*;
-import com.ygj.yuemum.domain.utils.AddMMInfo;
-import com.ygj.yuemum.service.maternitymatron.JlServiceUserInfoService;
-import com.ygj.yuemum.service.maternitymatron.JlServiceUserService;
-import com.ygj.yuemum.service.maternitymatron.JlStoreXService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-@RestController
-public class JlServiceUserController {
-    @Autowired
-    private JlServiceUserService jlServiceUserService;
-    @Autowired
-    private JlServiceUserInfoService jlServiceUserInfoService;
-    @Autowired
-    private JlStoreXService jlStoreXService;
-
-    @GetMapping("/getjlServiceUsers")
-    public List<JlServiceUser> getjlServiceUsers() {
-        return jlServiceUserService.getJlServiceUsers();
-    }
-
-    @GetMapping("/getMMList")
-    public String getMMList(@RequestParam("page") Integer page,@RequestParam("limit") Integer limit) {
-        Map<String, Object> trains= jlServiceUserService.getMMList(page,limit);
-        String jso = JSONObject.toJSONString(trains);
-        return jso;
-    }
-    @GetMapping("/queryServiceUserStock")
-    public String queryServiceUserStock(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit) {
-        Map<String, Object> trains= jlServiceUserService.queryServiceUserStock(page,limit);
-        String jso = JSONObject.toJSONString(trains);
-        return jso;
-    }
-    @PostMapping("/queryServiceUserStockCondition")
-    public String queryServiceUserStockCondition(@ModelAttribute QueryServiceUserStock queryServiceUserStock) throws ParseException {
-        //计算天数
-        if(queryServiceUserStock.getService_start() != null && queryServiceUserStock.getDays() != 0){
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-            Calendar calStart = Calendar.getInstance();
-            calStart.setTime(sdf.parse(queryServiceUserStock.getService_start()));
-            calStart.add(Calendar.DATE, -5);
-
-            Calendar calEnd = Calendar.getInstance();
-            calEnd.setTime(sdf.parse(queryServiceUserStock.getService_start()));
-            calEnd.add(Calendar.DATE, queryServiceUserStock.getDays()+5);
-
-            queryServiceUserStock.setService_start(sdf.format(calStart.getTime()));
-            queryServiceUserStock.setService_end(sdf.format(calEnd.getTime()));
-        }
-        Map<String, Object> trains= jlServiceUserService.queryServiceUserStockCondition(queryServiceUserStock);
-        String jso = JSONObject.toJSONString(trains);
-        return jso;
-    }
-
-    @PostMapping("/queryEditServiceUser")
-    public String queryEditServiceUser(@ModelAttribute QueryServiceUserStock queryServiceUserStock) throws ParseException {
-        Map<String, Object> trains= jlServiceUserService.queryEditServiceUser(queryServiceUserStock);
-        String jso = JSONObject.toJSONString(trains);
-        return jso;
-    }
-
-    @PostMapping("/queryMMList")
-    public String queryMMList(@ModelAttribute QueryServiceUser queryServiceUser) {
-
-        Map<String, Object> trains= jlServiceUserService.queryMMList(queryServiceUser);
-        String jso = JSONObject.toJSONString(trains);
-        return jso;
-    }
-
-
-    @PostMapping("/addjlServiceUser")
-    public int add(@ModelAttribute AddMMInfo addMMInfo) {
-        int id =jlServiceUserService.getPMId();
-        JlServiceUserInfo jlServiceUserInfo = new JlServiceUserInfo();
-        JlServiceUser jlServiceUser = new JlServiceUser();
-        // jlServiceUser
-        jlServiceUser.setUpdated_at(new Date());
-        jlServiceUser.setUsertype("6");
-        jlServiceUser.setStatus("1");
-        jlServiceUser.setTruename(addMMInfo.getTruename());
-        jlServiceUser.setSalt(addMMInfo.getSalt());
-//        jlServiceUser.setMobile_phone(addMMInfo.getMobile_phone());
-        //jlServiceUserInfo
-        jlServiceUserInfo.setId(id);
-        jlServiceUserInfo.setIdcard(addMMInfo.getIdcard());
-        jlServiceUserInfo.setSeniority(addMMInfo.getSeniority());
-        jlServiceUserInfo.setBabynumber(addMMInfo.getBabynumber());
-        jlServiceUserInfo.setGender(Integer.valueOf(addMMInfo.getGender()));
-        jlServiceUserInfo.setCity(Integer.valueOf(addMMInfo.getNp()));
-        jlServiceUserInfo.setConstellation(addMMInfo.getConstellation());
-        jlServiceUserInfo.setZodiac(addMMInfo.getZodiac());
-        jlServiceUserInfo.setCreate_time(new Date());
-        jlServiceUserInfo.setEducation(addMMInfo.getEducation());
-        jlServiceUserInfo.setEthnicgroup(addMMInfo.getEthnicgroup());
-        jlServiceUserInfo.setHeight(addMMInfo.getHeight());
-        jlServiceUserInfo.setHighlight(addMMInfo.getHighlight());
-        jlServiceUserInfo.setMarriage(addMMInfo.getMarriage());
-        jlServiceUserInfo.setWeight(addMMInfo.getWeight());
-
-        try {
-            jlServiceUserService.addJlServiceUser(jlServiceUser);
-            jlServiceUserInfoService.addJlServiceUserInfo(jlServiceUserInfo);
-            // jlStoreX
-            String sum[] = addMMInfo.getCityname().split(",");
-            for(int i=0;i<sum.length;i++){
-                JlStoreX jlStoreX = new JlStoreX();
-                jlStoreX.setService_id(String.valueOf(id));
-                jlStoreX.setStore_id(Integer.valueOf(sum[i]));
-                jlStoreXService.addJlStoreX(jlStoreX);
-            }
-            return 1;
-        }catch (Exception ex) {
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-
-    @GetMapping("/deletejlServiceUser/{id}")
-    public int delete(@PathVariable("id") Integer id) {
-        return jlServiceUserService.deleteJlServiceUser(id);
-    }
-
-    @PostMapping("/updatejlServiceUser")
-    public int updatejlServiceUser(@ModelAttribute JlServiceUser jlServiceUser) {
-        JlServiceUserInfo jlServiceUserInfo = new JlServiceUserInfo();
-        jlServiceUser.setUpdated_at(new Date());
-        //jlServiceUserInfo
-        jlServiceUserInfo.setIdcard(jlServiceUser.getIdcard());
-        jlServiceUserInfo.setSeniority(jlServiceUser.getSeniority());
-        jlServiceUserInfo.setBabynumber(jlServiceUser.getBabynumber());
-        if (jlServiceUser.getGender() != null) {
-            jlServiceUserInfo.setGender(Integer.valueOf(jlServiceUser.getGender()));
-        }
-        if(jlServiceUser.getNp() != null) {
-            jlServiceUserInfo.setCity(Integer.valueOf(jlServiceUser.getNp()));
-        }
-        jlServiceUserInfo.setId(jlServiceUser.getId());
-        jlServiceUserInfo.setConstellation(jlServiceUser.getConstellation());
-        jlServiceUserInfo.setZodiac(jlServiceUser.getZodiac());
-        jlServiceUserInfo.setEducation(jlServiceUser.getEducation());
-        jlServiceUserInfo.setEthnicgroup(jlServiceUser.getEthnicgroup());
-        jlServiceUserInfo.setHeight(jlServiceUser.getHeight());
-        jlServiceUserInfo.setHighlight(jlServiceUser.getHighlight());
-        jlServiceUserInfo.setMarriage(jlServiceUser.getMarriage());
-        jlServiceUserInfo.setWeight(jlServiceUser.getWeight());
-        try {
-            jlServiceUserService.updateJlServiceUser(jlServiceUser);
-            jlServiceUserInfoService.updateJlServiceUserInfo(jlServiceUserInfo);
-            // jlStoreX
-            if(jlServiceUser.getCityname() != null) {
-                String sum[] = jlServiceUser.getCityname().split(",");
-                jlStoreXService.deleteJlStoreX(jlServiceUser.getId());
-                for(int i=0;i<sum.length;i++){
-                    JlStoreX jlStoreX = new JlStoreX();
-                    jlStoreX.setService_id(String.valueOf(jlServiceUser.getId()));
-                    jlStoreX.setStore_id(Integer.valueOf(sum[i]));
-                    jlStoreXService.addJlStoreX(jlStoreX);
-                }
-                return 1;
-            }
-            return 1;
-        }catch (Exception ex) {
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-    @PostMapping("/upDateStatus")
-    public int upDateStatus(@ModelAttribute JlServiceUser jlServiceUser) { return jlServiceUserService.upDateStatus(jlServiceUser);}
-
-    @GetMapping("/SaltCheck")
-    public int IDCardCheck(@RequestParam("salt") String salt) {
-        return jlServiceUserService.saltcheck(salt);
-    }
-
-    @GetMapping("/getjlServiceUser")
-    public JlServiceUser getOne(@RequestParam("id") Integer id) {return  jlServiceUserService.getJlServiceUser(id);}
+package com.ygj.yuemum.controller.maternitymatron;
+
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.maternitymatron.*;
+import com.ygj.yuemum.domain.utils.AddMMInfo;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearch;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail;
+import com.ygj.yuemum.service.maternitymatron.JlServiceUserInfoService;
+import com.ygj.yuemum.service.maternitymatron.JlServiceUserService;
+import com.ygj.yuemum.service.maternitymatron.JlStoreXService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+public class JlServiceUserController {
+    @Autowired
+    private JlServiceUserService jlServiceUserService;
+    @Autowired
+    private JlServiceUserInfoService jlServiceUserInfoService;
+    @Autowired
+    private JlStoreXService jlStoreXService;
+
+
+    @RequestMapping(value = "/queryUserMMSearch", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
+    @ResponseBody
+    public List<JlServiceUser> queryUserMMSearch(@RequestBody Map<String, Object> jsonParam) throws ParseException {
+        List<JlServiceUser> jlServiceUsers = new ArrayList<>();
+        WXMMUserSearch wxmmUserSearch = JSON.parseObject(JSON.toJSONString(jsonParam), WXMMUserSearch.class);
+        //q1 a3 预产期, q3 双胞胎, q4 a10 服务天数, q5 等级, q8 年龄, q9 性格
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        QueryServiceUserStock queryConditions = new QueryServiceUserStock();
+        queryConditions.setCityname(wxmmUserSearch.getWmu_city());
+        queryConditions.setStatus("1");
+        Date ydate = new Date();
+        Integer days = null;
+        for (WXMMUserSearchDetail wxmmUserSearchDetail : wxmmUserSearch.getWxMMUserSearchDetails()) {
+            if (wxmmUserSearchDetail.getWmud_qid() == 1 && wxmmUserSearchDetail.getWmud_aid() == 3) {
+                ydate = sdf.parse(wxmmUserSearchDetail.getWmud_value());
+            }
+            if (wxmmUserSearchDetail.getWmud_qid() == 4 && wxmmUserSearchDetail.getWmud_aid() == 10) {
+                days = Integer.valueOf(wxmmUserSearchDetail.getWmud_value());
+            }
+            if (wxmmUserSearchDetail.getWmud_qid() == 8) {
+                if (wxmmUserSearchDetail.getWmud_value().equals("39")) {
+                    queryConditions.setAgestart(String.valueOf(0));
+                    queryConditions.setAgeend(String.valueOf(40));
+                } else if (wxmmUserSearchDetail.getWmud_value().equals("41")) {
+                    queryConditions.setAgestart(String.valueOf(41));
+                    queryConditions.setAgeend(String.valueOf(99));
+                }
+            }
+            if (wxmmUserSearchDetail.getWmud_qid() == 3) {
+                queryConditions.setTwins(Integer.valueOf(wxmmUserSearchDetail.getWmud_value()));
+            }
+            if (wxmmUserSearchDetail.getWmud_qid() == 5) {
+                queryConditions.setGender(Integer.valueOf(wxmmUserSearchDetail.getWmud_value()));
+            }
+            if (wxmmUserSearchDetail.getWmud_qid() == 9) {
+                queryConditions.setCharacters(String.valueOf(wxmmUserSearchDetail.getWmud_value()));
+            }
+        }
+        if (ydate != null && days != null) {
+            Calendar calStart = Calendar.getInstance();
+            calStart.setTime(ydate);
+            calStart.add(Calendar.DATE, -5);
+
+            Calendar calEnd = Calendar.getInstance();
+            calEnd.setTime(ydate);
+            calEnd.add(Calendar.DATE, +5 + days);
+
+            queryConditions.setService_start(sdf.format(calStart.getTime()));
+            queryConditions.setService_end(sdf.format(calEnd.getTime()));
+        }
+        for(JlServiceUser jlServiceUser: jlServiceUserService.queryUserMMSearch(wxmmUserSearch,queryConditions)) {
+            jlServiceUsers.add(jlServiceUserService.queryUserMMResult(jlServiceUser.getId()));
+        }
+        return jlServiceUsers;
+    }
+
+    @GetMapping("/getjlServiceUsers")
+    public List<JlServiceUser> getjlServiceUsers() {
+        return jlServiceUserService.getJlServiceUsers();
+    }
+
+    @GetMapping("/getMMList")
+    public String getMMList(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit) {
+        Map<String, Object> trains = jlServiceUserService.getMMList(page, limit);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
+    @GetMapping("/queryServiceUserStock")
+    public String queryServiceUserStock(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit) {
+        Map<String, Object> trains = jlServiceUserService.queryServiceUserStock(page, limit);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
+    @PostMapping("/queryServiceUserStockCondition")
+    public String queryServiceUserStockCondition(@ModelAttribute QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        //计算天数
+        if (queryServiceUserStock.getService_start() != null && queryServiceUserStock.getDays() != 0) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar calStart = Calendar.getInstance();
+            calStart.setTime(sdf.parse(queryServiceUserStock.getService_start()));
+            calStart.add(Calendar.DATE, -5);
+
+            Calendar calEnd = Calendar.getInstance();
+            calEnd.setTime(sdf.parse(queryServiceUserStock.getService_start()));
+            calEnd.add(Calendar.DATE, queryServiceUserStock.getDays() + 5);
+
+            queryServiceUserStock.setService_start(sdf.format(calStart.getTime()));
+            queryServiceUserStock.setService_end(sdf.format(calEnd.getTime()));
+        }
+        Map<String, Object> trains = jlServiceUserService.queryServiceUserStockCondition(queryServiceUserStock);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
+    @PostMapping("/queryEditServiceUser")
+    public String queryEditServiceUser(@ModelAttribute QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        Map<String, Object> trains = jlServiceUserService.queryEditServiceUser(queryServiceUserStock);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
+    @PostMapping("/queryMMList")
+    public String queryMMList(@ModelAttribute QueryServiceUser queryServiceUser) {
+
+        Map<String, Object> trains = jlServiceUserService.queryMMList(queryServiceUser);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
+
+    @PostMapping("/addjlServiceUser")
+    public int add(@ModelAttribute AddMMInfo addMMInfo) {
+        int id = jlServiceUserService.getPMId();
+        JlServiceUserInfo jlServiceUserInfo = new JlServiceUserInfo();
+        JlServiceUser jlServiceUser = new JlServiceUser();
+        // jlServiceUser
+        jlServiceUser.setUpdated_at(new Date());
+        jlServiceUser.setUsertype("6");
+        jlServiceUser.setStatus("1");
+        jlServiceUser.setTruename(addMMInfo.getTruename());
+        jlServiceUser.setSalt(addMMInfo.getSalt());
+//        jlServiceUser.setMobile_phone(addMMInfo.getMobile_phone());
+        //jlServiceUserInfo
+        jlServiceUserInfo.setId(id);
+        jlServiceUserInfo.setIdcard(addMMInfo.getIdcard());
+        jlServiceUserInfo.setSeniority(addMMInfo.getSeniority());
+        jlServiceUserInfo.setBabynumber(addMMInfo.getBabynumber());
+        jlServiceUserInfo.setGender(Integer.valueOf(addMMInfo.getGender()));
+        jlServiceUserInfo.setCity(Integer.valueOf(addMMInfo.getNp()));
+        jlServiceUserInfo.setConstellation(addMMInfo.getConstellation());
+        jlServiceUserInfo.setZodiac(addMMInfo.getZodiac());
+        jlServiceUserInfo.setCreate_time(new Date());
+        jlServiceUserInfo.setEducation(addMMInfo.getEducation());
+        jlServiceUserInfo.setEthnicgroup(addMMInfo.getEthnicgroup());
+        jlServiceUserInfo.setHeight(addMMInfo.getHeight());
+        jlServiceUserInfo.setHighlight(addMMInfo.getHighlight());
+        jlServiceUserInfo.setMarriage(addMMInfo.getMarriage());
+        jlServiceUserInfo.setWeight(addMMInfo.getWeight());
+        jlServiceUserInfo.setServicesdays(addMMInfo.getServicesdays());
+        jlServiceUserInfo.setCharacters(addMMInfo.getCharacters());
+        jlServiceUserInfo.setTwins(addMMInfo.getTwins());
+
+        try {
+            jlServiceUserService.addJlServiceUser(jlServiceUser);
+            jlServiceUserInfoService.addJlServiceUserInfo(jlServiceUserInfo);
+            // jlStoreX
+            String sum[] = addMMInfo.getCityname().split(",");
+            for (int i = 0; i < sum.length; i++) {
+                JlStoreX jlStoreX = new JlStoreX();
+                jlStoreX.setService_id(String.valueOf(id));
+                jlStoreX.setStore_id(Integer.valueOf(sum[i]));
+                jlStoreXService.addJlStoreX(jlStoreX);
+            }
+            return 1;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
+    @GetMapping("/deletejlServiceUser/{id}")
+    public int delete(@PathVariable("id") Integer id) {
+        return jlServiceUserService.deleteJlServiceUser(id);
+    }
+
+    @PostMapping("/updatejlServiceUser")
+    public int updatejlServiceUser(@ModelAttribute JlServiceUser jlServiceUser) {
+        JlServiceUserInfo jlServiceUserInfo = new JlServiceUserInfo();
+        jlServiceUser.setUpdated_at(new Date());
+        //jlServiceUserInfo
+        jlServiceUserInfo.setIdcard(jlServiceUser.getIdcard());
+        jlServiceUserInfo.setSeniority(jlServiceUser.getSeniority());
+        jlServiceUserInfo.setBabynumber(jlServiceUser.getBabynumber());
+        if (jlServiceUser.getGender() != null) {
+            jlServiceUserInfo.setGender(Integer.valueOf(jlServiceUser.getGender()));
+        }
+        if (jlServiceUser.getNp() != null) {
+            jlServiceUserInfo.setCity(Integer.valueOf(jlServiceUser.getNp()));
+        }
+        jlServiceUserInfo.setId(jlServiceUser.getId());
+        jlServiceUserInfo.setConstellation(jlServiceUser.getConstellation());
+        jlServiceUserInfo.setZodiac(jlServiceUser.getZodiac());
+        jlServiceUserInfo.setEducation(jlServiceUser.getEducation());
+        jlServiceUserInfo.setEthnicgroup(jlServiceUser.getEthnicgroup());
+        jlServiceUserInfo.setHeight(jlServiceUser.getHeight());
+        jlServiceUserInfo.setHighlight(jlServiceUser.getHighlight());
+        jlServiceUserInfo.setMarriage(jlServiceUser.getMarriage());
+        jlServiceUserInfo.setWeight(jlServiceUser.getWeight());
+        jlServiceUserInfo.setServicesdays(jlServiceUser.getServicesdays());
+        jlServiceUserInfo.setCharacters(jlServiceUser.getCharacters());
+        jlServiceUserInfo.setTwins(jlServiceUser.getTwins());
+        try {
+            jlServiceUserService.updateJlServiceUser(jlServiceUser);
+            jlServiceUserInfoService.updateJlServiceUserInfo(jlServiceUserInfo);
+            // jlStoreX
+            if (jlServiceUser.getCityname() != null) {
+                String sum[] = jlServiceUser.getCityname().split(",");
+                jlStoreXService.deleteJlStoreX(jlServiceUser.getId());
+                for (int i = 0; i < sum.length; i++) {
+                    JlStoreX jlStoreX = new JlStoreX();
+                    jlStoreX.setService_id(String.valueOf(jlServiceUser.getId()));
+                    jlStoreX.setStore_id(Integer.valueOf(sum[i]));
+                    jlStoreXService.addJlStoreX(jlStoreX);
+                }
+                return 1;
+            }
+            return 1;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
+    @PostMapping("/upDateStatus")
+    public int upDateStatus(@ModelAttribute JlServiceUser jlServiceUser) {
+        return jlServiceUserService.upDateStatus(jlServiceUser);
+    }
+
+    @GetMapping("/SaltCheck")
+    public int IDCardCheck(@RequestParam("salt") String salt) {
+        return jlServiceUserService.saltcheck(salt);
+    }
+
+    @GetMapping("/getjlServiceUser")
+    public JlServiceUser getOne(@RequestParam("id") Integer id) {
+        return jlServiceUserService.getJlServiceUser(id);
+    }
 }

+ 10 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXContentController.java

@@ -5,11 +5,16 @@ import com.alibaba.fastjson.JSONObject;
 import com.ygj.yuemum.domain.wxmini.WXContent;
 import com.ygj.yuemum.domain.wxmini.WXDianPing;
 import com.ygj.yuemum.domain.wxmini.WXDianPingImages;
+import com.ygj.yuemum.domain.wxmini.WXUser;
 import com.ygj.yuemum.service.wxmini.WXContentService;
+import com.ygj.yuemum.utils.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.io.File;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -24,6 +29,11 @@ public class WXContentController {
         return wxContentService.getWXContents();
     }
 
+    @PostMapping("/queryUserContent")
+    public WXContent queryUserContent(@RequestParam("openid") String openid) {
+        return wxContentService.queryUserContent(openid);
+    }
+
 
     @PostMapping("/queryWXContents")
     public String queryWXContents(@ModelAttribute WXContent wxContent) {

+ 5 - 4
src/main/java/com/ygj/yuemum/controller/wxmini/WXDianpingController.java

@@ -36,12 +36,13 @@ public class WXDianpingController {
         return wxBanners;
     }
 
-
-    @PostMapping("/updateWXDianPing")
-    public int updateWXDianPing(@ModelAttribute WXDianPing wxDianPing) {
-        return wxDianPingService.updateWXDianPing(wxDianPing);
+    @GetMapping("/getWXDianPing")
+    public List<WXDianPing> getWXDianPing() {
+        List<WXDianPing> wxBanners = wxDianPingService.getWXDianPing();
+        return wxBanners;
     }
 
+
     @RequestMapping(value = "/insertWXDianPing", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
     @ResponseBody
     public int insertWXDianPing(@RequestParam Map<String, Object> jsonParam) {

+ 45 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXMMSearchAnswerController.java

@@ -0,0 +1,45 @@
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer;
+import com.ygj.yuemum.service.wxmini.WXMMSearchAnswerService;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+public class WXMMSearchAnswerController {
+
+    @Autowired
+    private WXMMSearchAnswerService wxmmSearchAnswerService;
+
+    @PostMapping("/updateWXMMSearchAnswer")
+    public int updateWXMMSearchAnswer(@ModelAttribute WXMMSearchAnswer wxmmSearchAnswer) {
+        return wxmmSearchAnswerService.updateWXMMSearchAnswer(wxmmSearchAnswer);
+    }
+
+    @PostMapping("/insertWXMMSearchAnswer")
+    public int insertWXMMSearchAnswer(@ModelAttribute WXMMSearchAnswer wxmmSearchAnswer) {
+        return wxmmSearchAnswerService.insertWXMMSearchAnswer(wxmmSearchAnswer);
+    }
+
+    @PostMapping("/getWXMMSearchAnswers")
+    public List<WXMMSearchAnswer> getWXMMSearchAnswers() {
+        return wxmmSearchAnswerService.getWXMMSearchAnswers();
+    }
+
+    @PostMapping("/deleteWXMMSearchAnswer")
+    public int deleteWXMMSearchAnswer(@RequestParam("id") Integer id) {
+        return wxmmSearchAnswerService.deleteWXMMSearchAnswer(id);
+    }
+
+    @PostMapping("/getWXMMSearchAnswerByID")
+    public WXMMSearchAnswer getWXMMSearchAnswerByID(@RequestParam("id") Integer id) {
+        return  wxmmSearchAnswerService.getWXMMSearchAnswerByID(id);
+    }
+
+}

+ 50 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXMMSearchQuestionController.java

@@ -0,0 +1,50 @@
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion;
+import com.ygj.yuemum.service.wxmini.WXMMSearchQuestionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class WXMMSearchQuestionController {
+
+    @Autowired
+    private WXMMSearchQuestionService wxmmSearchQuestionService;
+
+    @PostMapping("/updateWXMMSearchQuestion")
+    public int updateWXMMSearchQuestion(@ModelAttribute WXMMSearchQuestion wxmmSearchQuestion) {
+        return wxmmSearchQuestionService.updateWXMMSearchQuestion(wxmmSearchQuestion);
+    }
+    @GetMapping("/getWXMMSearchQuestion")
+    public List<WXMMSearchQuestion> getWXMMSearchQuestion() {
+        return wxmmSearchQuestionService.getWXMMSearchQuestion();
+    }
+
+    @PostMapping("/insertWXMMSearchQuestion")
+    public int insertWXMMSearchQuestion(@ModelAttribute WXMMSearchQuestion wxmmSearchQuestion) {
+        return wxmmSearchQuestionService.insertWXMMSearchQuestion(wxmmSearchQuestion);
+    }
+
+    @PostMapping("/getWXMMSearchQuestions")
+    public String getWXMMSearchQuestions(@ModelAttribute WXMMSearchQuestion wxmmSearchQuestion) {
+        Map<String, Object> orderTemps = wxmmSearchQuestionService.getWXMMSearchQuestions(wxmmSearchQuestion);
+        String jso = JSONObject.toJSONString(orderTemps);
+        return jso;
+    }
+
+    @PostMapping("/deleteWXMMSearchQuestion")
+    public int deleteWXMMSearchQuestion(@RequestParam("id") Integer id) {
+        return wxmmSearchQuestionService.deleteWXMMSearchQuestion(id);
+    }
+
+    @PostMapping("/getWXMMSearchQuestionByID")
+    public WXMMSearchQuestion getWXMMSearchQuestionByID(@RequestParam("id") Integer id) {
+        return  wxmmSearchQuestionService.getWXMMSearchQuestionByID(id);
+    }
+
+}

+ 31 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXMMUserSearchController.java

@@ -0,0 +1,31 @@
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearch;
+import com.ygj.yuemum.service.wxmini.WXMMUserSearchService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class WXMMUserSearchController {
+
+    @Autowired
+    private WXMMUserSearchService wxmmUserSearchervice;
+
+    @GetMapping("/getWXMMUserSearchs")
+    public List<WXMMUserSearch> getWXMMUserSearchs(@RequestParam("wmu_openid") String wmu_openid) {
+        return wxmmUserSearchervice.getWXMMUserSearchs(wmu_openid);
+    }
+
+    @PostMapping("/queryWXMMUserSearchs")
+    public String queryWXMMUserSearchs(@ModelAttribute WXMMUserSearch WXMMUserSearch) {
+        Map<String, Object> wxmmUserSearchs = wxmmUserSearchervice.queryWXMMUserSearchs(WXMMUserSearch);
+        String jso = JSONObject.toJSONString(wxmmUserSearchs);
+        return jso;
+    }
+
+}

+ 24 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXMMUserSearchDetailController.java

@@ -0,0 +1,24 @@
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail;
+import com.ygj.yuemum.service.wxmini.WXMMUserSearchDetailService;
+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 WXMMUserSearchDetailController {
+
+    @Autowired
+    private WXMMUserSearchDetailService wxmmUserSearchDetailService;
+
+    @GetMapping("/getWXMMUserSearchDetailByQID")
+    public List<WXMMUserSearchDetail> getWXMMUserSearchDetailByQID(@RequestParam("wmu_id") Integer wmu_id) {
+        return wxmmUserSearchDetailService.getWXMMUserSearchDetailByQID(wmu_id);
+    }
+
+}

+ 22 - 21
src/main/java/com/ygj/yuemum/controller/wxmini/WXMktInfoController.java

@@ -1,22 +1,23 @@
-package com.ygj.yuemum.controller.wxmini;
-
-
-import com.ygj.yuemum.domain.wxmini.WXMktInfo;
-import com.ygj.yuemum.service.wxmini.WXMktInfoService;
-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 WXMktInfoController {
-
-    @Autowired
-    private WXMktInfoService mktInfoService;
-    @GetMapping("/getMktInfos")
-    public List<WXMktInfo> getMktInfos() {
-        List<WXMktInfo> mktInfos = mktInfoService.getMktInfos();
-        return mktInfos;
-    }
+package com.ygj.yuemum.controller.wxmini;
+
+
+import com.ygj.yuemum.domain.wxmini.WXMktInfo;
+import com.ygj.yuemum.service.wxmini.WXMktInfoService;
+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 WXMktInfoController {
+
+    @Autowired
+    private WXMktInfoService mktInfoService;
+    @GetMapping("/getMktInfos")
+    public List<WXMktInfo> getMktInfos(@RequestParam("mi_branche_code") Integer mi_branche_code) {
+        List<WXMktInfo> mktInfos = mktInfoService.getMktInfos(mi_branche_code);
+        return mktInfos;
+    }
 }

+ 14 - 14
src/main/java/com/ygj/yuemum/dao/global/PackageItemDao.java

@@ -1,15 +1,15 @@
-package com.ygj.yuemum.dao.global;
-
-import com.ygj.yuemum.domain.global.PackageItem;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface PackageItemDao {
-
-    List<PackageItem> getPackageItems();
-    List<PackageItem> getPIGroups();
-    List<PackageItem> getPIClasses();
-    List<PackageItem> getPIServices();
+package com.ygj.yuemum.dao.global;
+
+import com.ygj.yuemum.domain.global.PackageItem;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface PackageItemDao {
+
+    List<PackageItem> getPackageItems();
+    List<PackageItem> getPIGroups(String p_branches);
+    List<PackageItem> getPIClasses(String p_branches);
+    List<PackageItem> getPIServices(String p_branches);
 }

+ 1 - 1
src/main/java/com/ygj/yuemum/dao/global/PackagesDao.java

@@ -12,7 +12,7 @@ public interface PackagesDao {
     List<Packages> getPackageSelect();
     List<Packages> getPackageAll();
     List<Packages> getPackageShowname();
-    List<Packages> getPackageLists();
+    List<Packages> getPackageLists(String p_branches);
     Packages getPackageDetail(String p_code);
     String getPackageCRMCode(String p_code);
     Packages getBizID(String p_code);

+ 43 - 39
src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserDao.java

@@ -1,40 +1,44 @@
-package com.ygj.yuemum.dao.maternitymatron;
-
-import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
-import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
-import com.ygj.yuemum.domain.maternitymatron.QueryServiceUserStock;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface JlServiceUserDao {
-
-    /**
-     * 得到所有的库存信息
-     * @return List<Photo>
-     */
-    List<JlServiceUser> getAll();
-    List<JlServiceUser> getOrdermm();
-
-    List<JlServiceUser> getMMList();
-
-    JlServiceUser getResume(Integer id);
-
-    List<QueryServiceUser> queryMMList(QueryServiceUser record);
-
-    List<JlServiceUser> queryServiceUserStock();
-
-    List<QueryServiceUserStock> queryServiceUserStockCondition(QueryServiceUserStock record);
-
-    List<QueryServiceUserStock> queryEditServiceUser(QueryServiceUserStock record);
-
-    int getcount();
-    int getpmid();
-    int upDateStatus(JlServiceUser record);
-    int saltcheck(String salt);
-    int deleteByPrimaryKey(Integer id);
-    int insertSelective(JlServiceUser record);
-    JlServiceUser selectByPrimaryKey(Integer id);
-    int updateByPrimaryKeySelective(JlServiceUser record);
+package com.ygj.yuemum.dao.maternitymatron;
+
+import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUserStock;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface JlServiceUserDao {
+
+    /**
+     * 得到所有的库存信息
+     * @return List<Photo>
+     */
+    List<JlServiceUser> getAll();
+    List<JlServiceUser> getOrdermm();
+
+    List<JlServiceUser> getMMList();
+
+    JlServiceUser getResume(Integer id);
+
+    List<QueryServiceUser> queryMMList(QueryServiceUser record);
+
+    List<JlServiceUser> queryServiceUserStock();
+
+    List<JlServiceUser> queryServiceUserStockCondition(QueryServiceUserStock record);
+
+    JlServiceUser queryUserMMResult(Integer id);
+
+    List<JlServiceUser> queryUserMMSearch(QueryServiceUserStock record);
+
+    List<QueryServiceUserStock> queryEditServiceUser(QueryServiceUserStock record);
+
+    int getcount();
+    int getpmid();
+    int upDateStatus(JlServiceUser record);
+    int saltcheck(String salt);
+    int deleteByPrimaryKey(Integer id);
+    int insertSelective(JlServiceUser record);
+    JlServiceUser selectByPrimaryKey(Integer id);
+    int updateByPrimaryKeySelective(JlServiceUser record);
 }

+ 1 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXContentDao.java

@@ -14,4 +14,5 @@ public interface WXContentDao {
     int deleteWXContent(Integer id);
     List<WXContent> queryWXContents(WXContent wxContent);
     WXContent getWXContentByID(Integer id);
+    WXContent queryUserContent(WXContent wxContent);
 }

+ 1 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXContentTypeDao.java

@@ -9,4 +9,5 @@ import java.util.List;
 public interface WXContentTypeDao {
 
     List<WXContentType> getWXContentTypes();
+    WXContentType queryWXContentType(String wct_code);
 }

+ 24 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXMMSearchAnswerDao.java

@@ -0,0 +1,24 @@
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface WXMMSearchAnswerDao {
+
+    List<WXMMSearchAnswer> getWXMMSearchAnswers();
+
+    int updateWXMMSearchAnswer(WXMMSearchAnswer wxmmSearchAnswer);
+
+    int insertWXMMSearchAnswer(WXMMSearchAnswer wxmmSearchAnswer);
+
+    WXMMSearchAnswer getWXMMSearchAnswerByID(Integer id);
+
+    int deleteWXMMSearchAnswer(Integer id);
+
+
+    List<WXMMSearchAnswer> getWXMMSearchAnswerByQID(Integer wma_question_id);
+
+}

+ 21 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXMMSearchQuestionDao.java

@@ -0,0 +1,21 @@
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface WXMMSearchQuestionDao {
+
+    List<WXMMSearchQuestion> getWXMMSearchQuestions();
+
+    int updateWXMMSearchQuestion(WXMMSearchQuestion wxmmSearchQuestion);
+
+    int insertWXMMSearchQuestion(WXMMSearchQuestion wxmmSearchQuestion);
+
+    WXMMSearchQuestion getWXMMSearchQuestionByID(Integer id);
+
+    int deleteWXMMSearchQuestion(Integer id);
+
+}

+ 18 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXMMUserSearchDao.java

@@ -0,0 +1,18 @@
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearch;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface WXMMUserSearchDao {
+
+    List<WXMMUserSearch> getWXMMUserSearchs(String wmu_openid);
+
+    int insertWXMMUserSearch(WXMMUserSearch wxmmUserSearch);
+    int getWXMMUserSearchId();
+
+    List<WXMMUserSearch> queryWXMMUserSearchs(WXMMUserSearch wxmmUserSearch);
+
+}

+ 17 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXMMUserSearchDetailDao.java

@@ -0,0 +1,17 @@
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface WXMMUserSearchDetailDao {
+
+    List<WXMMUserSearchDetail> getWXMMUserSearchDetails(String wmud_phone);
+
+    int insertWXMMUserSearchDetail(WXMMUserSearchDetail wxmmUserSearchDetail);
+
+    List<WXMMUserSearchDetail> getWXMMUserSearchDetailByQID(Integer wmu_id);
+
+}

+ 11 - 11
src/main/java/com/ygj/yuemum/dao/wxmini/WXMktInfoDao.java

@@ -1,12 +1,12 @@
-package com.ygj.yuemum.dao.wxmini;
-
-import com.ygj.yuemum.domain.wxmini.WXMktInfo;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface WXMktInfoDao {
-
-    List<WXMktInfo> getMktInfos();
+package com.ygj.yuemum.dao.wxmini;
+
+import com.ygj.yuemum.domain.wxmini.WXMktInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface WXMktInfoDao {
+
+    List<WXMktInfo> getMktInfos(Integer mi_branche_code);
 }

+ 75 - 66
src/main/java/com/ygj/yuemum/domain/global/PackageItem.java

@@ -1,67 +1,76 @@
-package com.ygj.yuemum.domain.global;
-
-public class PackageItem {
-    private Integer id;
-    private Integer pi_groupid;
-    private String pi_groupname;
-    private Integer pi_classid;
-    private String pi_classname;
-    private String pi_service;
-    private String p_code;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getPi_groupid() {
-        return pi_groupid;
-    }
-
-    public void setPi_groupid(Integer pi_groupid) {
-        this.pi_groupid = pi_groupid;
-    }
-
-    public String getPi_groupname() {
-        return pi_groupname;
-    }
-
-    public void setPi_groupname(String pi_groupname) {
-        this.pi_groupname = pi_groupname;
-    }
-
-    public Integer getPi_classid() {
-        return pi_classid;
-    }
-
-    public void setPi_classid(Integer pi_classid) {
-        this.pi_classid = pi_classid;
-    }
-
-    public String getPi_classname() {
-        return pi_classname;
-    }
-
-    public void setPi_classname(String pi_classname) {
-        this.pi_classname = pi_classname;
-    }
-
-    public String getPi_service() {
-        return pi_service;
-    }
-
-    public void setPi_service(String pi_service) {
-        this.pi_service = pi_service;
-    }
-
-    public String getP_code() {
-        return p_code;
-    }
-
-    public void setP_code(String p_code) {
-        this.p_code = p_code;
-    }
+package com.ygj.yuemum.domain.global;
+
+public class PackageItem {
+    private Integer id;
+    private Integer pi_groupid;
+    private String pi_groupname;
+    private Integer pi_classid;
+    private String pi_classname;
+    private String pi_service;
+    private String p_code;
+    private String p_branches;
+
+    public String getP_branches() {
+        return p_branches;
+    }
+
+    public void setP_branches(String p_branches) {
+        this.p_branches = p_branches;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getPi_groupid() {
+        return pi_groupid;
+    }
+
+    public void setPi_groupid(Integer pi_groupid) {
+        this.pi_groupid = pi_groupid;
+    }
+
+    public String getPi_groupname() {
+        return pi_groupname;
+    }
+
+    public void setPi_groupname(String pi_groupname) {
+        this.pi_groupname = pi_groupname;
+    }
+
+    public Integer getPi_classid() {
+        return pi_classid;
+    }
+
+    public void setPi_classid(Integer pi_classid) {
+        this.pi_classid = pi_classid;
+    }
+
+    public String getPi_classname() {
+        return pi_classname;
+    }
+
+    public void setPi_classname(String pi_classname) {
+        this.pi_classname = pi_classname;
+    }
+
+    public String getPi_service() {
+        return pi_service;
+    }
+
+    public void setPi_service(String pi_service) {
+        this.pi_service = pi_service;
+    }
+
+    public String getP_code() {
+        return p_code;
+    }
+
+    public void setP_code(String p_code) {
+        this.p_code = p_code;
+    }
 }

+ 9 - 0
src/main/java/com/ygj/yuemum/domain/global/Packages.java

@@ -16,6 +16,15 @@ public class Packages {
     private String p_detailimg;
     private String p_detaildesc;
     private String p_biz_id;
+    private String p_branches;
+
+    public String getP_branches() {
+        return p_branches;
+    }
+
+    public void setP_branches(String p_branches) {
+        this.p_branches = p_branches;
+    }
 
     public String getP_biz_id() {
         return p_biz_id;

+ 345 - 308
src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUser.java

@@ -1,309 +1,346 @@
-package com.ygj.yuemum.domain.maternitymatron;
-
-import java.util.Date;
-
-public class JlServiceUser {
-
-    private Integer id;
-    private String password;
-    private String truename;
-    private String mobile_phone;
-    private String status;
-    private Date last_login_time;
-    private String last_login_ip;
-    private String salt;
-    private String token;
-    private String zone_code;
-    private Date updated_at;
-    private Integer stock_status;
-    private String usertype;
-    // querylist add
-    private String age;
-    private String idcard;
-    private String cityname;
-    private String np;
-    private String seniority;
-    private String gender;
-    private String babynumber;
-    private String constellation;
-    private String zodiac;
-    private String ethnicgroup;
-    private String height;
-    private String marriage;
-    private String highlight;
-    private String education;
-    private String weight;
-    private String citycode;
-    private String city;
-    private String resume_path;
-    public String getResume_path() {
-        return resume_path;
-    }
-
-    public void setResume_path(String resume_path) {
-        this.resume_path = resume_path;
-    }
-
-    public String getCity() {
-        return city;
-    }
-
-    public void setCity(String city) {
-        this.city = city;
-    }
-
-    public String getWeight() {
-        return weight;
-    }
-
-    public void setWeight(String weight) {
-        this.weight = weight;
-    }
-
-    public String getCitycode() {
-        return citycode;
-    }
-
-    public void setCitycode(String citycode) {
-        this.citycode = citycode;
-    }
-
-    public String getEthnicgroup() {
-        return ethnicgroup;
-    }
-
-    public void setEthnicgroup(String ethnicgroup) {
-        this.ethnicgroup = ethnicgroup;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public String getMarriage() {
-        return marriage;
-    }
-
-    public void setMarriage(String marriage) {
-        this.marriage = marriage;
-    }
-
-    public String getHighlight() {
-        return highlight;
-    }
-
-    public void setHighlight(String highlight) {
-        this.highlight = highlight;
-    }
-
-    public String getEducation() {
-        return education;
-    }
-
-    public void setEducation(String education) {
-        this.education = education;
-    }
-
-    public String getBabynumber() {
-        return babynumber;
-    }
-
-    public void setBabynumber(String babynumber) {
-        this.babynumber = babynumber;
-    }
-
-    public String getConstellation() {
-        return constellation;
-    }
-
-    public void setConstellation(String constellation) {
-        this.constellation = constellation;
-    }
-
-    public String getZodiac() {
-        return zodiac;
-    }
-
-    public void setZodiac(String zodiac) {
-        this.zodiac = zodiac;
-    }
-
-    public JlServiceUser() {
-        super();
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getTruename() {
-        return truename;
-    }
-
-    public void setTruename(String truename) {
-        this.truename = truename;
-    }
-
-    public String getMobile_phone() {
-        return mobile_phone;
-    }
-
-    public void setMobile_phone(String mobile_phone) {
-        this.mobile_phone = mobile_phone;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public Date getLast_login_time() {
-        return last_login_time;
-    }
-
-    public void setLast_login_time(Date last_login_time) {
-        this.last_login_time = last_login_time;
-    }
-
-    public String getLast_login_ip() {
-        return last_login_ip;
-    }
-
-    public void setLast_login_ip(String last_login_ip) {
-        this.last_login_ip = last_login_ip;
-    }
-
-    public String getSalt() {
-        return salt;
-    }
-
-    public void setSalt(String salt) {
-        this.salt = salt;
-    }
-
-    public String getToken() {
-        return token;
-    }
-
-    public void setToken(String token) {
-        this.token = token;
-    }
-
-    public String getZone_code() {
-        return zone_code;
-    }
-
-    public void setZone_code(String zone_code) {
-        this.zone_code = zone_code;
-    }
-
-    public Date getUpdated_at() {
-        return updated_at;
-    }
-
-    public void setUpdated_at(Date updated_at) {
-        this.updated_at = updated_at;
-    }
-
-    public Integer getStock_status() {
-        return stock_status;
-    }
-
-    public void setStock_status(Integer stock_status) {
-        this.stock_status = stock_status;
-    }
-
-    public String getUsertype() {
-        return usertype;
-    }
-
-    public void setUsertype(String usertype) {
-        this.usertype = usertype;
-    }
-
-    public String getAge() {
-        return age;
-    }
-
-    public void setAge(String age) {
-        this.age = age;
-    }
-
-    public String getIdcard() {
-        return idcard;
-    }
-
-    public void setIdcard(String idcard) {
-        this.idcard = idcard;
-    }
-
-    public String getCityname() {
-        return cityname;
-    }
-
-    public void setCityname(String cityname) {
-        this.cityname = cityname;
-    }
-
-    public String getNp() {
-        return np;
-    }
-
-    public void setNp(String np) {
-        this.np = np;
-    }
-
-    public String getSeniority() {
-        return seniority;
-    }
-
-    public void setSeniority(String experience) {
-        this.seniority = experience;
-    }
-
-    public String getGender() {
-        return gender;
-    }
-
-    public void setGender(String gender) {
-        this.gender = gender;
-    }
-
-    @Override
-    public String toString() {
-        return "MmInfoPhoto{" +
-                "id=" + id +
-                ", password='" + password + '\'' +
-                ", truename='" + truename + '\'' +
-                ", mobile_phone='" + mobile_phone + '\'' +
-                ", status='" + status + '\'' +
-                ", last_login_time='" + last_login_time + '\'' +
-                ", last_login_ip='" + last_login_ip + '\'' +
-                ", salt='" + salt + '\'' +
-                ", token='" + token + '\'' +
-                ", zone_code='" + zone_code + '\'' +
-                ", updated_at='" + updated_at + '\'' +
-                ", stock_status='" + stock_status + '\'' +
-                ", usertype='" + usertype + '\'' +
-                '}';
-    }
+package com.ygj.yuemum.domain.maternitymatron;
+
+import java.util.Date;
+
+public class JlServiceUser {
+
+    private Integer id;
+    private String password;
+    private String truename;
+    private String mobile_phone;
+    private String status;
+    private Date last_login_time;
+    private String last_login_ip;
+    private String salt;
+    private String token;
+    private String zone_code;
+    private Date updated_at;
+    private Integer stock_status;
+    private String usertype;
+    // querylist add
+    private String age;
+    private String idcard;
+    private String cityname;
+    private String np;
+    private String seniority;
+    private Integer gender;
+    private String babynumber;
+    private String constellation;
+    private String zodiac;
+    private String ethnicgroup;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String education;
+    private String weight;
+    private String citycode;
+    private String city;
+    private String resume_path;
+    private Integer servicesdays;
+    private String characters;
+    private Integer twins;
+    private String photo_path;
+
+    public String getPhoto_path() {
+        return photo_path;
+    }
+
+    public void setPhoto_path(String photo_path) {
+        this.photo_path = photo_path;
+    }
+
+    public Integer getServicesdays() {
+        return servicesdays;
+    }
+
+    public void setServicesdays(Integer servicesdays) {
+        this.servicesdays = servicesdays;
+    }
+
+    public String getCharacters() {
+        return characters;
+    }
+
+    public void setCharacters(String characters) {
+        this.characters = characters;
+    }
+
+    public Integer getTwins() {
+        return twins;
+    }
+
+    public void setTwins(Integer twins) {
+        this.twins = twins;
+    }
+
+    public String getResume_path() {
+        return resume_path;
+    }
+
+    public void setResume_path(String resume_path) {
+        this.resume_path = resume_path;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getCitycode() {
+        return citycode;
+    }
+
+    public void setCitycode(String citycode) {
+        this.citycode = citycode;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
+
+    public String getBabynumber() {
+        return babynumber;
+    }
+
+    public void setBabynumber(String babynumber) {
+        this.babynumber = babynumber;
+    }
+
+    public String getConstellation() {
+        return constellation;
+    }
+
+    public void setConstellation(String constellation) {
+        this.constellation = constellation;
+    }
+
+    public String getZodiac() {
+        return zodiac;
+    }
+
+    public void setZodiac(String zodiac) {
+        this.zodiac = zodiac;
+    }
+
+    public JlServiceUser() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getMobile_phone() {
+        return mobile_phone;
+    }
+
+    public void setMobile_phone(String mobile_phone) {
+        this.mobile_phone = mobile_phone;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Date getLast_login_time() {
+        return last_login_time;
+    }
+
+    public void setLast_login_time(Date last_login_time) {
+        this.last_login_time = last_login_time;
+    }
+
+    public String getLast_login_ip() {
+        return last_login_ip;
+    }
+
+    public void setLast_login_ip(String last_login_ip) {
+        this.last_login_ip = last_login_ip;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public String getZone_code() {
+        return zone_code;
+    }
+
+    public void setZone_code(String zone_code) {
+        this.zone_code = zone_code;
+    }
+
+    public Date getUpdated_at() {
+        return updated_at;
+    }
+
+    public void setUpdated_at(Date updated_at) {
+        this.updated_at = updated_at;
+    }
+
+    public Integer getStock_status() {
+        return stock_status;
+    }
+
+    public void setStock_status(Integer stock_status) {
+        this.stock_status = stock_status;
+    }
+
+    public String getUsertype() {
+        return usertype;
+    }
+
+    public void setUsertype(String usertype) {
+        this.usertype = usertype;
+    }
+
+    public String getAge() {
+        return age;
+    }
+
+    public void setAge(String age) {
+        this.age = age;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getCityname() {
+        return cityname;
+    }
+
+    public void setCityname(String cityname) {
+        this.cityname = cityname;
+    }
+
+    public String getNp() {
+        return np;
+    }
+
+    public void setNp(String np) {
+        this.np = np;
+    }
+
+    public String getSeniority() {
+        return seniority;
+    }
+
+    public void setSeniority(String experience) {
+        this.seniority = experience;
+    }
+
+    public Integer getGender() {
+        return gender;
+    }
+
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
+
+    @Override
+    public String toString() {
+        return "MmInfoPhoto{" +
+                "id=" + id +
+                ", password='" + password + '\'' +
+                ", truename='" + truename + '\'' +
+                ", mobile_phone='" + mobile_phone + '\'' +
+                ", status='" + status + '\'' +
+                ", last_login_time='" + last_login_time + '\'' +
+                ", last_login_ip='" + last_login_ip + '\'' +
+                ", salt='" + salt + '\'' +
+                ", token='" + token + '\'' +
+                ", zone_code='" + zone_code + '\'' +
+                ", updated_at='" + updated_at + '\'' +
+                ", stock_status='" + stock_status + '\'' +
+                ", usertype='" + usertype + '\'' +
+                '}';
+    }
 }

+ 330 - 304
src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUserInfo.java

@@ -1,305 +1,331 @@
-package com.ygj.yuemum.domain.maternitymatron;
-
-import java.util.Date;
-
-public class JlServiceUserInfo {
-
-    private int id;
-    private String truename;
-    private String mobile_phone;
-    private int level;
-    private int is_fulltime;
-    private int total_score;
-    private String email;
-    private String tel;
-    private Date create_time;
-    private int gender;
-    private String portrait;
-    private Date birthday;
-    private String qq;
-    private Date update_time;
-    private String address;
-    private String brief;
-    private String idcard;
-    private String education;
-    private int city;
-    private int district;
-    private String service_number;
-    private int province;
-    private int update_uid;
-    private Date updated_at;
-    private String seniority;
-    private String babynumber;
-    private String constellation;
-    private String zodiac;
-
-    private String ethnicgroup;
-    private String height;
-    private String marriage;
-    private String highlight;
-    private String weight;
-
-    public String getWeight() {
-        return weight;
-    }
-
-    public void setWeight(String weight) {
-        this.weight = weight;
-    }
-
-    public String getEthnicgroup() {
-        return ethnicgroup;
-    }
-
-    public void setEthnicgroup(String ethnicgroup) {
-        this.ethnicgroup = ethnicgroup;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public String getMarriage() {
-        return marriage;
-    }
-
-    public void setMarriage(String marriage) {
-        this.marriage = marriage;
-    }
-
-    public String getHighlight() {
-        return highlight;
-    }
-
-    public void setHighlight(String highlight) {
-        this.highlight = highlight;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getTruename() {
-        return truename;
-    }
-
-    public void setTruename(String truename) {
-        this.truename = truename;
-    }
-
-    public String getMobile_phone() {
-        return mobile_phone;
-    }
-
-    public void setMobile_phone(String mobile_phone) {
-        this.mobile_phone = mobile_phone;
-    }
-
-    public int getLevel() {
-        return level;
-    }
-
-    public void setLevel(int level) {
-        this.level = level;
-    }
-
-    public int getIs_fulltime() {
-        return is_fulltime;
-    }
-
-    public void setIs_fulltime(int is_fulltime) {
-        this.is_fulltime = is_fulltime;
-    }
-
-    public int getTotal_score() {
-        return total_score;
-    }
-
-    public void setTotal_score(int total_score) {
-        this.total_score = total_score;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getTel() {
-        return tel;
-    }
-
-    public void setTel(String tel) {
-        this.tel = tel;
-    }
-
-    public Date getCreate_time() {
-        return create_time;
-    }
-
-    public void setCreate_time(Date create_time) {
-        this.create_time = create_time;
-    }
-
-    public int getGender() {
-        return gender;
-    }
-
-    public void setGender(int gender) {
-        this.gender = gender;
-    }
-
-    public String getPortrait() {
-        return portrait;
-    }
-
-    public void setPortrait(String portrait) {
-        this.portrait = portrait;
-    }
-
-    public Date getBirthday() {
-        return birthday;
-    }
-
-    public void setBirthday(Date birthday) {
-        this.birthday = birthday;
-    }
-
-    public String getQq() {
-        return qq;
-    }
-
-    public void setQq(String qq) {
-        this.qq = qq;
-    }
-
-    public Date getUpdate_time() {
-        return update_time;
-    }
-
-    public void setUpdate_time(Date update_time) {
-        this.update_time = update_time;
-    }
-
-    public String getAddress() {
-        return address;
-    }
-
-    public void setAddress(String address) {
-        this.address = address;
-    }
-
-    public String getBrief() {
-        return brief;
-    }
-
-    public void setBrief(String brief) {
-        this.brief = brief;
-    }
-
-    public String getIdcard() {
-        return idcard;
-    }
-
-    public void setIdcard(String idcard) {
-        this.idcard = idcard;
-    }
-
-    public String getEducation() {
-        return education;
-    }
-
-    public void setEducation(String education) {
-        this.education = education;
-    }
-
-    public int getCity() {
-        return city;
-    }
-
-    public void setCity(int city) {
-        this.city = city;
-    }
-
-    public int getDistrict() {
-        return district;
-    }
-
-    public void setDistrict(int district) {
-        this.district = district;
-    }
-
-    public String getService_number() {
-        return service_number;
-    }
-
-    public void setService_number(String service_number) {
-        this.service_number = service_number;
-    }
-
-    public int getProvince() {
-        return province;
-    }
-
-    public void setProvince(int province) {
-        this.province = province;
-    }
-
-    public int getUpdate_uid() {
-        return update_uid;
-    }
-
-    public void setUpdate_uid(int update_uid) {
-        this.update_uid = update_uid;
-    }
-
-    public Date getUpdated_at() {
-        return updated_at;
-    }
-
-    public void setUpdated_at(Date updated_at) {
-        this.updated_at = updated_at;
-    }
-
-    public String getSeniority() {
-        return seniority;
-    }
-
-    public void setSeniority(String seniority) {
-        this.seniority = seniority;
-    }
-
-    public String getBabynumber() {
-        return babynumber;
-    }
-
-    public void setBabynumber(String babynumber) {
-        this.babynumber = babynumber;
-    }
-
-    public String getConstellation() {
-        return constellation;
-    }
-
-    public void setConstellation(String constellation) {
-        this.constellation = constellation;
-    }
-
-    public String getZodiac() {
-        return zodiac;
-    }
-
-    public void setZodiac(String zodiac) {
-        this.zodiac = zodiac;
-    }
+package com.ygj.yuemum.domain.maternitymatron;
+
+import java.util.Date;
+
+public class JlServiceUserInfo {
+
+    private int id;
+    private String truename;
+    private String mobile_phone;
+    private int level;
+    private int is_fulltime;
+    private int total_score;
+    private String email;
+    private String tel;
+    private Date create_time;
+    private int gender;
+    private String portrait;
+    private Date birthday;
+    private String qq;
+    private Date update_time;
+    private String address;
+    private String brief;
+    private String idcard;
+    private String education;
+    private int city;
+    private int district;
+    private String service_number;
+    private int province;
+    private int update_uid;
+    private Date updated_at;
+    private String seniority;
+    private String babynumber;
+    private String constellation;
+    private String zodiac;
+    private String ethnicgroup;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String weight;
+    private String characters;
+    private Integer servicesdays;
+    private Integer twins;
+
+    public String getCharacters() {
+        return characters;
+    }
+
+    public void setCharacters(String characters) {
+        this.characters = characters;
+    }
+
+    public Integer getTwins() {
+        return twins;
+    }
+
+    public void setTwins(Integer twins) {
+        this.twins = twins;
+    }
+
+    public Integer getServicesdays() {
+        return servicesdays;
+    }
+
+    public void setServicesdays(Integer servicesdays) {
+        this.servicesdays = servicesdays;
+    }
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getMobile_phone() {
+        return mobile_phone;
+    }
+
+    public void setMobile_phone(String mobile_phone) {
+        this.mobile_phone = mobile_phone;
+    }
+
+    public int getLevel() {
+        return level;
+    }
+
+    public void setLevel(int level) {
+        this.level = level;
+    }
+
+    public int getIs_fulltime() {
+        return is_fulltime;
+    }
+
+    public void setIs_fulltime(int is_fulltime) {
+        this.is_fulltime = is_fulltime;
+    }
+
+    public int getTotal_score() {
+        return total_score;
+    }
+
+    public void setTotal_score(int total_score) {
+        this.total_score = total_score;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public Date getCreate_time() {
+        return create_time;
+    }
+
+    public void setCreate_time(Date create_time) {
+        this.create_time = create_time;
+    }
+
+    public int getGender() {
+        return gender;
+    }
+
+    public void setGender(int gender) {
+        this.gender = gender;
+    }
+
+    public String getPortrait() {
+        return portrait;
+    }
+
+    public void setPortrait(String portrait) {
+        this.portrait = portrait;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public String getQq() {
+        return qq;
+    }
+
+    public void setQq(String qq) {
+        this.qq = qq;
+    }
+
+    public Date getUpdate_time() {
+        return update_time;
+    }
+
+    public void setUpdate_time(Date update_time) {
+        this.update_time = update_time;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getBrief() {
+        return brief;
+    }
+
+    public void setBrief(String brief) {
+        this.brief = brief;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
+
+    public int getCity() {
+        return city;
+    }
+
+    public void setCity(int city) {
+        this.city = city;
+    }
+
+    public int getDistrict() {
+        return district;
+    }
+
+    public void setDistrict(int district) {
+        this.district = district;
+    }
+
+    public String getService_number() {
+        return service_number;
+    }
+
+    public void setService_number(String service_number) {
+        this.service_number = service_number;
+    }
+
+    public int getProvince() {
+        return province;
+    }
+
+    public void setProvince(int province) {
+        this.province = province;
+    }
+
+    public int getUpdate_uid() {
+        return update_uid;
+    }
+
+    public void setUpdate_uid(int update_uid) {
+        this.update_uid = update_uid;
+    }
+
+    public Date getUpdated_at() {
+        return updated_at;
+    }
+
+    public void setUpdated_at(Date updated_at) {
+        this.updated_at = updated_at;
+    }
+
+    public String getSeniority() {
+        return seniority;
+    }
+
+    public void setSeniority(String seniority) {
+        this.seniority = seniority;
+    }
+
+    public String getBabynumber() {
+        return babynumber;
+    }
+
+    public void setBabynumber(String babynumber) {
+        this.babynumber = babynumber;
+    }
+
+    public String getConstellation() {
+        return constellation;
+    }
+
+    public void setConstellation(String constellation) {
+        this.constellation = constellation;
+    }
+
+    public String getZodiac() {
+        return zodiac;
+    }
+
+    public void setZodiac(String zodiac) {
+        this.zodiac = zodiac;
+    }
 }

+ 103 - 103
src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUser.java

@@ -1,104 +1,104 @@
-package com.ygj.yuemum.domain.maternitymatron;
-
-public class QueryServiceUser {
-
-    private String id;
-    private String truename;
-    private String status;
-    private String idcard;
-    private String cityname;
-    private String np;
-    private String experience;
-    private String gender;
-    private String salt;
-    int page;
-    int limit;
-
-    public String getSalt() {
-        return salt;
-    }
-
-    public void setSalt(String salt) {
-        this.salt = salt;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getTruename() {
-        return truename;
-    }
-
-    public void setTruename(String truename) {
-        this.truename = truename;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getIdcard() {
-        return idcard;
-    }
-
-    public void setIdcard(String idcard) {
-        this.idcard = idcard;
-    }
-
-    public String getCityname() {
-        return cityname;
-    }
-
-    public void setCityname(String cityname) {
-        this.cityname = cityname;
-    }
-
-    public String getNp() {
-        return np;
-    }
-
-    public void setNp(String np) {
-        this.np = np;
-    }
-
-    public String getExperience() {
-        return experience;
-    }
-
-    public void setExperience(String experience) {
-        this.experience = experience;
-    }
-
-    public String getGender() {
-        return gender;
-    }
-
-    public void setGender(String gender) {
-        this.gender = gender;
-    }
-
-    public int getPage() {
-        return page;
-    }
-
-    public void setPage(int page) {
-        this.page = page;
-    }
-
-    public int getLimit() {
-        return limit;
-    }
-
-    public void setLimit(int limit) {
-        this.limit = limit;
-    }
+package com.ygj.yuemum.domain.maternitymatron;
+
+public class QueryServiceUser {
+
+    private String id;
+    private String truename;
+    private String status;
+    private String idcard;
+    private String cityname;
+    private String np;
+    private String experience;
+    private Integer gender;
+    private String salt;
+    int page;
+    int limit;
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getCityname() {
+        return cityname;
+    }
+
+    public void setCityname(String cityname) {
+        this.cityname = cityname;
+    }
+
+    public String getNp() {
+        return np;
+    }
+
+    public void setNp(String np) {
+        this.np = np;
+    }
+
+    public String getExperience() {
+        return experience;
+    }
+
+    public void setExperience(String experience) {
+        this.experience = experience;
+    }
+
+    public Integer getGender() {
+        return gender;
+    }
+
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
 }

+ 288 - 261
src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUserStock.java

@@ -1,262 +1,289 @@
-package com.ygj.yuemum.domain.maternitymatron;
-
-import java.util.List;
-
-public class QueryServiceUserStock {
-
-    private String id;
-    private String truename;
-    private String status;
-    private String cityname;
-    private List<String> np;
-    private String experiencestart;
-    private String experienceend;
-    private String experience;
-    private String gender;
-    private List<String> constellation;
-    private List<String> zodiac;
-    private String babynumber;
-    private String service_start;
-    private String service_end;
-    private String ids;
-    private String ethnicgroup;
-    private List<String> education;
-    private String height;
-    private String marriage;
-    private String highlight;
-    private String weight;
-    private String agestart;
-    private String ageend;
-    private String salt;
-    private Integer days;
-    private String mobile_phone;
-    int page;
-    int limit;
-
-
-    public String getMobile_phone() {
-        return mobile_phone;
-    }
-
-    public void setMobile_phone(String mobile_phone) {
-        this.mobile_phone = mobile_phone;
-    }
-
-    public Integer getDays() {
-        return days;
-    }
-
-    public void setDays(Integer days) {
-        this.days = days;
-    }
-
-    public String getSalt() {
-        return salt;
-    }
-
-    public void setSalt(String salt) {
-        this.salt = salt;
-    }
-
-    public String getEthnicgroup() {
-        return ethnicgroup;
-    }
-
-    public void setEthnicgroup(String ethnicgroup) {
-        this.ethnicgroup = ethnicgroup;
-    }
-
-    public List<String> getNp() {
-        return np;
-    }
-
-    public void setNp(List<String> np) {
-        this.np = np;
-    }
-
-    public List<String> getEducation() {
-        return education;
-    }
-
-    public void setEducation(List<String> education) {
-        this.education = education;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public String getMarriage() {
-        return marriage;
-    }
-
-    public void setMarriage(String marriage) {
-        this.marriage = marriage;
-    }
-
-    public String getHighlight() {
-        return highlight;
-    }
-
-    public void setHighlight(String highlight) {
-        this.highlight = highlight;
-    }
-
-    public String getExperience() {
-        return experience;
-    }
-
-    public void setExperience(String experience) {
-        this.experience = experience;
-    }
-
-    public String getWeight() {
-        return weight;
-    }
-
-    public void setWeight(String weight) {
-        this.weight = weight;
-    }
-
-    public String getAgestart() {
-        return agestart;
-    }
-
-    public void setAgestart(String agestart) {
-        this.agestart = agestart;
-    }
-
-    public String getAgeend() {
-        return ageend;
-    }
-
-    public void setAgeend(String ageend) {
-        this.ageend = ageend;
-    }
-
-    public String getIds() {
-        return ids;
-    }
-
-    public void setIds(String ids) {
-        this.ids = ids;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getTruename() {
-        return truename;
-    }
-
-    public void setTruename(String truename) {
-        this.truename = truename;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getCityname() {
-        return cityname;
-    }
-
-    public void setCityname(String cityname) {
-        this.cityname = cityname;
-    }
-
-
-
-    public String getExperiencestart() {
-        return experiencestart;
-    }
-
-    public void setExperiencestart(String experiencestart) {
-        this.experiencestart = experiencestart;
-    }
-
-    public String getExperienceend() {
-        return experienceend;
-    }
-
-    public void setExperienceend(String experienceend) {
-        this.experienceend = experienceend;
-    }
-
-    public String getGender() {
-        return gender;
-    }
-
-    public void setGender(String gender) {
-        this.gender = gender;
-    }
-
-    public List<String> getConstellation() {
-        return constellation;
-    }
-
-    public void setConstellation(List<String> constellation) {
-        this.constellation = constellation;
-    }
-
-    public List<String> getZodiac() {
-        return zodiac;
-    }
-
-    public void setZodiac(List<String> zodiac) {
-        this.zodiac = zodiac;
-    }
-
-    public String getBabynumber() {
-        return babynumber;
-    }
-
-    public void setBabynumber(String babynumber) {
-        this.babynumber = babynumber;
-    }
-
-    public String getService_start() {
-        return service_start;
-    }
-
-    public void setService_start(String service_start) {
-        this.service_start = service_start;
-    }
-
-    public String getService_end() {
-        return service_end;
-    }
-
-    public void setService_end(String service_end) {
-        this.service_end = service_end;
-    }
-
-    public int getPage() {
-        return page;
-    }
-
-    public void setPage(int page) {
-        this.page = page;
-    }
-
-    public int getLimit() {
-        return limit;
-    }
-
-    public void setLimit(int limit) {
-        this.limit = limit;
-    }
+package com.ygj.yuemum.domain.maternitymatron;
+
+import java.util.List;
+
+public class QueryServiceUserStock {
+
+    private String id;
+    private String truename;
+    private String status;
+    private String cityname;
+    private List<String> np;
+    private String experiencestart;
+    private String experienceend;
+    private String experience;
+    private Integer gender;
+    private List<String> constellation;
+    private List<String> zodiac;
+    private String babynumber;
+    private String service_start;
+    private String service_end;
+    private String ids;
+    private String ethnicgroup;
+    private List<String> education;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String weight;
+    private String agestart;
+    private String ageend;
+    private String salt;
+    private Integer days;
+    private Integer servicesdays;
+    private String characters;
+    private Integer twins;
+    private String mobile_phone;
+    int page;
+    int limit;
+
+    public Integer getServicesdays() {
+        return servicesdays;
+    }
+
+    public void setServicesdays(Integer servicesdays) {
+        this.servicesdays = servicesdays;
+    }
+
+    public Integer getTwins() {
+        return twins;
+    }
+
+    public void setTwins(Integer twins) {
+        this.twins = twins;
+    }
+
+
+    public String getCharacters() {
+        return characters;
+    }
+
+    public void setCharacters(String characters) {
+        this.characters = characters;
+    }
+
+    public String getMobile_phone() {
+        return mobile_phone;
+    }
+
+    public void setMobile_phone(String mobile_phone) {
+        this.mobile_phone = mobile_phone;
+    }
+
+    public Integer getDays() {
+        return days;
+    }
+
+    public void setDays(Integer days) {
+        this.days = days;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public List<String> getNp() {
+        return np;
+    }
+
+    public void setNp(List<String> np) {
+        this.np = np;
+    }
+
+    public List<String> getEducation() {
+        return education;
+    }
+
+    public void setEducation(List<String> education) {
+        this.education = education;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getExperience() {
+        return experience;
+    }
+
+    public void setExperience(String experience) {
+        this.experience = experience;
+    }
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getAgestart() {
+        return agestart;
+    }
+
+    public void setAgestart(String agestart) {
+        this.agestart = agestart;
+    }
+
+    public String getAgeend() {
+        return ageend;
+    }
+
+    public void setAgeend(String ageend) {
+        this.ageend = ageend;
+    }
+
+    public String getIds() {
+        return ids;
+    }
+
+    public void setIds(String ids) {
+        this.ids = ids;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getCityname() {
+        return cityname;
+    }
+
+    public void setCityname(String cityname) {
+        this.cityname = cityname;
+    }
+
+
+
+    public String getExperiencestart() {
+        return experiencestart;
+    }
+
+    public void setExperiencestart(String experiencestart) {
+        this.experiencestart = experiencestart;
+    }
+
+    public String getExperienceend() {
+        return experienceend;
+    }
+
+    public void setExperienceend(String experienceend) {
+        this.experienceend = experienceend;
+    }
+
+    public Integer getGender() {
+        return gender;
+    }
+
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
+
+    public List<String> getConstellation() {
+        return constellation;
+    }
+
+    public void setConstellation(List<String> constellation) {
+        this.constellation = constellation;
+    }
+
+    public List<String> getZodiac() {
+        return zodiac;
+    }
+
+    public void setZodiac(List<String> zodiac) {
+        this.zodiac = zodiac;
+    }
+
+    public String getBabynumber() {
+        return babynumber;
+    }
+
+    public void setBabynumber(String babynumber) {
+        this.babynumber = babynumber;
+    }
+
+    public String getService_start() {
+        return service_start;
+    }
+
+    public void setService_start(String service_start) {
+        this.service_start = service_start;
+    }
+
+    public String getService_end() {
+        return service_end;
+    }
+
+    public void setService_end(String service_end) {
+        this.service_end = service_end;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
 }

+ 193 - 166
src/main/java/com/ygj/yuemum/domain/utils/AddMMInfo.java

@@ -1,167 +1,194 @@
-package com.ygj.yuemum.domain.utils;
-
-public class AddMMInfo {
-
-   private String truename;
-   private String mobile_phone;
-   private String idcard;
-   private String seniority;
-   private String babynumber;
-   private int gender;
-   private String cityname;
-   private String constellation;
-   private String zodiac;
-   private int store_id;
-   private int np;
-   private String ethnicgroup;
-   private String height;
-   private String marriage;
-   private String highlight;
-   private String education;
-   private String weight;
-   private String salt;
-
-    public String getSalt() {
-        return salt;
-    }
-
-    public void setSalt(String salt) {
-        this.salt = salt;
-    }
-
-    public String getWeight() {
-        return weight;
-    }
-
-    public void setWeight(String weight) {
-        this.weight = weight;
-    }
-
-    public String getEthnicgroup() {
-        return ethnicgroup;
-    }
-
-    public void setEthnicgroup(String ethnicgroup) {
-        this.ethnicgroup = ethnicgroup;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public String getMarriage() {
-        return marriage;
-    }
-
-    public void setMarriage(String marriage) {
-        this.marriage = marriage;
-    }
-
-    public String getHighlight() {
-        return highlight;
-    }
-
-    public void setHighlight(String highlight) {
-        this.highlight = highlight;
-    }
-
-    public String getEducation() {
-        return education;
-    }
-
-    public void setEducation(String education) {
-        this.education = education;
-    }
-
-    public String getTruename() {
-        return truename;
-    }
-
-    public void setTruename(String truename) {
-        this.truename = truename;
-    }
-
-    public String getMobile_phone() {
-        return mobile_phone;
-    }
-
-    public void setMobile_phone(String mobile_phone) {
-        this.mobile_phone = mobile_phone;
-    }
-
-    public String getIdcard() {
-        return idcard;
-    }
-
-    public void setIdcard(String idcard) {
-        this.idcard = idcard;
-    }
-
-    public String getSeniority() {
-        return seniority;
-    }
-
-    public void setSeniority(String seniority) {
-        this.seniority = seniority;
-    }
-
-    public String getBabynumber() {
-        return babynumber;
-    }
-
-    public void setBabynumber(String babynumber) {
-        this.babynumber = babynumber;
-    }
-
-    public int getGender() {
-        return gender;
-    }
-
-    public void setGender(int gender) {
-        this.gender = gender;
-    }
-
-    public String getCityname() {
-        return cityname;
-    }
-
-    public void setCityname(String cityname) {
-        this.cityname = cityname;
-    }
-
-    public String getConstellation() {
-        return constellation;
-    }
-
-    public void setConstellation(String constellation) {
-        this.constellation = constellation;
-    }
-
-    public String getZodiac() {
-        return zodiac;
-    }
-
-    public void setZodiac(String zodiac) {
-        this.zodiac = zodiac;
-    }
-
-    public int getStore_id() {
-        return store_id;
-    }
-
-    public void setStore_id(int store_id) {
-        this.store_id = store_id;
-    }
-
-    public int getNp() {
-        return np;
-    }
-
-    public void setNp(int np) {
-        this.np = np;
-    }
+package com.ygj.yuemum.domain.utils;
+
+public class AddMMInfo {
+
+   private String truename;
+   private String mobile_phone;
+   private String idcard;
+   private String seniority;
+   private String babynumber;
+   private int gender;
+   private String cityname;
+   private String constellation;
+   private String zodiac;
+   private int store_id;
+   private int np;
+   private String ethnicgroup;
+   private String height;
+   private String marriage;
+   private String highlight;
+   private String education;
+   private String weight;
+   private String salt;
+   private Integer servicesdays;
+   private String characters;
+   private Integer twins;
+
+    public Integer getServicesdays() {
+        return servicesdays;
+    }
+
+    public void setServicesdays(Integer servicesdays) {
+        this.servicesdays = servicesdays;
+    }
+
+    public String getCharacters() {
+        return characters;
+    }
+
+    public void setCharacters(String characters) {
+        this.characters = characters;
+    }
+
+    public Integer getTwins() {
+        return twins;
+    }
+
+    public void setTwins(Integer twins) {
+        this.twins = twins;
+    }
+
+    public String getSalt() {
+        return salt;
+    }
+
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getMobile_phone() {
+        return mobile_phone;
+    }
+
+    public void setMobile_phone(String mobile_phone) {
+        this.mobile_phone = mobile_phone;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getSeniority() {
+        return seniority;
+    }
+
+    public void setSeniority(String seniority) {
+        this.seniority = seniority;
+    }
+
+    public String getBabynumber() {
+        return babynumber;
+    }
+
+    public void setBabynumber(String babynumber) {
+        this.babynumber = babynumber;
+    }
+
+    public int getGender() {
+        return gender;
+    }
+
+    public void setGender(int gender) {
+        this.gender = gender;
+    }
+
+    public String getCityname() {
+        return cityname;
+    }
+
+    public void setCityname(String cityname) {
+        this.cityname = cityname;
+    }
+
+    public String getConstellation() {
+        return constellation;
+    }
+
+    public void setConstellation(String constellation) {
+        this.constellation = constellation;
+    }
+
+    public String getZodiac() {
+        return zodiac;
+    }
+
+    public void setZodiac(String zodiac) {
+        this.zodiac = zodiac;
+    }
+
+    public int getStore_id() {
+        return store_id;
+    }
+
+    public void setStore_id(int store_id) {
+        this.store_id = store_id;
+    }
+
+    public int getNp() {
+        return np;
+    }
+
+    public void setNp(int np) {
+        this.np = np;
+    }
 }

+ 11 - 0
src/main/java/com/ygj/yuemum/domain/wxmini/WXDianPing.java

@@ -1,5 +1,7 @@
 package com.ygj.yuemum.domain.wxmini;
 
+import java.util.List;
+
 public class WXDianPing {
     private Integer id;
     private String wd_username;
@@ -11,10 +13,19 @@ public class WXDianPing {
     private Integer wd_create_user;
     private String wd_create_user_name;
     private String image_list;
+    private List<WXDianPingImages> dianPingImages;
     private Integer imgs;
     private Integer page;
     private Integer limit;
 
+    public List<WXDianPingImages> getDianPingImages() {
+        return dianPingImages;
+    }
+
+    public void setDianPingImages(List<WXDianPingImages> dianPingImages) {
+        this.dianPingImages = dianPingImages;
+    }
+
     public Integer getImgs() {
         return imgs;
     }

+ 58 - 0
src/main/java/com/ygj/yuemum/domain/wxmini/WXMMSearchAnswer.java

@@ -0,0 +1,58 @@
+package com.ygj.yuemum.domain.wxmini;
+
+public class WXMMSearchAnswer {
+    private Integer id;
+    private Integer wma_question_id;
+    private String wma_desc;
+    private Integer wma_seq;
+    private Integer wma_status;
+    private String wma_value;
+
+    public String getWma_value() {
+        return wma_value;
+    }
+
+    public void setWma_value(String wma_value) {
+        this.wma_value = wma_value;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getWma_question_id() {
+        return wma_question_id;
+    }
+
+    public void setWma_question_id(Integer wma_question_id) {
+        this.wma_question_id = wma_question_id;
+    }
+
+    public String getWma_desc() {
+        return wma_desc;
+    }
+
+    public void setWma_desc(String wma_desc) {
+        this.wma_desc = wma_desc;
+    }
+
+    public Integer getWma_seq() {
+        return wma_seq;
+    }
+
+    public void setWma_seq(Integer wma_seq) {
+        this.wma_seq = wma_seq;
+    }
+
+    public Integer getWma_status() {
+        return wma_status;
+    }
+
+    public void setWma_status(Integer wma_status) {
+        this.wma_status = wma_status;
+    }
+}

+ 105 - 0
src/main/java/com/ygj/yuemum/domain/wxmini/WXMMSearchQuestion.java

@@ -0,0 +1,105 @@
+package com.ygj.yuemum.domain.wxmini;
+
+import java.util.List;
+
+public class WXMMSearchQuestion {
+    private Integer id;
+    private Integer wsq_seq;
+    private String wsq_name;
+    private Integer wsq_type;
+    private Integer wsq_create_user;
+    private String wsq_create_date;
+    private String wsq_comments;
+    private Integer wsq_status;
+    private List<WXMMSearchAnswer> wxmmSearchAnswerList;
+    private Integer limit;
+    private Integer page;
+
+    public String getWsq_comments() {
+        return wsq_comments;
+    }
+
+    public void setWsq_comments(String wsq_comments) {
+        this.wsq_comments = wsq_comments;
+    }
+
+    public List<WXMMSearchAnswer> getWxmmSearchAnswerList() {
+        return wxmmSearchAnswerList;
+    }
+
+    public void setWxmmSearchAnswerList(List<WXMMSearchAnswer> wxmmSearchAnswerList) {
+        this.wxmmSearchAnswerList = wxmmSearchAnswerList;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getWsq_seq() {
+        return wsq_seq;
+    }
+
+    public void setWsq_seq(Integer wsq_seq) {
+        this.wsq_seq = wsq_seq;
+    }
+
+    public String getWsq_name() {
+        return wsq_name;
+    }
+
+    public void setWsq_name(String wsq_name) {
+        this.wsq_name = wsq_name;
+    }
+
+    public Integer getWsq_type() {
+        return wsq_type;
+    }
+
+    public void setWsq_type(Integer wsq_type) {
+        this.wsq_type = wsq_type;
+    }
+
+    public Integer getWsq_create_user() {
+        return wsq_create_user;
+    }
+
+    public void setWsq_create_user(Integer wsq_create_user) {
+        this.wsq_create_user = wsq_create_user;
+    }
+
+    public String getWsq_create_date() {
+        return wsq_create_date;
+    }
+
+    public void setWsq_create_date(String wsq_create_date) {
+        this.wsq_create_date = wsq_create_date;
+    }
+
+    public Integer getWsq_status() {
+        return wsq_status;
+    }
+
+    public void setWsq_status(Integer wsq_status) {
+        this.wsq_status = wsq_status;
+    }
+}

+ 87 - 0
src/main/java/com/ygj/yuemum/domain/wxmini/WXMMUserSearch.java

@@ -0,0 +1,87 @@
+package com.ygj.yuemum.domain.wxmini;
+
+import java.util.List;
+
+public class WXMMUserSearch {
+    private Integer id;
+    private String wmu_openid;
+    private String wmu_phone;
+    private String wmu_city;
+    private String wmu_date;
+    private String wmu_city_name;
+    private Integer page;
+    private Integer limit;
+    private List<WXMMUserSearchDetail> wxMMUserSearchDetails;
+    public List<WXMMUserSearchDetail> getWxMMUserSearchDetails() {
+        return wxMMUserSearchDetails;
+    }
+
+
+    public String getWmu_city_name() {
+        return wmu_city_name;
+    }
+
+    public void setWmu_city_name(String wmu_city_name) {
+        this.wmu_city_name = wmu_city_name;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
+
+    public void setWxMMUserSearchDetails(List<WXMMUserSearchDetail> wxMMUserSearchDetails) {
+        this.wxMMUserSearchDetails = wxMMUserSearchDetails;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getWmu_openid() {
+        return wmu_openid;
+    }
+
+    public void setWmu_openid(String wmu_openid) {
+        this.wmu_openid = wmu_openid;
+    }
+
+    public String getWmu_phone() {
+        return wmu_phone;
+    }
+
+    public void setWmu_phone(String wmu_phone) {
+        this.wmu_phone = wmu_phone;
+    }
+
+    public String getWmu_city() {
+        return wmu_city;
+    }
+
+    public void setWmu_city(String wmu_city) {
+        this.wmu_city = wmu_city;
+    }
+
+    public String getWmu_date() {
+        return wmu_date;
+    }
+
+    public void setWmu_date(String wmu_date) {
+        this.wmu_date = wmu_date;
+    }
+}

+ 77 - 0
src/main/java/com/ygj/yuemum/domain/wxmini/WXMMUserSearchDetail.java

@@ -0,0 +1,77 @@
+package com.ygj.yuemum.domain.wxmini;
+
+public class WXMMUserSearchDetail {
+    private Integer id;
+    private Integer wmu_id;
+    private String wmud_phone;
+    private Integer wmud_qid;
+    private Integer wmud_aid;
+    private String wmud_value;
+    private String wsq_name;
+    private String returnvalue;
+
+    public String getWsq_name() {
+        return wsq_name;
+    }
+
+    public void setWsq_name(String wsq_name) {
+        this.wsq_name = wsq_name;
+    }
+
+    public String getReturnvalue() {
+        return returnvalue;
+    }
+
+    public void setReturnvalue(String returnvalue) {
+        this.returnvalue = returnvalue;
+    }
+
+    public String getWmud_value() {
+        return wmud_value;
+    }
+
+    public void setWmud_value(String wmud_value) {
+        this.wmud_value = wmud_value;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getWmu_id() {
+        return wmu_id;
+    }
+
+    public void setWmu_id(Integer wmu_id) {
+        this.wmu_id = wmu_id;
+    }
+
+    public String getWmud_phone() {
+        return wmud_phone;
+    }
+
+    public void setWmud_phone(String wmud_phone) {
+        this.wmud_phone = wmud_phone;
+    }
+
+    public Integer getWmud_qid() {
+        return wmud_qid;
+    }
+
+    public void setWmud_qid(Integer wmud_qid) {
+        this.wmud_qid = wmud_qid;
+    }
+
+    public Integer getWmud_aid() {
+        return wmud_aid;
+    }
+
+    public void setWmud_aid(Integer wmud_aid) {
+        this.wmud_aid = wmud_aid;
+    }
+
+}

+ 147 - 130
src/main/java/com/ygj/yuemum/domain/wxmini/WXUser.java

@@ -1,131 +1,148 @@
-package com.ygj.yuemum.domain.wxmini;
-
-public class WXUser {
-    private Integer id;
-    private String xu_openid;
-    private String xu_sessionkey;
-    private String xu_phone;
-    private String xu_countryCode;
-    private String xu_name;
-    private String xu_avatarUrl;
-    private String xu_gender;
-    private String xu_city;
-    private String xu_province;
-    private String xu_country;
-    private String xu_language;
-    private String xu_ydate;
-    private Integer xu_isauthorize;
-
-
-    public String getXu_countryCode() {
-        return xu_countryCode;
-    }
-
-    public void setXu_countryCode(String xu_countryCode) {
-        this.xu_countryCode = xu_countryCode;
-    }
-
-    public Integer getXu_isauthorize() {
-        return xu_isauthorize;
-    }
-
-    public void setXu_isauthorize(Integer xu_isauthorize) {
-        this.xu_isauthorize = xu_isauthorize;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getXu_openid() {
-        return xu_openid;
-    }
-
-    public void setXu_openid(String xu_openid) {
-        this.xu_openid = xu_openid;
-    }
-
-    public String getXu_sessionkey() {
-        return xu_sessionkey;
-    }
-
-    public void setXu_sessionkey(String xu_sessionkey) {
-        this.xu_sessionkey = xu_sessionkey;
-    }
-
-    public String getXu_phone() {
-        return xu_phone;
-    }
-
-    public void setXu_phone(String xu_phone) {
-        this.xu_phone = xu_phone;
-    }
-
-    public String getXu_name() {
-        return xu_name;
-    }
-
-    public void setXu_name(String xu_name) {
-        this.xu_name = xu_name;
-    }
-
-    public String getXu_avatarUrl() {
-        return xu_avatarUrl;
-    }
-
-    public void setXu_avatarUrl(String xu_avatarUrl) {
-        this.xu_avatarUrl = xu_avatarUrl;
-    }
-
-    public String getXu_gender() {
-        return xu_gender;
-    }
-
-    public void setXu_gender(String xu_gender) {
-        this.xu_gender = xu_gender;
-    }
-
-    public String getXu_city() {
-        return xu_city;
-    }
-
-    public void setXu_city(String xu_city) {
-        this.xu_city = xu_city;
-    }
-
-    public String getXu_province() {
-        return xu_province;
-    }
-
-    public void setXu_province(String xu_province) {
-        this.xu_province = xu_province;
-    }
-
-    public String getXu_country() {
-        return xu_country;
-    }
-
-    public void setXu_country(String xu_country) {
-        this.xu_country = xu_country;
-    }
-
-    public String getXu_language() {
-        return xu_language;
-    }
-
-    public void setXu_language(String xu_language) {
-        this.xu_language = xu_language;
-    }
-
-    public String getXu_ydate() {
-        return xu_ydate;
-    }
-
-    public void setXu_ydate(String xu_ydate) {
-        this.xu_ydate = xu_ydate;
-    }
+package com.ygj.yuemum.domain.wxmini;
+
+public class WXUser {
+    private Integer id;
+    private String xu_openid;
+    private String xu_sessionkey;
+    private String xu_phone;
+    private String xu_countryCode;
+    private String xu_name;
+    private String xu_avatarUrl;
+    private String xu_gender;
+    private String xu_city;
+    private String xu_province;
+    private String xu_country;
+    private String xu_language;
+    private String xu_ydate;
+    private Integer xu_isauthorize;
+    private String xu_content_type;
+    private String xu_content_date;
+
+    public String getXu_content_type() {
+        return xu_content_type;
+    }
+
+    public void setXu_content_type(String xu_content_type) {
+        this.xu_content_type = xu_content_type;
+    }
+
+    public String getXu_content_date() {
+        return xu_content_date;
+    }
+
+    public void setXu_content_date(String xu_content_date) {
+        this.xu_content_date = xu_content_date;
+    }
+
+    public String getXu_countryCode() {
+        return xu_countryCode;
+    }
+
+    public void setXu_countryCode(String xu_countryCode) {
+        this.xu_countryCode = xu_countryCode;
+    }
+
+    public Integer getXu_isauthorize() {
+        return xu_isauthorize;
+    }
+
+    public void setXu_isauthorize(Integer xu_isauthorize) {
+        this.xu_isauthorize = xu_isauthorize;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getXu_openid() {
+        return xu_openid;
+    }
+
+    public void setXu_openid(String xu_openid) {
+        this.xu_openid = xu_openid;
+    }
+
+    public String getXu_sessionkey() {
+        return xu_sessionkey;
+    }
+
+    public void setXu_sessionkey(String xu_sessionkey) {
+        this.xu_sessionkey = xu_sessionkey;
+    }
+
+    public String getXu_phone() {
+        return xu_phone;
+    }
+
+    public void setXu_phone(String xu_phone) {
+        this.xu_phone = xu_phone;
+    }
+
+    public String getXu_name() {
+        return xu_name;
+    }
+
+    public void setXu_name(String xu_name) {
+        this.xu_name = xu_name;
+    }
+
+    public String getXu_avatarUrl() {
+        return xu_avatarUrl;
+    }
+
+    public void setXu_avatarUrl(String xu_avatarUrl) {
+        this.xu_avatarUrl = xu_avatarUrl;
+    }
+
+    public String getXu_gender() {
+        return xu_gender;
+    }
+
+    public void setXu_gender(String xu_gender) {
+        this.xu_gender = xu_gender;
+    }
+
+    public String getXu_city() {
+        return xu_city;
+    }
+
+    public void setXu_city(String xu_city) {
+        this.xu_city = xu_city;
+    }
+
+    public String getXu_province() {
+        return xu_province;
+    }
+
+    public void setXu_province(String xu_province) {
+        this.xu_province = xu_province;
+    }
+
+    public String getXu_country() {
+        return xu_country;
+    }
+
+    public void setXu_country(String xu_country) {
+        this.xu_country = xu_country;
+    }
+
+    public String getXu_language() {
+        return xu_language;
+    }
+
+    public void setXu_language(String xu_language) {
+        this.xu_language = xu_language;
+    }
+
+    public String getXu_ydate() {
+        return xu_ydate;
+    }
+
+    public void setXu_ydate(String xu_ydate) {
+        this.xu_ydate = xu_ydate;
+    }
 }

+ 65 - 65
src/main/java/com/ygj/yuemum/service/customer/CustomerBookingService.java

@@ -1,66 +1,66 @@
-package com.ygj.yuemum.service.customer;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.ygj.yuemum.dao.customer.CustomerBookingDao;
-import com.ygj.yuemum.domain.customer.CustomerBooking;
-import com.ygj.yuemum.domain.equipment.EquipmenteHireHead;
-import com.ygj.yuemum.service.equipment.EquipmenteHireHeadService;
-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 CustomerBookingService {
-
-    @Autowired
-    private CustomerBookingDao customerBookingDao;
-    @Autowired
-    private EquipmenteHireHeadService equipmenteHireHeadService;
-
-
-    public Map<String, Object> selectAll(CustomerBooking customerBooking) {
-        PageHelper.startPage(customerBooking.getPage(), customerBooking.getLimit());
-        List<CustomerBooking> customerBookings = customerBookingDao.selectAll(customerBooking);
-        PageInfo<CustomerBooking> pageInfo = new PageInfo<CustomerBooking>(customerBookings);
-        long count = pageInfo.getTotal(); //获取总记录数
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", customerBookings);
-        tableData.put("total", count);
-        return tableData;
-    }
-
-    public List<CustomerBooking> selectCustomerBooking(String bk_phone) {
-        return customerBookingDao.selectCustomerBooking(bk_phone);
-    }
-
-    public int insertCustomerBooking(CustomerBooking customerBooking){
-        try {
-            int check = customerBookingDao.checkBooking(customerBooking);
-            if(check > 0) {
-                return 99;
-            } else {
-                return customerBookingDao.insertCustomerBooking(customerBooking);
-            }
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            return 0;
-        }
-    }
-    public int insertEqCustomerBooking(CustomerBooking customerBooking){
-        try{
-            customerBookingDao.insertCustomerBooking(customerBooking);
-            EquipmenteHireHead equipmenteHireHead = new EquipmenteHireHead();
-            equipmenteHireHead.setEh_code(customerBooking.getEh_code());
-            equipmenteHireHead.setEh_status(9);
-            equipmenteHireHeadService.updateEqorderStatus(equipmenteHireHead);
-        }catch (Exception ex){
-            ex.printStackTrace();
-            return 0;
-        }
-        return 1;
-    }
+package com.ygj.yuemum.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.customer.CustomerBookingDao;
+import com.ygj.yuemum.domain.customer.CustomerBooking;
+import com.ygj.yuemum.domain.equipment.EquipmenteHireHead;
+import com.ygj.yuemum.service.equipment.EquipmenteHireHeadService;
+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 CustomerBookingService {
+
+    @Autowired
+    private CustomerBookingDao customerBookingDao;
+    @Autowired
+    private EquipmenteHireHeadService equipmenteHireHeadService;
+
+
+    public Map<String, Object> selectAll(CustomerBooking customerBooking) {
+        PageHelper.startPage(customerBooking.getPage(), customerBooking.getLimit());
+        List<CustomerBooking> customerBookings = customerBookingDao.selectAll(customerBooking);
+        PageInfo<CustomerBooking> pageInfo = new PageInfo<CustomerBooking>(customerBookings);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", customerBookings);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public List<CustomerBooking> selectCustomerBooking(String bk_phone) {
+        return customerBookingDao.selectCustomerBooking(bk_phone);
+    }
+
+    public int insertCustomerBooking(CustomerBooking customerBooking){
+        try {
+            int check = customerBookingDao.checkBooking(customerBooking);
+            if(check > 0) {
+                return 99;
+            } else {
+                return customerBookingDao.insertCustomerBooking(customerBooking);
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+    public int insertEqCustomerBooking(CustomerBooking customerBooking){
+        try{
+            customerBookingDao.insertCustomerBooking(customerBooking);
+            EquipmenteHireHead equipmenteHireHead = new EquipmenteHireHead();
+            equipmenteHireHead.setEh_code(customerBooking.getEh_code());
+            equipmenteHireHead.setEh_status(9);
+            equipmenteHireHeadService.updateEqorderStatus(equipmenteHireHead);
+        }catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
 }

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

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

+ 31 - 31
src/main/java/com/ygj/yuemum/service/global/PackageItemService.java

@@ -1,32 +1,32 @@
-package com.ygj.yuemum.service.global;
-
-import com.ygj.yuemum.dao.global.PackageItemDao;
-import com.ygj.yuemum.domain.global.PackageItem;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class PackageItemService {
-
-    @Autowired
-
-    private PackageItemDao packageItemDao;
-
-    public List<PackageItem> getPackageItems() {
-        return packageItemDao.getPackageItems();
-    }
-    public List<PackageItem> getPIGroups() {
-        return packageItemDao.getPIGroups();
-    }
-    public List<PackageItem> getPIClasses() {
-        return packageItemDao.getPIClasses();
-    }
-    public List<PackageItem> getPIServices() {
-        return packageItemDao.getPIServices();
-    }
-
-
-
+package com.ygj.yuemum.service.global;
+
+import com.ygj.yuemum.dao.global.PackageItemDao;
+import com.ygj.yuemum.domain.global.PackageItem;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class PackageItemService {
+
+    @Autowired
+
+    private PackageItemDao packageItemDao;
+
+    public List<PackageItem> getPackageItems() {
+        return packageItemDao.getPackageItems();
+    }
+    public List<PackageItem> getPIGroups(String p_branches) {
+        return packageItemDao.getPIGroups(p_branches);
+    }
+    public List<PackageItem> getPIClasses(String p_branches) {
+        return packageItemDao.getPIClasses(p_branches);
+    }
+    public List<PackageItem> getPIServices(String p_branches) {
+        return packageItemDao.getPIServices(p_branches);
+    }
+
+
+
 }

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

@@ -24,8 +24,8 @@ public class PackagesService {
     public List<Packages> getPackageShowname() {
         return packagesDao.getPackageShowname();
     }
-    public List<Packages> getPackageLists() {
-        return packagesDao.getPackageLists();
+    public List<Packages> getPackageLists(String p_branches) {
+        return packagesDao.getPackageLists(p_branches);
     }
     public Packages getPackageDetail(String p_code) {
         return packagesDao.getPackageDetail(p_code);

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

@@ -235,6 +235,9 @@ public class WeChatInfoService {
         } else if (customerBooking.getBk_type().equals(1) && customerBooking.getBk_introducer_phone() != null && customerBooking.getBk_introducer_phone() != "") {
             first.setValue("套餐预约信息!介绍人手机:" + customerBooking.getBk_introducer_phone() + ",介绍人顾问:" + customerBooking.getBk_introducer_consultant() + "!");
             first.setColor("#173177");
+        } else if (customerBooking.getBk_type().equals(2) && customerBooking.getBk_introducer_phone() != null && customerBooking.getBk_introducer_phone() != "") {
+            first.setValue("月嫂预约信息!介绍人手机:" + customerBooking.getBk_introducer_phone() + ",介绍人顾问:" + customerBooking.getBk_introducer_consultant() + "!");
+            first.setColor("#173177");
         } else {
             first.setValue("预约信息!");
             first.setColor("#173177");
@@ -266,10 +269,23 @@ public class WeChatInfoService {
             keyword4.setColor("#173177");
             mapData.put("keyword4", keyword4);
         }
-        TemplateData keyword5 = new TemplateData();
-        keyword5.setValue("请尽快安排跟进!");
-        keyword5.setColor("#173177");
-        mapData.put("remark", keyword5);
+        if (customerBooking.getBk_type().equals(4)) {
+            TemplateData keyword4 = new TemplateData();
+            keyword4.setValue("月嫂信息:" + customerBooking.getBk_desc());
+            keyword4.setColor("#173177");
+            mapData.put("keyword4", keyword4);
+        }
+        if(customerBooking.getBk_type().equals(4)) {
+            TemplateData keyword5 = new TemplateData();
+            keyword5.setValue("用户选择偏好,请在智慧悦所管理系统中查询!");
+            keyword5.setColor("#173177");
+            mapData.put("remark", keyword5);
+        } else {
+            TemplateData keyword5 = new TemplateData();
+            keyword5.setValue("请尽快安排跟进!");
+            keyword5.setColor("#173177");
+            mapData.put("remark", keyword5);
+        }
         wechatTemplate.setTemplate_id(BookingTemplateid);
 
         try {

+ 193 - 150
src/main/java/com/ygj/yuemum/service/maternitymatron/JlServiceUserService.java

@@ -1,151 +1,194 @@
-package com.ygj.yuemum.service.maternitymatron;
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.ygj.yuemum.dao.maternitymatron.JlServiceUserDao;
-import com.ygj.yuemum.dao.maternitymatron.MmStockDao;
-import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
-import com.ygj.yuemum.domain.maternitymatron.MmStock;
-import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
-import com.ygj.yuemum.domain.maternitymatron.QueryServiceUserStock;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-@Service
-public class JlServiceUserService {
-
-    @Autowired
-    private JlServiceUserDao jlServiceUserDao;
-    @Autowired
-    private JlServiceUserInfoService jlServiceUserInfoService;
-    @Autowired
-    private JlStoreXService jlStoreXService;
-    @Autowired
-    private MmStockDao mmStockDao;
-
-
-    public List<JlServiceUser> getJlServiceUsers() {
-        List<JlServiceUser> jlServiceUsers = jlServiceUserDao.getOrdermm();
-        return jlServiceUsers;
-    }
-
-    //分页
-
-    public Map<String, Object> getMMList(int page, int limit) {
-        PageHelper.startPage(page, limit);
-        List<JlServiceUser> mmlists = jlServiceUserDao.getMMList();
-        PageInfo<JlServiceUser> pageInfo = new PageInfo<JlServiceUser>(mmlists);
-        long count = pageInfo.getTotal(); //获取总记录数
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", mmlists);
-        tableData.put("total", count);
-        return tableData;
-    }
-
-    public Map<String, Object> queryMMList(QueryServiceUser queryServiceUser) {
-        PageHelper.startPage(queryServiceUser.getPage(), queryServiceUser.getLimit());
-        List<QueryServiceUser> mmlists = jlServiceUserDao.queryMMList(queryServiceUser);
-        PageInfo<QueryServiceUser> pageInfo = new PageInfo<QueryServiceUser>(mmlists);
-        long count = pageInfo.getTotal(); //获取总记录数
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", mmlists);
-        tableData.put("total", count);
-        return tableData;
-    }
-
-    public Map<String, Object> queryServiceUserStock(int page, int limit) {
-        PageHelper.startPage(page, limit);
-        List<JlServiceUser> mmlists = jlServiceUserDao.queryServiceUserStock();
-        PageInfo<JlServiceUser> pageInfo = new PageInfo<JlServiceUser>(mmlists);
-        long count = pageInfo.getTotal(); //获取总记录数
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", mmlists);
-        tableData.put("total", count);
-        return tableData;
-    }
-    public Map<String, Object> queryEditServiceUser(QueryServiceUserStock queryServiceUserStock) throws ParseException {
-        List<QueryServiceUserStock> stockLists = jlServiceUserDao.queryEditServiceUser(queryServiceUserStock);
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", stockLists);
-        return tableData;
-    }
-    public Map<String, Object> queryServiceUserStockCondition(QueryServiceUserStock queryServiceUserStock) throws ParseException {
-        // 1.根据日期筛选出月嫂 获取 把不能服务的记录下来 然后数据库里 not in
-        // 2.根据id获取月嫂相关信息
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        ArrayList idlist = new ArrayList();
-        String ids = "";
-        if (queryServiceUserStock.getService_start()!=null && queryServiceUserStock.getService_end()!=null) {
-            List<MmStock> stocks = mmStockDao.getAll();
-            Date startDate = sdf.parse(queryServiceUserStock.getService_start());
-            Date endDate = sdf.parse(queryServiceUserStock.getService_end());
-            Calendar cal = Calendar.getInstance();
-            List<Date> lDate = new ArrayList<Date>();
-            lDate.add(startDate);
-            cal.setTime(startDate);
-            while (true) {
-                cal.add(Calendar.DAY_OF_MONTH, 1);
-                if (endDate.after(cal.getTime())) {
-                    lDate.add(cal.getTime());
-                } else {
-                    break;
-                }
-            }
-            lDate.add(endDate);
-            for (Date day : lDate) {
-                for (MmStock res : stocks) {
-                    if (day.getTime() >= sdf.parse(res.getStart_date()).getTime() && day.getTime() <= sdf.parse(res.getEnd_date()).getTime() ) {
-                        idlist.add(res.getServant_code());
-                    }
-                }
-            }
-            for (int i = 0; i < idlist.size(); i++) {
-                ids = ids + idlist.get(i) + ",";
-            }
-            if(ids.length()>0) {
-                queryServiceUserStock.setIds(ids.substring(0, ids.length() - 1));
-            }
-        }
-        PageHelper.startPage(queryServiceUserStock.getPage(), queryServiceUserStock.getLimit());
-        List<QueryServiceUserStock> stockLists = jlServiceUserDao.queryServiceUserStockCondition(queryServiceUserStock);
-        PageInfo<QueryServiceUserStock> pageInfo = new PageInfo<QueryServiceUserStock>(stockLists);
-        long count = pageInfo.getTotal(); //获取总记录数
-        Map<String, Object> tableData = new HashMap<>();
-        tableData.put("items", stockLists);
-        tableData.put("total", count);
-        return tableData;
-    }
-
-    public JlServiceUser getResume(Integer id) {
-        return jlServiceUserDao.getResume(id);
-    }
-
-    public int getPMId() {
-        return jlServiceUserDao.getpmid();
-    }
-
-    public int addJlServiceUser(JlServiceUser jlServiceUser) {
-        return jlServiceUserDao.insertSelective(jlServiceUser);
-    }
-
-    public int deleteJlServiceUser(Integer id) {
-        return jlServiceUserDao.deleteByPrimaryKey(id);
-    }
-
-    public int updateJlServiceUser(JlServiceUser jlServiceUser) {
-        return jlServiceUserDao.updateByPrimaryKeySelective(jlServiceUser);
-    }
-    public int saltcheck(String salt){
-        return jlServiceUserDao.saltcheck(salt);
-    }
-    public int upDateStatus(JlServiceUser jlServiceUser) {
-        return jlServiceUserDao.upDateStatus(jlServiceUser);
-    }
-    public JlServiceUser getJlServiceUser(Integer id) {
-        return jlServiceUserDao.selectByPrimaryKey(id);
-    }
+package com.ygj.yuemum.service.maternitymatron;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.maternitymatron.JlServiceUserDao;
+import com.ygj.yuemum.dao.maternitymatron.MmStockDao;
+import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.MmStock;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUserStock;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearch;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail;
+import com.ygj.yuemum.service.wxmini.WXMMUserSearchDetailService;
+import com.ygj.yuemum.service.wxmini.WXMMUserSearchService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+public class JlServiceUserService {
+
+    @Autowired
+    private JlServiceUserDao jlServiceUserDao;
+    @Autowired
+    private JlServiceUserInfoService jlServiceUserInfoService;
+    @Autowired
+    private JlStoreXService jlStoreXService;
+    @Autowired
+    private MmStockDao mmStockDao;
+    @Autowired
+    private WXMMUserSearchService wxmmUserSearchService;
+    @Autowired
+    private WXMMUserSearchDetailService wxmmUserSearchDetailService;
+
+
+    public List<JlServiceUser> queryUserMMSearch(WXMMUserSearch wxmmUserSearch,QueryServiceUserStock queryServiceUserStock) {
+        try {
+            //保存查询条件 ID没有保存
+            int id = wxmmUserSearchService.getWXMMUserSearchId();
+            wxmmUserSearchService.insertWXMMUserSearch(wxmmUserSearch);
+            for (WXMMUserSearchDetail wxmmUserSearchDetail : wxmmUserSearch.getWxMMUserSearchDetails()) {
+                wxmmUserSearchDetail.setWmu_id(id);
+                wxmmUserSearchDetail.setWmud_phone(wxmmUserSearch.getWmu_phone());
+                wxmmUserSearchDetailService.insertWXMMUserSearch(wxmmUserSearchDetail);
+            }
+            //查询月嫂
+
+            return jlServiceUserDao.queryUserMMSearch(queryServiceUserStock);
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return null;
+        }
+    }
+
+    public List<JlServiceUser> getJlServiceUsers() {
+        List<JlServiceUser> jlServiceUsers = jlServiceUserDao.getOrdermm();
+        return jlServiceUsers;
+    }
+
+    public JlServiceUser queryUserMMResult(Integer id) {
+        return jlServiceUserDao.queryUserMMResult(id);
+    }
+
+    //分页
+
+    public Map<String, Object> getMMList(int page, int limit) {
+        PageHelper.startPage(page, limit);
+        List<JlServiceUser> mmlists = jlServiceUserDao.getMMList();
+        PageInfo<JlServiceUser> pageInfo = new PageInfo<JlServiceUser>(mmlists);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", mmlists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public Map<String, Object> queryMMList(QueryServiceUser queryServiceUser) {
+        PageHelper.startPage(queryServiceUser.getPage(), queryServiceUser.getLimit());
+        List<QueryServiceUser> mmlists = jlServiceUserDao.queryMMList(queryServiceUser);
+        PageInfo<QueryServiceUser> pageInfo = new PageInfo<QueryServiceUser>(mmlists);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", mmlists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public Map<String, Object> queryServiceUserStock(int page, int limit) {
+        PageHelper.startPage(page, limit);
+        List<JlServiceUser> mmlists = jlServiceUserDao.queryServiceUserStock();
+        PageInfo<JlServiceUser> pageInfo = new PageInfo<JlServiceUser>(mmlists);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", mmlists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public Map<String, Object> queryEditServiceUser(QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        List<QueryServiceUserStock> stockLists = jlServiceUserDao.queryEditServiceUser(queryServiceUserStock);
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", stockLists);
+        return tableData;
+    }
+
+    public Map<String, Object> queryServiceUserStockCondition(QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        // 1.根据日期筛选出月嫂 获取 把不能服务的记录下来 然后数据库里 not in
+        queryServiceUserStock.setIds(getIds(queryServiceUserStock.getService_start(), queryServiceUserStock.getService_end()));
+        // 2.根据id获取月嫂相关信息
+        PageHelper.startPage(queryServiceUserStock.getPage(), queryServiceUserStock.getLimit());
+        List<JlServiceUser> stockLists = jlServiceUserDao.queryServiceUserStockCondition(queryServiceUserStock);
+        PageInfo<JlServiceUser> pageInfo = new PageInfo<JlServiceUser>(stockLists);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", stockLists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    private String getIds(String sDate, String eDate) throws ParseException {
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        ArrayList idList = new ArrayList();
+        String ids = "";
+        if (sDate != null && eDate != null) {
+            List<MmStock> stocks = mmStockDao.getAll();
+            Date startDate = sdf.parse(sDate);
+            Date endDate = sdf.parse(eDate);
+            Calendar cal = Calendar.getInstance();
+            List<Date> lDate = new ArrayList<Date>();
+            lDate.add(startDate);
+            cal.setTime(startDate);
+            while (true) {
+                cal.add(Calendar.DAY_OF_MONTH, 1);
+                if (endDate.after(cal.getTime())) {
+                    lDate.add(cal.getTime());
+                } else {
+                    break;
+                }
+            }
+            lDate.add(endDate);
+            for (Date day : lDate) {
+                for (MmStock res : stocks) {
+                    if (day.getTime() >= sdf.parse(res.getStart_date()).getTime() && day.getTime() <= sdf.parse(res.getEnd_date()).getTime()) {
+                        idList.add(res.getServant_code());
+                    }
+                }
+            }
+            for (int i = 0; i < idList.size(); i++) {
+                ids = ids + idList.get(i) + ",";
+            }
+            if (ids.length() > 0) {
+                return ids.substring(0, ids.length() - 1);
+            }
+        }
+        return "";
+    }
+
+    public JlServiceUser getResume(Integer id) {
+        return jlServiceUserDao.getResume(id);
+    }
+
+    public int getPMId() {
+        return jlServiceUserDao.getpmid();
+    }
+
+    public int addJlServiceUser(JlServiceUser jlServiceUser) {
+        return jlServiceUserDao.insertSelective(jlServiceUser);
+    }
+
+    public int deleteJlServiceUser(Integer id) {
+        return jlServiceUserDao.deleteByPrimaryKey(id);
+    }
+
+    public int updateJlServiceUser(JlServiceUser jlServiceUser) {
+        return jlServiceUserDao.updateByPrimaryKeySelective(jlServiceUser);
+    }
+
+    public int saltcheck(String salt) {
+        return jlServiceUserDao.saltcheck(salt);
+    }
+
+    public int upDateStatus(JlServiceUser jlServiceUser) {
+        return jlServiceUserDao.upDateStatus(jlServiceUser);
+    }
+
+    public JlServiceUser getJlServiceUser(Integer id) {
+        return jlServiceUserDao.selectByPrimaryKey(id);
+    }
 }

+ 50 - 3
src/main/java/com/ygj/yuemum/service/wxmini/WXContentService.java

@@ -4,12 +4,14 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.ygj.yuemum.dao.wxmini.WXContentDao;
 import com.ygj.yuemum.domain.wxmini.WXContent;
+import com.ygj.yuemum.domain.wxmini.WXContentType;
+import com.ygj.yuemum.domain.wxmini.WXUser;
+import com.ygj.yuemum.utils.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 @Service
 public class WXContentService {
@@ -17,6 +19,50 @@ public class WXContentService {
     @Autowired
 
     private WXContentDao wxContentDao;
+    @Autowired
+    private WXContentTypeService wxContentTypeService;
+    @Autowired
+    private WXUserService wxUserService;
+
+    public WXContent queryUserContent(String openid) {
+        try {
+            WXUser wxUser = wxUserService.getWXUser(openid);
+            WXContentType wxContentType = wxContentTypeService.queryWXContentType(wxUser.getXu_content_type());
+            SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
+            Date dateNow = new Date();
+            Date getDate = sdf.parse(wxUser.getXu_content_date());
+            WXContent wxContent = new WXContent();
+            int showTime = 1;
+            if(wxContentType.getWct_frequency().equals("周")) {
+                showTime = 40 - DateUtil.getWeekDiff(getDate,dateNow);
+                if (showTime >= wxContentType.getWct_step()) {
+                    wxContent.setWc_showtime(wxContentType.getWct_step());
+                    wxContent.setWc_content("宝宝出生了!");
+                    return wxContent;
+                }
+
+            } else if (wxContentType.getWct_frequency().equals("月")) {
+                System.out.println(DateUtil.getMonthDiff(dateNow,getDate));
+                showTime = DateUtil.getMonthDiff(dateNow,getDate)+1;
+                if(showTime <= 0) {
+                    showTime = 1;
+                }
+                if (showTime > wxContentType.getWct_step()) {
+                    wxContent.setWc_showtime(wxContentType.getWct_step());
+                    wxContent.setWc_content("宝宝俩岁啦!");
+                    return wxContent;
+                }
+            } else {
+                showTime = 0;
+            }
+            wxContent.setWc_type(wxUser.getXu_content_type());
+            wxContent.setWc_showtime(showTime);
+            return wxContentDao.queryUserContent(wxContent);
+        }catch (Exception ex) {
+            ex.printStackTrace();
+            return null;
+        }
+    }
 
     public List<WXContent> getWXContents() {
         return wxContentDao.getWXContents();
@@ -49,4 +95,5 @@ public class WXContentService {
         return wxContentDao.getWXContentByID(id);
     }
 
+
 }

+ 4 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXContentTypeService.java

@@ -18,4 +18,8 @@ public class WXContentTypeService {
         return wxContentTypeDao.getWXContentTypes();
     }
 
+    public WXContentType queryWXContentType(String wct_code) {
+        return wxContentTypeDao.queryWXContentType(wct_code);
+    }
+
 }

+ 14 - 1
src/main/java/com/ygj/yuemum/service/wxmini/WXDianPingService.java

@@ -5,9 +5,11 @@ import com.github.pagehelper.PageInfo;
 import com.ygj.yuemum.dao.wxmini.WXDianPingDao;
 import com.ygj.yuemum.domain.order.YSOrder;
 import com.ygj.yuemum.domain.wxmini.WXDianPing;
+import com.ygj.yuemum.domain.wxmini.WXDianPingImages;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -16,12 +18,23 @@ import java.util.Map;
 public class WXDianPingService {
 
     @Autowired
-
     private WXDianPingDao wxDianpingDao;
+    @Autowired
+    private WXDianPingImagesService wxDianPingImagesService;
 
     public List<WXDianPing> getWXDianPings() {
         return wxDianpingDao.getWXDianPings();
     }
+
+    public List<WXDianPing> getWXDianPing(){
+        List<WXDianPing> wxDianPingReturn = new ArrayList<>();
+        for(WXDianPing wxDianPing:wxDianpingDao.getWXDianPings()) {
+            wxDianPing.setDianPingImages(wxDianPingImagesService.getWXDianPingImages(wxDianPing.getId()));
+            wxDianPingReturn.add(wxDianPing);
+        }
+        return wxDianPingReturn;
+    }
+
     public  Map<String, Object> queryWXDianPings(WXDianPing wxDianPing) {
         PageHelper.startPage(wxDianPing.getPage(),wxDianPing.getLimit());
         List<WXDianPing> wxDianPings = wxDianpingDao.queryWXDianPings(wxDianPing);

+ 47 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXMMSearchAnswerService.java

@@ -0,0 +1,47 @@
+package com.ygj.yuemum.service.wxmini;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.wxmini.WXMMSearchAnswerDao;
+import com.ygj.yuemum.dao.wxmini.WXMMSearchQuestionDao;
+import com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer;
+import com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion;
+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 WXMMSearchAnswerService {
+
+    @Autowired
+
+    private WXMMSearchAnswerDao wxmmSearchAnswerDao;
+
+    public List<WXMMSearchAnswer> getWXMMSearchAnswers() {
+        return wxmmSearchAnswerDao.getWXMMSearchAnswers();
+    }
+
+    public int updateWXMMSearchAnswer(WXMMSearchAnswer wxmmSearchAnswer) {
+        return wxmmSearchAnswerDao.updateWXMMSearchAnswer(wxmmSearchAnswer);
+    }
+
+    public int insertWXMMSearchAnswer(WXMMSearchAnswer wxmmSearchAnswer) {
+        return wxmmSearchAnswerDao.insertWXMMSearchAnswer(wxmmSearchAnswer);
+    }
+
+    public int deleteWXMMSearchAnswer(Integer id) {
+        return wxmmSearchAnswerDao.deleteWXMMSearchAnswer(id);
+    }
+
+    public WXMMSearchAnswer getWXMMSearchAnswerByID(Integer id) {
+        return wxmmSearchAnswerDao.getWXMMSearchAnswerByID(id);
+    }
+
+    public List<WXMMSearchAnswer> getWXMMSearchAnswerByQID(Integer wma_question_id) {
+        return wxmmSearchAnswerDao.getWXMMSearchAnswerByQID(wma_question_id);
+    }
+
+}

+ 62 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXMMSearchQuestionService.java

@@ -0,0 +1,62 @@
+package com.ygj.yuemum.service.wxmini;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.wxmini.WXMMSearchQuestionDao;
+import com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer;
+import com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class WXMMSearchQuestionService {
+
+    @Autowired
+
+    private WXMMSearchQuestionDao wxmmSearchQuestionDao;
+
+    @Autowired
+    private WXMMSearchAnswerService wxmmSearchAnswerService;
+
+    public Map<String, Object> getWXMMSearchQuestions(WXMMSearchQuestion wxmmSearchQuestion) {
+        PageHelper.startPage(wxmmSearchQuestion.getPage(), wxmmSearchQuestion.getLimit());
+        List<WXMMSearchQuestion> wxDianPings = wxmmSearchQuestionDao.getWXMMSearchQuestions();
+        PageInfo<WXMMSearchQuestion> pageInfo = new PageInfo<WXMMSearchQuestion>(wxDianPings);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", wxDianPings);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public int updateWXMMSearchQuestion(WXMMSearchQuestion wxmmSearchQuestion) {
+        return wxmmSearchQuestionDao.updateWXMMSearchQuestion(wxmmSearchQuestion);
+    }
+
+    public int insertWXMMSearchQuestion(WXMMSearchQuestion wxmmSearchQuestion) {
+        return wxmmSearchQuestionDao.insertWXMMSearchQuestion(wxmmSearchQuestion);
+    }
+
+    public int deleteWXMMSearchQuestion(Integer id) {
+        return wxmmSearchQuestionDao.deleteWXMMSearchQuestion(id);
+    }
+
+    public WXMMSearchQuestion getWXMMSearchQuestionByID(Integer id) {
+        return wxmmSearchQuestionDao.getWXMMSearchQuestionByID(id);
+    }
+
+    public List<WXMMSearchQuestion> getWXMMSearchQuestion(){
+        List<WXMMSearchQuestion> wxmmSearchAnswersReturn = new ArrayList<>();
+        for(WXMMSearchQuestion wxmmSearchQuestion:wxmmSearchQuestionDao.getWXMMSearchQuestions()) {
+            wxmmSearchQuestion.setWxmmSearchAnswerList(wxmmSearchAnswerService.getWXMMSearchAnswerByQID(wxmmSearchQuestion.getId()));
+            wxmmSearchAnswersReturn.add(wxmmSearchQuestion);
+        }
+        return wxmmSearchAnswersReturn;
+    }
+
+}

+ 27 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXMMUserSearchDetailService.java

@@ -0,0 +1,27 @@
+package com.ygj.yuemum.service.wxmini;
+
+import com.ygj.yuemum.dao.wxmini.WXMMUserSearchDetailDao;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class WXMMUserSearchDetailService {
+
+    @Autowired
+    private WXMMUserSearchDetailDao wxmmUserSearchDetailDao;
+
+    public List<WXMMUserSearchDetail> getWXMMUserSearchDetails(String wmud_phone) {
+        return wxmmUserSearchDetailDao.getWXMMUserSearchDetails(wmud_phone);
+    }
+
+    public int insertWXMMUserSearch(WXMMUserSearchDetail wxmmUserSearchDetail) {
+        return wxmmUserSearchDetailDao.insertWXMMUserSearchDetail(wxmmUserSearchDetail);
+    }
+
+    public  List<WXMMUserSearchDetail> getWXMMUserSearchDetailByQID(Integer wmu_id) {
+        return wxmmUserSearchDetailDao.getWXMMUserSearchDetailByQID(wmu_id);
+    }
+}

+ 44 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXMMUserSearchService.java

@@ -0,0 +1,44 @@
+package com.ygj.yuemum.service.wxmini;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ygj.yuemum.dao.wxmini.WXMMUserSearchDao;
+import com.ygj.yuemum.domain.wxmini.WXMMUserSearch;
+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 WXMMUserSearchService {
+
+    @Autowired
+    private WXMMUserSearchDao wxmmUserSearchDao;
+
+    public List<WXMMUserSearch> getWXMMUserSearchs(String wmu_openid) {
+        return wxmmUserSearchDao.getWXMMUserSearchs(wmu_openid);
+    }
+
+    public int insertWXMMUserSearch(WXMMUserSearch wxmmUserSearch) {
+        return wxmmUserSearchDao.insertWXMMUserSearch(wxmmUserSearch);
+    }
+
+    public int getWXMMUserSearchId() {
+        return wxmmUserSearchDao.getWXMMUserSearchId();
+    }
+
+    public Map<String, Object> queryWXMMUserSearchs(WXMMUserSearch wxmmUserSearch) {
+        PageHelper.startPage(wxmmUserSearch.getPage(), wxmmUserSearch.getLimit());
+        List<WXMMUserSearch> wxmmUserSearches = wxmmUserSearchDao.queryWXMMUserSearchs(wxmmUserSearch);
+        PageInfo<WXMMUserSearch> pageInfo = new PageInfo<WXMMUserSearch>(wxmmUserSearches);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", wxmmUserSearches);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
+}

+ 21 - 21
src/main/java/com/ygj/yuemum/service/wxmini/WXMktInfoService.java

@@ -1,22 +1,22 @@
-package com.ygj.yuemum.service.wxmini;
-
-import com.ygj.yuemum.dao.wxmini.WXMktInfoDao;
-import com.ygj.yuemum.domain.wxmini.WXMktInfo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class WXMktInfoService {
-
-    @Autowired
-
-    private WXMktInfoDao mktInfoDao;
-
-    public List<WXMktInfo> getMktInfos() {
-        return mktInfoDao.getMktInfos();
-    }
-
-
+package com.ygj.yuemum.service.wxmini;
+
+import com.ygj.yuemum.dao.wxmini.WXMktInfoDao;
+import com.ygj.yuemum.domain.wxmini.WXMktInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class WXMktInfoService {
+
+    @Autowired
+
+    private WXMktInfoDao mktInfoDao;
+
+    public List<WXMktInfo> getMktInfos(Integer mi_branche_code) {
+        return mktInfoDao.getMktInfos(mi_branche_code);
+    }
+
+
 }

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

@@ -96,6 +96,13 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/getPromotionDCByID", "anon");
         filterChainDefinitionMap.put("/getPromotionTestUserScoreByOpenID", "anon");
         filterChainDefinitionMap.put("/getPromotionTestResultShowByPrxID", "anon");
+        filterChainDefinitionMap.put("/getWXDianPing", "anon");
+        filterChainDefinitionMap.put("/getWXContentTypes", "anon");
+        filterChainDefinitionMap.put("/queryUserContent", "anon");
+        filterChainDefinitionMap.put("/getWXUser", "anon");
+        filterChainDefinitionMap.put("/getWXMMSearchQuestion", "anon");
+        filterChainDefinitionMap.put("/queryUserMMSearch", "anon");
+        filterChainDefinitionMap.put("/getMmInfoResume", "anon");
         //萌动开放权限
         filterChainDefinitionMap.put("/getNewUserCoupon", "anon");
         filterChainDefinitionMap.put("/getConsultTaskCoupon", "anon");

+ 83 - 0
src/main/java/com/ygj/yuemum/utils/DateUtil.java

@@ -0,0 +1,83 @@
+package com.ygj.yuemum.utils;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * 文件读取工具类
+ */
+public class DateUtil {
+    public static int getWeekDiff(Date d1, Date d2) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(d1);
+        int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
+        dayOfWeek = dayOfWeek - 1;
+        if (dayOfWeek == 0) dayOfWeek = 7;
+
+        int dayOffset = getDayDiff(d1, d2);
+
+        int weekOffset = dayOffset / 7;
+        int a;
+        if (dayOffset > 0) {
+            a = (dayOffset % 7 + dayOfWeek > 7) ? 1 : 0;
+        } else {
+            a = (dayOfWeek + dayOffset % 7 < 1) ? -1 : 0;
+        }
+        weekOffset = weekOffset + a;
+        return weekOffset;
+    }
+    public static int getMonthDiff(Date d1, Date d2) {
+        Calendar c1 = Calendar.getInstance();
+        Calendar c2 = Calendar.getInstance();
+        c1.setTime(d1);
+        c2.setTime(d2);
+        int year1 = c1.get(Calendar.YEAR);
+        int year2 = c2.get(Calendar.YEAR);
+        int month1 = c1.get(Calendar.MONTH);
+        int month2 = c2.get(Calendar.MONTH);
+        int day1 = c1.get(Calendar.DAY_OF_MONTH);
+        int day2 = c2.get(Calendar.DAY_OF_MONTH);
+        // 获取年的差值 
+        int yearInterval = year1 - year2;
+        // 如果 d1的 月-日 小于 d2的 月-日 那么 yearInterval-- 这样就得到了相差的年数
+        if (month1 < month2 || month1 == month2 && day1 < day2) {
+            yearInterval--;
+        }
+        // 获取月数差值
+        int monthInterval = (month1 + 12) - month2;
+        if (day1 < day2) {
+            monthInterval--;
+        }
+        monthInterval %= 12;
+        int monthsDiff = yearInterval * 12 + monthInterval;
+        return monthsDiff;
+    }
+
+    public static int getDayDiff(Date date1, Date date2) {
+        Calendar cal1 = Calendar.getInstance();
+        cal1.setTime(date1);
+
+        Calendar cal2 = Calendar.getInstance();
+        cal2.setTime(date2);
+        int day1 = cal1.get(Calendar.DAY_OF_YEAR);
+        int day2 = cal2.get(Calendar.DAY_OF_YEAR);
+
+        int year1 = cal1.get(Calendar.YEAR);
+        int year2 = cal2.get(Calendar.YEAR);
+        if (year1 != year2) {  //同一年
+            int timeDistance = 0;
+            for (int i = year1; i < year2; i++) {
+                if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {  //闰年
+                    timeDistance += 366;
+                } else {  //不是闰年
+
+                    timeDistance += 365;
+                }
+            }
+            return timeDistance + (day2 - day1);
+        } else { //不同年
+            return day2 - day1;
+        }
+    }
+
+}

+ 64 - 64
src/main/java/com/ygj/yuemum/utils/IDcard.java

@@ -1,65 +1,65 @@
-package com.ygj.yuemum.utils;
-
-public class IDcard {
-    private final static int[] dayArr = new int[] { 20, 19, 21, 20, 21, 22, 23,
-            23, 23, 24, 23, 22 };
-    private final static String[] constellationArr = new String[] { "10",
-            "11", "12", "1", "2", "3", "4", "5", "6", "7",
-            "8", "9", "10" };
-
-    /**
-     * 根据出生日期计算属相和星座
-     *
-     * @param
-     */
-//    public static void main(String[] args) throws Exception{
-//        String idcardt ="130202198307080017";
-//        String year = idcardt.substring(6,10);
-//        String month = idcardt.substring(10,12);
-//        String day = idcardt.substring(12,14);
-//        String city  =idcardt.substring(0,3)+"000";
-//        String province = idcardt.substring(0,6);
-//        System.out.println("省份为:"+province);
-//        System.out.println("城市为:"+city);
-//        System.out.println("星座为:" + getConstellation(Integer.valueOf(month), Integer.valueOf(day)));
-//        System.out.println("属相为:" + getYear(Integer.valueOf(year)));
-//    }
-
-    public String getidcard(String idcard){
-        String id;
-        String res = "";
-        int month = 1;
-        int day = 1;
-        int year =  1981;
-        res = "constellation: "+getConstellation(month, day)+",";
-        res = res+"zodiac: "+getYear(year)+",";
-        return res;
-    }
-    /**
-     * Java通过生日计算星座
-     *
-     * @param month
-     * @param day
-     * @return
-     */
-    public static String getConstellation(int month, int day) {
-        return day < dayArr[month - 1] ? constellationArr[month - 1]
-                : constellationArr[month];
-    }
-
-    /**
-     * 通过生日计算属相
-     *
-     * @param year
-     * @return
-     */
-    public static String getYear(int year) {
-        if (year < 1900) {
-            return "未知";
-        }
-        int start = 1900;
-        String[] years = new String[] { "1", "2", "3", "4", "5", "6", "7", "8",
-                "9", "10", "11", "12" };
-        return years[(year - start) % years.length];
-    }
+package com.ygj.yuemum.utils;
+
+public class IDcard {
+    private final static int[] dayArr = new int[] { 20, 19, 21, 20, 21, 22, 23,
+            23, 23, 24, 23, 22 };
+    private final static String[] constellationArr = new String[] { "10",
+            "11", "12", "1", "2", "3", "4", "5", "6", "7",
+            "8", "9", "10" };
+
+    /**
+     * 根据出生日期计算属相和星座
+     *
+     * @param
+     */
+//    public static void main(String[] args) throws Exception{
+//        String idcardt ="130202198307080017";
+//        String year = idcardt.substring(6,10);
+//        String month = idcardt.substring(10,12);
+//        String day = idcardt.substring(12,14);
+//        String city  =idcardt.substring(0,3)+"000";
+//        String province = idcardt.substring(0,6);
+//        System.out.println("省份为:"+province);
+//        System.out.println("城市为:"+city);
+//        System.out.println("星座为:" + getConstellation(Integer.valueOf(month), Integer.valueOf(day)));
+//        System.out.println("属相为:" + getYear(Integer.valueOf(year)));
+//    }
+
+    public String getidcard(String idcard){
+        String id;
+        String res = "";
+        int month = 1;
+        int day = 1;
+        int year =  1981;
+        res = "constellation: "+getConstellation(month, day)+",";
+        res = res+"zodiac: "+getYear(year)+",";
+        return res;
+    }
+    /**
+     * Java通过生日计算星座
+     *
+     * @param month
+     * @param day
+     * @return
+     */
+    public static String getConstellation(int month, int day) {
+        return day < dayArr[month - 1] ? constellationArr[month - 1]
+                : constellationArr[month];
+    }
+
+    /**
+     * 通过生日计算属相
+     *
+     * @param year
+     * @return
+     */
+    public static String getYear(int year) {
+        if (year < 1900) {
+            return "0";
+        }
+        int start = 1900;
+        String[] years = new String[] { "1", "2", "3", "4", "5", "6", "7", "8",
+                "9", "10", "11", "12" };
+        return years[(year - start) % years.length];
+    }
 }

+ 22 - 13
src/main/resources/application.yml

@@ -73,19 +73,28 @@ file:
   HTTPDIANPINGIMGURL: "http://127.0.0.1:8080/MiniProgram/dianping/"
 #测试
 #file:
-#  ROOT : "/usr/local/apache-tomcat-8.5.30/webapps/resume/img/"
-#  ResumeFile : "/usr/local/apache-tomcat-8.5.30/webapps/resume/"
-#  httpRoot : "http://192.168.1.24/resume/img/"
-#  httphtmlRoot : "http://192.168.1.24/resume/"
-#  modulePath : "/usr/local/apache-tomcat-8.5.30/webapps/resume/resume.html"
-#  payvoucher : "/usr/local/apache-tomcat-8.5.30/webapps/payvoucher"
-#  httppayvoucher : "http://192.168.1.24/payvoucher"
-#  promotionvoucher : "/usr/local/apache-tomcat-8.5.30/webapps/promotion/offline"
-#  httppromotionvoucher : "http://192.168.1.24/MiniProgram/promotion/offline"
-#  qrcode: "/usr/local/apache-tomcat-8.5.30/webapps/MiniProgram/mgm"
-#  httpqrcode: "http://192.168.1.24/MiniProgram/mgm"
-#  IMGBANKCARD: "/usr/local/apache-tomcat-8.5.30/webapps/MiniProgram/mgm/bankCard/"
-#  HTTPIMGBANKCARD: "http://192.168.1.24/MiniProgram/mgm/bankCard/"
+#  ROOT : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/img/"
+#  ResumeFile : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/"
+#  httpRoot : "http://192.168.1.24:8182/resume/img/"
+#  httphtmlRoot : "http://192.168.1.24:8182/resume/"
+#  modulePath : "/home/tomcat/apache-tomcat-8.5.40/webapps/resume/resume.html"
+#  payvoucher : "/home/tomcat/apache-tomcat-8.5.40/webapps/payvoucher"
+#  httppayvoucher : "http://192.168.1.24:8182/payvoucher"
+#  promotionvoucher : "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/promotion/offline"
+#  httppromotionvoucher : "http://192.168.1.24:8182/MiniProgram/promotion/offline"
+#  qrcode: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm"
+#  httpqrcode: "http://192.168.1.24:8182/MiniProgram/mgm"
+#  IMGBANKCARD: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm/bankCard/"
+#  HTTPIMGBANKCARD: "http://192.168.1.24:8182/MiniProgram/mgm/bankCard/"
+#  LOCALQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm"
+#  DEMOQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/mgm/pop"
+#  HTTPOPPQRCODE: "http://192.168.1.24:8182/MiniProgram/mgm/pop"
+#  TESTQRCODE: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/promotion/test"
+#  HTTTESTQRCODE: "http://192.168.1.24:8182/MiniProgram/promotion/test/dc"
+#  BANNERIMGURL: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/index/banner/"
+#  HTTPBANNERIMGURL: "http://192.168.1.24:8182/MiniProgram/index/banner/"
+#  DIANPINGIMGURL: "/home/tomcat/apache-tomcat-8.5.40/webapps/MiniProgram/dianping/"
+#  HTTPDIANPINGIMGURL: "http://192.168.1.24:8182/MiniProgram/dianping/"
 #生产
 #file:
 #  ROOT : "/usr/local/tomcat/tomcat7/webapps/resume/img/"

+ 7 - 1
src/main/resources/mybatis/mapper/customer/CustomerBookingMapper.xml

@@ -29,7 +29,7 @@
 
     <select id="selectAll" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.customer.CustomerBooking">
         select
-        id, bk_phone,bk_duedate,bk_date,bk_type,bk_desc,bk_introducer_phone,bk_introducer_consultant,bk_branches_id
+        id, bk_phone,bk_duedate,bk_date,bk_type,bk_desc,bk_introducer_phone,bk_introducer_consultant,bk_branches_id,
         case bk_type when 1 then '套餐预约' WHEN 2 then '月嫂预约' WHEN 3 then '设备租赁' WHEN 4 then '顾问预约' WHEN 5 then '设备归还' End as bk_typedesc
         from customer_booking
         where 1=1
@@ -72,6 +72,12 @@
         <if test="bk_type != null and bk_type != ''">
             and bk_type = #{bk_type,jdbcType=INTEGER}
         </if>
+        <if test="bk_desc != null and bk_desc != ''">
+            and bk_desc = #{bk_desc,jdbcType=INTEGER}
+        </if>
+        <if test="bk_branches_id != null and bk_branches_id != ''">
+            and bk_branches_id = #{bk_branches_id,jdbcType=INTEGER}
+        </if>
     </select>
 
     <!-- 插入一条培训信息 -->

+ 48 - 42
src/main/resources/mybatis/mapper/global/PackageItemMapper.xml

@@ -1,43 +1,49 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.ygj.yuemum.dao.global.PackageItemDao" >
-
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.global.PackageItem" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="pi_groupid" property="pi_groupid" jdbcType="INTEGER" />
-        <result column="pi_groupname" property="pi_groupname" jdbcType="VARCHAR" />
-        <result column="pi_classid" property="pi_classid" jdbcType="INTEGER" />
-        <result column="pi_classname" property="pi_classname" jdbcType="VARCHAR" />
-        <result column="pi_service" property="pi_service" jdbcType="VARCHAR" />
-        <result column="p_code" property="p_code" jdbcType="VARCHAR" />
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getPackageItems" resultType="com.ygj.yuemum.domain.global.PackageItem" >
-        select
-        id,pi_groupid,pi_groupname,pi_classid,pi_classname,pi_service,p_code
-        from package_item
-    </select>
-
-    <select id="getPIGroups" resultType="com.ygj.yuemum.domain.global.PackageItem" >
-        select pi_groupid,pi_groupname
-        from package_item
-        group by pi_groupid,pi_groupname
-        order by 1 asc
-    </select>
-
-    <select id="getPIClasses" resultType="com.ygj.yuemum.domain.global.PackageItem" >
-        select pi_groupid,pi_classid,pi_classname
-        from package_item
-        group by pi_groupid,pi_classid,pi_classname
-        order by pi_groupid asc,pi_classid asc
-    </select>
-
-
-    <select id="getPIServices" resultType="com.ygj.yuemum.domain.global.PackageItem" >
-        select pi_groupid,pi_classid,pi_service,p_code from package_item order by pi_groupid asc,pi_classid  asc ,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.global.PackageItemDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.global.PackageItem" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="pi_groupid" property="pi_groupid" jdbcType="INTEGER" />
+        <result column="pi_groupname" property="pi_groupname" jdbcType="VARCHAR" />
+        <result column="pi_classid" property="pi_classid" jdbcType="INTEGER" />
+        <result column="pi_classname" property="pi_classname" jdbcType="VARCHAR" />
+        <result column="pi_service" property="pi_service" jdbcType="VARCHAR" />
+        <result column="p_code" property="p_code" jdbcType="VARCHAR" />
+        <result column="p_branches" property="p_branches" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getPackageItems" resultType="com.ygj.yuemum.domain.global.PackageItem" >
+        select
+        id,pi_groupid,pi_groupname,pi_classid,pi_classname,pi_service,p_code
+        from package_item
+    </select>
+
+    <select id="getPIGroups" resultType="com.ygj.yuemum.domain.global.PackageItem" parameterType="java.lang.String" >
+        select pi_groupid,pi_groupname
+        from package_item
+        where p_branches = #{p_branches,jdbcType=VARCHAR}
+        group by pi_groupid,pi_groupname
+        order by 1 asc
+    </select>
+
+    <select id="getPIClasses" resultType="com.ygj.yuemum.domain.global.PackageItem" parameterType="java.lang.String">
+        select pi_groupid,pi_classid,pi_classname
+        from package_item
+        where p_branches = #{p_branches,jdbcType=VARCHAR}
+        group by pi_groupid,pi_classid,pi_classname
+        order by pi_groupid asc,pi_classid asc
+    </select>
+
+
+    <select id="getPIServices" resultType="com.ygj.yuemum.domain.global.PackageItem" parameterType="java.lang.String">
+        select pi_groupid,pi_classid,pi_service,p_code
+        from package_item
+        where p_branches = #{p_branches,jdbcType=VARCHAR}
+        order by pi_groupid asc,pi_classid  asc ,id asc
+
+    </select>
+
+
 </mapper>

+ 3 - 3
src/main/resources/mybatis/mapper/global/PackagesMapper.xml

@@ -18,8 +18,7 @@
         <result column="p_detailimg" property="p_detailimg" jdbcType="VARCHAR" />
         <result column="p_detaildesc" property="p_detaildesc" jdbcType="VARCHAR" />
         <result column="p_biz_id" property="p_biz_id" jdbcType="VARCHAR" />
-
-
+        <result column="p_branches" property="p_branches" jdbcType="VARCHAR" />
     </resultMap>
 
     <!--获取所有数据-->
@@ -41,10 +40,11 @@
         order by p_seq asc
     </select>
 
-    <select id="getPackageLists" resultType="com.ygj.yuemum.domain.global.Packages" >
+    <select id="getPackageLists" resultType="com.ygj.yuemum.domain.global.Packages" parameterType="java.lang.String">
         select *
         from packages
         where p_type = '1'
+        and p_branches = #{p_branches,jdbcType=VARCHAR}
         order by p_seq asc
     </select>
 

+ 408 - 378
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserInfoMapper.xml

@@ -1,379 +1,409 @@
-<?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.maternitymatron.JlServiceUserInfoDao" >
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="truename" property="truename" jdbcType="VARCHAR" />
-        <result column="mobile_phone" property="mobile_phone" jdbcType="VARCHAR" />
-        <result column="level" property="level" jdbcType="INTEGER" />
-        <result column="is_fulltime" property="is_fulltime" jdbcType="INTEGER" />
-        <result column="total_score" property="total_score" jdbcType="INTEGER" />
-        <result column="email" property="email" jdbcType="VARCHAR" />
-        <result column="tel" property="tel" jdbcType="VARCHAR" />
-        <result column="create_time" property="create_time" jdbcType="DATE" />
-        <result column="gender" property="gender" jdbcType="INTEGER" />
-        <result column="portrait" property="portrait" jdbcType="VARCHAR" />
-        <result column="birthday" property="birthday" jdbcType="DATE" />
-        <result column="qq" property="qq" jdbcType="VARCHAR" />
-        <result column="update_time" property="update_time" jdbcType="DATE" />
-        <result column="address" property="address" jdbcType="VARCHAR" />
-        <result column="brief" property="brief" jdbcType="VARCHAR" />
-        <result column="idcard" property="idcard" jdbcType="VARCHAR" />
-        <result column="education" property="education" jdbcType="VARCHAR" />
-        <result column="city" property="city" jdbcType="INTEGER" />
-        <result column="district" property="district" jdbcType="INTEGER" />
-        <result column="service_number" property="service_number" jdbcType="VARCHAR" />
-        <result column="province" property="province" jdbcType="INTEGER" />
-        <result column="update_uid" property="update_uid" jdbcType="INTEGER" />
-        <result column="updated_at" property="updated_at" jdbcType="DATE" />
-        <result column="seniority" property="seniority" jdbcType="VARCHAR" />
-        <result column="babynumber" property="babynumber" jdbcType="VARCHAR" />
-        <result column="constellation" property="constellation" jdbcType="VARCHAR" />
-        <result column="zodiac" property="zodiac" jdbcType="VARCHAR" />
-    </resultMap>
-
-    <sql id="Base_Column_List" >
-        id,truename,mobile_phone,level,is_fulltime,total_score,email,tel,create_time,gender,portrait,birthday,qq,update_time,address,brief,idcard,education,city,district,service_number,province,update_uid,updated_at,seniority,babynumber,constellation,zodiac
-    </sql>
-
-    <select id="idcardcheck" resultType="java.lang.Integer" parameterType="java.lang.String">
-        select
-        count(1)
-        from jl_service_user_info
-        where idcard = #{idcard,jdbcType=VARCHAR}
-    </select>
-
-    <!-- 得到所有的月嫂信息 -->
-    <select id="getAll" resultMap="BaseResultMap" >
-        select
-        <include refid="Base_Column_List" />
-        from jl_service_user_info
-    </select>
-
-    <!-- 根据id查找某个月嫂信息 -->
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-        select
-        <include refid="Base_Column_List" />
-        from jl_service_user_info
-        where id = #{id,jdbcType=INTEGER}
-    </select>
-    <!-- 根据id删除某个月嫂信息 -->
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-        delete from jl_service_user_info
-        where id = #{id,jdbcType=INTEGER}
-    </delete>
-
-    <!-- 插入一条月嫂信息 -->
-    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
-        insert into jl_service_user_info
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-            <if test="id != null" >
-                id,
-            </if>
-            <if test="truename != null" >
-                truename,
-            </if>
-            <if test="mobile_phone != null" >
-                mobile_phone,
-            </if>
-            <if test="level != null" >
-                level,
-            </if>
-            <if test="is_fulltime != null" >
-                is_fulltime,
-            </if>
-            <if test="total_score != null" >
-                total_score,
-            </if>
-            <if test="email != null" >
-                email,
-            </if>
-            <if test="tel != null" >
-                tel,
-            </if>
-            <if test="create_time != null" >
-                create_time,
-            </if>
-            <if test="gender != null" >
-                gender,
-            </if>
-            <if test="portrait != null" >
-                portrait,
-            </if>
-            <if test="birthday != null" >
-                birthday,
-            </if>
-            <if test="qq != null" >
-                qq,
-            </if>
-            <if test="update_time != null" >
-                update_time,
-            </if>
-            <if test="address != null" >
-                address,
-            </if>
-            <if test="brief != null" >
-                brief,
-            </if>
-            <if test="idcard != null" >
-                idcard,
-            </if>
-            <if test="education != null" >
-                education,
-            </if>
-            <if test="city != null" >
-                city,
-            </if>
-            <if test="district != null" >
-                district,
-            </if>
-            <if test="service_number != null" >
-                service_number,
-            </if>
-            <if test="province != null" >
-                province,
-            </if>
-            <if test="update_uid != null" >
-                update_uid,
-            </if>
-            <if test="updated_at != null" >
-                updated_at,
-            </if>
-            <if test="seniority != null" >
-                seniority,
-            </if>
-            <if test="babynumber != null" >
-                babynumber,
-            </if>
-            <if test="constellation != null" >
-                constellation,
-            </if>
-            <if test="zodiac != null" >
-                zodiac,
-            </if>
-            <if test="ethnicgroup != null" >
-                ethnicgroup,
-            </if>
-            <if test="height != null" >
-                height,
-            </if>
-            <if test="marriage != null" >
-                marriage,
-            </if>
-            <if test="highlight != null" >
-                highlight,
-            </if>
-            <if test="weight != null" >
-                weight
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-            <if test="id != null" >
-                #{id,jdbcType=INTEGER},
-            </if>
-            <if test="truename != null" >
-                #{truename,jdbcType=VARCHAR},
-            </if>
-            <if test="mobile_phone != null" >
-                #{mobile_phone,jdbcType=VARCHAR},
-            </if>
-            <if test="level != null" >
-                #{level,jdbcType=INTEGER},
-            </if>
-            <if test="is_fulltime != null" >
-                #{is_fulltime,jdbcType=INTEGER},
-            </if>
-            <if test="total_score != null" >
-                #{total_score,jdbcType=INTEGER},
-            </if>
-            <if test="email != null" >
-                #{email,jdbcType=VARCHAR},
-            </if>
-            <if test="tel != null" >
-                #{tel,jdbcType=VARCHAR},
-            </if>
-            <if test="create_time != null" >
-                #{create_time,jdbcType=DATE},
-            </if>
-            <if test="gender != null" >
-                #{gender,jdbcType=INTEGER},
-            </if>
-            <if test="portrait != null" >
-                #{portrait,jdbcType=VARCHAR},
-            </if>
-            <if test="birthday != null" >
-                #{birthday,jdbcType=DATE},
-            </if>
-            <if test="qq != null" >
-                #{qq,jdbcType=VARCHAR},
-            </if>
-            <if test="update_time != null" >
-                #{update_time,jdbcType=DATE},
-            </if>
-            <if test="address != null" >
-                #{address,jdbcType=VARCHAR},
-            </if>
-            <if test="brief != null" >
-                #{brief,jdbcType=VARCHAR},
-            </if>
-            <if test="idcard != null" >
-                #{idcard,jdbcType=VARCHAR},
-            </if>
-            <if test="education != null" >
-                #{education,jdbcType=VARCHAR},
-            </if>
-            <if test="city != null" >
-                #{city,jdbcType=INTEGER},
-            </if>
-            <if test="district != null" >
-                #{district,jdbcType=INTEGER},
-            </if>
-            <if test="service_number != null" >
-                #{service_number,jdbcType=VARCHAR},
-            </if>
-            <if test="province != null" >
-                #{province,jdbcType=INTEGER},
-            </if>
-            <if test="update_uid != null" >
-                #{update_uid,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                #{updated_at,jdbcType=DATE},
-            </if>
-            <if test="seniority != null" >
-                #{seniority,jdbcType=VARCHAR},
-            </if>
-            <if test="babynumber != null" >
-                #{babynumber,jdbcType=VARCHAR},
-            </if>
-            <if test="constellation != null" >
-                #{constellation,jdbcType=VARCHAR},
-            </if>
-            <if test="zodiac != null" >
-                #{zodiac,jdbcType=VARCHAR},
-            </if>
-            <if test="ethnicgroup != null" >
-                #{ethnicgroup,jdbcType=VARCHAR},
-            </if>
-            <if test="height != null" >
-                #{height,jdbcType=VARCHAR},
-            </if>
-            <if test="marriage != null" >
-                #{marriage,jdbcType=VARCHAR},
-            </if>
-            <if test="highlight != null" >
-                #{highlight,jdbcType=VARCHAR},
-            </if>
-            <if test="weight != null" >
-                #{weight,jdbcType=VARCHAR}
-            </if>
-        </trim>
-    </insert>
-    <!-- 根据id更新一条月嫂信息 -->
-    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
-        update jl_service_user_info
-        <set >
-            <if test="truename != null" >
-                truename = #{truename,jdbcType=VARCHAR},
-            </if>
-            <if test="mobile_phone != null" >
-                mobile_phone = #{mobile_phone,jdbcType=VARCHAR},
-            </if>
-            <if test="level != null" >
-                level = #{level,jdbcType=INTEGER},
-            </if>
-            <if test="is_fulltime != null" >
-                is_fulltime = #{is_fulltime,jdbcType=INTEGER},
-            </if>
-            <if test="total_score != null" >
-                total_score = #{total_score,jdbcType=INTEGER},
-            </if>
-            <if test="email != null" >
-                email = #{email,jdbcType=VARCHAR},
-            </if>
-            <if test="tel != null" >
-                tel = #{tel,jdbcType=VARCHAR},
-            </if>
-            <if test="create_time != null" >
-                create_time = #{create_time,jdbcType=DATE},
-            </if>
-            <if test="gender != null" >
-                gender = #{gender,jdbcType=INTEGER},
-            </if>
-            <if test="portrait != null" >
-                portrait = #{portrait,jdbcType=VARCHAR},
-            </if>
-            <if test="birthday != null" >
-                birthday = #{birthday,jdbcType=DATE},
-            </if>
-            <if test="qq != null" >
-                qq = #{qq,jdbcType=VARCHAR},
-            </if>
-            <if test="update_time != null" >
-                update_time = #{update_time,jdbcType=DATE},
-            </if>
-            <if test="address != null" >
-                address = #{address,jdbcType=VARCHAR},
-            </if>
-            <if test="brief != null" >
-                brief = #{brief,jdbcType=VARCHAR},
-            </if>
-            <if test="idcard != null" >
-                idcard = #{idcard,jdbcType=VARCHAR},
-            </if>
-            <if test="education != null" >
-                education = #{education,jdbcType=VARCHAR},
-            </if>
-            <if test="city != null" >
-                city = #{city,jdbcType=INTEGER},
-            </if>
-            <if test="district != null" >
-                district = #{district,jdbcType=INTEGER},
-            </if>
-            <if test="service_number != null" >
-                service_number = #{service_number,jdbcType=VARCHAR},
-            </if>
-            <if test="province != null" >
-                province = #{province,jdbcType=INTEGER},
-            </if>
-            <if test="update_uid != null" >
-                update_uid = #{update_uid,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                updated_at = #{updated_at,jdbcType=DATE},
-            </if>
-            <if test="seniority != null" >
-                seniority = #{seniority,jdbcType=VARCHAR},
-            </if>
-            <if test="babynumber != null" >
-                babynumber = #{babynumber,jdbcType=VARCHAR},
-            </if>
-            <if test="constellation != null" >
-                constellation = #{constellation,jdbcType=VARCHAR},
-            </if>
-            <if test="zodiac != null" >
-                zodiac = #{zodiac,jdbcType=VARCHAR},
-            </if>
-            <if test="ethnicgroup != null" >
-                ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR},
-            </if>
-            <if test="education != null" >
-                education = #{education,jdbcType=VARCHAR},
-            </if>
-            <if test="height != null" >
-                height = #{height,jdbcType=VARCHAR},
-            </if>
-            <if test="marriage != null" >
-                marriage = #{marriage,jdbcType=VARCHAR},
-            </if>
-            <if test="highlight != null" >
-                highlight = #{highlight,jdbcType=VARCHAR},
-            </if>
-            <if test="weight != null" >
-                weight = #{weight,jdbcType=VARCHAR}
-            </if>
-        </set>
-        where id = #{id,jdbcType=INTEGER}
-    </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.maternitymatron.JlServiceUserInfoDao" >
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="truename" property="truename" jdbcType="VARCHAR" />
+        <result column="mobile_phone" property="mobile_phone" jdbcType="VARCHAR" />
+        <result column="level" property="level" jdbcType="INTEGER" />
+        <result column="is_fulltime" property="is_fulltime" jdbcType="INTEGER" />
+        <result column="total_score" property="total_score" jdbcType="INTEGER" />
+        <result column="email" property="email" jdbcType="VARCHAR" />
+        <result column="tel" property="tel" jdbcType="VARCHAR" />
+        <result column="create_time" property="create_time" jdbcType="DATE" />
+        <result column="gender" property="gender" jdbcType="INTEGER" />
+        <result column="portrait" property="portrait" jdbcType="VARCHAR" />
+        <result column="birthday" property="birthday" jdbcType="DATE" />
+        <result column="qq" property="qq" jdbcType="VARCHAR" />
+        <result column="update_time" property="update_time" jdbcType="DATE" />
+        <result column="address" property="address" jdbcType="VARCHAR" />
+        <result column="brief" property="brief" jdbcType="VARCHAR" />
+        <result column="idcard" property="idcard" jdbcType="VARCHAR" />
+        <result column="education" property="education" jdbcType="VARCHAR" />
+        <result column="city" property="city" jdbcType="INTEGER" />
+        <result column="district" property="district" jdbcType="INTEGER" />
+        <result column="service_number" property="service_number" jdbcType="VARCHAR" />
+        <result column="province" property="province" jdbcType="INTEGER" />
+        <result column="update_uid" property="update_uid" jdbcType="INTEGER" />
+        <result column="updated_at" property="updated_at" jdbcType="DATE" />
+        <result column="seniority" property="seniority" jdbcType="VARCHAR" />
+        <result column="babynumber" property="babynumber" jdbcType="VARCHAR" />
+        <result column="constellation" property="constellation" jdbcType="VARCHAR" />
+        <result column="zodiac" property="zodiac" jdbcType="VARCHAR" />
+        <result column="servicesdays" property="servicesdays" jdbcType="INTEGER" />
+        <result column="characters" property="characters" jdbcType="VARCHAR" />
+        <result column="twins" property="twins" jdbcType="INTEGER" />
+    </resultMap>
+
+    <sql id="Base_Column_List" >
+        id,truename,mobile_phone,level,is_fulltime,total_score,email,tel,create_time,gender,portrait,birthday,qq,update_time,address,brief,idcard,education,city,district,service_number,province,update_uid,updated_at,seniority,babynumber,constellation,zodiac,servicesdays,characters,twins
+    </sql>
+
+    <select id="idcardcheck" resultType="java.lang.Integer" parameterType="java.lang.String">
+        select
+        count(1)
+        from jl_service_user_info
+        where idcard = #{idcard,jdbcType=VARCHAR}
+    </select>
+
+    <!-- 得到所有的月嫂信息 -->
+    <select id="getAll" resultMap="BaseResultMap" >
+        select
+        <include refid="Base_Column_List" />
+        from jl_service_user_info
+    </select>
+
+    <!-- 根据id查找某个月嫂信息 -->
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from jl_service_user_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <!-- 根据id删除某个月嫂信息 -->
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from jl_service_user_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <!-- 插入一条月嫂信息 -->
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
+        insert into jl_service_user_info
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="id != null" >
+                id,
+            </if>
+            <if test="truename != null" >
+                truename,
+            </if>
+            <if test="mobile_phone != null" >
+                mobile_phone,
+            </if>
+            <if test="level != null" >
+                level,
+            </if>
+            <if test="is_fulltime != null" >
+                is_fulltime,
+            </if>
+            <if test="total_score != null" >
+                total_score,
+            </if>
+            <if test="email != null" >
+                email,
+            </if>
+            <if test="tel != null" >
+                tel,
+            </if>
+            <if test="create_time != null" >
+                create_time,
+            </if>
+            <if test="gender != null" >
+                gender,
+            </if>
+            <if test="portrait != null" >
+                portrait,
+            </if>
+            <if test="birthday != null" >
+                birthday,
+            </if>
+            <if test="qq != null" >
+                qq,
+            </if>
+            <if test="update_time != null" >
+                update_time,
+            </if>
+            <if test="address != null" >
+                address,
+            </if>
+            <if test="brief != null" >
+                brief,
+            </if>
+            <if test="idcard != null" >
+                idcard,
+            </if>
+            <if test="education != null" >
+                education,
+            </if>
+            <if test="city != null" >
+                city,
+            </if>
+            <if test="district != null" >
+                district,
+            </if>
+            <if test="service_number != null" >
+                service_number,
+            </if>
+            <if test="province != null" >
+                province,
+            </if>
+            <if test="update_uid != null" >
+                update_uid,
+            </if>
+            <if test="updated_at != null" >
+                updated_at,
+            </if>
+            <if test="seniority != null" >
+                seniority,
+            </if>
+            <if test="babynumber != null" >
+                babynumber,
+            </if>
+            <if test="constellation != null" >
+                constellation,
+            </if>
+            <if test="zodiac != null" >
+                zodiac,
+            </if>
+            <if test="ethnicgroup != null" >
+                ethnicgroup,
+            </if>
+            <if test="height != null" >
+                height,
+            </if>
+            <if test="marriage != null" >
+                marriage,
+            </if>
+            <if test="highlight != null" >
+                highlight,
+            </if>
+            <if test="weight != null" >
+                weight,
+            </if>
+            <if test="servicesdays != null" >
+                servicesdays,
+            </if>
+            <if test="characters != null" >
+                characters,
+            </if>
+            <if test="twins != null" >
+                twins
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="truename != null" >
+                #{truename,jdbcType=VARCHAR},
+            </if>
+            <if test="mobile_phone != null" >
+                #{mobile_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="level != null" >
+                #{level,jdbcType=INTEGER},
+            </if>
+            <if test="is_fulltime != null" >
+                #{is_fulltime,jdbcType=INTEGER},
+            </if>
+            <if test="total_score != null" >
+                #{total_score,jdbcType=INTEGER},
+            </if>
+            <if test="email != null" >
+                #{email,jdbcType=VARCHAR},
+            </if>
+            <if test="tel != null" >
+                #{tel,jdbcType=VARCHAR},
+            </if>
+            <if test="create_time != null" >
+                #{create_time,jdbcType=DATE},
+            </if>
+            <if test="gender != null" >
+                #{gender,jdbcType=INTEGER},
+            </if>
+            <if test="portrait != null" >
+                #{portrait,jdbcType=VARCHAR},
+            </if>
+            <if test="birthday != null" >
+                #{birthday,jdbcType=DATE},
+            </if>
+            <if test="qq != null" >
+                #{qq,jdbcType=VARCHAR},
+            </if>
+            <if test="update_time != null" >
+                #{update_time,jdbcType=DATE},
+            </if>
+            <if test="address != null" >
+                #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="brief != null" >
+                #{brief,jdbcType=VARCHAR},
+            </if>
+            <if test="idcard != null" >
+                #{idcard,jdbcType=VARCHAR},
+            </if>
+            <if test="education != null" >
+                #{education,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                #{city,jdbcType=INTEGER},
+            </if>
+            <if test="district != null" >
+                #{district,jdbcType=INTEGER},
+            </if>
+            <if test="service_number != null" >
+                #{service_number,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null" >
+                #{province,jdbcType=INTEGER},
+            </if>
+            <if test="update_uid != null" >
+                #{update_uid,jdbcType=INTEGER},
+            </if>
+            <if test="updated_at != null" >
+                #{updated_at,jdbcType=DATE},
+            </if>
+            <if test="seniority != null" >
+                #{seniority,jdbcType=VARCHAR},
+            </if>
+            <if test="babynumber != null" >
+                #{babynumber,jdbcType=VARCHAR},
+            </if>
+            <if test="constellation != null" >
+                #{constellation,jdbcType=VARCHAR},
+            </if>
+            <if test="zodiac != null" >
+                #{zodiac,jdbcType=VARCHAR},
+            </if>
+            <if test="ethnicgroup != null" >
+                #{ethnicgroup,jdbcType=VARCHAR},
+            </if>
+            <if test="height != null" >
+                #{height,jdbcType=VARCHAR},
+            </if>
+            <if test="marriage != null" >
+                #{marriage,jdbcType=VARCHAR},
+            </if>
+            <if test="highlight != null" >
+                #{highlight,jdbcType=VARCHAR},
+            </if>
+            <if test="weight != null" >
+                #{weight,jdbcType=VARCHAR},
+            </if>
+            <if test="servicesdays != null" >
+                #{servicesdays,jdbcType=VARCHAR},
+            </if>
+            <if test="characters != null" >
+                #{characters,jdbcType=VARCHAR},
+            </if>
+            <if test="twins != null" >
+                #{twins,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+    <!-- 根据id更新一条月嫂信息 -->
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo" >
+        update jl_service_user_info
+        <set >
+            <if test="truename != null" >
+                truename = #{truename,jdbcType=VARCHAR},
+            </if>
+            <if test="mobile_phone != null" >
+                mobile_phone = #{mobile_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="level != null" >
+                level = #{level,jdbcType=INTEGER},
+            </if>
+            <if test="is_fulltime != null" >
+                is_fulltime = #{is_fulltime,jdbcType=INTEGER},
+            </if>
+            <if test="total_score != null" >
+                total_score = #{total_score,jdbcType=INTEGER},
+            </if>
+            <if test="email != null" >
+                email = #{email,jdbcType=VARCHAR},
+            </if>
+            <if test="tel != null" >
+                tel = #{tel,jdbcType=VARCHAR},
+            </if>
+            <if test="create_time != null" >
+                create_time = #{create_time,jdbcType=DATE},
+            </if>
+            <if test="gender != null" >
+                gender = #{gender,jdbcType=INTEGER},
+            </if>
+            <if test="portrait != null" >
+                portrait = #{portrait,jdbcType=VARCHAR},
+            </if>
+            <if test="birthday != null" >
+                birthday = #{birthday,jdbcType=DATE},
+            </if>
+            <if test="qq != null" >
+                qq = #{qq,jdbcType=VARCHAR},
+            </if>
+            <if test="update_time != null" >
+                update_time = #{update_time,jdbcType=DATE},
+            </if>
+            <if test="address != null" >
+                address = #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="brief != null" >
+                brief = #{brief,jdbcType=VARCHAR},
+            </if>
+            <if test="idcard != null" >
+                idcard = #{idcard,jdbcType=VARCHAR},
+            </if>
+            <if test="education != null" >
+                education = #{education,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null" >
+                city = #{city,jdbcType=INTEGER},
+            </if>
+            <if test="district != null" >
+                district = #{district,jdbcType=INTEGER},
+            </if>
+            <if test="service_number != null" >
+                service_number = #{service_number,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null" >
+                province = #{province,jdbcType=INTEGER},
+            </if>
+            <if test="update_uid != null" >
+                update_uid = #{update_uid,jdbcType=INTEGER},
+            </if>
+            <if test="updated_at != null" >
+                updated_at = #{updated_at,jdbcType=DATE},
+            </if>
+            <if test="seniority != null" >
+                seniority = #{seniority,jdbcType=VARCHAR},
+            </if>
+            <if test="babynumber != null" >
+                babynumber = #{babynumber,jdbcType=VARCHAR},
+            </if>
+            <if test="constellation != null" >
+                constellation = #{constellation,jdbcType=VARCHAR},
+            </if>
+            <if test="zodiac != null" >
+                zodiac = #{zodiac,jdbcType=VARCHAR},
+            </if>
+            <if test="ethnicgroup != null" >
+                ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR},
+            </if>
+            <if test="education != null" >
+                education = #{education,jdbcType=VARCHAR},
+            </if>
+            <if test="height != null" >
+                height = #{height,jdbcType=VARCHAR},
+            </if>
+            <if test="marriage != null" >
+                marriage = #{marriage,jdbcType=VARCHAR},
+            </if>
+            <if test="highlight != null" >
+                highlight = #{highlight,jdbcType=VARCHAR},
+            </if>
+            <if test="weight != null" >
+                weight = #{weight,jdbcType=VARCHAR},
+            </if>
+            <if test="servicesdays != null" >
+                servicesdays = #{servicesdays,jdbcType=INTEGER},
+            </if>
+            <if test="characters != null" >
+                characters = #{characters,jdbcType=VARCHAR},
+            </if>
+            <if test="twins != null" >
+                twins = #{twins,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
 </mapper>

文件差异内容过多而无法显示
+ 903 - 683
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml


+ 26 - 0
src/main/resources/mybatis/mapper/wxmini/WXContentMapper.xml

@@ -69,6 +69,32 @@
         order by id  desc
     </select>
 
+
+    <select id="queryUserContent" resultType="com.ygj.yuemum.domain.wxmini.WXContent" parameterType="com.ygj.yuemum.domain.wxmini.WXContent">
+        SELECT
+        wx_content.id,
+        wc_title,
+        wc_content,
+        wc_type,
+        wct_name,
+        wc_showtime,
+        wct_frequency,
+        wc_create_user,
+        fgetuser_name (wc_create_user) wc_create_user_name,
+        wc_create_date
+        FROM
+        wx_content
+        LEFT JOIN wx_content_type ON wx_content.wc_type = wx_content_type.wct_code
+        where 1=1
+        <if test="wc_type != null and wc_type != ''">
+            and wc_type = #{wc_type,jdbcType=VARCHAR}
+        </if>
+        <if test="wc_showtime != null and wc_showtime != ''">
+            and wc_showtime = #{wc_showtime,jdbcType=INTEGER}
+        </if>
+        order by id  desc limit 1
+    </select>
+
     <insert id="insertWXContent" parameterType="com.ygj.yuemum.domain.wxmini.WXContent" >
         insert into wx_content
         <trim prefix="(" suffix=")" suffixOverrides="," >

+ 9 - 0
src/main/resources/mybatis/mapper/wxmini/WXContentTypeMapper.xml

@@ -18,4 +18,13 @@
         order by id desc
     </select>
 
+
+    <select id="queryWXContentType" resultType="com.ygj.yuemum.domain.wxmini.WXContentType" parameterType="java.lang.String" >
+        select
+        *
+        from wx_content_type
+        where  wct_code = #{wct_code,jdbcType=INTEGER}
+    </select>
+
+
 </mapper>

+ 108 - 0
src/main/resources/mybatis/mapper/wxmini/WXMMSearchAnswerMapper.xml

@@ -0,0 +1,108 @@
+<?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.WXMMSearchAnswerDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="wma_question_id" property="wma_question_id" jdbcType="INTEGER" />
+        <result column="wma_desc" property="wma_desc" jdbcType="VARCHAR" />
+        <result column="wma_seq" property="wma_seq" jdbcType="INTEGER" />
+        <result column="wma_status" property="wma_status" jdbcType="INTEGER" />
+        <result column="wma_value" property="wma_value" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getWXMMSearchAnswers" resultType="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" >
+        select
+        *
+        from wx_mm_search_answer
+        order by id desc
+    </select>
+
+    <select id="getWXMMSearchAnswerByID" resultType="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" parameterType="java.lang.Integer">
+        select
+        *
+        from wx_mm_search_answer
+        where  id = #{id,jdbcType=INTEGER}
+        order by id desc
+    </select>
+
+
+    <select id="getWXMMSearchAnswerByQID" resultType="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" parameterType="java.lang.Integer">
+        select
+        *
+        from wx_mm_search_answer
+        where  wma_question_id = #{wma_question_id,jdbcType=INTEGER}
+        and wma_status = 1
+        order by wma_seq ASC
+    </select>
+
+    <update id="updateWXMMSearchAnswer" parameterType="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" >
+        update wx_mm_search_answer
+        <set >
+            <if test="wma_question_id != null" >
+                wma_question_id = #{wma_question_id,jdbcType=INTEGER},
+            </if>
+            <if test="wma_desc != null" >
+                wma_desc = #{wma_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="wma_seq != null" >
+                wma_seq = #{wma_seq,jdbcType=INTEGER},
+            </if>
+            <if test="wma_status != null" >
+                wma_status = #{wma_status,jdbcType=INTEGER},
+            </if>
+            <if test="wma_value != null" >
+                wma_value = #{wma_value,jdbcType=VARCHAR}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+
+    <insert id="insertWXMMSearchAnswer" parameterType="com.ygj.yuemum.domain.wxmini.WXMMSearchAnswer" >
+        insert into wx_mm_search_answer
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wma_question_id != null" >
+                wma_question_id,
+            </if>
+            <if test="wma_desc != null" >
+                wma_desc,
+            </if>
+            <if test="wma_seq != null" >
+                wma_seq,
+            </if>
+            <if test="wma_status != null" >
+                wma_status,
+            </if>
+            <if test="wma_value != null" >
+                wma_value
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wma_question_id != null" >
+                #{wma_question_id,jdbcType=INTEGER},
+            </if>
+            <if test="wma_desc != null" >
+                #{wma_desc,jdbcType=VARCHAR},
+            </if>
+            <if test="wma_seq != null" >
+                #{wma_seq,jdbcType=INTEGER},
+            </if>
+            <if test="wma_status != null" >
+                #{wma_status,jdbcType=INTEGER},
+            </if>
+            <if test="wma_value != null" >
+                #{wma_value,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="deleteWXMMSearchAnswer" parameterType="java.lang.Integer"  >
+        delete from wx_mm_search_answer
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+
+
+</mapper>

+ 121 - 0
src/main/resources/mybatis/mapper/wxmini/WXMMSearchQuestionMapper.xml

@@ -0,0 +1,121 @@
+<?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.WXMMSearchQuestionDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="wsq_seq" property="wsq_seq" jdbcType="INTEGER" />
+        <result column="wsq_name" property="wsq_name" jdbcType="VARCHAR" />
+        <result column="wsq_type" property="wsq_type" jdbcType="INTEGER" />
+        <result column="wsq_create_user" property="wsq_create_user" jdbcType="INTEGER" />
+        <result column="wsq_create_date" property="wsq_create_date" jdbcType="DATE" />
+        <result column="wsq_status" property="wsq_status" jdbcType="INTEGER" />
+        <result column="wsq_comments" property="wsq_comments" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getWXMMSearchQuestions" resultType="com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion" >
+        select
+        *
+        from wx_mm_search_question
+        where wsq_status = 1
+        order by wsq_seq ASC
+    </select>
+
+
+
+    <select id="getWXMMSearchQuestionByID" resultType="com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion" parameterType="java.lang.Integer">
+        select
+        *
+        from wx_mm_search_question
+        where  id = #{id,jdbcType=INTEGER}
+        order by id desc
+    </select>
+
+    <update id="updateWXMMSearchQuestion" parameterType="com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion" >
+        update wx_mm_search_question
+        <set >
+            <if test="wsq_seq != null" >
+                wsq_seq = #{wsq_seq,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_name != null" >
+                wsq_name = #{wsq_name,jdbcType=VARCHAR},
+            </if>
+            <if test="wsq_type != null" >
+                wsq_type = #{wsq_type,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_create_user != null" >
+                wsq_create_user = #{wsq_create_user,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_create_date != null" >
+                wsq_create_date = #{wsq_create_date,jdbcType=DATE},
+            </if>
+            <if test="wsq_status != null" >
+                wsq_status = #{wsq_status,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_comments != null" >
+                wsq_comments = #{wsq_comments,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+
+    <insert id="insertWXMMSearchQuestion" parameterType="com.ygj.yuemum.domain.wxmini.WXMMSearchQuestion" >
+        insert into wx_mm_search_question
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wsq_seq != null" >
+                wsq_seq,
+            </if>
+            <if test="wsq_name != null" >
+                wsq_name,
+            </if>
+            <if test="wsq_type != null" >
+                wsq_type,
+            </if>
+            <if test="wsq_create_user != null" >
+                wsq_create_user,
+            </if>
+            <if test="wsq_create_date != null" >
+                wsq_create_date,
+            </if>
+            <if test="wsq_status != null" >
+                wsq_status,
+            </if>
+            <if test="wsq_comments != null" >
+                wsq_comments,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wsq_seq != null" >
+                #{wsq_seq,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_name != null" >
+                #{wsq_name,jdbcType=VARCHAR},
+            </if>
+            <if test="wsq_type != null" >
+                #{wsq_type,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_create_user != null" >
+                #{wsq_create_user,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_create_date != null" >
+                #{wsq_create_date,jdbcType=DATE},
+            </if>
+            <if test="wsq_status != null" >
+                #{wsq_status,jdbcType=INTEGER},
+            </if>
+            <if test="wsq_comments != null" >
+                #{wsq_comments,jdbcType=INTEGER}
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="deleteWXMMSearchQuestion" parameterType="java.lang.Integer"  >
+        delete from wx_mm_search_question
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+
+
+
+</mapper>

+ 85 - 0
src/main/resources/mybatis/mapper/wxmini/WXMMUserSearchDetailMapper.xml

@@ -0,0 +1,85 @@
+<?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.WXMMUserSearchDetailDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="wmu_id" property="wmu_id" jdbcType="VARCHAR"/>
+        <result column="wmud_phone" property="wmud_phone" jdbcType="VARCHAR"/>
+        <result column="wmud_qid" property="wmud_qid" jdbcType="VARCHAR"/>
+        <result column="wmud_aid" property="wmud_aid" jdbcType="DATE"/>
+        <result column="wmud_value" property="wmud_value" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getWXMMUserSearchDetails" resultType="com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail" parameterType="java.lang.String">
+        select
+        *
+        from wx_mm_user_search_detail
+        where wmud_phone = #{wmud_phone,jdbcType=VARCHAR}
+        order by id asc
+    </select>
+
+    <select id = "getWXMMUserSearchDetailByQID" resultType="com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail" parameterType="java.lang.Integer">
+    SELECT
+        wx_mm_user_search_detail.wmu_id,
+        wx_mm_user_search_detail.wmud_phone,
+        wx_mm_user_search_detail.wmud_qid,
+        wx_mm_search_question.wsq_name,
+        wx_mm_user_search_detail.wmud_aid,
+        CASE wx_mm_search_question.wsq_type
+    WHEN 2 THEN
+        wx_mm_search_answer.wma_desc
+    WHEN 1 THEN
+        CONCAT(wx_mm_search_answer.wma_desc,':',wx_mm_user_search_detail.wmud_value)
+    END as returnvalue
+    FROM
+        wx_mm_user_search_detail
+    LEFT JOIN wx_mm_search_question ON wx_mm_user_search_detail.wmud_qid = wx_mm_search_question.id
+    LEFT JOIN wx_mm_search_answer ON wx_mm_user_search_detail.wmud_aid = wx_mm_search_answer.id
+    WHERE
+        wmu_id =  #{wmu_id,jdbcType=INTEGER}
+    ORDER BY
+        wmud_qid ASC,
+        wmud_aid ASC
+    </select>
+
+    <insert id="insertWXMMUserSearchDetail" parameterType="com.ygj.yuemum.domain.wxmini.WXMMUserSearchDetail" >
+        insert into wx_mm_user_search_detail
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wmu_id != null" >
+                wmu_id,
+            </if>
+            <if test="wmud_phone != null" >
+                wmud_phone,
+            </if>
+            <if test="wmud_qid != null" >
+                wmud_qid,
+            </if>
+            <if test="wmud_aid != null" >
+                wmud_aid,
+            </if>
+            <if test="wmud_value != null" >
+                wmud_value
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wmu_id != null" >
+                #{wmu_id,jdbcType=INTEGER},
+            </if>
+            <if test="wmud_phone != null" >
+                #{wmud_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wmud_qid != null" >
+                #{wmud_qid,jdbcType=INTEGER},
+            </if>
+            <if test="wmud_aid != null" >
+                #{wmud_aid,jdbcType=INTEGER},
+            </if>
+            <if test="wmud_value != null" >
+                #{wmud_value,jdbcType=VARCHAR}
+            </if>
+        </trim>
+    </insert>
+
+</mapper>

+ 86 - 0
src/main/resources/mybatis/mapper/wxmini/WXMMUserSearchMapper.xml

@@ -0,0 +1,86 @@
+<?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.WXMMUserSearchDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMMUserSearch">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="wmu_openid" property="wmu_openid" jdbcType="VARCHAR"/>
+        <result column="wmu_phone" property="wmu_phone" jdbcType="VARCHAR"/>
+        <result column="wmu_city" property="wmu_city" jdbcType="VARCHAR"/>
+        <result column="wmu_date" property="wmu_date" jdbcType="DATE"/>
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getWXMMUserSearchs" resultType="com.ygj.yuemum.domain.wxmini.WXMMUserSearch" parameterType="java.lang.String">
+        select
+        *
+        from wx_mm_user_search
+        where wmu_openid = #{wmu_openid,jdbcType=VARCHAR}
+        order by id asc
+    </select>
+
+
+    <select id="queryWXMMUserSearchs" resultType="com.ygj.yuemum.domain.wxmini.WXMMUserSearch" parameterType="com.ygj.yuemum.domain.wxmini.WXMMUserSearch">
+        select
+        id,
+        wmu_openid,
+        wmu_phone,
+        wmu_city,
+        wmu_date,
+        fgetbranches_name(wmu_city) wmu_city_name
+        from wx_mm_user_search
+        where 1=1
+        <if test="wmu_openid != null and wmu_openid != ''">
+            and wmu_openid like "%"#{wmu_openid,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="wmu_phone != null and wmu_phone != ''">
+            and wmu_phone = #{wmu_phone,jdbcType=INTEGER}
+        </if>
+        <if test="wmu_city != null and wmu_city != ''">
+            and wmu_city = #{wmu_city,jdbcType=INTEGER}
+        </if>
+        <if test="wmu_date != null and wmu_date != ''">
+            and DATE_FORMAT(wmu_date,'%Y-%m-%d') = DATE_FORMAT(#{wmu_date,jdbcType=DATE},'%Y-%m-%d')
+        </if>
+        order by id desc
+    </select>
+
+    <insert id="insertWXMMUserSearch" parameterType="com.ygj.yuemum.domain.wxmini.WXMMUserSearch" >
+        insert into wx_mm_user_search
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="wmu_openid != null" >
+                wmu_openid,
+            </if>
+            <if test="wmu_phone != null" >
+                wmu_phone,
+            </if>
+            <if test="wmu_city != null" >
+                wmu_city,
+            </if>
+            <if test="wmu_date != null" >
+                wmu_date
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="wmu_openid != null" >
+                #{wmu_openid,jdbcType=VARCHAR},
+            </if>
+            <if test="wmu_phone != null" >
+                #{wmu_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="wmu_city != null" >
+                #{wmu_city,jdbcType=VARCHAR},
+            </if>
+            <if test="wmu_date != null" >
+                #{wmu_date,jdbcType=DATE}
+            </if>
+        </trim>
+    </insert>
+    <select id="getWXMMUserSearchId" resultType="java.lang.Integer" >
+        SELECT auto_increment
+        FROM information_schema.tables
+        where table_schema="yuemum"
+        and table_name="wx_mm_user_search";
+    </select>
+
+</mapper>

+ 32 - 22
src/main/resources/mybatis/mapper/wxmini/WXMktInfoMapper.xml

@@ -1,23 +1,33 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.ygj.yuemum.dao.wxmini.WXMktInfoDao" >
-
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMktInfo" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="mi_mktname" property="mi_mktname" jdbcType="VARCHAR" />
-        <result column="mi_mktaddress" property="mi_mktaddress" jdbcType="VARCHAR" />
-        <result column="mi_latitude" property="mi_latitude" jdbcType="VARCHAR" />
-        <result column="mi_longitude" property="mi_longitude" jdbcType="VARCHAR" />
-        <result column="mi_mkturl" property="mi_mkturl" jdbcType="VARCHAR" />
-        <result column="mi_mapurl" property="mi_mapurl" jdbcType="VARCHAR" />
-    </resultMap>
-
-    <!--获取所有数据-->
-    <select id="getMktInfos" resultType="com.ygj.yuemum.domain.wxmini.WXMktInfo" >
-        select
-        id,mi_mktname,mi_mktaddress,mi_latitude,mi_longitude,mi_mkturl,mi_mapurl
-        from wx_mkt_info
-        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.WXMktInfoDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.wxmini.WXMktInfo" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="mi_mktname" property="mi_mktname" jdbcType="VARCHAR" />
+        <result column="mi_mktaddress" property="mi_mktaddress" jdbcType="VARCHAR" />
+        <result column="mi_latitude" property="mi_latitude" jdbcType="VARCHAR" />
+        <result column="mi_longitude" property="mi_longitude" jdbcType="VARCHAR" />
+        <result column="mi_mkturl" property="mi_mkturl" jdbcType="VARCHAR" />
+        <result column="mi_mapurl" property="mi_mapurl" jdbcType="VARCHAR" />
+        <result column="mi_branche_code" property="mi_branche_code" jdbcType="INTEGER" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getMktInfos" resultType="com.ygj.yuemum.domain.wxmini.WXMktInfo" parameterType="java.lang.Integer">
+        SELECT
+            id,
+            mi_mktname,
+            mi_mktaddress,
+            mi_latitude,
+            mi_longitude,
+            mi_mkturl,
+            mi_mapurl,
+            mi_branche_code,
+            mi_branche_code
+        FROM
+            wx_mkt_info
+        order by field(mi_branche_code,#{mi_branche_code,jdbcType=INTEGER}) desc
+    </select>
+
 </mapper>

+ 10 - 2
src/main/resources/mybatis/mapper/wxmini/WXUserMapper.xml

@@ -17,12 +17,14 @@
         <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"/>
+        <result column="xu_content_type" property="xu_content_type" jdbcType="INTEGER"/>
+        <result column="xu_content_date" property="xu_content_date" 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
+        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,xu_content_type,xu_content_date
         from wx_user
         where xu_openid = #{xu_openid,jdbcType=VARCHAR}
         order by id asc
@@ -148,7 +150,13 @@
                 xu_ydate = #{xu_ydate,jdbcType=DATE},
             </if>
             <if test="xu_isauthorize != null" >
-                xu_isauthorize = #{xu_isauthorize,jdbcType=INTEGER}
+                xu_isauthorize = #{xu_isauthorize,jdbcType=INTEGER},
+            </if>
+            <if test="xu_content_type != null" >
+                xu_content_type = #{xu_content_type,jdbcType=VARCHAR},
+            </if>
+            <if test="xu_content_date != null" >
+                xu_content_date = #{xu_content_date,jdbcType=DATE}
             </if>
         </set>
         where xu_openid = #{xu_openid,jdbcType=VARCHAR}