wang-hao-jie
2022-08-25 57dcc73636bb7d8dce89c808eb8cc988a7512264
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
130
<?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.ruoyi.station.mapper.MjStatisticMapper">
    
    <resultMap type="MjStatistic" id="MjStatisticResult">
        <result property="id"    column="id"    />
        <result property="teamnum"    column="teamNum"    />
        <result property="ordernum1"    column="orderNum1"    />
        <result property="ordernum2"    column="orderNum2"    />
        <result property="teamopen"    column="teamOpen"    />
        <result property="orderopen1"    column="orderOpen1"    />
        <result property="orderopen2"    column="orderOpen2"    />
        <result property="statu1"    column="statu1"    />
        <result property="statu2"    column="statu2"    />
        <result property="statu3"    column="statu3"    />
        <result property="statu4"    column="statu4"    />
        <result property="statu5"    column="statu5"    />
        <result property="statu6"    column="statu6"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="updateBy"    column="update_by"    />
    </resultMap>
 
    <sql id="selectMjStatisticVo">
        select id, teamNum, orderNum1, orderNum2, teamOpen, orderOpen1, orderOpen2, statu1, statu2, statu3, statu4, statu5, statu6, create_time, update_time, create_by, update_by from mj_statistic
    </sql>
 
    <select id="selectMjStatisticList" parameterType="MjStatistic" resultMap="MjStatisticResult">
        <include refid="selectMjStatisticVo"/>
        <where>  
            <if test="teamnum != null "> and teamNum = #{teamnum}</if>
            <if test="ordernum1 != null "> and orderNum1 = #{ordernum1}</if>
            <if test="ordernum2 != null "> and orderNum2 = #{ordernum2}</if>
            <if test="teamopen != null "> and teamOpen = #{teamopen}</if>
            <if test="orderopen1 != null "> and orderOpen1 = #{orderopen1}</if>
            <if test="orderopen2 != null "> and orderOpen2 = #{orderopen2}</if>
            <if test="statu1 != null "> and statu1 = #{statu1}</if>
            <if test="statu2 != null "> and statu2 = #{statu2}</if>
            <if test="statu3 != null "> and statu3 = #{statu3}</if>
            <if test="statu4 != null  and statu4 != ''"> and statu4 = #{statu4}</if>
            <if test="statu5 != null  and statu5 != ''"> and statu5 = #{statu5}</if>
            <if test="statu6 != null  and statu6 != ''"> and statu6 = #{statu6}</if>
        </where>
    </select>
    
    <select id="selectMjStatisticById" parameterType="String" resultMap="MjStatisticResult">
        <include refid="selectMjStatisticVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertMjStatistic" parameterType="MjStatistic">
        insert into mj_statistic
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="teamnum != null">teamNum,</if>
            <if test="ordernum1 != null">orderNum1,</if>
            <if test="ordernum2 != null">orderNum2,</if>
            <if test="teamopen != null">teamOpen,</if>
            <if test="orderopen1 != null">orderOpen1,</if>
            <if test="orderopen2 != null">orderOpen2,</if>
            <if test="statu1 != null">statu1,</if>
            <if test="statu2 != null">statu2,</if>
            <if test="statu3 != null">statu3,</if>
            <if test="statu4 != null">statu4,</if>
            <if test="statu5 != null">statu5,</if>
            <if test="statu6 != null">statu6,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="updateBy != null">update_by,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="teamnum != null">#{teamnum},</if>
            <if test="ordernum1 != null">#{ordernum1},</if>
            <if test="ordernum2 != null">#{ordernum2},</if>
            <if test="teamopen != null">#{teamopen},</if>
            <if test="orderopen1 != null">#{orderopen1},</if>
            <if test="orderopen2 != null">#{orderopen2},</if>
            <if test="statu1 != null">#{statu1},</if>
            <if test="statu2 != null">#{statu2},</if>
            <if test="statu3 != null">#{statu3},</if>
            <if test="statu4 != null">#{statu4},</if>
            <if test="statu5 != null">#{statu5},</if>
            <if test="statu6 != null">#{statu6},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="updateBy != null">#{updateBy},</if>
         </trim>
    </insert>
 
    <update id="updateMjStatistic" parameterType="MjStatistic">
        update mj_statistic
        <trim prefix="SET" suffixOverrides=",">
            <if test="teamnum != null">teamNum = #{teamnum},</if>
            <if test="ordernum1 != null">orderNum1 = #{ordernum1},</if>
            <if test="ordernum2 != null">orderNum2 = #{ordernum2},</if>
            <if test="teamopen != null">teamOpen = #{teamopen},</if>
            <if test="orderopen1 != null">orderOpen1 = #{orderopen1},</if>
            <if test="orderopen2 != null">orderOpen2 = #{orderopen2},</if>
            <if test="statu1 != null">statu1 = #{statu1},</if>
            <if test="statu2 != null">statu2 = #{statu2},</if>
            <if test="statu3 != null">statu3 = #{statu3},</if>
            <if test="statu4 != null">statu4 = #{statu4},</if>
            <if test="statu5 != null">statu5 = #{statu5},</if>
            <if test="statu6 != null">statu6 = #{statu6},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteMjStatisticById" parameterType="String">
        delete from mj_statistic where id = #{id}
    </delete>
 
    <delete id="deleteMjStatisticByIds" parameterType="String">
        delete from mj_statistic where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
</mapper>