Shanks 7 gadi atpakaļ
vecāks
revīzija
ba41434cc5
42 mainītis faili ar 2520 papildinājumiem un 534 dzēšanām
  1. 671 0
      hs_err_pid11320.log
  2. 464 0
      hs_err_pid3732.log
  3. 176 0
      hs_err_pid7296.log
  4. 27 1
      pom.xml
  5. 14 0
      src/main/java/com/ygj/yuemum/MyWebAppConfigurer.java
  6. 1 1
      src/main/java/com/ygj/yuemum/YueMumApplication.java
  7. 23 27
      src/main/java/com/ygj/yuemum/controller/admin/JlRegionController.java
  8. 12 5
      src/main/java/com/ygj/yuemum/controller/admin/TrainController.java
  9. 65 1
      src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java
  10. 3 1
      src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserInfoController.java
  11. 15 2
      src/main/java/com/ygj/yuemum/controller/maternitymatron/MmInfoTrainController.java
  12. 1 36
      src/main/java/com/ygj/yuemum/dao/admin/JlRegionDao.java
  13. 5 24
      src/main/java/com/ygj/yuemum/dao/admin/TrainDao.java
  14. 10 1
      src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserDao.java
  15. 0 28
      src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserInfoDao.java
  16. 4 24
      src/main/java/com/ygj/yuemum/dao/maternitymatron/MmInfoTrainDao.java
  17. 17 30
      src/main/java/com/ygj/yuemum/domain/admin/JlRegion.java
  18. 81 0
      src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUser.java
  19. 155 73
      src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUserInfo.java
  20. 9 0
      src/main/java/com/ygj/yuemum/domain/maternitymatron/MmInfoTrain.java
  21. 95 0
      src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUser.java
  22. 105 0
      src/main/java/com/ygj/yuemum/domain/utils/AddMMInfo.java
  23. 2 20
      src/main/java/com/ygj/yuemum/service/admin/JlRegionService.java
  24. 13 4
      src/main/java/com/ygj/yuemum/service/admin/TrainService.java
  25. 33 0
      src/main/java/com/ygj/yuemum/service/maternitymatron/JlServiceUserService.java
  26. 15 0
      src/main/java/com/ygj/yuemum/service/maternitymatron/MmInfoTrainService.java
  27. 66 0
      src/main/java/com/ygj/yuemum/utils/IDcard.java
  28. 8 2
      src/main/resources/application.yml
  29. 3 3
      src/main/resources/mybatis/mapper/admin/CertificateMapper.xml
  30. 3 3
      src/main/resources/mybatis/mapper/admin/JlAdminUserMapper.xml
  31. 4 100
      src/main/resources/mybatis/mapper/admin/JlRegionMapper.xml
  32. 2 2
      src/main/resources/mybatis/mapper/admin/PhotoMapper.xml
  33. 3 3
      src/main/resources/mybatis/mapper/admin/ResumeMapper.xml
  34. 11 2
      src/main/resources/mybatis/mapper/admin/TrainMapper.xml
  35. 178 55
      src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserInfoMapper.xml
  36. 185 65
      src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml
  37. 3 3
      src/main/resources/mybatis/mapper/maternitymatron/JlStoreXMapper.xml
  38. 3 3
      src/main/resources/mybatis/mapper/maternitymatron/MmInfoCertificateMapper.xml
  39. 3 3
      src/main/resources/mybatis/mapper/maternitymatron/MmInfoPhotoMapper.xml
  40. 3 3
      src/main/resources/mybatis/mapper/maternitymatron/MmInfoResumeMapper.xml
  41. 26 6
      src/main/resources/mybatis/mapper/maternitymatron/MmInfoTrainMapper.xml
  42. 3 3
      src/main/resources/mybatis/mapper/maternitymatron/MmStockMapper.xml

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 671 - 0
hs_err_pid11320.log


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 464 - 0
hs_err_pid3732.log


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 176 - 0
hs_err_pid7296.log


+ 27 - 1
pom.xml

@@ -32,7 +32,7 @@
 		<dependency>
 			<groupId>org.mybatis.spring.boot</groupId>
 			<artifactId>mybatis-spring-boot-starter</artifactId>
-			<version>1.3.2</version>
+			<version>1.3.0</version>
 		</dependency>
 
 		<dependency>
@@ -40,11 +40,37 @@
 			<artifactId>mysql-connector-java</artifactId>
 			<scope>runtime</scope>
 		</dependency>
+
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.31</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.1.3</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.github.pagehelper</groupId>
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
+
+		<dependency>
+			<groupId>com.thetransactioncompany</groupId>
+			<artifactId>cors-filter</artifactId>
+			<version>1.7.1</version>
+		</dependency>
+
     </dependencies>
 
 	<build>

+ 14 - 0
src/main/java/com/ygj/yuemum/MyWebAppConfigurer.java

@@ -0,0 +1,14 @@
+package com.ygj.yuemum;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+@Configuration
+public class MyWebAppConfigurer extends WebMvcConfigurerAdapter {
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**");
+    }
+}
+

+ 1 - 1
src/main/java/com/ygj/yuemum/YueMumApplication.java

@@ -11,4 +11,4 @@ public class YueMumApplication {
     public static void main(String[] args) {
         SpringApplication.run(YueMumApplication.class, args);
     }
-}
+}

+ 23 - 27
src/main/java/com/ygj/yuemum/controller/admin/JlRegionController.java

@@ -1,42 +1,38 @@
 package com.ygj.yuemum.controller.admin;
 
 
-import com.ygj.yuemum.domain.admin.JlRegion;
-
+import com.alibaba.fastjson.JSONObject;
 import com.ygj.yuemum.service.admin.JlRegionService;
