zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
commit | author | age
a18bfa 1 <?xml version="1.0" encoding="UTF-8" ?>
Z 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3 <mapper namespace="com.changhong.epc.form.mapper.tenant.ExcelLogMapper.ExcelLobMapper" >
4
5     <insert id="addExcelLog"  parameterType="com.changhong.epc.bean.parsing.ExcelLog"
6             useGeneratedKeys="true"  keyProperty="id">
7         INSERT INTO excellog_{rule} (
8            `formId`,`tenantId`,
9             `formName`, `startTime`, `state`,
10             `filePath`, `overTime`, `mag`,
11             `ins_p`, `data_start`, `type`
12         )
13         VALUES
14             (
15                 #{formId},
16                 #{tenantId},
17                 #{formName},
18                 #{startTime},
19                 #{state},
20                 #{filePath},
21                 #{overTime},
22                 #{mag},
23                 #{insP},
24                 #{dataStart},
25                 #{type}
26             )
27
28     </insert>
29
30     <select id="selectEmpLog" resultType="com.changhong.epc.bean.parsing.ExcelLog" parameterType="com.changhong.epc.bean.parsing.ExcelLog">
31         SELECT
32             `id`,         `formId`,
33             `tenantId`,   `formName`,
34             `startTime`,  `state`,
35             `filePath`,   `overTime`,
36             `mag`,       ins_t insT,
37             ins_p insP,      upd_t updT,
38             upd_p updP,       `data_start` dataStart,
39             `type`
40         FROM
41         excellog_{rule}
42         <trim prefix="WHERE" prefixOverrides="AND | OR">
43             data_start = 0
44             <if test="type!=null" >
45                 and type = #{type}
46             </if>
47             <if test="state!=null" >
48                 and state = #{state}
49             </if>
50         </trim>
51     </select>
52
53     <update id="updateExcelLog"  parameterType="com.changhong.epc.bean.parsing.ExcelLog">
54         UPDATE excellog_{rule}
55         SET
56           state = #{state},
57           overTime = #{overTime},
58           mag = #{mag}
59           <if test="filePath!=null">
60           , filePath = #{filePath}
61           </if>
62         WHERE
63             id = #{id}
64     </update>
65 </mapper>