| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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="platform.modules.government.dao.NotifyDetailDao">
- <select id="findNotifyByDetailId" resultType="platform.modules.government.entity.Notify">
- select * from z_notify n
- left join z_notify_detail d on n.id = d.z_notify_id
- where d.id = #{notify_detail_id}
- </select>
-
- <select id="findByPushIdAndNotifyId" resultType="platform.modules.government.entity.NotifyDetail">
- select * from z_notify_detail n
- where n.z_notify_id = #{detail.z_notify_id}
- and n.push_id = #{detail.push_id} and n.user_type = #{detail.user_type}
- and n.push_type = #{detail.push_type}
-
- <if test="detail.push_street_id!=null and detail.push_street_id!=''">
- and n.push_street_id=#{detail.push_street_id}
- </if>
- <if test="detail.push_build_id!=null and detail.push_build_id!='' ">
- and n.push_build_id=#{detail.push_build_id}
- </if>
- </select>
-
-
- <select id="findPushedIdsByNotifyId" resultType="java.util.HashMap">
- select group_concat(push_id)
-
- from z_notify_detail n
- where n.z_notify_id = #{detail.z_notify_id}
- and n.user_type = #{detail.user_type}
- <if test="detail.push_street_id!=null and detail.push_street_id!=''">
- and n.push_street_id=#{detail.push_street_id}
- </if>
- <if test="detail.push_build_id!=null and detail.push_build_id!='' ">
- and n.push_build_id=#{detail.push_build_id}
- </if>
- group by push_type
- </select>
-
- <select id="getPushDate" resultType="java.lang.String">
- select n.create_time from z_notify_detail n
- where n.z_notify_id = #{detail.z_notify_id}
- and n.user_type = #{detail.user_type}
-
- <if test="detail.push_street_id!=null and detail.push_street_id!=''">
- and n.push_street_id=#{detail.push_street_id}
- </if>
- <if test="detail.push_build_id!=null and detail.push_build_id!='' ">
- and n.push_build_id=#{detail.push_build_id}
- </if>
-
- order by create_time asc
- limit 1
- </select>
-
- </mapper>
|