<?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.unis.policy.info.modular.mlpFirstDraftCollect.mapper.MlpFirstDraftCollectMapper">
    <select id="checkList" parameterType="string" resultType="com.unis.policy.info.modular.mlpFirstDraftCollectFeedback.param.MlpFirstDraftCollectFeedbackAddParam">
        SELECT
            fdcf.sys_org_id sysOrgId,
            so.`NAME` sysOrgName,
            fdcf.feedback_time feedbackTime,
            fdcf.advice_content adviceContent,
            fdcf.attachment attachment
        FROM
            biz_mlp_first_draft_collect_feedback fdcf
        LEFT JOIN sys_org so ON fdcf.sys_org_id = so.ID
        WHERE
            fdcf.status_flag = 2
        AND fdcf.first_draft_collect_id = #{id}
    </select>
    <select id="pageList" parameterType="com.baomidou.mybatisplus.core.conditions.Wrapper" resultType="com.unis.policy.info.modular.mlpFirstDraftCollect.entity.MlpFirstDraftCollect">
        SELECT
            t1.*, t2.plan_name planName
        FROM
            biz_mlp_first_draft_collect t1
        LEFT JOIN biz_mlp_first_draft t2 ON t1.first_draft_id = t2.id
        LEFT JOIN sys_user su ON t1.create_user = su.id
        ${ew.customSqlSegment}
    </select>
</mapper>