<?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.mlpAdviceCollectFeedback.mapper.MlpAdviceCollectOrgFeedbackMapper">

    <select id="selectMyPage"
            resultType="com.unis.policy.info.modular.mlpAdviceCollectFeedback.vo.MlpAdviceCollectOrgFeedbackVO">

        select t2.plan_name, t2.collection_deadline,t2.plan_content,t2.id,t2.attachment AdviceAttachment
        from biz_mlp_advice_collect t2

        <where>
            t2.delete_flag='NOT_DELETE' and t2.status = 2
            and FIND_IN_SET(#{orgId}, t2.sys_org_id) > 0
            <if test="planName!=null and planName!=''">
                and t2.plan_name like concat("%",#{planName},"%")
            </if>
            <if test="collectionDeadline !=null and collectionDeadline!=''">
                and t2.collection_deadline =#{collectionDeadline}
            </if>
        </where>
        order by t2.create_time desc

    </select>
</mapper>