| @@ -86,13 +86,13 @@ | |||||
| round( | round( | ||||
| (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | ||||
| from wx_merchant m | from wx_merchant m | ||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| /100,2) volume, | /100,2) volume, | ||||
| round( | round( | ||||
| (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | ||||
| from wx_merchant m | from wx_merchant m | ||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| / | / | ||||
| (select if(sum(ws.operation_area) is null,0,sum(ws.operation_area)) | (select if(sum(ws.operation_area) is null,0,sum(ws.operation_area)) | ||||
| from wx_merchant m | from wx_merchant m | ||||
| @@ -105,15 +105,15 @@ | |||||
| from wx_merchant m | from wx_merchant m | ||||
| left join wx_merchant_shop mtd on mtd.merchant_id = m.id | left join wx_merchant_shop mtd on mtd.merchant_id = m.id | ||||
| left join wx_shop ws on(mtd.shop_id = ws.id) | left join wx_shop ws on(mtd.shop_id = ws.id) | ||||
| where m.business_id = b.id and m.tenant_id=456 and m.status = 1 and m.is_del = 0 )area, | |||||
| where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )area, | |||||
| round( | round( | ||||
| (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) | ||||
| from wx_merchant m | from wx_merchant m | ||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) / | |||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) / | |||||
| (select sum(mtd.trade_count) | (select sum(mtd.trade_count) | ||||
| from wx_merchant m | from wx_merchant m | ||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) | |||||
| /100,2) comPrice | /100,2) comPrice | ||||
| from wx_business b | from wx_business b | ||||