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
<?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" >
<!-- Table:epc_money_budget_log -->
<mapper namespace="com.changhong.epc.tenant.mapper.tenant.cost.costlog.MoneyBudgetLogMapper">
    <resultMap id="moneyBudgetLogMapperResultMap" type="com.changhong.epc.bean.tenant.cost.budgetlog.MoneyBudgetLog">
        <result property="formId" column="form_id"/><!-- 表单id -->
        <result property="rowId" column="row_id"/><!-- 表单数据id -->
        <result property="qFormId" column="q_form_id"/><!-- 变更其它表单id -->
        <result property="qRowId" column="q_row_id"/><!-- 变更其它数据id -->
        <result property="operatorMsg" column="operator_msg"/><!-- 操作信息 -->
        <result property="alterAlias" column="alter_alias"/><!-- 变更的字段别名 -->
        <result property="alterContentOld" column="alter_content_old"/><!-- 变更的内容 -->
        <result property="alterContentNew" column="alter_content_new"/><!-- 变更后的内容 -->
    </resultMap>
    <sql id="moneyBudgetLogSql">
        form_id, row_id, q_form_id, q_row_id, operator_msg        
        , alter_alias, alter_content_old, alter_content_new
    </sql>
    
    
    <select id="selectNewestRecordLog" resultMap="moneyBudgetLogMapperResultMap">
    SELECT <include refid="moneyBudgetLogSql"></include> from epc_money_budget_log B
        where B.form_id = #{budgetLog.formID}
        and
            B.row_id = #{budgetLog.dataRowNUm}
        and
            B.data_start = 0
        ORDER BY id DESC
        limit 1;
    </select>
    
</mapper>