<?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.hzs.member.account.mapper.CuMemberAccountLogMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.member.account.CuMemberAccountLog">
        <result column="DEL_FLAG" property="delFlag"/>
        <result column="PK_COUNTRY" property="pkCountry"/>
        <result column="PK_CREATOR" property="pkCreator"/>
        <result column="CREATION_TIME" property="creationTime"/>
        <result column="PK_MODIFIED" property="pkModified"/>
        <result column="MODIFIED_TIME" property="modifiedTime"/>
        <result column="PK_ID" property="pkId"/>
        <result column="APPROVAL_CODE" property="approvalCode"/>
        <result column="APPROVE_STATE" property="approveState"/>
        <result column="APPROVE_TIME" property="approveTime"/>
        <result column="APPROVER" property="approver"/>
        <result column="APPROVE_REMARKS" property="approveRemarks"/>
        <result column="LOCK_ACCOUNT_DATA" property="lockAccountData"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        DEL_FLAG,
        PK_COUNTRY,
        PK_CREATOR,
        CREATION_TIME,
        PK_MODIFIED,
        MODIFIED_TIME,
        PK_ID, APPROVAL_CODE, APPROVE_STATE, APPROVE_TIME, APPROVER, APPROVE_REMARKS, LOCK_ACCOUNT_DATA
    </sql>

    <update id="updateMemberAccountLogByCode" parameterType="com.hzs.common.domain.member.account.CuMemberAccountLog">
        update cu_member_account_log
        <set>
            <if test="approveState != null">approve_state = #{approveState},</if>
            <if test="approver != null">approver = #{approver},</if>
            <if test="approveTime != null">approve_time = #{approveTime},</if>
            <if test="pkModified != null">pk_modified = #{pkModified},</if>
            modified_time = sysdate
        </set>
        where APPROVAL_CODE = #{approvalCode}
    </update>



</mapper>
