zhaowenxuan
2025-02-06 06c12d2b42c343798d9476be66031b48967df639
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
<?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.ltkj.hosp.mapper.TjHarmTypeMapper">
 
    <resultMap type="TjHarmType" id="TjHarmTypeResult">
        <result property="aid" column="aid"/>
        <result property="harmPinYin" column="harm_pin_yin"/>
        <result property="harmType" column="harm_type"/>
        <result property="sort" column="sort"/>
        <result property="harmInfo" column="harm_info"/>
        <result property="externalCode" column="external_code"/>
        <result property="harmCode" column="harm_code"/>
        <result property="type" column="type"/>
        <result property="protection" column="protection"/>
    </resultMap>
 
    <sql id="selectTjHarmTypeVo">
 
        select
            aid,
            harm_pin_yin,
            harm_type,
            sort,
            harm_info,
            external_code,
            harm_code,
            type,
            protection
        from tj_harm_type
    </sql>
 
    <select id="selectTjHarmTypeList" parameterType="TjHarmType" resultMap="TjHarmTypeResult">
        <include refid="selectTjHarmTypeVo"/>
        <where>
            <if test="harmCode   != null  and harmCode  != ''">
                and harm_code = #{harmCode}
            </if>
            <if test=" harmType != null  and  harmType != ''">
                and  harm_type = #{harmType}
            </if>
            <if test="harmPinYin   != null  and harmPinYin   != ''">
                and harm_pin_yin   = #{harmPinYin}
            </if>
        </where>
    </select>
 
</mapper>