Shanks 7 лет назад
Родитель
Сommit
02530adf3d

+ 23 - 0
src/main/java/com/ygj/yuemum/controller/admin/JlEthnicgroupController.java

@@ -0,0 +1,23 @@
+package com.ygj.yuemum.controller.admin;
+
+
+import com.ygj.yuemum.domain.admin.JlEthnicgroup;
+import com.ygj.yuemum.service.admin.JlEthnicgroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+public class JlEthnicgroupController {
+
+    @Autowired
+    private JlEthnicgroupService jlEthnicgroupService;
+    @GetMapping("/getJlEthnicGroup")
+    public List<JlEthnicgroup> getJlEthnicGroup() {
+        List<JlEthnicgroup> jlEthnicgroups = jlEthnicgroupService.getJlEthnicgroup();
+        return jlEthnicgroups;
+    }
+
+}

+ 7 - 0
src/main/java/com/ygj/yuemum/controller/admin/JlRegionController.java

@@ -2,6 +2,7 @@ package com.ygj.yuemum.controller.admin;
 
 
 import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.admin.JlRegion;
 import com.ygj.yuemum.service.admin.JlRegionService;
 import com.ygj.yuemum.utils.IDcard;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -10,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 @RestController
@@ -34,4 +36,9 @@ public class JlRegionController {
         return jsor;
     }
 
+    @GetMapping("/getProvince")
+    public List<JlRegion> getProvince() {
+        return jlRegionService.getProvince();
+    }
+
 }

+ 7 - 0
src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java

