<?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.fjhx.victoriatourist.mapper.abnormal.AbnormalDetailsMapper">
    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalDetailsVo">
        select
            ad.id,
            ad.abnormal_info_id,
            ad.`explain`,
            ad.`status`,
            ad.handle_user,
            ad.next_handle_user,
            ad.processing,
            ad.handle_time,
            ad.create_user,
            ad.create_time,
            ad.update_user,
            ad.update_time,
            ad.refund_amount
        from abnormal_details ad
            ${ew.customSqlSegment}
    </select>
    <select id="getList" resultType="com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalDetailsVo">
        SELECT
            ad.id,
            ad.abnormal_info_id,
            ad.`explain`,
            ad.`status`,
            ad.handle_user,
            ad.next_handle_user,
            ad.processing,
            ad.handle_time,
            ad.create_user,
            ad.create_time,
            ad.update_user,
            ad.update_time,
            ai.purchase_id,
            ad.refund_amount
        FROM
            abnormal_details ad
                LEFT JOIN abnormal_info ai ON ad.abnormal_info_id = ai.id
            ${ew.customSqlSegment}
    </select>

</mapper>
