yyt
2024-06-26 0cceb649e1dc443c2a91d26d81eacb0867c96db3
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?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.jcdm.main.da.tileMatchRules.mapper.DaTileMatchRulesMapper">
    
    <resultMap type="DaTileMatchRules" id="DaTileMatchRulesResult">
        <result property="id"    column="id"    />
        <result property="productSeries"    column="product_series"    />
        <result property="scanObject1"    column="scan_object1"    />
        <result property="scanObject2"    column="scan_object2"    />
        <result property="axisName"    column="axis_name"    />
        <result property="neckName"    column="neck_name"    />
        <result property="tileName"    column="tile_name"    />
        <result property="axisParameterNoPosition"    column="axis_parameter_no_position"    />
        <result property="neckParameterPosition"    column="neck_parameter_position"    />
        <result property="axisValue"    column="axis_value"    />
        <result property="neckValue"    column="neck_value"    />
        <result property="tileColor"    column="tile_color"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="state"    column="state"    />
    </resultMap>
 
    <sql id="selectDaTileMatchRulesVo">
        select id, product_series, scan_object1, scan_object2, axis_name, neck_name, tile_name, axis_parameter_no_position, neck_parameter_position, axis_value, neck_value, tile_color, create_user, create_time, update_user, update_time, state from da_tile_match_rules
    </sql>
 
    <select id="selectDaTileMatchRulesList" parameterType="DaTileMatchRules" resultMap="DaTileMatchRulesResult">
        <include refid="selectDaTileMatchRulesVo"/>
        <where>  
            <if test="productSeries != null  and productSeries != ''"> and product_series = #{productSeries}</if>
            <if test="scanObject1 != null  and scanObject1 != ''"> and scan_object1 = #{scanObject1}</if>
            <if test="scanObject2 != null  and scanObject2 != ''"> and scan_object2 = #{scanObject2}</if>
            <if test="axisName != null  and axisName != ''"> and axis_name like concat('%', #{axisName}, '%')</if>
            <if test="neckName != null  and neckName != ''"> and neck_name like concat('%', #{neckName}, '%')</if>
            <if test="tileName != null  and tileName != ''"> and tile_name like concat('%', #{tileName}, '%')</if>
            <if test="axisParameterNoPosition != null "> and axis_parameter_no_position = #{axisParameterNoPosition}</if>
            <if test="neckParameterPosition != null "> and neck_parameter_position = #{neckParameterPosition}</if>
            <if test="axisValue != null  and axisValue != ''"> and axis_value = #{axisValue}</if>
            <if test="neckValue != null  and neckValue != ''"> and neck_value = #{neckValue}</if>
            <if test="tileColor != null  and tileColor != ''"> and tile_color = #{tileColor}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="state != null  and state != ''"> and state = #{state}</if>
        </where>
    </select>
    
    <select id="selectDaTileMatchRulesById" parameterType="Long" resultMap="DaTileMatchRulesResult">
        <include refid="selectDaTileMatchRulesVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertDaTileMatchRules" parameterType="DaTileMatchRules" useGeneratedKeys="true" keyProperty="id">
        insert into da_tile_match_rules
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="productSeries != null">product_series,</if>
            <if test="scanObject1 != null">scan_object1,</if>
            <if test="scanObject2 != null">scan_object2,</if>
            <if test="axisName != null">axis_name,</if>
            <if test="neckName != null">neck_name,</if>
            <if test="tileName != null">tile_name,</if>
            <if test="axisParameterNoPosition != null">axis_parameter_no_position,</if>
            <if test="neckParameterPosition != null">neck_parameter_position,</if>
            <if test="axisValue != null">axis_value,</if>
            <if test="neckValue != null">neck_value,</if>
            <if test="tileColor != null">tile_color,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="state != null">state,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="productSeries != null">#{productSeries},</if>
            <if test="scanObject1 != null">#{scanObject1},</if>
            <if test="scanObject2 != null">#{scanObject2},</if>
            <if test="axisName != null">#{axisName},</if>
            <if test="neckName != null">#{neckName},</if>
            <if test="tileName != null">#{tileName},</if>
            <if test="axisParameterNoPosition != null">#{axisParameterNoPosition},</if>
            <if test="neckParameterPosition != null">#{neckParameterPosition},</if>
            <if test="axisValue != null">#{axisValue},</if>
            <if test="neckValue != null">#{neckValue},</if>
            <if test="tileColor != null">#{tileColor},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="state != null">#{state},</if>
         </trim>
    </insert>
 
    <update id="updateDaTileMatchRules" parameterType="DaTileMatchRules">
        update da_tile_match_rules
        <trim prefix="SET" suffixOverrides=",">
            <if test="productSeries != null">product_series = #{productSeries},</if>
            <if test="scanObject1 != null">scan_object1 = #{scanObject1},</if>
            <if test="scanObject2 != null">scan_object2 = #{scanObject2},</if>
            <if test="axisName != null">axis_name = #{axisName},</if>
            <if test="neckName != null">neck_name = #{neckName},</if>
            <if test="tileName != null">tile_name = #{tileName},</if>
            <if test="axisParameterNoPosition != null">axis_parameter_no_position = #{axisParameterNoPosition},</if>
            <if test="neckParameterPosition != null">neck_parameter_position = #{neckParameterPosition},</if>
            <if test="axisValue != null">axis_value = #{axisValue},</if>
            <if test="neckValue != null">neck_value = #{neckValue},</if>
            <if test="tileColor != null">tile_color = #{tileColor},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="state != null">state = #{state},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteDaTileMatchRulesById" parameterType="Long">
        delete from da_tile_match_rules where id = #{id}
    </delete>
 
    <delete id="deleteDaTileMatchRulesByIds" parameterType="String">
        delete from da_tile_match_rules where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>