MedInoculateorder.xml 2.96 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
<?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.lymsh.yimiao.main.data.dao.MedInoculateOrderMapper">

<resultMap id="MedInoculateOrderResultMap" type="com.lymsh.yimiao.main.data.model.MedInoculateOrder">
<result column="io_id" property="ioId" jdbcType="VARCHAR" />
<result column="io_kidId" property="ioKidId" jdbcType="VARCHAR" />
<result column="io_vaccineId" property="ioVaccineId" jdbcType="VARCHAR" />
<result column="io_organizationId" property="ioOrganizationId" jdbcType="VARCHAR" />
<result column="io_inoculateDate" property="ioInoculateDate" jdbcType="VARCHAR" />
<result column="io_inoculateTime" property="ioInoculateTime" jdbcType="VARCHAR" />
<result column="io_orderOper" property="ioOrderOPer" jdbcType="VARCHAR" />
<result column="io_orderTime" property="ioOrderTime" jdbcType="VARCHAR" />
</resultMap>

<select id="getMedInoculateOrder" resultMap="MedInoculateOrderResultMap" parameterType="java.lang.String">
select io_id,io_kidId,io_vaccineId,io_organizationId,io_inoculateDate,io_inoculateTime,io_orderOper,io_orderTime
FROM med_inoculateorder
WHERE io_id = #{ioId,jdbcType=VARCHAR}
</select>


<sql id="orderAndLimit">
<if test="sort != null and sort != '' ">
order by ${sort}
<if test="need != null">
limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
</if>
</if>
</sql>



<sql id="MedInoculateOrderCondition">
<where>
1 = 1
<if test="ioId != null and ioId != ''">
and io_id = #{ioId,jdbcType=VARCHAR}
</if>
<if test="ioKidId != null and ioKidId != ''">
and io_kidId = #{ioKidId,jdbcType=VARCHAR}
</if>
<if test="ioVaccineId != null and ioVaccineId != ''">
and io_vaccineId = #{ioVaccineId,jdbcType=VARCHAR}
</if>
<if test="ioOrganizationId != null and ioOrganizationId != ''">
and io_organizationId = #{ioOrganizationId,jdbcType=VARCHAR}
</if>
<if test="ioInoculateDate != null and ioInoculateDate != ''">
and io_inoculateDate = #{ioInoculateDate,jdbcType=VARCHAR}
</if>
<if test="ioInoculateTime != null and ioInoculateTime != ''">
and io_inoculateTime = #{ioInoculateTime,jdbcType=VARCHAR}
</if>
<if test="ioOrderOPer != null and ioOrderOPer != ''">
and io_orderOper = #{ioOrderOPer,jdbcType=VARCHAR}
</if>
<if test="ioOrderTime != null and ioOrderTime != ''">
and io_orderTime = #{ioOrderTime,jdbcType=VARCHAR}
</if>
</where>
</sql>



<select id="queryMedInoculateOrder" resultMap="MedInoculateOrderResultMap" parameterType="com.lymsh.yimiao.main.data.model.MedInoculateOrderQuery">
select io_id,io_kidId,io_vaccineId,io_organizationId,io_inoculateDate,io_inoculateTime,io_orderOper,io_orderTime
from med_inoculateorder
<include refid="MedInoculateOrderCondition" />
<include refid="orderAndLimit" />
</select>



<select id="queryMedInoculateOrderCount" resultType="int" parameterType="com.lymsh.yimiao.main.data.model.MedInoculateOrderQuery">
select count(1) from med_inoculateorder
<include refid="MedInoculateOrderCondition" />
</select>



</mapper>