| | |
| | | AND toc.order_from = #{param.orderFrom} |
| | | </if> |
| | | <if test="param.startOrderDate != null and param.startOrderDate != '' "> |
| | | AND toc.create_time >= #{param.startOrderDate} |
| | | AND Date(toc.create_time) >= #{param.startOrderDate} |
| | | </if> |
| | | <if test="param.endOrderDate != null and param.endOrderDate != '' "> |
| | | AND toc.create_time <= #{param.endOrderDate} |
| | | AND Date(toc.create_time) <= #{param.endOrderDate} |
| | | </if> |
| | | <if test="param.keyword != null and param.keyword != ''"> |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR tog.goods_name LIKE CONCAT('%',#{param.keyword},'%')) |
| | |
| | | AND toc.order_status = #{param.orderStatus} |
| | | </if> |
| | | <if test="param.startOrderDate != null and param.startOrderDate != '' "> |
| | | AND toc.create_time >= #{param.startOrderDate} |
| | | AND Date(toc.create_time) >= #{param.startOrderDate} |
| | | </if> |
| | | <if test="param.endOrderDate != null and param.endOrderDate != '' "> |
| | | AND toc.create_time <= #{param.endOrderDate} |
| | | AND Date(toc.create_time) <= #{param.endOrderDate} |
| | | </if> |
| | | <if test="param.keyword != null and param.keyword != ''"> |
| | | AND toc.order_no LIKE CONCAT('%',#{param.keyword},'%') |
| | |
| | | AND toc.order_from = #{param.orderFrom} |
| | | </if> |
| | | <if test="param.startOrderDate != null and param.startOrderDate != ''"> |
| | | AND toc.create_time >= #{param.startOrderDate} |
| | | AND Date(toc.create_time) >= #{param.startOrderDate} |
| | | </if> |
| | | <if test="param.endOrderDate != null and param.endOrderDate != ''"> |
| | | AND toc.create_time <= #{param.endOrderDate} |
| | | AND Date(toc.create_time) <= #{param.endOrderDate} |
| | | </if> |
| | | <if test="param.keyword != null and param.keyword != ''"> |
| | | AND toc.order_no LIKE CONCAT('%',#{param.keyword},'%') |
| | |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR toc.activity_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(toc.user_id, #{param.userIds}) > 0) |
| | | </if> |
| | | <if test="param.verifyStartTime != null and param.verifyStartTime != ''"> |
| | | AND toc.use_time >= #{param.verifyStartTime} |
| | | AND Date(toc.use_time) >= #{param.verifyStartTime} |
| | | </if> |
| | | <if test="param.verifyEndTime != null and param.verifyEndTime != ''"> |
| | | AND toc.use_time <= #{param.verifyEndTime} |
| | | AND Date(toc.use_time) <= #{param.verifyEndTime} |
| | | </if> |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR toc.activity_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(toc.user_id, #{param.userIds}) > 0) |
| | | </if> |
| | | <if test="param.verifyStartTime != null and param.verifyStartTime != ''"> |
| | | AND toc.use_time >= #{param.verifyStartTime} |
| | | AND Date(toc.use_time) >= #{param.verifyStartTime} |
| | | </if> |
| | | <if test="param.verifyEndTime != null and param.verifyEndTime != ''"> |
| | | AND toc.use_time <= #{param.verifyEndTime} |
| | | AND Date(toc.use_time) <= #{param.verifyEndTime} |
| | | </if> |
| | | GROUP BY toc.order_id) AS temp |
| | | </select> |
| | |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR toc.activity_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(toc.user_id, #{param.userIds}) > 0) |
| | | </if> |
| | | <if test="param.verifyStartTime != null and param.verifyStartTime != ''"> |
| | | AND toc.use_time >= #{param.verifyStartTime} |
| | | AND Date(toc.use_time) >= #{param.verifyStartTime} |
| | | </if> |
| | | <if test="param.verifyEndTime != null and param.verifyEndTime != ''"> |
| | | AND toc.use_time <= #{param.verifyEndTime} |
| | | AND Date(toc.use_time) <= #{param.verifyEndTime} |
| | | </if> |
| | | GROUP BY toc.order_id) AS temp |
| | | </select> |
| | |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR toc.activity_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(toc.user_id, #{param.userIds}) > 0) |
| | | </if> |
| | | <if test="param.verifyStartTime != null and param.verifyStartTime != ''"> |
| | | AND toc.use_time >= #{param.verifyStartTime} |
| | | AND Date(toc.use_time) >= #{param.verifyStartTime} |
| | | </if> |
| | | <if test="param.verifyEndTime != null and param.verifyEndTime != ''"> |
| | | AND toc.use_time <= #{param.verifyEndTime} |
| | | AND Date(toc.use_time) <= #{param.verifyEndTime} |
| | | </if> |
| | | GROUP BY toc.order_id) AS temp |
| | | </select> |
| | |
| | | AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR toc.activity_name LIKE CONCAT('%',#{param.keyword},'%') OR FIND_IN_SET(toc.user_id, #{param.userIds}) > 0) |
| | | </if> |
| | | <if test="param.verifyStartTime != null and param.verifyStartTime != ''"> |
| | | AND toc.use_time >= #{param.verifyStartTime} |
| | | AND Date(toc.use_time) >= #{param.verifyStartTime} |
| | | </if> |
| | | <if test="param.verifyEndTime != null and param.verifyEndTime != ''"> |
| | | AND toc.use_time <= #{param.verifyEndTime} |
| | | AND Date(toc.use_time) <= #{param.verifyEndTime} |
| | | </if> |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | t_order |
| | | WHERE |
| | | del_flag = 0 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_name |
| | | ORDER BY SUM(tog.goods_total_money) DESC LIMIT 10 |
| | |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY toc.order_from |
| | | ORDER BY SUM(toc.order_money) DESC LIMIT 15 |
| | |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | t_order |
| | | WHERE |
| | | del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | |
| | | t_order |
| | | WHERE |
| | | del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | |
| | | t_order |
| | | WHERE |
| | | del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopId != null and param.shopId != ''"> |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | |
| | | AND o.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND o.create_time >= #{param.startDate} |
| | | AND Date(o.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND o.create_time <= #{param.endDate} |
| | | AND Date(o.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY o.user_id |
| | | ) AS user_goods_type_counts |
| | |
| | | AND shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_name |
| | | ORDER BY COUNT(DISTINCT toc.user_id) DESC LIMIT 15 |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | t_order |
| | | WHERE |
| | | del_flag = 0 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_name |
| | | ORDER BY SUM(tog.goods_total_money) DESC LIMIT 10 |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY toc.order_from |
| | | ORDER BY SUM(toc.order_money) DESC LIMIT 10 |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | IFNULL(SUM(order_money),0) AS mapValueSecond |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | |
| | | DISTINCT user_id |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | |
| | | COUNT(DISTINCT user_id) AS mapValue |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | AND Date(create_time) >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND create_time >= #{param.startDate} |
| | | AND Date(create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND create_time <= #{param.endDate} |
| | | AND Date(create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_type |
| | | </select> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tog.goods_name |
| | | ORDER BY SUM(tog.goods_total_money) DESC LIMIT 10 |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY toc.order_from |
| | | ORDER BY SUM(toc.order_money) DESC LIMIT 15 |
| | |
| | | AND toc.shop_id = #{param.shopId} |
| | | </if> |
| | | <if test="param.startOrderDate != null and param.startOrderDate != '' "> |
| | | AND toc.create_time >= #{param.startOrderDate} |
| | | AND Date(toc.create_time) >= #{param.startOrderDate} |
| | | </if> |
| | | <if test="param.endOrderDate != null and param.endOrderDate != '' "> |
| | | AND toc.create_time <= #{param.endOrderDate} |
| | | AND Date(toc.create_time) <= #{param.endOrderDate} |
| | | </if> |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | |
| | | AND toc.activity_id = #{param.activityId} |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND toc.create_time >= #{param.startDate} |
| | | AND Date(toc.create_time) >= #{param.startDate} |
| | | </if> |
| | | <if test="param.endDate!=null and param.endDate!=''"> |
| | | AND toc.create_time <= #{param.endDate} |
| | | AND Date(toc.create_time) <= #{param.endDate} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | FROM t_order toc WHERE toc.del_flag = 0 AND toc.shop_id = #{param.shopId} GROUP BY toc.user_id) AS firstOrder) |
| | | AND toa.order_from = 2 |
| | | <if test="param.activityId !=null and param.activityId != ''"> |
| | | AND toc.activity_id = #{param.activityId} |
| | | AND toa.activity_id = #{param.activityId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <if test="param.goodsType !=null and param.goodsType != ''"> |
| | | AND tog.goods_type = #{param.goodsType} |
| | | </if> |
| | | GROUP BY toc.order_date |
| | | GROUP BY toc.create_time |
| | | </select> |
| | | |
| | | <select id="getStaffActivityMemberTotal" resultType="com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo"> |
| | |
| | | <if test="param.goodsType !=null and param.goodsType != ''"> |
| | | AND tog.goods_type = #{param.goodsType} |
| | | </if> |
| | | GROUP BY toc.order_date |
| | | GROUP BY toc.create_time |
| | | </select> |
| | | </mapper> |