zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
<?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.changhong.epc.admin.mapper.centen.account.AccountMapper">
    <sql id="col">
        id,tenantId,companyId,openId,formId,dataRowNum,fieldSet
    </sql>
    <select id="selectByDataStart" resultType="com.changhong.epc.bean.admin.Account">
        select
        <include refid="col" />
        from
        epc_order_account
        where
        data_start=0
    </select>
 
    <update id="updateState">
      update epc_order_account
      set data_start=#{account.dataStart}
          <if test="account.orderCode !=null">
              , orderCode = #{account.orderCode}
          </if>
        <if test="account.voucherCode !=null">
            ,voucherCode = #{account.voucherCode}
        </if>
      where id=#{account.id}
 
    </update>
    
    <select id="selectOneAccount" resultType="com.changhong.epc.bean.admin.Account">
        select
        <include refid="col" />
        from
        epc_order_account
        where orderCode = #{orderCode}
    </select>
 
    <update id="repetitionAccount">
        UPDATE epc_order_account
        SET data_start = 0
        WHERE
            formId = #{account.formId}
        AND dataRowNum = #{account.dataRowNum}
        AND tenantId = #{account.tenantId}
        AND companyId = #{account.companyId}
    </update>
 
    <update id="updateVoucherCode">
        UPDATE epc_order_account
        SET voucherCode = #{voucherCode}
        WHERE
        orderCode = #{orderCode}
    </update>
</mapper>