+import com.ygj.yuemum.utils.IDcard;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+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;
+import java.util.HashMap;
+import java.util.Map;
 
 @RestController
 public class JlRegionController {
 
     @Autowired
     private JlRegionService jlRegionService;
-
-    @GetMapping("/getJlRegions")
-    public List<JlRegion> getJlRegions() {
-        return jlRegionService.getJlRegions();
+    @GetMapping("/getNP")
+    public String getNP(@RequestParam("IDcard")  String idcard) {
+        System.out.println(idcard.length());
+        String year = idcard.substring(6,10);
+        String month = idcard.substring(10,12);
+        String day = idcard.substring(12,14);
+        String province  =idcard.substring(0,2)+"0000";
+        String city = idcard.substring(0,4)+"00";
+        Map<String, String> rejso = new HashMap<String, String>();
+        rejso.put("province",String.valueOf(jlRegionService.getnp(Integer.valueOf(province))));
+        rejso.put("city",jlRegionService.getnp(Integer.valueOf(city)));
+        rejso.put("constellation",IDcard.getConstellation(Integer.valueOf(month), Integer.valueOf(day)));
+        rejso.put("zodiac",IDcard.getYear(Integer.valueOf(year)));
+        rejso.put("np",city);
+        String jsor = JSONObject.toJSONString(rejso);
+        return jsor;
     }
 
-    @PostMapping("/addJlRegion")
-    public int add(@ModelAttribute JlRegion jlRegion) {
-        return jlRegionService.addJlRegion(jlRegion);
-    }
-
-    @GetMapping("/deleteJlRegion/{id}")
-    public int delete(@PathVariable("id") Integer id) {
-        return jlRegionService.deleteJlRegion(id);
-    }
-
-    @PostMapping("/updateJlRegion")
-    public int update(@ModelAttribute JlRegion jlRegion) {
-        return jlRegionService.updateJlRegion(jlRegion);
-    }
-
-    @GetMapping("/getJlRegion/{id}")
-    public JlRegion getOne(@PathVariable("id") Integer id) {
-        return jlRegionService.getJlRegion(id);
-    }
 }

+ 12 - 5
src/main/java/com/ygj/yuemum/controller/admin/TrainController.java

@@ -1,12 +1,13 @@
 package com.ygj.yuemum.controller.admin;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.ygj.yuemum.domain.admin.Train;
 import com.ygj.yuemum.service.admin.TrainService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
+import java.util.Map;
 
 @RestController
 public class TrainController {
@@ -15,8 +16,10 @@ public class TrainController {
     private TrainService trainService;
 
     @GetMapping("/getTrains")
-    public List<Train> getTrains() {
-        return trainService.getTrains();
+    public String getTrains(@RequestParam("page") Integer page,@RequestParam("limit") Integer limit) {
+        Map<String, Object> trains= trainService.getTrains(page,limit);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
     }
 
     @PostMapping("/addTrain")
@@ -30,8 +33,12 @@ public class TrainController {
     }
 
     @PostMapping("/updateTrain")
-    public int update(@ModelAttribute Train train) { return trainService.updateTrain(train);}
+    public int update(@ModelAttribute Train train) {
+        return trainService.updateTrain(train);
+    }
 
     @GetMapping("/getTrain/{id}")
-    public Train getOne(@PathVariable("id") Integer id) {return  trainService.getTrain(id);}
+    public Train getOne(@PathVariable("id") Integer id) {
+        return trainService.getTrain(id);
+    }
 }

+ 65 - 1
src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java

@@ -1,26 +1,90 @@
 package com.ygj.yuemum.controller.maternitymatron;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.JlServiceUserInfo;
+import com.ygj.yuemum.domain.maternitymatron.JlStoreX;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
+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.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;
+    }
+    @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 JlServiceUser jlServiceUser) { return jlServiceUserService.addJlServiceUser(jlServiceUser);    }
+    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());
+        //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());
+        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) {

+ 3 - 1
src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserInfoController.java

@@ -20,7 +20,9 @@ public class JlServiceUserInfoController {
     }
 
     @PostMapping("/addJlServiceUserInfo")
-    public int add(@ModelAttribute JlServiceUserInfo jlServiceUserInfo) { return jlServiceUserInfoService.addJlServiceUserInfo(jlServiceUserInfo);    }
+    public int add(@ModelAttribute JlServiceUserInfo jlServiceUserInfo) {
+        return jlServiceUserInfoService.addJlServiceUserInfo(jlServiceUserInfo);
+    }
 
     @GetMapping("/deleteJlServiceUserInfo/{id}")
     public int delete(@PathVariable("id") Integer id) {

+ 15 - 2
src/main/java/com/ygj/yuemum/controller/maternitymatron/MmInfoTrainController.java

@@ -1,12 +1,14 @@
 package com.ygj.yuemum.controller.maternitymatron;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.ygj.yuemum.domain.maternitymatron.MmInfoTrain;
 import com.ygj.yuemum.service.maternitymatron.MmInfoTrainService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 @RestController
 public class MmInfoTrainController {
@@ -19,6 +21,13 @@ public class MmInfoTrainController {
         return mmInfoTrainService.getMmInfoTrains();
     }
 
+    @GetMapping("/getInfoTrains")
+    public String getInfoTrains(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit ,@RequestParam("id") Integer id) {
+        Map<String, Object> trains= mmInfoTrainService.getInfoTrains(page,limit,id);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
     @PostMapping("/addMmInfoTrain")
     public int add(@ModelAttribute MmInfoTrain mmInfoTrain) {
         return mmInfoTrainService.addMmInfoTrain(mmInfoTrain);
@@ -30,8 +39,12 @@ public class MmInfoTrainController {
     }
 
     @PostMapping("/updateMmInfoTrain")
-    public int update(@ModelAttribute MmInfoTrain mmInfoTrain) { return mmInfoTrainService.updateMmInfoTrain(mmInfoTrain);}
+    public int update(@ModelAttribute MmInfoTrain mmInfoTrain) {
+        return mmInfoTrainService.updateMmInfoTrain(mmInfoTrain);
+    }
 
     @GetMapping("/getMmInfoTrain/{id}")
-    public MmInfoTrain getOne(@PathVariable("id") Integer id) {return  mmInfoTrainService.getMmInfoTrain(id);}
+    public MmInfoTrain getOne(@PathVariable("id") Integer id) {
+        return mmInfoTrainService.getMmInfoTrain(id);
+    }
 }

+ 1 - 36
src/main/java/com/ygj/yuemum/dao/admin/JlRegionDao.java

@@ -1,44 +1,9 @@
 package com.ygj.yuemum.dao.admin;
 
-import com.ygj.yuemum.domain.admin.JlRegion;
 import org.springframework.stereotype.Repository;
 
-import java.util.List;
-
 @Repository
 public interface JlRegionDao {
 
-    /**
-     * 得到所有的城市信息
-     * @return List<JlRegion>
-     */
-    List<JlRegion> getAll();
-
-    /**
-     * 根据id删除某个城市信息
-     * @param id
-     * @return
-     */
-    int deleteByPrimaryKey(Integer id);
-
-    /**
-     * 插入一条用城市息
-     * @param record
-     * @return
-     */
-    int insertSelective(JlRegion record);
-
-    /**
-     * 根据id查找某个城市信息
-     * @param id
-     * @return User
-     */
-    JlRegion selectByPrimaryKey(Integer id);
-
-    /**
-     * 根据id更新一条城市信息
-     * @param record
-     * @return
-     */
-    int updateByPrimaryKeySelective(JlRegion record);
+    String getnp(Integer code);
 }

+ 5 - 24
src/main/java/com/ygj/yuemum/dao/admin/TrainDao.java

@@ -8,37 +8,18 @@ import java.util.List;
 @Repository
 public interface TrainDao {
 
-    /**
-     * 得到所有的用户信息
-     * @return List<Train>
-     */
     List<Train> getAll();
 
-    /**
-     * 根据id删除某个用户信息
-     * @param id
-     * @return
-     */
     int deleteByPrimaryKey(Integer id);
 
-    /**
-     * 插入一条用户信息
-     * @param record
-     * @return
-     */
     int insertSelective(Train record);
 
-    /**
-     * 根据id查找某个用户信息
-     * @param id
-     * @return User
-     */
     Train selectByPrimaryKey(Integer id);
 
-    /**
-     * 根据id更新一条用户信息
-     * @param record
-     * @return
-     */
     int updateByPrimaryKeySelective(Train record);
+
+    int getcount();
+
+
+
 }

+ 10 - 1
src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserDao.java

@@ -1,6 +1,7 @@
 package com.ygj.yuemum.dao.maternitymatron;
 
 import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -14,6 +15,15 @@ public interface JlServiceUserDao {
      */
     List<JlServiceUser> getAll();
 
+    List<JlServiceUser> getMMList();
+
+    List<QueryServiceUser> queryMMList(QueryServiceUser record);
+
+
+    int getcount();
+    int getquerycount(QueryServiceUser record);
+    int getpmid();
+
     /**
      * 根据id删除某个库存信息
      * @param id
@@ -27,7 +37,6 @@ public interface JlServiceUserDao {
      * @return
      */
     int insertSelective(JlServiceUser record);
-
     /**
      * 根据id查找某个库存信息
      * @param id

+ 0 - 28
src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserInfoDao.java

@@ -8,37 +8,9 @@ import java.util.List;
 @Repository
 public interface JlServiceUserInfoDao {
 
-    /**
-     * 得到所有的库存信息
-     * @return List<JlServiceUserInfo>
-     */
     List<JlServiceUserInfo> getAll();
-
-    /**
-     * 根据id删除某个库存信息
-     * @param id
-     * @return
-     */
     int deleteByPrimaryKey(Integer id);
-
-    /**
-     * 插入一条用库存息
-     * @param record
-     * @return
-     */
     int insertSelective(JlServiceUserInfo record);
-
-    /**
-     * 根据id查找某个库存信息
-     * @param id
-     * @return User
-     */
     JlServiceUserInfo selectByPrimaryKey(Integer id);
-
-    /**
-     * 根据id更新一条库存信息
-     * @param record
-     * @return
-     */
     int updateByPrimaryKeySelective(JlServiceUserInfo record);
 }

+ 4 - 24
src/main/java/com/ygj/yuemum/dao/maternitymatron/MmInfoTrainDao.java

@@ -8,37 +8,17 @@ import java.util.List;
 @Repository
 public interface MmInfoTrainDao {
 
-    /**
-     * 得到所有的照片信息
-     * @return List<MmInfoTrain>
-     */
     List<MmInfoTrain> getAll();
 
-    /**
-     * 根据id删除某个照片信息
-     * @param id
-     * @return
-     */
+    List<MmInfoTrain> getInfoTrains(Integer id);
+
+    int getTrainsCount(Integer id);
+
     int deleteByPrimaryKey(Integer id);
 
-    /**
-     * 插入一条用照片息
-     * @param record
-     * @return
-     */
     int insertSelective(MmInfoTrain record);
 
-    /**
-     * 根据id查找某个照片信息
-     * @param id
-     * @return User
-     */
     MmInfoTrain selectByPrimaryKey(Integer id);
 
-    /**
-     * 根据id更新一条照片信息
-     * @param record
-     * @return
-     */
     int updateByPrimaryKeySelective(MmInfoTrain record);
 }

+ 17 - 30
src/main/java/com/ygj/yuemum/domain/admin/JlRegion.java

@@ -1,15 +1,16 @@
 package com.ygj.yuemum.domain.admin;
 
-public class JlRegion {
+import java.util.Date;
 
+public class JlRegion {
     private Integer id;
-    private Integer pid; // 城市编号
-    private String name; // 城市名称
-    private String sort; //
-    private String code; // 编码
-    private String type; // 级别
-    private String is_service; //
-    private String updated_at; // 最后更新日期
+    private Integer pid;
+    private String name;
+    private Integer sort;
+    private String code;
+    private Integer type;
+    private Integer is_service;
+    private Date updated_at;
 
     public JlRegion() {
         super();
@@ -39,11 +40,11 @@ public class JlRegion {
         this.name = name;
     }
 
-    public String getSort() {
+    public Integer getSort() {
         return sort;
     }
 
-    public void setSort(String sort) {
+    public void setSort(Integer sort) {
         this.sort = sort;
     }
 
@@ -55,41 +56,27 @@ public class JlRegion {
         this.code = code;
     }
 
-    public String getType() {
+    public Integer getType() {
         return type;
     }
 
-    public void setType(String type) {
+    public void setType(Integer type) {
         this.type = type;
     }
 
-    public String getIs_service() {
+    public Integer getIs_service() {
         return is_service;
     }
 
-    public void setIs_service(String is_service) {
+    public void setIs_service(Integer is_service) {
         this.is_service = is_service;
     }
 
-    public String getUpdated_at() {
+    public Date getUpdated_at() {
         return updated_at;
     }
 
-    public void setUpdated_at(String updated_at) {
+    public void setUpdated_at(Date updated_at) {
         this.updated_at = updated_at;
     }
-
-    @Override
-    public String toString() {
-        return "JlRegion{" +
-                "id=" + id +
-                ", pid='" + pid + '\'' +
-                ", name='" + name + '\'' +
-                ", sort='" + sort + '\'' +
-                ", code='" + code + '\'' +
-                ", type='" + type + '\'' +
-                ", is_service='" + is_service + '\'' +
-                ", updated_at='" + updated_at + '\'' +
-                '}';
-    }
 }

+ 81 - 0
src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUser.java

@@ -17,7 +17,40 @@ public class JlServiceUser {
     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;
 
+    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();
@@ -127,6 +160,54 @@ public class JlServiceUser {
         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{" +

+ 155 - 73
src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUserInfo.java

@@ -4,35 +4,51 @@ import java.util.Date;
 
 public class JlServiceUserInfo {
 
-    private Integer id;
+    private int id;
+    private String truename;
     private String mobile_phone;
-    private String idcard;
-    private Integer gender;
+    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 Integer province;
-    private Integer city;
-    private Integer district;
-    private String experience;
+    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 Integer update_uid;
-    private Date updated_at;
 
-    public JlServiceUserInfo() {
-        super();
-    }
-
-    public Integer getId() {
+    public int getId() {
         return id;
     }
 
-    public void setId(Integer 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;
     }
@@ -41,20 +57,44 @@ public class JlServiceUserInfo {
         this.mobile_phone = mobile_phone;
     }
 
-    public String getIdcard() {
-        return idcard;
+    public int getLevel() {
+        return level;
     }
 
-    public void setIdcard(String idcard) {
-        this.idcard = idcard;
+    public void setLevel(int level) {
+        this.level = level;
     }
 
-    public Integer getGender() {
-        return gender;
+    public int getIs_fulltime() {
+        return is_fulltime;
     }
 
-    public void setGender(Integer gender) {
-        this.gender = gender;
+    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() {
@@ -65,6 +105,22 @@ public class JlServiceUserInfo {
         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;
     }
@@ -73,6 +129,22 @@ public class JlServiceUserInfo {
         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;
     }
@@ -81,67 +153,67 @@ public class JlServiceUserInfo {
         this.address = address;
     }
 
-    public Integer getProvince() {
-        return province;
+    public String getBrief() {
+        return brief;
     }
 
-    public void setProvince(Integer province) {
-        this.province = province;
+    public void setBrief(String brief) {
+        this.brief = brief;
     }
 
-    public Integer getCity() {
-        return city;
+    public String getIdcard() {
+        return idcard;
     }
 
-    public void setCity(Integer city) {
-        this.city = city;
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
     }
 
-    public Integer getDistrict() {
-        return district;
+    public String getEducation() {
+        return education;
     }
 
-    public void setDistrict(Integer district) {
-        this.district = district;
+    public void setEducation(String education) {
+        this.education = education;
     }
 
-    public String getExperience() {
-        return experience;
+    public int getCity() {
+        return city;
     }
 
-    public void setExperience(String experience) {
-        this.experience = experience;
+    public void setCity(int city) {
+        this.city = city;
     }
 
-    public String getBabynumber() {
-        return babynumber;
+    public int getDistrict() {
+        return district;
     }
 
-    public void setBabynumber(String babynumber) {
-        this.babynumber = babynumber;
+    public void setDistrict(int district) {
+        this.district = district;
     }
 
-    public String getConstellation() {
-        return constellation;
+    public String getService_number() {
+        return service_number;
     }
 
-    public void setConstellation(String constellation) {
-        this.constellation = constellation;
+    public void setService_number(String service_number) {
+        this.service_number = service_number;
     }
 
-    public String getZodiac() {
-        return zodiac;
+    public int getProvince() {
+        return province;
     }
 
-    public void setZodiac(String zodiac) {
-        this.zodiac = zodiac;
+    public void setProvince(int province) {
+        this.province = province;
     }
 
-    public Integer getUpdate_uid() {
+    public int getUpdate_uid() {
         return update_uid;
     }
 
-    public void setUpdate_uid(Integer update_uid) {
+    public void setUpdate_uid(int update_uid) {
         this.update_uid = update_uid;
     }
 
@@ -153,25 +225,35 @@ public class JlServiceUserInfo {
         this.updated_at = updated_at;
     }
 
-    @Override
-    public String toString() {
-        return "JlServiceUserInfo{" +
-                "id=" + id +
-                ", mobile_phone='" + mobile_phone + '\'' +
-                ", idcard='" + idcard + '\'' +
-                ", gender='" + gender + '\'' +
-                ", create_time='" + create_time + '\'' +
-                ", birthday='" + birthday + '\'' +
-                ", address='" + address + '\'' +
-                ", province='" + province + '\'' +
-                ", city='" + city + '\'' +
-                ", district='" + district + '\'' +
-                ", experience='" + experience + '\'' +
-                ", babynumber='" + babynumber + '\'' +
-                ", constellation='" + constellation + '\'' +
-                ", zodiac='" + zodiac + '\'' +
-                ", update_uid='" + update_uid + '\'' +
-                ", 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;
     }
 }

+ 9 - 0
src/main/java/com/ygj/yuemum/domain/maternitymatron/MmInfoTrain.java

@@ -9,6 +9,7 @@ public class MmInfoTrain {
     private Integer train_code; // 培训编号
     private Date train_date; // 培训编号
     private String train_result; // 培训成绩
+    private String train_name;
 
     public MmInfoTrain() {
         super();
@@ -54,6 +55,14 @@ public class MmInfoTrain {
         this.train_result = train_result;
     }
 
+    public String getTrain_name() {
+        return train_name;
+    }
+
+    public void setTrain_name(String train_name) {
+        this.train_name = train_name;
+    }
+
     @Override
     public String toString() {
         return "MmInfoTrain{" +

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

@@ -0,0 +1,95 @@
+package com.ygj.yuemum.domain.maternitymatron;
+
+public class QueryServiceUser {
+
+    private Integer id;
+    private String truename;
+    private String status;
+    private String idcard;
+    private String cityname;
+    private String np;
+    private String experience;
+    private String gender;
+    int page;
+    int limit;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer 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;
+    }
+}

+ 105 - 0
src/main/java/com/ygj/yuemum/domain/utils/AddMMInfo.java

@@ -0,0 +1,105 @@
+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;
+
+
+    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;
+    }
+}

+ 2 - 20
src/main/java/com/ygj/yuemum/service/admin/JlRegionService.java

@@ -1,36 +1,18 @@
 package com.ygj.yuemum.service.admin;
 
 import com.ygj.yuemum.dao.admin.JlRegionDao;
-import com.ygj.yuemum.domain.admin.JlRegion;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-
 @Service
 public class JlRegionService {
 
     @Autowired
 
     private JlRegionDao jlRegionDao;
-    public List<JlRegion> getJlRegions() {
-        List<JlRegion> jlRegions = jlRegionDao.getAll();
-        return jlRegions;
-    }
-
-    public int addJlRegion(JlRegion jlRegion) {
-        return jlRegionDao.insertSelective(jlRegion);
-    }
 
-    public int deleteJlRegion(Integer id) {
-        return jlRegionDao.deleteByPrimaryKey(id);
+    public String getnp(Integer code) {
+        return jlRegionDao.getnp(code);
     }
 
-    public int updateJlRegion(JlRegion jlRegion) {
-        return jlRegionDao.updateByPrimaryKeySelective(jlRegion);
-    }
-
-    public JlRegion getJlRegion(Integer id) {
-        return jlRegionDao.selectByPrimaryKey(id);
-    }
 }

+ 13 - 4
src/main/java/com/ygj/yuemum/service/admin/TrainService.java

@@ -1,22 +1,29 @@
 package com.ygj.yuemum.service.admin;
 
+import com.github.pagehelper.PageHelper;
 import com.ygj.yuemum.dao.admin.TrainDao;
 import com.ygj.yuemum.domain.admin.Train;
 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 TrainService {
 
     @Autowired
-
     private TrainDao trainDao;
-
-    public List<Train> getTrains() {
+    //分页
+    public Map<String, Object> getTrains(int page, int limit) {
+        PageHelper.startPage(page, limit);
         List<Train> trains = trainDao.getAll();
-        return trains;
+        Map<String, Object> tableData = new HashMap<>();
+        Integer count  = trainDao.getcount();
+        tableData.put("items", trains);
+        tableData.put("total", count);
+        return tableData;
     }
 
     public int addTrain(Train train) {
@@ -34,4 +41,6 @@ public class TrainService {
     public Train getTrain(Integer id) {
         return trainDao.selectByPrimaryKey(id);
     }
+
+
 }

+ 33 - 0
src/main/java/com/ygj/yuemum/service/maternitymatron/JlServiceUserService.java

@@ -1,17 +1,24 @@
 package com.ygj.yuemum.service.maternitymatron;
 
+import com.github.pagehelper.PageHelper;
 import com.ygj.yuemum.dao.maternitymatron.JlServiceUserDao;
 import com.ygj.yuemum.domain.maternitymatron.JlServiceUser;
+import com.ygj.yuemum.domain.maternitymatron.QueryServiceUser;
 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 JlServiceUserService {
 
     @Autowired
     private JlServiceUserDao jlServiceUserDao;
+    private JlServiceUserInfoService jlServiceUserInfoService;
+    private JlStoreXService jlStoreXService;
+
 
 
     public List<JlServiceUser> getJlServiceUsers() {
@@ -19,6 +26,32 @@ public class JlServiceUserService {
         return jlServiceUsers;
     }
 
+    //分页
+
+    public Map<String, Object> getMMList(int page, int limit) {
+        PageHelper.startPage(page, limit);
+        List<JlServiceUser> mmlists = jlServiceUserDao.getMMList();
+        Map<String, Object> tableData = new HashMap<>();
+        Integer count  = jlServiceUserDao.getcount();
+        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);
+        Map<String, Object> tableData = new HashMap<>();
+        Integer count  = jlServiceUserDao.getquerycount(queryServiceUser);
+        tableData.put("items", mmlists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+    public int getPMId() {
+        return jlServiceUserDao.getpmid();
+    }
+
     public int addJlServiceUser(JlServiceUser jlServiceUser) {
         return jlServiceUserDao.insertSelective(jlServiceUser);
     }

+ 15 - 0
src/main/java/com/ygj/yuemum/service/maternitymatron/MmInfoTrainService.java

@@ -1,11 +1,14 @@
 package com.ygj.yuemum.service.maternitymatron;
 
+import com.github.pagehelper.PageHelper;
 import com.ygj.yuemum.dao.maternitymatron.MmInfoTrainDao;
 import com.ygj.yuemum.domain.maternitymatron.MmInfoTrain;
 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 MmInfoTrainService {
@@ -18,6 +21,18 @@ public class MmInfoTrainService {
         return mmInfoTrains;
     }
 
+    public Map<String, Object> getInfoTrains(int page, int limit , int id) {
+
+        PageHelper.startPage(page, limit);
+        List<MmInfoTrain> mmlists = mmInfoTrainDao.getInfoTrains(id);
+        Map<String, Object> tableData = new HashMap<>();
+        Integer count  = mmInfoTrainDao.getTrainsCount(id);
+        tableData.put("items", mmlists);
+        tableData.put("total", count);
+        return tableData;
+    }
+
+
     public int addMmInfoTrain(MmInfoTrain mmInfoTrain) {
         return mmInfoTrainDao.insertSelective(mmInfoTrain);
     }

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

@@ -0,0 +1,66 @@
+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[] { "摩羯座",
+            "水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座", "狮子座", "处女座", "天秤座",
+            "天蝎座", "射手座", "摩羯座" };
+
+    /**
+     * 根据出生日期计算属相和星座
+     *
+     * @param args
+     */
+//    public static void main(String[] args) throws Exception{
+//        String idcardt ="130202198307080017";
+//        System.out.println(idcardt.length());
+//        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 = 7;
+        int day = 8;
+        int year =  1983;
+        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[] { "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊",
+                "猴", "鸡", "狗", "猪" };
+        return years[(year - start) % years.length];
+    }
+}

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

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8888
 mybatis:
   config-location: classpath:mybatis/mybatis-config.xml
   mapper-locations: mybatis/mapper/admin/*.xml,mybatis/mapper/maternitymatron/*.xml
@@ -9,4 +9,10 @@ spring:
     driverClassName: com.mysql.jdbc.Driver
     url: jdbc:mysql://121.43.235.99:3306/yuemum?useUnicode=true&characterEncoding=utf-8&noDatetimeStringSync=true
     username: jielin
-    password: jielin123
+    password: jielin123
+# 分页配置
+pagehelper:
+  helper-dialect: mysql
+  reasonable: true
+  support-methods-arguments: true
+  params: count=countSql

+ 3 - 3
src/main/resources/mybatis/mapper/admin/CertificateMapper.xml

@@ -40,7 +40,7 @@
                 certificate_code,
             </if>
             <if test="certificate_name != null" >
-                certificate_name,
+                certificate_name
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -48,7 +48,7 @@
                 #{certificate_code,jdbcType=INTEGER},
             </if>
             <if test="certificate_name != null" >
-                #{certificate_name,jdbcType=VARCHAR},
+                #{certificate_name,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -61,7 +61,7 @@
                 certificate_code = #{certificate_code,jdbcType=INTEGER},
             </if>
             <if test="certificate_name != null" >
-                certificate_name = #{certificate_name,jdbcType=VARCHAR},
+                certificate_name = #{certificate_name,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

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

@@ -103,7 +103,7 @@
                 enabled,
             </if>
             <if test="update_time != null" >
-                update_time,
+                update_time
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -159,7 +159,7 @@
                 #{enabled,jdbcType=INTEGER},
             </if>
             <if test="update_time != null" >
-                #{update_time,jdbcType=DATE},
+                #{update_time,jdbcType=DATE}
             </if>
         </trim>
     </insert>
@@ -217,7 +217,7 @@
                 enabled = #{enabled,jdbcType=INTEGER},
             </if>
             <if test="update_time != null" >
-                update_time = #{update_time,jdbcType=DATE},
+                update_time = #{update_time,jdbcType=DATE}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 4 - 100
src/main/resources/mybatis/mapper/admin/JlRegionMapper.xml

@@ -13,108 +13,12 @@
         <result column="updated_at" property="updated_at" jdbcType="DATE" />
     </resultMap>
 
-    <sql id="Base_Column_List" >
-        id, pid, name,sort,code,type,is_service,updated_at
-    </sql>
-
-    <!-- 得到所有的城市信息 -->
-    <select id="getAll" resultMap="BaseResultMap" >
+    <!--获取所有数据-->
+    <select id="getnp" parameterType="java.lang.Integer" resultType="java.lang.String" >
         select
-        <include refid="Base_Column_List" />
+        name
         from jl_region
+        where code = #{code,jdbcType=INTEGER}
     </select>
 
-    <!-- 根据id查找某个城市信息 -->
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-        select
-        <include refid="Base_Column_List" />
-        from jl_region
-        where pid = #{pid,jdbcType=INTEGER}
-    </select>
-    <!-- 根据id删除某个城市信息 -->
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-        delete from jl_region
-        where id = #{id,jdbcType=INTEGER}
-    </delete>
-
-    <!-- 插入一条城市信息 -->
-    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.admin.JlRegion" >
-        insert into jl_region
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-            <if test="pid != null" >
-                pid,
-            </if>
-            <if test="name != null" >
-                name,
-            </if>
-            <if test="sort != null" >
-                sort,
-            </if>
-            <if test="code != null" >
-                code,
-            </if>
-            <if test="type != null" >
-                type,
-            </if>
-            <if test="is_service != null" >
-                is_service,
-            </if>
-            <if test="updated_at != null" >
-                updated_at,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-            <if test="pid != null" >
-                #{pid,jdbcType=INTEGER},
-            </if>
-            <if test="name != null" >
-                #{name,jdbcType=VARCHAR},
-            </if>
-            <if test="sort != null" >
-                #{sort,jdbcType=INTEGER},
-            </if>
-            <if test="code != null" >
-                #{code,jdbcType=VARCHAR},
-            </if>
-            <if test="type != null" >
-                #{type,jdbcType=INTEGER},
-            </if>
-            <if test="is_service != null" >
-                #{is_service,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                #{updated_at,jdbcType=DATE},
-            </if>
-        </trim>
-    </insert>
-
-    <!-- 根据id更新一条城市信息 -->
-    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.admin.JlRegion" >
-        update jl_region
-        <set >
-            <if test="pid != null" >
-                pid = #{pid,jdbcType=INTEGER},
-            </if>
-            <if test="name != null" >
-                name = #{name,jdbcType=VARCHAR},
-            </if>
-            <if test="sort != null" >
-                sort = #{sort,jdbcType=INTEGER},
-            </if>
-            <if test="code != null" >
-                code = #{code,jdbcType=VARCHAR},
-            </if>
-            <if test="type != null" >
-                type = #{type,jdbcType=INTEGER},
-            </if>
-            <if test="is_service != null" >
-                is_service = #{is_service,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                updated_at = #{updated_at,jdbcType=DATE},
-            </if>
-        </set>
-        where id = #{id,jdbcType=INTEGER}
-    </update>
-
 </mapper>

+ 2 - 2
src/main/resources/mybatis/mapper/admin/PhotoMapper.xml

@@ -48,7 +48,7 @@
                 #{photo_code,jdbcType=INTEGER},
             </if>
             <if test="photo_title != null" >
-                #{photo_title,jdbcType=VARCHAR},
+                #{photo_title,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -61,7 +61,7 @@
                 photo_code = #{photo_code,jdbcType=INTEGER},
             </if>
             <if test="photo_title != null" >
-                photo_title = #{photo_title,jdbcType=VARCHAR},
+                photo_title = #{photo_title,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 3 - 3
src/main/resources/mybatis/mapper/admin/ResumeMapper.xml

@@ -44,7 +44,7 @@
                 resume_name,
             </if>
             <if test="resume_path != null" >
-                resume_path,
+                resume_path
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -55,7 +55,7 @@
                 #{resume_name,jdbcType=VARCHAR},
             </if>
             <if test="resume_path != null" >
-                #{resume_path,jdbcType=VARCHAR},
+                #{resume_path,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -71,7 +71,7 @@
                 resume_name = #{resume_name,jdbcType=VARCHAR},
             </if>
             <if test="resume_path != null" >
-                resume_path = #{resume_path,jdbcType=VARCHAR},
+                resume_path = #{resume_path,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 11 - 2
src/main/resources/mybatis/mapper/admin/TrainMapper.xml

@@ -12,11 +12,20 @@
         id, train_code, train_name
     </sql>
 
+    <!--获取所有数据-->
+    <select id="getcount" resultType="java.lang.Integer" >
+        select
+        count(1)
+        from train
+    </select>
+
+
     <!-- 得到所有的培训信息 -->
     <select id="getAll" resultMap="BaseResultMap" >
         select
         <include refid="Base_Column_List" />
         from train
+        order by train_code
     </select>
 
     <!-- 根据id查找某个培训信息 -->
@@ -48,7 +57,7 @@
                 #{train_code,jdbcType=INTEGER},
             </if>
             <if test="train_name != null" >
-                #{train_name,jdbcType=VARCHAR},
+                #{train_name,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -61,7 +70,7 @@
                 train_code = #{train_code,jdbcType=INTEGER},
             </if>
             <if test="train_name != null" >
-                train_name = #{train_name,jdbcType=VARCHAR},
+                train_name = #{train_name,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 178 - 55
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserInfoMapper.xml

@@ -1,28 +1,39 @@
 <?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="idcard" property="idcard" jdbcType="VARCHAR" />
-        <result column="gender" property="gender" jdbcType="INTEGER" />
+        <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="province" property="province" jdbcType="INTEGER" />
+        <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="experience" property="experience" jdbcType="VARCHAR" />
+        <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="update_uid" property="update_uid" jdbcType="INTEGER" />
-        <result column="updated_at" property="updated_at" jdbcType="DATE" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id, mobile_phone, idcard,gender,create_time,birthday,address,province,city,district,experience,babynumber,constellation,zodiac,update_uid,updated_at
+        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>
 
     <!-- 得到所有的月嫂信息 -->
@@ -49,26 +60,59 @@
     <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="idcard != null" >
-                idcard,
+            <if test="level != null" >
+                level,
             </if>
-            <if test="gender != null" >
-                gender,
+            <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="province != null" >
-                province,
+            <if test="brief != null" >
+                brief,
+            </if>
+            <if test="idcard != null" >
+                idcard,
+            </if>
+            <if test="education != null" >
+                education,
             </if>
             <if test="city != null" >
                 city,
@@ -76,8 +120,20 @@
             <if test="district != null" >
                 district,
             </if>
-            <if test="experience != null" >
-                experience,
+            <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,
@@ -86,37 +142,63 @@
                 constellation,
             </if>
             <if test="zodiac != null" >
-                zodiac,
-            </if>
-            <if test="update_uid != null" >
-                update_uid,
-            </if>
-            <if test="updated_at != null" >
-                updated_at,
+                zodiac
             </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="idcard != null" >
-                #{idcard,jdbcType=VARCHAR},
+            <if test="level != null" >
+                #{level,jdbcType=INTEGER},
             </if>
-            <if test="gender != null" >
-                #{gender,jdbcType=INTEGER},
+            <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="province != null" >
-                #{province,jdbcType=INTEGER},
+            <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},
@@ -124,8 +206,20 @@
             <if test="district != null" >
                 #{district,jdbcType=INTEGER},
             </if>
-            <if test="experience != null" >
-                #{experience,jdbcType=VARCHAR},
+            <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},
@@ -134,41 +228,64 @@
                 #{constellation,jdbcType=VARCHAR},
             </if>
             <if test="zodiac != null" >
-                #{zodiac,jdbcType=VARCHAR},
-            </if>
-            <if test="update_uid != null" >
-                #{update_uid,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                #{updated_at,jdbcType=DATAE},
+                #{zodiac,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="idcard != null" >
-                idcard = #{idcard,jdbcType=VARCHAR},
+            <if test="level != null" >
+                level = #{level,jdbcType=INTEGER},
             </if>
-            <if test="gender != null" >
-                gender = #{gender,jdbcType=INTEGER},
+            <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="province != null" >
-                province = #{province,jdbcType=INTEGER},
+            <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},
@@ -176,8 +293,20 @@
             <if test="district != null" >
                 district = #{district,jdbcType=INTEGER},
             </if>
-            <if test="experience != null" >
-                experience = #{experience,jdbcType=VARCHAR},
+            <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},
@@ -186,13 +315,7 @@
                 constellation = #{constellation,jdbcType=VARCHAR},
             </if>
             <if test="zodiac != null" >
-                zodiac = #{zodiac,jdbcType=VARCHAR},
-            </if>
-            <if test="update_uid != null" >
-                update_uid = #{update_uid,jdbcType=INTEGER},
-            </if>
-            <if test="updated_at != null" >
-                updated_at = #{updated_at,jdbcType=DATE},
+                zodiac = #{zodiac,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 185 - 65
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml

@@ -1,167 +1,287 @@
 <?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.JlServiceUserDao" >
+<mapper namespace="com.ygj.yuemum.dao.maternitymatron.JlServiceUserDao">
 
-    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUser" >
-        <id column="id" property="id" jdbcType="INTEGER" />
-        <result column="password" property="password" jdbcType="VARCHAR" />
-        <result column="truename" property="truename" jdbcType="VARCHAR" />
-        <result column="mobile_phone" property="mobile_phone" jdbcType="VARCHAR" />
-        <result column="status" property="status" jdbcType="VARCHAR" />
-        <result column="last_login_time" property="last_login_time" jdbcType="DATE" />
-        <result column="last_login_ip" property="last_login_ip" jdbcType="VARCHAR" />
-        <result column="salt" property="salt" jdbcType="VARCHAR" />
-        <result column="token" property="token" jdbcType="VARCHAR" />
-        <result column="zone_code" property="zone_code" jdbcType="VARCHAR" />
-        <result column="updated_at" property="updated_at" jdbcType="DATE" />
-        <result column="stock_status" property="stock_status" jdbcType="INTEGER" />
-        <result column="usertype" property="usertype" jdbcType="VARCHAR" />
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="password" property="password" jdbcType="VARCHAR"/>
+        <result column="truename" property="truename" jdbcType="VARCHAR"/>
+        <result column="mobile_phone" property="mobile_phone" jdbcType="VARCHAR"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+        <result column="last_login_time" property="last_login_time" jdbcType="DATE"/>
+        <result column="last_login_ip" property="last_login_ip" jdbcType="VARCHAR"/>
+        <result column="salt" property="salt" jdbcType="VARCHAR"/>
+        <result column="token" property="token" jdbcType="VARCHAR"/>
+        <result column="zone_code" property="zone_code" jdbcType="VARCHAR"/>
+        <result column="updated_at" property="updated_at" jdbcType="DATE"/>
+        <result column="stock_status" property="stock_status" jdbcType="INTEGER"/>
+        <result column="usertype" property="usertype" jdbcType="VARCHAR"/>
+        <!--list add-->
+        <result column="age" property="age" jdbcType="VARCHAR"/>
+        <result column="idcard" property="idcard" jdbcType="VARCHAR"/>
+        <result column="cityname" property="cityname" jdbcType="VARCHAR"/>
+        <result column="np" property="np" jdbcType="VARCHAR"/>
+        <!--query add-->
+        <result column="experience" property="experience" jdbcType="VARCHAR"/>
+        <result column="gender" property="gender" jdbcType="VARCHAR"/>
     </resultMap>
 
-    <sql id="Base_Column_List" >
+    <resultMap id="ListResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="truename" property="truename" jdbcType="VARCHAR"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+        <!--list add-->
+        <result column="age" property="age" jdbcType="VARCHAR"/>
+        <result column="idcard" property="idcard" jdbcType="VARCHAR"/>
+        <result column="cityname" property="cityname" jdbcType="VARCHAR"/>
+        <result column="np" property="np" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
         id, password, truename,mobile_phone,status,last_login_time,last_login_ip,salt,token,zone_code,updated_at,stock_status,usertype
     </sql>
+    <!--获取所有数据-->
+    <select id="getcount" resultType="java.lang.Integer" >
+        select
+        count(1)
+        from jl_service_user
+    </select>
+
+    <!--获取主键-->
+    <select id="getpmid" resultType="java.lang.Integer" >
+        SELECT auto_increment
+        FROM information_schema.tables
+        where table_schema="yuemum"
+        and table_name="jl_service_user";
+    </select>
+
+    <select id="getquerycount" resultType="java.lang.Integer" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
+        select count(1) from jl_service_user where 2=2
+        <if test="id != null">
+            and jl_service_user.id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="truename != null">
+            and jl_service_user.truename = #{truename,jdbcType=VARCHAR}
+        </if>
+        <if test="status != null">
+            and status = #{status,jdbcType=VARCHAR}
+        </if>
+        <if test="idcard != null">
+            and idcard = #{idcard,jdbcType=VARCHAR}
+        </if>
+        <if test="cityname != null">
+            and cityname = #{cityname,jdbcType=VARCHAR}
+        </if>
+        <if test="np != null">
+            and np = #{np,jdbcType=VARCHAR}
+        </if>
+        <if test="experience != null">
+            and experience = #{experience,jdbcType=VARCHAR}
+        </if>
+        <if test="gender != null">
+            and gender = #{gender,jdbcType=VARCHAR}
+        </if>
+    </select>
+    <!--getList-->
+    <select id="getMMList" resultMap="ListResultMap">
+        select
+        jl_service_user.id,
+        jl_service_user.truename,
+        year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
+        jl_service_user_info.idcard,
+        city.cityname,
+        fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
+        jl_service_user.status
+        from jl_service_user
+        LEFT JOIN jl_service_user_info on jl_service_user.id = jl_service_user_info.id
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname from jl_store_service LEFT JOIN jl_region
+        on jl_store_service.store_id = jl_region.`code` group by service_id) as
+        city ON jl_service_user.id = city.service_id
+        order by id
+    </select>
+
+    <select id="queryMMList" resultMap="ListResultMap" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
+        select
+        jl_service_user.id,
+        jl_service_user.truename,
+        year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
+        jl_service_user_info.idcard,
+        city.cityname,
+        fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
+        jl_service_user.status
+        from jl_service_user
+        LEFT JOIN jl_service_user_info on jl_service_user.id = jl_service_user_info.id
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname from jl_store_service LEFT JOIN jl_region
+        on jl_store_service.store_id = jl_region.`code` where jl_store_service.service_id = 3 group by service_id) as
+        city ON jl_service_user.id = city.service_id
+        where 1=1
+        <if test="id != null">
+          and jl_service_user.id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="truename != null">
+            and jl_service_user.truename = #{truename,jdbcType=VARCHAR}
+        </if>
+        <if test="status != null">
+            and status = #{status,jdbcType=VARCHAR}
+        </if>
+        <if test="idcard != null">
+            and idcard = #{idcard,jdbcType=VARCHAR}
+        </if>
+        <if test="cityname != null">
+            and cityname = #{cityname,jdbcType=VARCHAR}
+        </if>
+        <if test="np != null">
+            and np = #{np,jdbcType=VARCHAR}
+        </if>
+        <if test="experience != null">
+            and experience = #{experience,jdbcType=VARCHAR}
+        </if>
+        <if test="gender != null">
+            and gender = #{gender,jdbcType=VARCHAR}
+        </if>
+        order by id
+    </select>
 
     <!-- 得到所有的月嫂信息 -->
-    <select id="getAll" resultMap="BaseResultMap" >
+    <select id="getAll" resultMap="BaseResultMap">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         from jl_service_user
     </select>
 
     <!-- 根据id查找某个月嫂信息 -->
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         from jl_service_user
         where id = #{id,jdbcType=INTEGER}
     </select>
     <!-- 根据id删除某个月嫂信息 -->
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
         delete from jl_service_user
         where id = #{id,jdbcType=INTEGER}
     </delete>
 
     <!-- 插入一条月嫂信息 -->
-    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser" >
+    <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
         insert into jl_service_user
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-            <if test="password != null" >
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="password != null">
                 password,
             </if>
-            <if test="truename != null" >
+            <if test="truename != null">
                 truename,
             </if>
-            <if test="mobile_phone != null" >
+            <if test="mobile_phone != null">
                 mobile_phone,
             </if>
-            <if test="status != null" >
+            <if test="status != null">
                 status,
             </if>
-            <if test="last_login_time != null" >
+            <if test="last_login_time != null">
                 last_login_time,
             </if>
-            <if test="last_login_ip != null" >
+            <if test="last_login_ip != null">
                 last_login_ip,
             </if>
-            <if test="salt != null" >
+            <if test="salt != null">
                 salt,
             </if>
-            <if test="token != null" >
+            <if test="token != null">
                 token,
             </if>
-            <if test="zone_code != null" >
+            <if test="zone_code != null">
                 zone_code,
             </if>
-            <if test="updated_at != null" >
+            <if test="updated_at != null">
                 updated_at,
             </if>
-            <if test="stock_status != null" >
+            <if test="stock_status != null">
                 stock_status,
             </if>
-            <if test="usertype != null" >
-                usertype,
+            <if test="usertype != null">
+                usertype
             </if>
         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-            <if test="password != null" >
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="password != null">
                 #{password,jdbcType=VARCHAR},
             </if>
-            <if test="truename != null" >
+            <if test="truename != null">
                 #{truename,jdbcType=VARCHAR},
             </if>
-            <if test="mobile_phone != null" >
+            <if test="mobile_phone != null">
                 #{mobile_phone,jdbcType=VARCHAR},
             </if>
-            <if test="status != null" >
+            <if test="status != null">
                 #{status,jdbcType=VARCHAR},
             </if>
-            <if test="last_login_time != null" >
+            <if test="last_login_time != null">
                 #{last_login_time,jdbcType=DATE},
             </if>
-            <if test="last_login_ip != null" >
+            <if test="last_login_ip != null">
                 #{last_login_ip,jdbcType=VARCHAR},
             </if>
-            <if test="salt != null" >
+            <if test="salt != null">
                 #{salt,jdbcType=VARCHAR},
             </if>
-            <if test="token != null" >
+            <if test="token != null">
                 #{token,jdbcType=VARCHAR},
             </if>
-            <if test="zone_code != null" >
+            <if test="zone_code != null">
                 #{zone_code,jdbcType=VARCHAR},
             </if>
-            <if test="updated_at != null" >
+            <if test="updated_at != null">
                 #{updated_at,jdbcType=DATE},
             </if>
-            <if test="stock_status != null" >
+            <if test="stock_status != null">
                 #{stock_status,jdbcType=INTEGER},
             </if>
-            <if test="usertype != null" >
-                #{usertype,jdbcType=VARCHAR},
+            <if test="usertype != null">
+                #{usertype,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
 
     <!-- 根据id更新一条月嫂信息 -->
-    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser" >
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
         update jl_service_user
-        <set >
-            <if test="password != null" >
+        <set>
+            <if test="password != null">
                 password = #{password,jdbcType=VARCHAR},
             </if>
-            <if test="truename != null" >
+            <if test="truename != null">
                 truename = #{truename,jdbcType=VARCHAR},
             </if>
-            <if test="mobile_phone != null" >
+            <if test="mobile_phone != null">
                 mobile_phone = #{mobile_phone,jdbcType=VARCHAR},
             </if>
-            <if test="status != null" >
+            <if test="status != null">
                 status = #{status,jdbcType=VARCHAR},
             </if>
-            <if test="last_login_time != null" >
+            <if test="last_login_time != null">
                 last_login_time = #{last_login_time,jdbcType=DATE},
             </if>
-            <if test="last_login_ip != null" >
+            <if test="last_login_ip != null">
                 last_login_ip = #{last_login_ip,jdbcType=VARCHAR},
             </if>
-            <if test="salt != null" >
+            <if test="salt != null">
                 salt = #{salt,jdbcType=VARCHAR},
             </if>
-            <if test="token != null" >
+            <if test="token != null">
                 token = #{token,jdbcType=VARCHAR},
             </if>
-            <if test="zone_code != null" >
+            <if test="zone_code != null">
                 zone_code = #{zone_code,jdbcType=VARCHAR},
             </if>
-            <if test="updated_at != null" >
+            <if test="updated_at != null">
                 updated_at = #{updated_at,jdbcType=DATE},
             </if>
-            <if test="stock_status != null" >
+            <if test="stock_status != null">
                 stock_status = #{stock_status,jdbcType=INTEGER},
             </if>
-            <if test="usertype != null" >
-                usertype = #{usertype,jdbcType=VARCHAR},
+            <if test="usertype != null">
+                usertype = #{usertype,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 3 - 3
src/main/resources/mybatis/mapper/maternitymatron/JlStoreXMapper.xml

@@ -32,7 +32,7 @@
                 service_id,
             </if>
             <if test="store_id != null" >
-                store_id,
+                store_id
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -40,7 +40,7 @@
                 #{service_id,jdbcType=INTEGER},
             </if>
             <if test="store_id != null" >
-                #{store_id,jdbcType=INTEGER},
+                #{store_id,jdbcType=INTEGER}
             </if>
         </trim>
     </insert>
@@ -53,7 +53,7 @@
                 service_id = #{service_id,jdbcType=INTEGER},
             </if>
             <if test="store_id != null" >
-                store_id = #{store_id,jdbcType=INTEGER},
+                store_id = #{store_id,jdbcType=INTEGER}
             </if>
         </set>
         where service_id = #{service_id,jdbcType=INTEGER} and store_id = #{store_id,jdbcType=INTEGER}

+ 3 - 3
src/main/resources/mybatis/mapper/maternitymatron/MmInfoCertificateMapper.xml

@@ -48,7 +48,7 @@
                 start_date,
             </if>
             <if test="end_date != null" >
-                end_date,
+                end_date
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -62,7 +62,7 @@
                 #{start_date,jdbcType=DATE},
             </if>
             <if test="end_date != null" >
-                #{end_date,jdbcType=DATE},
+                #{end_date,jdbcType=DATE}
             </if>
         </trim>
     </insert>
@@ -81,7 +81,7 @@
                 start_date = #{start_date,jdbcType=INTEGER},
             </if>
             <if test="end_date != null" >
-                end_date = #{end_date,jdbcType=VARCHAR},
+                end_date = #{end_date,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 3 - 3
src/main/resources/mybatis/mapper/maternitymatron/MmInfoPhotoMapper.xml

@@ -45,7 +45,7 @@
                 photo_code,
             </if>
             <if test="photo_path != null" >
-                photo_path,
+                photo_path
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -56,7 +56,7 @@
                 #{photo_code,jdbcType=INTEGER},
             </if>
             <if test="photo_path != null" >
-                #{photo_path,jdbcType=VARCHAR},
+                #{photo_path,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -72,7 +72,7 @@
                 photo_code = #{photo_code,jdbcType=INTEGER},
             </if>
             <if test="photo_path != null" >
-                photo_path = #{photo_path,jdbcType=VARCHAR},
+                photo_path = #{photo_path,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 3 - 3
src/main/resources/mybatis/mapper/maternitymatron/MmInfoResumeMapper.xml

@@ -44,7 +44,7 @@
                 resume_code,
             </if>
             <if test="resume_path != null" >
-                resume_path,
+                resume_path
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -55,7 +55,7 @@
                 #{resume_code,jdbcType=INTEGER},
             </if>
             <if test="resume_path != null" >
-                #{resume_path,jdbcType=VARCHAR},
+                #{resume_path,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -71,7 +71,7 @@
                 resume_code = #{resume_code,jdbcType=INTEGER},
             </if>
             <if test="resume_path != null" >
-                resume_path = #{resume_path,jdbcType=VARCHAR},
+                resume_path = #{resume_path,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}

+ 26 - 6
src/main/resources/mybatis/mapper/maternitymatron/MmInfoTrainMapper.xml

@@ -8,19 +8,40 @@
         <result column="train_code" property="train_code" jdbcType="INTEGER" />
         <result column="train_date" property="train_date" jdbcType="DATE" />
         <result column="train_result" property="train_result" jdbcType="VARCHAR" />
+        <result column="train_name" property="train_name" jdbcType="VARCHAR" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id, servant_code, train_code,train_date,train_result
+        id, servant_code, train_code,train_date,train_result,train_name
     </sql>
 
-    <!-- 得到所有的照片信息 -->
+    <!-- 得到所有的培训信息 -->
     <select id="getAll" resultMap="BaseResultMap" >
         select
         <include refid="Base_Column_List" />
         from mm_info_train
     </select>
 
+    <select id="getTrainsCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
+        select
+        count(1)
+        from mm_info_train
+        where servant_code = #{servant_code,jdbcType=INTEGER}
+    </select>
+
+
+    <select id="getInfoTrains" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        id,
+        fgettrainname(train_code) train_name,
+        train_code,
+        train_date,
+        train_result
+        from mm_info_train
+        where servant_code = #{servant_code,jdbcType=INTEGER}
+        order by id asc
+    </select>
+
     <!-- 根据id查找某个照片信息 -->
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
         select
@@ -48,7 +69,7 @@
                 train_date,
             </if>
             <if test="train_result != null" >
-                train_result,
+                train_result
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -62,7 +83,7 @@
                 #{train_date,jdbcType=DATE},
             </if>
             <if test="train_result != null" >
-                #{train_result,jdbcType=VARCHAR},
+                #{train_result,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -81,10 +102,9 @@
                 train_date = #{train_date,jdbcType=DATE},
             </if>
             <if test="train_result != null" >
-                train_result = #{train_result,jdbcType=VARCHAR},
+                train_result = #{train_result,jdbcType=VARCHAR}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>
-
 </mapper>

+ 3 - 3
src/main/resources/mybatis/mapper/maternitymatron/MmStockMapper.xml

@@ -48,7 +48,7 @@
                 start_date,
             </if>
             <if test="end_date != null" >
-                end_date,
+                end_date
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -62,7 +62,7 @@
                 #{start_date,jdbcType=DATE},
             </if>
             <if test="end_date != null" >
-                #{end_date,jdbcType=DATE},
+                #{end_date,jdbcType=DATE}
             </if>
         </trim>
     </insert>
@@ -81,7 +81,7 @@
                 start_date = #{start_date,jdbcType=DATE},
             </if>
             <if test="end_date != null" >
-                end_date = #{end_date,jdbcType=DATE},
+                end_date = #{end_date,jdbcType=DATE}
             </if>
         </set>
         where id = #{id,jdbcType=INTEGER}