|
|
@@ -2,7 +2,7 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
<mapper namespace="com.sqx.modules.errand.dao.TbIndentSmsSendLogDao">
|
|
|
- <select id="logPage" resultType="com.sqx.modules.errand.IndentSmsSendLogVO">
|
|
|
+ <select id="logPageByRider" resultType="com.sqx.modules.errand.IndentSmsSendLogVO">
|
|
|
select
|
|
|
issl.*, o.delivery_imgs as imgs, u.phone as sendFromPhone
|
|
|
from
|
|
|
@@ -11,6 +11,7 @@
|
|
|
left join tb_order o on o.order_id = i.order_id
|
|
|
left join tb_user u on u.user_id = issl.send_from_id
|
|
|
<where>
|
|
|
+ and issl.source_type = '1'
|
|
|
<if test="query.orderId != null">
|
|
|
and issl.order_id = #{query.orderId}
|
|
|
</if>
|
|
|
@@ -33,6 +34,37 @@
|
|
|
order by issl.send_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="logPageByShop" resultType="com.sqx.modules.errand.IndentSmsSendLogVO">
|
|
|
+ select
|
|
|
+ issl.*, o.delivery_imgs as imgs
|
|
|
+ from
|
|
|
+ tb_indent_sms_send_log issl
|
|
|
+ left join tb_indent i on i.indent_id = issl.order_id
|
|
|
+ left join tb_order o on o.order_id = i.order_id
|
|
|
+ <where>
|
|
|
+ and issl.source_type = '2'
|
|
|
+ <if test="query.orderId != null">
|
|
|
+ and issl.order_id = #{query.orderId}
|
|
|
+ </if>
|
|
|
+ <if test="query.successFlag != null and query.successFlag != ''">
|
|
|
+ and issl.success_flag = #{query.successFlag}
|
|
|
+ </if>
|
|
|
+ <if test="query.shopId != null">
|
|
|
+ and o.shop_id = #{query.shopId}
|
|
|
+ </if>
|
|
|
+ <if test="query.sendTo != null and query.sendTo != ''">
|
|
|
+ and issl.send_to = #{query.sendTo}
|
|
|
+ </if>
|
|
|
+ <if test="query.startTime != null">
|
|
|
+ and issl.send_time >= #{query.startTime}
|
|
|
+ </if>
|
|
|
+ <if test="query.endTime != null">
|
|
|
+ and issl.send_time <![CDATA[<=]]> #{query.endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by issl.send_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="countOfSendSuccess" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|