Commit 42d435cf333234f65c58029dc32dcc55c29449a9
1 parent
2cea69175a
Exists in
master
and in
1 other branch
update
Showing 1 changed file with 59 additions and 6 deletions
platform-biz-service/src/main/resources/mainOrm/master/BabyDiagnoseMapper.xml
View file @
42d435c
... | ... | @@ -3,20 +3,60 @@ |
3 | 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
4 | 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
5 | 5 | <mapper namespace="com.lyms.platform.permission.dao.master.BabyDiagnoseMapper"> |
6 | + <resultMap id="babyDiagnoseResultMap" type="com.lyms.platform.pojo.BabyDiagnoseModel"> | |
7 | + <id column="blh" property="blh" jdbcType="VARCHAR"/> | |
8 | + <result column="syxh" property="syxh" jdbcType="VARCHAR"/> | |
9 | + <result column="hzxm" property="hzxm" jdbcType="VARCHAR"/> | |
10 | + <result column="sex" property="sex" jdbcType="VARCHAR"/> | |
11 | + <result column="birth" property="birth" jdbcType="TIMESTAMP"/> | |
12 | + <result column="birthtime" property="birthtime" jdbcType="VARCHAR"/> | |
13 | + <result column="cyzddm" property="cyzddm" jdbcType="VARCHAR"/> | |
14 | + <result column="cyzdmc" property="cyzdmc" jdbcType="VARCHAR"/> | |
6 | 15 | |
7 | - <insert id="addBabyDiagnose" parameterType="com.lyms.platform.pojo.BabyDiagnoseModel" > | |
8 | - <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer"> SELECT LAST_INSERT_ID() </selectKey> | |
16 | + <result column="sfzh" property="sfzh" jdbcType="VARCHAR"/> | |
17 | + <result column="lxdh" property="lxdh" jdbcType="VARCHAR"/> | |
18 | + <result column="lxdz" property="lxdz" jdbcType="VARCHAR"/> | |
19 | + <result column="lxr" property="lxr" jdbcType="VARCHAR"/> | |
20 | + <result column="lxrdh" property="lxrdh" jdbcType="VARCHAR"/> | |
21 | + | |
22 | + | |
23 | + <result column="curraddr" property="curraddr" jdbcType="VARCHAR"/> | |
24 | + <result column="cyrq" property="cyrq" jdbcType="TIMESTAMP"/> | |
25 | + <result column="lrrq" property="lrrq" jdbcType="TIMESTAMP"/> | |
26 | + <result column="rqrq" property="rqrq" jdbcType="TIMESTAMP"/> | |
27 | + <result column="ryrq" property="ryrq" jdbcType="TIMESTAMP"/> | |
28 | + | |
29 | + <result column="cqrq" property="cqrq" jdbcType="TIMESTAMP"/> | |
30 | + <result column="ksdm" property="ksdm" jdbcType="VARCHAR"/> | |
31 | + <result column="bqdm" property="bqdm" jdbcType="VARCHAR"/> | |
32 | + <result column="mblh" property="mblh" jdbcType="VARCHAR"/> | |
33 | + <result column="msyxh" property="msyxh" jdbcType="VARCHAR"/> | |
34 | + | |
35 | + <result column="isbuild" property="isbuild" jdbcType="INTEGER"/> | |
36 | + </resultMap> | |
37 | + | |
38 | + | |
39 | + <insert id="addBabyDiagnose" parameterType="com.lyms.platform.pojo.BabyDiagnoseModel"> | |
40 | + <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer">SELECT LAST_INSERT_ID()</selectKey> | |
9 | 41 | INSERT INTO lyms_baby_diagnose |
10 | - (blh,syxh,hzxm,birth, | |
42 | + (blh,syxh,hzxm,birth, | |
11 | 43 | birthtime,sex,sfzh,lxdh,lxdz,lxr,lxrdh, |
12 | 44 | curraddr,lrrq,ryrq,rqrq,cyrq,cqrq,cyzddm, |
13 | 45 | cyzdmc,ksdm,bqdm,mblh,msyxh,isbuild) |
14 | - VALUES (#{blh},#{syxh,#{hzxm},#{birth}, | |
46 | + VALUES (#{blh},#{syxh},#{hzxm},#{birth}, | |
15 | 47 | #{birthtime},#{sex},#{sfzh},#{lxdh},#{lxdz},#{lxr},#{lxrdh}, |
16 | 48 | #{curraddr},#{lrrq},#{ryrq},#{rqrq},#{cyrq},#{cqrq},#{cyzddm}, |
17 | 49 | #{cyzdmc},#{ksdm},#{bqdm},#{mblh},#{msyxh},#{isbuild}) |
18 | 50 | </insert> |
19 | 51 | |
52 | + <sql id="orderAndLimit"> | |
53 | + <if test="sort != null and sort != '' "> | |
54 | + order by ${sort} | |
55 | + <if test="need != null"> | |
56 | + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
57 | + </if> | |
58 | + </if> | |
59 | + </sql> | |
20 | 60 | |
21 | 61 | <select id="queryBabyDiagnoses" parameterType="java.util.Map" resultType="com.lyms.platform.pojo.BabyDiagnoseModel"> |
22 | 62 | SELECT |
... | ... | @@ -24,7 +64,7 @@ |
24 | 64 | birthtime,sex,sfzh,lxdh,lxdz,lxr,lxrdh, |
25 | 65 | curraddr,lrrq,ryrq,rqrq,cyrq,cqrq,cyzddm, |
26 | 66 | cyzdmc,ksdm,bqdm,mblh,msyxh,isbuild |
27 | - FROM lyms_baby_diagnose | |
67 | + FROM lyms_baby_diagnose | |
28 | 68 | WHERE 1 = 1 |
29 | 69 | <if test="id != null"> |
30 | 70 | and id = #{id,jdbcType=INTEGER} |
31 | 71 | |
... | ... | @@ -35,10 +75,11 @@ |
35 | 75 | <if test="syxh != null and syxh != ''"> |
36 | 76 | and syxh = #{syxh,jdbcType=VARCHAR} |
37 | 77 | </if> |
78 | + <include refid="orderAndLimit"/> | |
38 | 79 | </select> |
39 | 80 | |
40 | 81 | |
41 | - <update id="updateBabyDiagnose" parameterType="com.lyms.platform.pojo.BabyDiagnoseModel" > | |
82 | + <update id="updateBabyDiagnose" parameterType="com.lyms.platform.pojo.BabyDiagnoseModel"> | |
42 | 83 | UPDATE |
43 | 84 | lyms_baby_diagnose |
44 | 85 | <set> |
... | ... | @@ -49,6 +90,18 @@ |
49 | 90 | where blh = #{blh,jdbcType=VARCHAR} |
50 | 91 | |
51 | 92 | </update> |
93 | + | |
94 | + | |
95 | + <!--<select id="queryBabyDiagnosesList" resultType="babyDiagnoseResultMap" parameterType="com.lyms.platform.permission.model.BabyDiagnoseQuery"> | |
96 | + SELECT | |
97 | + id,blh,syxh,hzxm,py,wb,birth, | |
98 | + birthtime,sex,sfzh,lxdh,lxdz,lxr,lxrdh, | |
99 | + curraddr,lrrq,ryrq,rqrq,cyrq,cqrq,cyzddm, | |
100 | + cyzdmc,ksdm,bqdm,mblh,msyxh,isbuild | |
101 | + FROM lyms_baby_diagnose | |
102 | + WHERE 1=1 | |
103 | + <include refid="orderAndLimit"/> | |
104 | + </select>--> | |
52 | 105 | |
53 | 106 | </mapper> |