<?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.jeeplus.finance.projectReport.mapper.CwProjectReportNumberApplyMapper">
    <update id="updateReviewStatysByReportId">
        update cw_project_report_number_apply set review_status = #{reviewStatus}
        where report_id = #{id}
    </update>
    <update id="updateReviewById">
        UPDATE cw_project_report_number_apply
        SET
        <if test="reviewStatus != null and reviewStatus != ''">
            review_status = #{reviewStatus},
        </if>
        <if test="takeNumberType != null and takeNumberType != ''">
            take_number_type = #{takeNumberType},
        </if>
        <if test="improperTakeCause != null and improperTakeCause != ''">
            improper_take_cause = #{improperTakeCause},
        </if>
        update_by_id = #{updateById},
        update_time = #{updateTime}
        WHERE
        id = #{id}
        AND del_flag = 0
    </update>
    <select id="selectByReportId"
            resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportNumberApply">
        select * from cw_project_report_number_apply where report_id = #{id}
    </select>
    <select id="selectByPortId" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         select * from cw_project_report_number_apply where report_id = #{id}
    </select>
</mapper>