linzhijie
2021-04-06 8728733ad60e1698bb6cf0fa2e428c28a6bffbe7
src/main/resources/mybatis/exam/TExamReportMapper.xml
@@ -52,6 +52,7 @@
        <result property="hrSendTime"    column="hrSendTime"    />
        <result property="hrUpdateTime"    column="hrUpdateTime"    />
        <result property="retriesTime"    column="retriesTime"    />
        <result property="memberTemplate"    column="member_template"    />
    </resultMap>
    <sql id="selectTExamReportVo">
@@ -64,7 +65,7 @@
        t.finish,m.member_name,p.test_name,u.user_name,t.question_order, t.question_report, t.question_template_id, t.interface_content,
        t.lang_type, t.report_address, p.report_template_id, t.send_hr_status, t.send_tester_status, m.member_email, p.test_email,
        t.member_name, p.auto_send_report, e.hr_email, e.mail_content, t.option_order, t.remain_part_time,
         t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime
         t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime,p.member_template
         from t_exam_report t
        left join sys_user u on u.user_id = t.user_id
        left join ent_test_member m on m.member_id = t.member_id
@@ -149,11 +150,26 @@
            <if test="finish == 1"> and t.finish in (1,2,6) </if>
            <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if>
            <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if>
            <if test="userId != null "> and t.user_id = #{userId}</if>
            <if test="testType != null  and testType != ''"> and p.test_type = #{testType}</if>
            <!-- 开始时间检索 -->
            <if test="params.beginTime != null and params.beginTime != ''">
                and date_format(p.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
            </if>
            <!-- 结束时间检索 -->
            <if test="params.endTime != null and params.endTime != ''">
                and date_format(p.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
            </if>
            <if test="sendHrStatusList != null"> and t.send_hr_status in
                <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")">
                    #{sendStatus}
                </foreach>
            </if>
            <if test="userIds != null"> and t.user_id in
                <foreach collection="userIds" item="userId" open="(" separator="," close=")">
                    #{userId}
                </foreach>
            </if>
        </where>
    </select>