@@ -81,6 +81,13 @@ public class JlServiceUserController {
         jlServiceUserInfo.setConstellation(addMMInfo.getConstellation());
         jlServiceUserInfo.setZodiac(addMMInfo.getZodiac());
         jlServiceUserInfo.setCreate_time(new Date());
+        jlServiceUserInfo.setEducation(addMMInfo.getEducation());
+        jlServiceUserInfo.setEthnicgroup(addMMInfo.getEthnicgroup());
+        jlServiceUserInfo.setHeight(addMMInfo.getHeight());
+        jlServiceUserInfo.setHighlight(addMMInfo.getHighlight());
+        jlServiceUserInfo.setMarriage(addMMInfo.getMarriage());
+        jlServiceUserInfo.setWeight(addMMInfo.getWeight());
+
         try {
             jlServiceUserService.addJlServiceUser(jlServiceUser);
             jlServiceUserInfoService.addJlServiceUserInfo(jlServiceUserInfo);

+ 12 - 0
src/main/java/com/ygj/yuemum/dao/admin/JlEthnicgroupDao.java

@@ -0,0 +1,12 @@
+package com.ygj.yuemum.dao.admin;
+
+import com.ygj.yuemum.domain.admin.JlEthnicgroup;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface JlEthnicgroupDao {
+
+    List<JlEthnicgroup> getJlEthnicgroup();
+}

+ 3 - 0
src/main/java/com/ygj/yuemum/dao/admin/JlRegionDao.java

@@ -1,9 +1,12 @@
 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 {
 
     String getnp(Integer code);
+    List<JlRegion> getProvince();
 }

+ 22 - 0
src/main/java/com/ygj/yuemum/domain/admin/JlEthnicgroup.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.domain.admin;
+
+public class JlEthnicgroup {
+    private Integer id;
+    private String ethnicgroup;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+}

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

@@ -27,6 +27,51 @@ public class JlServiceUser {
     private String babynumber;
     private String constellation;
     private String zodiac;
+    private String ethnicgroup;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String education;
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
 
     public String getBabynumber() {
         return babynumber;

+ 46 - 0
src/main/java/com/ygj/yuemum/domain/maternitymatron/JlServiceUserInfo.java

@@ -33,6 +33,52 @@ public class JlServiceUserInfo {
     private String constellation;
     private String zodiac;
 
+    private String ethnicgroup;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String weight;
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
     public int getId() {
         return id;
     }

+ 72 - 0
src/main/java/com/ygj/yuemum/domain/maternitymatron/QueryServiceUserStock.java

@@ -15,9 +15,81 @@ public class QueryServiceUserStock {
     private String service_start;
     private String service_end;
     private String ids;
+    private String ethnicgroup;
+    private String education;
+    private String height;
+    private String marriage;
+    private String highlight;
+    private String weight;
+    private String agestart;
+    private String ageend;
     int page;
     int limit;
 
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getAgestart() {
+        return agestart;
+    }
+
+    public void setAgestart(String agestart) {
+        this.agestart = agestart;
+    }
+
+    public String getAgeend() {
+        return ageend;
+    }
+
+    public void setAgeend(String ageend) {
+        this.ageend = ageend;
+    }
+
     public String getIds() {
         return ids;
     }

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

@@ -13,7 +13,60 @@ public class AddMMInfo {
    private String zodiac;
    private int store_id;
    private int np;
+   private String ethnicgroup;
+   private String height;
+   private String marriage;
+   private String highlight;
+   private String education;
+   private String weight;
 
+    public String getWeight() {
+        return weight;
+    }
+
+    public void setWeight(String weight) {
+        this.weight = weight;
+    }
+
+    public String getEthnicgroup() {
+        return ethnicgroup;
+    }
+
+    public void setEthnicgroup(String ethnicgroup) {
+        this.ethnicgroup = ethnicgroup;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getMarriage() {
+        return marriage;
+    }
+
+    public void setMarriage(String marriage) {
+        this.marriage = marriage;
+    }
+
+    public String getHighlight() {
+        return highlight;
+    }
+
+    public void setHighlight(String highlight) {
+        this.highlight = highlight;
+    }
+
+    public String getEducation() {
+        return education;
+    }
+
+    public void setEducation(String education) {
+        this.education = education;
+    }
 
     public String getTruename() {
         return truename;

+ 21 - 0
src/main/java/com/ygj/yuemum/service/admin/JlEthnicgroupService.java

@@ -0,0 +1,21 @@
+package com.ygj.yuemum.service.admin;
+
+import com.ygj.yuemum.dao.admin.JlEthnicgroupDao;
+import com.ygj.yuemum.domain.admin.JlEthnicgroup;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class JlEthnicgroupService {
+
+    @Autowired
+
+    private JlEthnicgroupDao jlEthnicgroupDao;
+
+    public List<JlEthnicgroup> getJlEthnicgroup() {
+        return jlEthnicgroupDao.getJlEthnicgroup();
+    }
+
+}

+ 7 - 0
src/main/java/com/ygj/yuemum/service/admin/JlRegionService.java

@@ -1,9 +1,12 @@
 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 {
 
@@ -15,4 +18,8 @@ public class JlRegionService {
         return jlRegionDao.getnp(code);
     }
 
+    public List<JlRegion> getProvince() {
+        return jlRegionDao.getProvince();
+    }
+
 }

+ 17 - 0
src/main/resources/mybatis/mapper/admin/JlEthnicgroupMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.admin.JlEthnicgroupDao" >
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.JlEthnicgroup" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="ethnicgroup" property="ethnicgroup" jdbcType="VARCHAR" />
+    </resultMap>
+
+    <!--获取所有数据-->
+    <select id="getJlEthnicgroup" resultType="com.ygj.yuemum.domain.admin.JlEthnicgroup" >
+        select
+        id,ethnicgroup
+        from jl_ethnicgroup
+    </select>
+
+</mapper>

+ 7 - 0
src/main/resources/mybatis/mapper/admin/JlRegionMapper.xml

@@ -21,4 +21,11 @@
         where code = #{code,jdbcType=INTEGER}
     </select>
 
+    <select id="getProvince" resultType="com.ygj.yuemum.domain.admin.JlRegion" >
+        select
+        code,name
+        from jl_region
+        where pid = 0
+    </select>
+
 </mapper>

+ 50 - 2
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserInfoMapper.xml

@@ -149,7 +149,22 @@
                 constellation,
             </if>
             <if test="zodiac != null" >
-                zodiac
+                zodiac,
+            </if>
+            <if test="ethnicgroup != null" >
+                ethnicgroup,
+            </if>
+            <if test="height != null" >
+                height,
+            </if>
+            <if test="marriage != null" >
+                marriage,
+            </if>
+            <if test="highlight != null" >
+                highlight,
+            </if>
+            <if test="weight != null" >
+                weight
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -235,7 +250,22 @@
                 #{constellation,jdbcType=VARCHAR},
             </if>
             <if test="zodiac != null" >
-                #{zodiac,jdbcType=VARCHAR}
+                #{zodiac,jdbcType=VARCHAR},
+            </if>
+            <if test="ethnicgroup != null" >
+                #{ethnicgroup,jdbcType=VARCHAR},
+            </if>
+            <if test="height != null" >
+                #{height,jdbcType=VARCHAR},
+            </if>
+            <if test="marriage != null" >
+                #{marriage,jdbcType=VARCHAR},
+            </if>
+            <if test="highlight != null" >
+                #{highlight,jdbcType=VARCHAR},
+            </if>
+            <if test="weight != null" >
+                #{weight,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -324,6 +354,24 @@
             <if test="zodiac != null" >
                 zodiac = #{zodiac,jdbcType=VARCHAR}
             </if>
+            <if test="ethnicgroup != null" >
+                ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR}
+            </if>
+            <if test="education != null" >
+                education = #{education,jdbcType=VARCHAR}
+            </if>
+            <if test="height != null" >
+                height = #{height,jdbcType=VARCHAR}
+            </if>
+            <if test="marriage != null" >
+                marriage = #{marriage,jdbcType=VARCHAR}
+            </if>
+            <if test="highlight != null" >
+                highlight = #{highlight,jdbcType=VARCHAR}
+            </if>
+            <if test="weight != null" >
+                weight = #{weight,jdbcType=VARCHAR}
+            </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>

+ 104 - 42
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml

@@ -49,7 +49,13 @@
         <result column="seniority" property="seniority" jdbcType="VARCHAR"/>
         <result column="gender" property="gender" jdbcType="VARCHAR"/>
         <result column="babynumber" property="babynumber" jdbcType="VARCHAR"/>
-        <result column="ids" property="ids" jdbcType="VARCHAR"/>
+        <!--4.14增加查询条件-->
+        <result column="ethnicgroup" property="ethnicgroup" jdbcType="VARCHAR"/>
+        <result column="education" property="education" jdbcType="VARCHAR"/>
+        <result column="height" property="height" jdbcType="VARCHAR"/>
+        <result column="marriage" property="marriage" jdbcType="VARCHAR"/>
+        <result column="highlight" property="highlight" 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
@@ -65,7 +71,7 @@
         count(1)
         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
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname,GROUP_CONCAT(store_id) citycode 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
         where 1=1
@@ -73,10 +79,10 @@
             and jl_service_user.id not in ( #{ids,jdbcType=INTEGER} )
         </if>
         <if test="truename != null and truename !=''">
-            and jl_service_user.truename like #{truename,jdbcType=VARCHAR}
+            and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
         </if>
         <if test="constellation != null and constellation !=''">
-            and constellation = #{constellation,jdbcType=VARCHAR}
+            and constellation like "%"#{constellation,jdbcType=VARCHAR}"%"
         </if>
         <if test="zodiac != null and zodiac !=''">
             and zodiac = #{zodiac,jdbcType=VARCHAR}
@@ -99,9 +105,32 @@
         <if test="babynumber != null and babynumber !=''">
             and babynumber = #{babynumber,jdbcType=VARCHAR}
         </if>
-        <if test="cityname != null and cityname !=''">
-            and cityname in #{cityname,jdbcType=VARCHAR}
+        <if test="cityname != null ">
+            and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="ethnicgroup != null ">
+            and ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR}
+        </if>
+        <if test="education != null ">
+            and education = #{education,jdbcType=VARCHAR}
+        </if>
+        <if test="height != null ">
+            and height = #{height,jdbcType=VARCHAR}
+        </if>
+        <if test="marriage != null ">
+            and marriage = #{marriage,jdbcType=VARCHAR}
+        </if>
+        <if test="highlight != null ">
+            and highlight like "%"#{highlight,jdbcType=VARCHAR}"%"
         </if>
+        <if test="weight != null ">
+            and weight = #{weight,jdbcType=VARCHAR}
+        </if>
+        <if test="agestart != null and ageend != null ">
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &gt;= #{agestart,jdbcType=VARCHAR}
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &lt;= #{ageend,jdbcType=VARCHAR}
+        </if>
+        <!--age-->
     </select>
     <!--获取主键-->
     <select id="getpmid" resultType="java.lang.Integer" >
@@ -112,12 +141,19 @@
     </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
+        select
+        count(1)
+        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,GROUP_CONCAT(store_id) citycode 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
+        where 1=1
         <if test="id != null and id != ''">
             and jl_service_user.id = #{id,jdbcType=INTEGER}
         </if>
         <if test="truename != null and truename != ''">
-            and jl_service_user.truename like #{truename,jdbcType=VARCHAR}
+            and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
         </if>
         <if test="status != null and status != ''">
             and status = #{status,jdbcType=VARCHAR}
@@ -126,13 +162,13 @@
             and idcard = #{idcard,jdbcType=VARCHAR}
         </if>
         <if test="cityname != null and cityname != ''">
-            and cityname = #{cityname,jdbcType=VARCHAR}
+            and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
         </if>
         <if test="np != null and np != ''">
-            and np = #{np,jdbcType=VARCHAR}
+            and city = #{np,jdbcType=VARCHAR}
         </if>
         <if test="experience != null and experience != ''">
-            and experience = #{experience,jdbcType=VARCHAR}
+            and seniority = #{experience,jdbcType=VARCHAR}
         </if>
         <if test="gender != null and gender != ''">
             and gender = #{gender,jdbcType=VARCHAR}
@@ -188,32 +224,32 @@
         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
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname,GROUP_CONCAT(store_id) citycode 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
         where 1=1
-        <if test="id != null and id != ''">
-          and jl_service_user.id = #{ids,jdbcType=INTEGER}
+        <if test="id != null ">
+          and jl_service_user.id = #{id,jdbcType=INTEGER}
         </if>
-        <if test="truename != null and truename != ''">
-            and jl_service_user.truename like #{truename,jdbcType=VARCHAR}
+        <if test="truename != null">
+            and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
         </if>
-        <if test="status != null and status != ''">
+        <if test="status != null ">
             and status = #{status,jdbcType=VARCHAR}
         </if>
-        <if test="idcard != null and idcard != ''">
+        <if test="idcard != null ">
             and idcard = #{idcard,jdbcType=VARCHAR}
         </if>
-        <if test="cityname != null and cityname != ''">
-            and cityname = #{cityname,jdbcType=VARCHAR}
+        <if test="cityname != null ">
+            and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
         </if>
-        <if test="np != null and np != ''">
-            and np = #{np,jdbcType=VARCHAR}
+        <if test="np != null ">
+            and city = #{np,jdbcType=VARCHAR}
         </if>
-        <if test="experience != null and experience != ''">
-            and experience = #{experience,jdbcType=VARCHAR}
+        <if test="experience != null ">
+            and seniority = #{experience,jdbcType=VARCHAR}
         </if>
-        <if test="gender != null and gender != ''">
+        <if test="gender != null ">
             and gender = #{gender,jdbcType=VARCHAR}
         </if>
         order by id
@@ -234,43 +270,69 @@
         jl_service_user_info.babynumber
         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
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname,GROUP_CONCAT(store_id) citycode 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
         where 1=1
-        <if test="ids != null and ids != ''">
+        <if test="ids != null ">
             and jl_service_user.id not in ( #{ids,jdbcType=INTEGER} )
         </if>
-        <if test="truename != null and truename !=''">
-            and jl_service_user.truename like #{truename,jdbcType=VARCHAR}
+        <if test="id != null ">
+            and jl_service_user.id = ( #{id,jdbcType=INTEGER} )
         </if>
-        <if test="constellation != null and constellation !=''">
-            and constellation = #{constellation,jdbcType=VARCHAR}
+        <if test="truename != null ">
+            and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
         </if>
-        <if test="zodiac != null and zodiac !=''">
-            and zodiac = #{zodiac,jdbcType=VARCHAR}
+        <if test="constellation != null ">
+            and constellation like  "%"#{constellation,jdbcType=VARCHAR}"%"
         </if>
-        <if test="np != null and np !=''">
+        <if test="zodiac != null ">
+            and zodiac =  #{zodiac,jdbcType=VARCHAR}
+        </if>
+        <if test="np != null ">
             and city = #{np,jdbcType=VARCHAR}
         </if>
-        <if test="experience != null and experience !=''">
+        <if test="experience != null ">
             and seniority = #{experience,jdbcType=VARCHAR}
         </if>
-        <if test="gender != null and gender !=''">
+        <if test="gender != null ">
             and gender = #{gender,jdbcType=VARCHAR}
         </if>
-        <if test="status != null and status !=''">
+        <if test="status != null ">
             and status = #{status,jdbcType=VARCHAR}
         </if>
-        <if test="gender != null and gender !=''">
+        <if test="gender != null ">
             and gender = #{gender,jdbcType=VARCHAR}
         </if>
-        <if test="babynumber != null and babynumber !=''">
+        <if test="babynumber != null ">
             and babynumber = #{babynumber,jdbcType=VARCHAR}
         </if>
-        <if test="cityname != null and cityname !=''">
-            and cityname in #{cityname,jdbcType=VARCHAR}
+        <if test="cityname != null ">
+            and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="ethnicgroup != null ">
+            and ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR}
+        </if>
+        <if test="education != null ">
+            and education = #{education,jdbcType=VARCHAR}
+        </if>
+        <if test="height != null ">
+            and height = #{height,jdbcType=VARCHAR}
+        </if>
+        <if test="marriage != null ">
+            and marriage = #{marriage,jdbcType=VARCHAR}
+        </if>
+        <if test="highlight != null ">
+            and highlight like "%"#{highlight,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="weight != null ">
+            and weight = #{weight,jdbcType=VARCHAR}
+        </if>
+        <if test="agestart != null and ageend != null ">
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &gt;= #{agestart,jdbcType=VARCHAR}
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &lt;= #{ageend,jdbcType=VARCHAR}
         </if>
+        <!--age-->
         order by  gender desc , babynumber desc , status asc
     </select>