<?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.hzya.frame.sysnew.pushMessage.dao.impl.SysPushMessageDaoImpl">

    <resultMap id="get-SysPushMessageEntity-result" type="com.hzya.frame.sysnew.pushMessage.entity.SysPushMessageEntity" >
           <result property="pushMethod" column="push_method" jdbcType="VARCHAR"/>
           <result property="warningAppCode" column="warning_app_code" jdbcType="INTEGER"/>
           <result property="warningApiCode" column="warning_api_code" jdbcType="INTEGER"/>
           <result property="warningAppType" column="warning_app_type" jdbcType="VARCHAR"/>
           <result property="recipientIdList" column="recipient_id_list" jdbcType="VARCHAR"/>
           <result property="sendAppName" column="send_app_name" jdbcType="VARCHAR"/>
           <result property="receiveAppName" column="receive_app_name" jdbcType="VARCHAR"/>
           <result property="receiveApiName" column="receive_api_name" jdbcType="VARCHAR"/>
           <result property="receiveApiCode" column="receive_api_code" jdbcType="INTEGER"/>
           <result property="returnData" column="return_data" jdbcType="LONGVARCHAR"/>
           <result property="status" column="status" jdbcType="VARCHAR"/>
        </resultMap>

       <!-- 查询 采用==查询 -->
       <select id="entity_list_base" resultMap="get-SysPushMessageEntity-result" parameterType = "com.hzya.frame.sysnew.pushMessage.entity.SysPushMessageEntity">
              SELECT
                     warning_config.push_method,
                     warning_config.sendAppid AS warning_app_code,
                     warning_config.endApiCode AS warning_api_code,
                     warning_config.app_type AS warning_app_type,
                     warning_config.recipient_id AS recipient_id_list,
                     log.send_app_name,
                     log.receive_app_name,
                     receive_api_name,
                     log.receive_api_code,
                     log.return_data,
                     log.STATUS
              FROM
                     v_hzya_sys_warning warning_config
                     LEFT JOIN v_hzya_sys_send_message_log log ON warning_config.api_code = log.receive_api_code
              WHERE
                     log.STATUS = '4'
                     AND warning_config.push_method = '定时'
       </select>

</mapper>

