| @@ -79,7 +79,7 @@ | |||||
| from | from | ||||
| (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where cmd_type=#{cmdType} | |||||
| </foreach>) wx_car_cmd_log where cmd_type=#{cmdType} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -96,7 +96,7 @@ | |||||
| select id,DATE_FORMAT(DATE_ADD(create_date,INTERVAL 1 HOUR),'%H:00') create_time | select id,DATE_FORMAT(DATE_ADD(create_date,INTERVAL 1 HOUR),'%H:00') create_time | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where cmd_type=#{cmdType} | |||||
| </foreach>) wx_car_cmd_log where cmd_type=#{cmdType} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -111,7 +111,7 @@ | |||||
| select count(id) | select count(id) | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where cmd_type=#{cmdType} | |||||
| </foreach>) wx_car_cmd_log where cmd_type=#{cmdType} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -126,7 +126,7 @@ | |||||
| select id,DATE_FORMAT(create_date,'%m/%d') create_time,CONVERT(JSON_EXTRACT(cmd_json,'$.fee'), Decimal(16,2)) fee | select id,DATE_FORMAT(create_date,'%m/%d') create_time,CONVERT(JSON_EXTRACT(cmd_json,'$.fee'), Decimal(16,2)) fee | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where cmd_type=#{cmdType} | |||||
| </foreach>) wx_car_cmd_log where cmd_type=#{cmdType} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -137,7 +137,7 @@ | |||||
| ) as orderSendCount | ) as orderSendCount | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_action_log | |||||
| where channel_type in (2,3,4,5) | where channel_type in (2,3,4,5) | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -155,7 +155,7 @@ | |||||
| select create_time_md as xTime, channel_type, count(create_time_md + '' + channel_type) as count | select create_time_md as xTime, channel_type, count(create_time_md + '' + channel_type) as count | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_action_log | |||||
| where channel_type in (2,3,4,5) | where channel_type in (2,3,4,5) | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -209,7 +209,7 @@ | |||||
| Count(*) as sendCount | Count(*) as sendCount | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_action_log | |||||
| where channel_type=#{channelType} | where channel_type=#{channelType} | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -256,7 +256,7 @@ | |||||
| <select id="getCountByDateLimit" resultType="java.lang.Integer"> | <select id="getCountByDateLimit" resultType="java.lang.Integer"> | ||||
| select COUNT(*) FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select COUNT(*) FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_action_log | |||||
| where `channel_type` != 0 | where `channel_type` != 0 | ||||
| and `channel_type` != 1 | and `channel_type` != 1 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| @@ -210,7 +210,7 @@ | |||||
| AND d.update_date <= #{endTime}) as verifyUserCount | AND d.update_date <= #{endTime}) as verifyUserCount | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_order | |||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -637,7 +637,7 @@ | |||||
| SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price | SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_order | |||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -147,7 +147,7 @@ | |||||
| <select id="queryOrderGroupSuccessCountAndTime" parameterType="hashmap" resultType="hashmap"> | <select id="queryOrderGroupSuccessCountAndTime" parameterType="hashmap" resultType="hashmap"> | ||||
| select count(1) total,DATE_FORMAT(create_date,'%Y-%m-%d') time from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) total,DATE_FORMAT(create_date,'%Y-%m-%d') time from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_coupon_order | |||||
| where coupon_type=9 | where coupon_type=9 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -168,7 +168,7 @@ | |||||
| select count(1) total,DATE_FORMAT(create_date,'%Y-%m-%d') time | select count(1) total,DATE_FORMAT(create_date,'%Y-%m-%d') time | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where coupon_type=9 and coupon_order_status=1 | |||||
| </foreach>) wx_coupon_order where coupon_type=9 and coupon_order_status=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -187,7 +187,7 @@ | |||||
| <select id="queryOrderGroupCount" parameterType="hashmap" resultType="long"> | <select id="queryOrderGroupCount" parameterType="hashmap" resultType="long"> | ||||
| select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_order_group | |||||
| <where> | <where> | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| @@ -205,7 +205,7 @@ | |||||
| select DATE_FORMAT(create_date,'%Y-%m-%d') xtime,count(*) xcount | select DATE_FORMAT(create_date,'%Y-%m-%d') xtime,count(*) xcount | ||||
| from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | ||||
| </foreach>) | |||||
| </foreach>) wx_order_group | |||||
| <where> | <where> | ||||
| <if test=" null != wxCoupon.startdate and null!= wxCoupon.enddate "> | <if test=" null != wxCoupon.startdate and null!= wxCoupon.enddate "> | ||||
| @@ -218,7 +218,7 @@ | |||||
| <select id="queryOrderGroupSuccessCount" parameterType="hashmap" resultType="long"> | <select id="queryOrderGroupSuccessCount" parameterType="hashmap" resultType="long"> | ||||
| select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | SELECT * from wx_order_group${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where status=11 | |||||
| </foreach>) wx_order_group where status=11 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -233,7 +233,7 @@ | |||||
| <select id="queryOrderGroupPeopleCount" parameterType="hashmap" resultType="long"> | <select id="queryOrderGroupPeopleCount" parameterType="hashmap" resultType="long"> | ||||
| select count(1) from (select id from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) from (select id from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_order${tenantEntity.shardTableSuffix} | SELECT * from wx_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where order_group_id!=0 | |||||
| </foreach>) wx_order where order_group_id!=0 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -249,7 +249,7 @@ | |||||
| <select id="queryOrderGroupVerifyCount" parameterType="hashmap" resultType="long"> | <select id="queryOrderGroupVerifyCount" parameterType="hashmap" resultType="long"> | ||||
| select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) total from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where coupon_type=9 and coupon_order_status=1 | |||||
| </foreach>) wx_coupon_order where coupon_type=9 and coupon_order_status=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -267,7 +267,7 @@ | |||||
| <select id="queryOrderGroupSuccessPeopleCount" parameterType="hashmap" resultType="long"> | <select id="queryOrderGroupSuccessPeopleCount" parameterType="hashmap" resultType="long"> | ||||
| select count(1) from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | select count(1) from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all"> | ||||
| SELECT * from wx_order${tenantEntity.shardTableSuffix} | SELECT * from wx_order${tenantEntity.shardTableSuffix} | ||||
| </foreach>) where order_status=11 | |||||
| </foreach>) wx_order where order_status=11 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||