|
@@ -370,4 +370,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND #{endTime} >= og.create_time
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getConsoleInfoUpdateNum" parameterType="com.zhongzheng.modules.base.bo.ConsoleQueryBo" resultType="Integer">
|
|
|
+ SELECT
|
|
|
+ count( DISTINCT o.user_id )
|
|
|
+ FROM
|
|
|
+ `order` o
|
|
|
+ LEFT JOIN order_goods og ON o.order_sn = og.order_sn
|
|
|
+ LEFT JOIN goods g ON og.goods_id = g.goods_id
|
|
|
+ LEFT JOIN user_update uu on o.user_id = uu.user_id
|
|
|
+ WHERE
|
|
|
+
|
|
|
+ og.pay_status IN ( 2, 3, 4 )
|
|
|
+ AND og.refund_status != 2
|
|
|
+ <if test="businessId != null">
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ AND uu.create_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ AND #{endTime} >= uu.create_time
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|