123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664 |
- <?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">
- <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>
- <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>
- <resultMap id="queryStockResultMap" type="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
- <id column="id" property="id" jdbcType="INTEGER"/>
- <result column="salt" property="salt" jdbcType="VARCHAR"/>
- <result column="truename" property="truename" jdbcType="VARCHAR"/>
- <result column="idcard" property="idcard" jdbcType="VARCHAR"/>
- <result column="age" property="age" jdbcType="VARCHAR"/>
- <result column="status" property="status" jdbcType="VARCHAR"/>
- <result column="cityname" property="cityname" jdbcType="VARCHAR"/>
- <result column="np" property="np" jdbcType="VARCHAR"/>
- <result column="constellation" property="constellation" jdbcType="VARCHAR"/>
- <result column="zodiac" property="zodiac" jdbcType="VARCHAR"/>
- <result column="seniority" property="seniority" jdbcType="VARCHAR"/>
- <result column="gender" property="gender" jdbcType="VARCHAR"/>
- <result column="babynumber" property="babynumber" 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"/>
- <result column="citycode" property="citycode" jdbcType="VARCHAR"/>
- <result column="weight" property="weight" jdbcType="VARCHAR"/>
- <result column="city" property="city" jdbcType="VARCHAR"/>
- <result column="resume_path" property="resume_path" 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="getstocklistcount" resultType="java.lang.Integer" >
- select
- count(1)
- from jl_service_user
- where jl_service_user.status = 1
- </select>
- <select id="getStock" resultType="java.lang.Integer" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
- 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="ids != null and ids != ''">
- and jl_service_user.id not in ( #{ids,jdbcType=INTEGER} )
- </if>
- <if test="id != null and id != ''">
- and jl_service_user.id = #{id,jdbcType=INTEGER}
- </if>
- <if test="salt != null and salt !=''">
- and jl_service_user.salt like "%"#{salt,jdbcType=VARCHAR}"%"
- </if>
- <if test="truename != null and truename !=''">
- and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
- </if>
- <if test="constellation != null and constellation !=''">
- and constellation like "%"#{constellation,jdbcType=VARCHAR}"%"
- </if>
- <if test="zodiac != null and zodiac !=''">
- and zodiac = #{zodiac,jdbcType=VARCHAR}
- </if>
- <if test="np != null and np !=''">
- and city = #{np,jdbcType=VARCHAR}
- </if>
- <if test="experience != null and experience != 0">
- and seniority = #{experience,jdbcType=VARCHAR}
- </if>
- <if test="gender != null and gender !=''">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="status != null and status !=''">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="gender != null and gender !=''">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="babynumber != null and babynumber !=''">
- and babynumber = #{babynumber,jdbcType=VARCHAR}
- </if>
- <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) >= #{agestart,jdbcType=VARCHAR}
- and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) <= #{ageend,jdbcType=VARCHAR}
- </if>
- <!--age-->
- </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
- 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}"%"
- </if>
- <if test="status != null and status != ''">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="idcard != null and idcard != ''">
- and idcard = #{idcard,jdbcType=VARCHAR}
- </if>
- <if test="cityname != null and cityname != ''">
- and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
- </if>
- <if test="np != null and np != ''">
- and city = #{np,jdbcType=VARCHAR}
- </if>
- <if test="experience != null and experience != 0">
- and seniority = #{experience,jdbcType=VARCHAR}
- </if>
- <if test="gender != null and gender != ''">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="salt != null and salt != ''">
- and salt like "%"#{salt,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,
- jl_service_user.salt
- 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="queryServiceUserStock" resultMap="queryStockResultMap">
- select
- jl_service_user.id,
- jl_service_user.salt,
- jl_service_user.truename,
- fgetconstellationname(jl_service_user_info.constellation) constellation,
- year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
- fgetzodiacname(jl_service_user_info.zodiac) zodiac,
- fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
- city.cityname,
- jl_service_user_info.seniority,
- jl_service_user_info.gender,
- jl_service_user.status,
- jl_service_user_info.babynumber,
- IFNULL(mm_info_resume.resume_path,0) resume_path,
- fgetethnicgroupname(jl_service_user_info.ethnicgroup) ethnicgroup
- 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
- left join mm_info_resume on jl_service_user.id = mm_info_resume.servant_code
- where jl_service_user.status = 1
- order by gender desc , babynumber desc , status asc
- </select>
- <select id="queryMMList" resultMap="ListResultMap" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUserStock">
- 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,
- jl_service_user.salt
- 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 jl_service_user.truename like "%"#{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 citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
- </if>
- <if test="np != null ">
- and city = #{np,jdbcType=VARCHAR}
- </if>
- <if test="experience != null and experience != 0">
- and seniority = #{experience,jdbcType=VARCHAR}
- </if>
- <if test="gender != null ">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="salt != null and salt !=''">
- and salt like "%"#{salt,jdbcType=VARCHAR}"%"
- </if>
- order by id
- </select>
- <select id="getResume" resultMap="queryStockResultMap" parameterType="java.lang.Integer" >
- select
- jl_service_user.id,
- jl_service_user.truename,
- fgetconstellationname(jl_service_user_info.constellation) constellation,
- year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
- fgetzodiacname(jl_service_user_info.zodiac) zodiac,
- fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
- city.cityname,
- jl_service_user_info.seniority,
- jl_service_user_info.gender,
- jl_service_user_info.babynumber,
- fgetethnicgroupname(jl_service_user_info.ethnicgroup) ethnicgroup,
- CASE jl_service_user_info.education WHEN '1' THEN '初中' WHEN '2' THEN '高中' WHEN '3' THEN '大专' WHEN '4' THEN '大本' WHEN '5' THEN '硕士' ELSE 'NAN' END as education,
- jl_service_user_info.height,
- CASE jl_service_user_info.marriage WHEN 'Y' THEN '已婚' WHEN 'N' THEN '未婚' ELSE 'NAN' END AS marriage ,
- jl_service_user_info.highlight,
- jl_service_user_info.weight
- 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
- jl_service_user.id = #{id,jdbcType=INTEGER}
- </select>
- <select id="queryServiceUserStockCondition" resultMap="queryStockResultMap" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
- select
- jl_service_user.id,
- jl_service_user.salt,
- jl_service_user.truename,
- fgetconstellationname(jl_service_user_info.constellation) constellation,
- jl_service_user_info.idcard,
- year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
- fgetzodiacname(jl_service_user_info.zodiac) zodiac,
- fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
- city.cityname,
- jl_service_user_info.seniority,
- jl_service_user_info.gender,
- jl_service_user_info.city,
- jl_service_user.status,
- jl_service_user_info.babynumber,
- fgetethnicgroupname(jl_service_user_info.ethnicgroup) ethnicgroup,
- jl_service_user_info.education,
- jl_service_user_info.height,
- jl_service_user_info.marriage,
- jl_service_user_info.highlight,
- jl_service_user_info.weight,
- city.citycode,
- IFNULL(mm_info_resume.resume_path,0) resume_path
- 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
- left join mm_info_resume on jl_service_user.id = mm_info_resume.servant_code
- where 1=1
- <if test="ids != null and id !=''">
- and FIND_IN_SET(jl_service_user.id,#{ids,jdbcType=INTEGER}) = 0
- </if>
- <if test="salt != null and salt !=''">
- and jl_service_user.salt like "%"#{salt,jdbcType=VARCHAR}"%"
- </if>
- <if test="truename != null ">
- and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
- </if>
- <if test="constellation != null ">
- and constellation like "%"#{constellation,jdbcType=VARCHAR}"%"
- </if>
- <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 != 0">
- and seniority = #{experience,jdbcType=VARCHAR}
- </if>
- <if test="gender != null ">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="status != null ">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="gender != null ">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="babynumber != null ">
- and babynumber = #{babynumber,jdbcType=VARCHAR}
- </if>
- <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) >= #{agestart,jdbcType=VARCHAR}
- and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) <= #{ageend,jdbcType=VARCHAR}
- </if>
- <!--age-->
- order by gender desc , babynumber desc , status asc
- </select>
- <select id="queryEditServiceUser" resultMap="queryStockResultMap" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
- select
- jl_service_user.id,
- jl_service_user.salt,
- jl_service_user.truename,
- jl_service_user_info.constellation,
- jl_service_user_info.idcard,
- year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
- jl_service_user_info.zodiac,
- fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
- city.cityname,
- jl_service_user_info.seniority,
- jl_service_user_info.gender,
- jl_service_user_info.city,
- jl_service_user.status,
- jl_service_user_info.babynumber,
- jl_service_user_info.ethnicgroup,
- jl_service_user_info.education,
- jl_service_user_info.height,
- jl_service_user_info.marriage,
- jl_service_user_info.highlight,
- jl_service_user_info.weight,
- city.citycode,
- IFNULL(mm_info_resume.resume_path,0) resume_path
- 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
- left join mm_info_resume on jl_service_user.id = mm_info_resume.servant_code
- where 1=1
- <if test="ids != null ">
- and jl_service_user.id not in ( #{ids,jdbcType=INTEGER} )
- </if>
- <if test="id != null and id !=''">
- and jl_service_user.id = #{id,jdbcType=INTEGER}
- </if>
- <if test="truename != null ">
- and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
- </if>
- <if test="constellation != null ">
- and constellation like "%"#{constellation,jdbcType=VARCHAR}"%"
- </if>
- <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 != 0">
- and seniority = #{experience,jdbcType=VARCHAR}
- </if>
- <if test="gender != null ">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="status != null ">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="gender != null ">
- and gender = #{gender,jdbcType=VARCHAR}
- </if>
- <if test="babynumber != null ">
- and babynumber = #{babynumber,jdbcType=VARCHAR}
- </if>
- <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) >= #{agestart,jdbcType=VARCHAR}
- and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) <= #{ageend,jdbcType=VARCHAR}
- </if>
- <!--age-->
- order by gender desc , babynumber desc , status asc
- </select>
- <!-- 得到所有的月嫂信息 -->
- <select id="getAll" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from jl_service_user
- </select>
- <select id="saltcheck" resultType="java.lang.Integer" parameterType="java.lang.String">
- select
- count(1)
- from jl_service_user
- where salt = #{salt,jdbcType=VARCHAR}
- </select>
- <!-- 根据id查找某个月嫂信息 -->
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
- select
- <include refid="Base_Column_List"/>
- from jl_service_user
- where id = #{id,jdbcType=INTEGER}
- </select>
- <!-- 根据id删除某个月嫂信息 -->
- <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 into jl_service_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="password != null">
- password,
- </if>
- <if test="truename != null">
- truename,
- </if>
- <if test="mobile_phone != null">
- mobile_phone,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="last_login_time != null">
- last_login_time,
- </if>
- <if test="last_login_ip != null">
- last_login_ip,
- </if>
- <if test="salt != null">
- salt,
- </if>
- <if test="token != null">
- token,
- </if>
- <if test="zone_code != null">
- zone_code,
- </if>
- <if test="updated_at != null">
- updated_at,
- </if>
- <if test="stock_status != null">
- stock_status,
- </if>
- <if test="usertype != null">
- usertype
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="truename != null">
- #{truename,jdbcType=VARCHAR},
- </if>
- <if test="mobile_phone != null">
- #{mobile_phone,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="last_login_time != null">
- #{last_login_time,jdbcType=DATE},
- </if>
- <if test="last_login_ip != null">
- #{last_login_ip,jdbcType=VARCHAR},
- </if>
- <if test="salt != null">
- #{salt,jdbcType=VARCHAR},
- </if>
- <if test="token != null">
- #{token,jdbcType=VARCHAR},
- </if>
- <if test="zone_code != null">
- #{zone_code,jdbcType=VARCHAR},
- </if>
- <if test="updated_at != null">
- #{updated_at,jdbcType=DATE},
- </if>
- <if test="stock_status != null">
- #{stock_status,jdbcType=INTEGER},
- </if>
- <if test="usertype != null">
- #{usertype,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <!-- 根据id更新一条月嫂信息 -->
- <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
- update jl_service_user
- <set>
- <if test="password != null">
- password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="truename != null">
- truename = #{truename,jdbcType=VARCHAR},
- </if>
- <if test="mobile_phone != null">
- mobile_phone = #{mobile_phone,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="last_login_time != null">
- last_login_time = #{last_login_time,jdbcType=DATE},
- </if>
- <if test="last_login_ip != null">
- last_login_ip = #{last_login_ip,jdbcType=VARCHAR},
- </if>
- <if test="salt != null">
- salt = #{salt,jdbcType=VARCHAR},
- </if>
- <if test="token != null">
- token = #{token,jdbcType=VARCHAR},
- </if>
- <if test="zone_code != null">
- zone_code = #{zone_code,jdbcType=VARCHAR},
- </if>
- <if test="updated_at != null">
- updated_at = #{updated_at,jdbcType=DATE},
- </if>
- <if test="stock_status != null">
- stock_status = #{stock_status,jdbcType=INTEGER},
- </if>
- <if test="usertype != null">
- usertype = #{usertype,jdbcType=VARCHAR}
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="upDateStatus" parameterType="com.ygj.yuemum.domain.maternitymatron.JlServiceUser">
- update jl_service_user
- <set>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|