|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|account|SELECT mb.id,mb.tenant_id,mb.tenant_app_id,tu.open_id tenantAppOpenId,? updateTime,if(ifnull(tu.is_subscribe,?)=?,?,?)subscribeFlag,tu.unsubscribe_time AS cancelTime,tu.subscribe_time AS subscribeTime FROM user_service.wx_user tu INNER JOIN tenant.tenant_wechatapp tw ON tu.wx_app_id=tw.wechat_appid INNER JOIN user_service.tenant_member_bind mb ON mb.tenant_id=tw.tenant_id AND mb.tenant_app_id=tw.id AND tu.id=mb.wx_user_id WHERE tw.id=? AND tu.update_time>=? AND tu.update_time<=? ORDER BY tu.id LIMIT ? OFFSET ?|359|5611|155||0|0|10316000|369173|1824|148|
|account|SELECT mb.id,mb.tenant_id,mb.tenant_app_id,tu.open_id tenantAppOpenId,? updateTime,if(ifnull(tu.is_subscribe,?)=?,?,?)subscribeFlag,tu.unsubscribe_time AS cancelTime,tu.subscribe_time AS subscribeTime FROM user_service.wx_user tu INNER JOIN tenant.tenant_wechatapp tw ON tu.wx_app_id=tw.wechat_appid INNER JOIN user_service.tenant_member_bind mb ON mb.tenant_id=tw.tenant_id AND mb.tenant_app_id=tw.id AND tu.id=mb.wx_user_id WHERE tw.id=? AND tw.tenant_id=? AND tu.create_time>=? AND tu.create_time<=? ORDER BY tu.id LIMIT ? OFFSET ?|319|6620|173||0|0|10843114|369141|1669|142|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.member_erp_id,sum(esd.amount_total) AS salesBalance,count(DISTINCT if(es.sales_status=? AND es.is_sales=?,concat(es.dept_erp_id,?,es.sales_date),?)) AS salesAmount,group_concat(DISTINCT if(es.sales_status=? AND es.is_sales=?,DATE_FORMAT(es.sales_date,?),?)) AS saleDates,group_concat(DISTINCT if(es.sales_status=? AND esd.sales_type=?,if(esd.quantity>?,round(esd.amount_pay/esd.quantity,?),?),?)) AS singleConsumeMoneys FROM tenant.erp_sales es JOIN tenant.erp_sales_detail esd ON es.tenant_id=esd.tenant_id AND es.tenant_wechatapp_id=esd.tenant_wechatapp_id AND es.sales_erp_id=esd.sales_erp_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.sales_status>=? AND es.member_erp_id IN (?) GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.member_erp_id|208|1242|79||0|0|9087243|163732|5073|328|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.sales_erp_id,t?.member_status,t?.first_sales FROM v4_sales.erp_sales_extend? t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<? LIMIT ? OFFSET ?|206|315|3||0|0|48003835|547997|502|81|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id AS tenant_app_id,es.member_erp_id,ifnull(GROUP_CONCAT(DISTINCT if(es.sales_status=?,if(sde.sales_brand=? OR sde.sales_brand=?,?,sde.sales_brand),?)),?) AS sales_brand,ifnull(GROUP_CONCAT(DISTINCT if(es.sales_status=?,if(sde.sales_craft=? OR sde.sales_craft=?,?,sde.sales_craft),?)),?) AS sales_craft FROM tenant.erp_sales es LEFT JOIN tenant.erp_sales_detail_extend sde ON sde.tenant_id=es.tenant_id AND sde.tenant_wechatapp_id=es.tenant_wechatapp_id AND sde.sales_erp_id=es.sales_erp_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.is_sales=? AND es.sales_status>=? AND es.member_erp_id IN (?) GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.member_erp_id|105|411|49||0|0|3954561|131870|3732|324|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.checkin_shop_id AS shop_id,t?.checkin_employee_id AS employee_id,t?.external_user_id AS externalUserId,ifnull(t?.member_name,ifnull(t?.external_user_name,?)) AS customer_name,ifnull(t?.mobile_no,?) AS mobile_no,t?.serial_number,DATE_FORMAT(t?.checkin_time,?) AS checkin_date,(CASE t?.`status` WHEN ? THEN ? ELSE ? END) AS `status`,if(t?.`status`=?,t?.finish_time,?) AS deal_time,ifnull(cds.sales_amount,?) AS deal_amount,ifnull(cds.sales_erp_id,?) AS sales_erp_id FROM v4_user.potential_customer t? LEFT JOIN v4_user.potential_customer_deal_sales cds ON t?.id=cds.potential_customer_id LEFT JOIN v4_user.cwx_external_user t? ON t?.tenant_id=t?.tenant_id AND t?.external_user_id=t?.external_user_id LEFT JOIN v4_user.member t? ON t?.tenant_id=t?.tenant_id AND t?.tenant_app_id=t?.tenant_app_id AND t?.external_user_id=t?.external_user_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<? LIMIT ? OFFSET ?|95|338|13||0|0|2620592|37692|3949|1190|
|v4_user|SELECT DATE_FORMAT(es.sales_date,?) AS statistic_date,DATE_FORMAT(es.sales_date,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,ifnull(sp.id,?) AS shop_id,ifnull(emp.id,es.employee_erp_id) AS employee_id,? AS saleStatus,count(t?.id) AS added FROM v4_sales.warranty t? JOIN v4_sales.erp_sales es ON es.tenant_id=t?.tenant_id AND es.id=t?.sales_id AND es.is_sales=? AND es.sales_status IN(?) LEFT JOIN tenant.employee emp ON es.tenant_id=emp.tenant_id AND es.employee_erp_id=emp.employee_erp_id LEFT JOIN v4_employee.shop sp ON es.tenant_id=sp.tenant_id AND es.dept_erp_id=sp.dept_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,sp.id,emp.id,es.employee_erp_id,DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.sales_date,?),DATE_FORMAT(t?.create_time,?) LIMIT ? OFFSET ?|77|148|6||0|0|33672325|571132|1036|104|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.reception_customer_id,t?.create_time AS tryonTime,t?.content FROM v4_user.reception_customer_log t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.oper_type=? AND t?.create_time>=? AND t?.create_time<? LIMIT ? OFFSET ?|74|88|2||0|0|24407920|330434|2|1|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,(CASE t?.customer_type WHEN ? THEN ? ELSE ? END) AS customer_type,ifnull(t?.external_user_id,?) AS external_user_id,ifnull(t?.member_id,?) AS member_id,t?.oper_status,t?.recept_time,t?.checkin_labels FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<? LIMIT ? OFFSET ?|73|310|11||0|0|4692487|107544|376|142|
|account|SELECT t.tenant_id,t.tenant_app_id,t.gift_product_id,t.shop_id,t.statistic_date,t.busi_date,sum(t.quantity)take_amount,sum(t.pay_price)take_score FROM (SELECT date_format(if(td.take_type=?,tp.create_time,td.write_off_time),?)statistic_date,date_format(td.create_time,?)busi_date,td.tenant_id,td.tenant_wechatapp_id tenant_app_id,td.product_id gift_product_id,if(td.take_type=?,?,ifnull(ws.dept_erp_id,?))shop_id,td.quantity,td.pay_price FROM gift_mail.trade td LEFT JOIN gift_mail.trade_take tt ON td.tenant_wechatapp_id=tt.tenant_wechatapp_id AND td.id=tt.trade_id LEFT JOIN tenant.tenant_wechatapp_shop ws ON tt.take_shop_id=ws.id LEFT JOIN gift_mail.trade_express tp ON td.id=tp.trade_id WHERE td.tenant_wechatapp_id=? AND ((td.take_type=? AND td.order_status=? AND tp.create_time>=? AND tp.create_time<=?) OR (td.take_type=? AND td.order_status=? AND td.write_off_time>=? AND td.write_off_time<=?)))t GROUP BY t.tenant_id,t.tenant_app_id,t.gift_product_id,t.shop_id,t.statistic_date,t.busi_date LIMIT ? OFFSET ?|71|317|12||0|0|1139401|22795|56|33|
|v4_user|SELECT DISTINCT t?.id,t?.tenant_id,t?.tenant_app_id,? AS collectType,t?.combine_status,t?.combine_id FROM v4_user.wx_user_subscribe_log t? JOIN v4_user.wx_user t? ON t?.wx_user_id=t?.id JOIN v4_user.member t? ON t?.member_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.subscribe_time>=? AND t?.subscribe_time<? AND t?.subscribe_status=?|70|153|9||0|0|14748192|381010|540|51|
|v4_user|SELECT tt.statistic_date,tt.statistic_month,tt.busi_date,tt.tenant_id,tt.tenant_app_id,tt.shop_id,tt.employee_id,tt.task_type,tt.task_template_id,tt.task_name,? AS status,sum(sale_count) AS sales,sum(sale_amount) AS amount FROM (SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=DATE_FORMAT(t?.create_time,?) AND es.sales_date<date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.create_time,?) UNION ALL SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) AND es.sales_date<(DATE_ADD(DATE_FORMAT(t?.finish_time,?),INTERVAL ? MONTH)-INTERVAL DAY(DATE_FORMAT(t?.finish_time,?))-? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time IS NOT ? AND es.create_time>=? AND es.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.create_time,?))tt GROUP BY tt.statistic_date,tt.statistic_month,tt.busi_date,tt.tenant_id,tt.tenant_app_id,tt.shop_id,tt.employee_id,tt.task_type,tt.task_template_id,tt.task_name LIMIT ? OFFSET ?|53|503|164||0|0|12030993|1500865|556|213|
|v4_user|SELECT DATE_FORMAT(t?.sales_date,?) AS statistic_date,DATE_FORMAT(t?.sales_date,?) AS statistic_month,? AS statistic_version,DATE_FORMAT(t?.create_time,?) AS busi_date,? AS sale_status,t?.tenant_id,t?.tenant_app_id,ifnull(sp.id,?) AS shop_id,ifnull(emp.id,?) AS employee_id,count(*) AS sales_order,ifnull(sum(t?.amount),?) AS sales_amount,ifnull(sum(if(t?.member_erp_id=?,?,?)),?) AS no_sales_order,ifnull(sum(if(t?.member_erp_id=?,t?.amount,?)),?) AS no_sales_amount,ifnull(sum(if(t?.member_erp_id>? AND t?.member_status=?,?,?)),?) AS new_sales_order,ifnull(sum(if(t?.member_erp_id>? AND t?.member_status=?,t?.amount,?)),?) AS new_sales_amount FROM v4_sales.erp_sales t? JOIN v4_sales.erp_sales_extend? t? ON t?.tenant_id=t?.tenant_id AND t?.id=t?.id LEFT JOIN v4_employee.shop sp ON t?.tenant_id=sp.tenant_id AND t?.dept_erp_id=sp.dept_id LEFT JOIN tenant.employee emp ON t?.tenant_id=emp.tenant_id AND t?.employee_erp_id=emp.employee_erp_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND t?.is_sales=? AND t?.sales_status IN(?) GROUP BY t?.tenant_id,t?.tenant_app_id,sp.id,emp.id,DATE_FORMAT(t?.sales_date,?),DATE_FORMAT(t?.sales_date,?),DATE_FORMAT(t?.create_time,?) LIMIT ? OFFSET ?|51|177|7||0|0|43743813|1356845|241643|5000|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_wechatapp_id AS tenantAppId,t?.order_id,t?.sales_index,t?.product_id AS goodsId,t?.product_name AS goodsName,t?.spec,t?.art_no,t?.price,t?.quantity,t?.total_fee,t?.payment_fee,t?.discount_fee,t?.integral FROM `order`.order_detail t? WHERE t?.tenant_wechatapp_id=? AND t?.create_time>=? AND t?.create_time<=? LIMIT ? OFFSET ?|46|136|5||0|0|12264187|266640|0|0|
|account|SELECT tm.id,tm.tenant_id,tm.tenant_app_id,tu.user_id AS external_user_id,? updateTime FROM corpwx.external_user tu INNER JOIN user_service.tenant_member_bind tm ON tu.tenant_id=tm.tenant_id AND tm.tenant_app_id=? AND tu.union_id=tm.wx_union_id WHERE tu.tenant_id=? AND tu.un_assign_flag=? AND tu.union_id IS NOT ? AND tu.update_time>=? AND tu.update_time<=? ORDER BY id LIMIT ? OFFSET ?|37|268|35||0|0|470821|31052|531|242|
|account|SELECT t.id,t.tenant_id AS tenantId,t.tenant_app_id AS tenantAppId,mb.erp_member_id AS memberId,ifnull(t.member_image_time,tui.update_time) AS memberImageTime FROM customer.tenant_user_image tui JOIN user_service.tenant_member_info t ON t.tenant_id=? AND t.tenant_app_id=tui.tenant_app_id AND t.user_id=tui.user_id JOIN user_service.tenant_member_bind mb ON t.tenant_id=mb.tenant_id AND t.id=mb.id AND mb.erp_member_id>? WHERE tui.tenant_app_id=? AND tui.is_drawed_img=? AND tui.update_time>=? AND tui.update_time<=? LIMIT ? OFFSET ?|35|93|5||0|0|25885090|1193563|144|64|
|v4_user|SELECT t.id,t.tenant_id,ifnull(if(t.dept_erp_id=?,e.dept_erp_id,t.dept_erp_id),?) AS dept_erp_id,t.employee_id,t.external_user_id,t.corp_user_id AS employeeCorpId,t.oper_type,t.create_time AS oper_time FROM v4_user.employee_external_bind_log t LEFT JOIN tenant.employee e ON t.employee_id=e.id WHERE t.tenant_id=? AND t.create_time>=? AND t.create_time<? LIMIT ? OFFSET ?|33|41|2||0|0|6552075|300190|257|34|
|v4_user|SELECT count(*) FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.task_template_id=t?.id AND t?.status=? WHERE t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time IS ? AND (t?.start_time<=CURRENT_DATE AND t?.end_time>CURRENT_DATE)|31|67|4||0|0|7066728|311115|31|1|
|v4_user|SELECT count(DISTINCT if(es.sales_status=?,concat(es.dept_erp_id,?,es.sales_date),?)) AS saleNum,sum(if(es.sales_status=?,esd.amount_total,?)) AS totalSaleAmount,min(if(es.sales_status=?,es.sales_date,?)) AS firstSaleTime,max(if(es.sales_status=?,es.sales_date,?)) AS lastSaleTime,GROUP_CONCAT(DISTINCT if(es.sales_status=?,DATE_FORMAT(es.sales_date,?),?)) AS saleTimes FROM v4_sales.erp_sales es JOIN v4_sales.erp_sales_detail esd ON es.tenant_id=esd.tenant_id AND es.tenant_app_id=esd.tenant_app_id AND es.sales_erp_id=esd.sales_erp_id AND esd.sales_type IN(?) WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.member_erp_id IN (?) AND es.is_sales=? AND es.sales_status>=?|30|77|6||0|0|996302|39904|30|1|
|v4_user|SELECT DATE_FORMAT(es.sales_date,?) AS statistic_date,DATE_FORMAT(es.sales_date,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,ifnull(sp.id,?) AS shop_id,ifnull(emp.id,es.employee_erp_id) AS employee_id,? AS saleStatus,count(t?.id) AS `should` FROM v4_sales.warranty_can_added t? JOIN v4_sales.erp_sales es ON es.tenant_id=t?.tenant_id AND es.id=t?.sales_id AND es.is_sales=? AND es.sales_status IN(?) LEFT JOIN tenant.employee emp ON es.tenant_id=emp.tenant_id AND es.employee_erp_id=emp.employee_erp_id LEFT JOIN v4_employee.shop sp ON es.tenant_id=sp.tenant_id AND es.dept_erp_id=sp.dept_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,sp.id,emp.id,es.employee_erp_id,DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.sales_date,?),DATE_FORMAT(t?.create_time,?) LIMIT ? OFFSET ?|30|63|5||0|0|6387073|369402|934|104|
|account|SELECT od.tenant_id,od.tenant_app_id,od.activity_id,count(*)join_amount FROM activity_service.online_sign_user_sign_log od WHERE od.tenant_app_id=? AND od.create_time>=? AND od.create_time<=? GROUP BY od.tenant_id,od.tenant_app_id,od.activity_id|29|52|5||0|0|13920562|480093|0|0|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.member_erp_id,ifnull(group_concat(DISTINCT if(es.sales_status=?,sd.category_erp_id,?)),?)categoryId,ifnull(group_concat(DISTINCT if(es.sales_status=?,ifnull(pc.category_name,sd.category_name),?)),?) AS categoryName,min(if(es.sales_status=?,es.sales_date,?)) AS firstSalesTime,max(if(es.sales_status=?,es.sales_date,?)) AS lastSalesTime FROM tenant.erp_sales es INNER JOIN tenant.erp_sales_detail sd ON sd.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=sd.tenant_wechatapp_id AND es.sales_erp_id=sd.sales_erp_id AND sd.sales_type=? LEFT JOIN tenant.erp_product_category pc ON es.tenant_id=pc.tenant_id AND sd.category_erp_id=pc.category_erp_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.is_sales=? AND es.sales_status>=? AND es.member_erp_id IN (?) GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.member_erp_id|28|424|46||0|0|2243719|203487|1537|241|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `should` FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.create_time>=? AND t?.create_time<? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(t?.create_time,?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|25|62|9||0|0|3105004|311681|3867|400|
|account|SELECT t.id,t.tenant_id AS tenantId,t.tenant_app_id AS tenantAppId,tui.user_id AS memberId,tui.update_time AS memberImageTime FROM customer.tenant_user_image tui JOIN user_service.tenant_member_info t ON t.tenant_id=? AND t.tenant_app_id=tui.tenant_app_id AND t.user_id=tui.user_id WHERE tui.tenant_app_id=? AND tui.is_drawed_img=? AND tui.update_time>=? AND tui.update_time<=? AND (t.member_image_flag=? OR t.member_image_flag IS ?) LIMIT ? OFFSET ?|20|27|1||0|0|8824134|483291|0|0|
|account|SELECT t.tenant_id,t.tenant_app_id,t.coupon_id,t.statistic_date,t.create_channel,t.coupon_type,t.busi_date,ifnull(sum(ifnull(t.total_fee,?)),?)amount FROM (SELECT cu.tenant_id,cu.tenant_app_id,cu.template_id coupon_id,cu.source create_channel,date_format(od.payment_time,?)statistic_date,cu.coupon_type,od.total_fee,date_format(cu.create_time,?)busi_date FROM `order`.order_info od INNER JOIN coupon_service.coupon cu ON od.tenant_wechatapp_id=cu.tenant_app_id AND od.coupon_id=cu.id WHERE od.tenant_wechatapp_id=? AND od.status>=? AND od.payment_time>=? AND od.payment_time<=?)t GROUP BY t.tenant_id,t.tenant_app_id,t.coupon_id,t.statistic_date,t.create_channel,t.coupon_type,t.busi_date LIMIT ? OFFSET ?|14|36|7||0|0|175109|43530|0|0|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `failed` FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.end_time>=DATE_ADD(?,INTERVAL ? day) AND t?.end_time<DATE_ADD(?,INTERVAL ? day) AND t?.finish_time IS ? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|14|26|3||0|0|2604364|311475|1033|180|
|v4_user|SELECT tt.statistic_date,tt.statistic_month,tt.busi_date,tt.tenant_id,tt.tenant_app_id,tt.shop_id,tt.employee_id,tt.task_type,tt.task_template_id,tt.task_name,? AS status,sum(sale_count) AS sales,sum(sale_amount) AS amount FROM (SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=DATE_FORMAT(t?.start_time,?) AND es.sales_date<date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`!=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.create_time,?) UNION ALL SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) AND es.sales_date<DATE_FORMAT(t?.end_time,?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`!=? AND es.create_time>=? AND es.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.create_time,?))tt GROUP BY tt.statistic_date,tt.statistic_month,tt.busi_date,tt.tenant_id,tt.tenant_app_id,tt.shop_id,tt.employee_id,tt.task_type,tt.task_template_id,tt.task_name LIMIT ? OFFSET ?|12|112|44||0|0|6002058|1716563|24|14|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `should` FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.create_time>=? AND t?.create_time<? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(t?.create_time,?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|11|56|20||0|0|3631957|855379|0|0|
|v4_user|SELECT t.id,t.tenant_id,t.tenant_app_id,t.shop_id AS belongShopId,t.member_name,t.mobile_no,t.recommend_id,t.head_img_url,t.sex,t.create_time AS registerTime,t.birthday,ifnull(t.birthday_is_lunar,?) AS birthdayIsLunar,t.memorial_name,t.memorial_day,ifnull(t.memorial_day_is_lunar,?) AS memorialDayIsLunar,ifnull(w.is_subscribe,?) AS subscribeFlag,w.subscribe_time,w.cancel_subscribe_time,w.nick_name AS wxNickName,t.wx_union_id,t.h5_open_id,t.mini_open_id,if(t.external_user_id IS NOT ? AND t.external_user_id!=?,?,?) AS externalUserFlag,t.external_user_id,t.status,t.combine_status,t.combine_id FROM v4_user.member t LEFT JOIN v4_user.wx_user w ON t.h5_open_id=w.open_id WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.create_time>=? AND t.create_time<? ORDER BY t.id LIMIT ? OFFSET ?|8|14|2||0|0|1344033|333179|407|116|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `failed` FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.end_time>=DATE_ADD(?,INTERVAL ? day) AND t?.end_time<DATE_ADD(?,INTERVAL ? day) AND t?.finish_time IS ? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|8|20|3||0|0|3380512|855379|0|0|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status,count(*) AS total,ifnull(sum(CASE WHEN t?.customer_type=? OR (ifnull(t?.external_user_id,?)=? AND t?.member_id=?) THEN ? ELSE ? END),?)+count(DISTINCT CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id ELSE ? END)+count(DISTINCT CASE WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE ? END) AS persons FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND t?.first_enter_shop=? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status LIMIT ? OFFSET ?|8|21|7||0|0|278911|107468|190|47|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(t?.finish_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `finished` FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(t?.finish_time,?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|8|16|4||0|0|1537232|311487|1257|379|
|v4_user|SELECT count(*)_count FROM v4_employee.task_task WHERE tenant_id=? AND tenant_app_id=? AND shop_id=? AND employee_id=? AND task_type=? AND finish_time>=? AND finish_time<DATE_ADD(?,INTERVAL ? Day)|6|8|1||0|0|13579|3701|6|1|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.update_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,? AS `status`,?*count(es.id) AS sales,?*sum(es.amount) AS amount FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status=? AND es.sales_date>=DATE_FORMAT(t?.create_time,?) AND es.sales_date<(DATE_ADD(DATE_FORMAT(t?.finish_time,?),INTERVAL ? MONTH)-INTERVAL DAY(DATE_FORMAT(t?.finish_time,?))-? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time IS NOT ? AND es.update_time>=? AND es.update_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.update_time,?) LIMIT ? OFFSET ?|6|12|4||0|0|336798|93648|1|1|
|v4_user|SELECT DATE_FORMAT(t.finish_time,?) AS statistic_date,DATE_FORMAT(t.finish_time,?) AS statistic_month,t.tenant_id,t.tenant_app_id,sp.id AS shop_id,t.employee_id,count(*) AS tag FROM v4_employee.mark_label_task t LEFT JOIN tenant.employee emp ON t.tenant_id=emp.tenant_id AND t.employee_id=emp.id LEFT JOIN v4_employee.shop sp ON t.tenant_id=sp.tenant_id AND emp.dept_erp_id=sp.dept_id WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.`status`=? AND t.finish_time>=? AND t.finish_time<? GROUP BY DATE_FORMAT(t.finish_time,?),DATE_FORMAT(t.finish_time,?),t.tenant_id,t.tenant_app_id,sp.id,t.employee_id LIMIT ? OFFSET ?|5|10|3||0|0|689075|248000|119|55|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,t?.registry_shop_id AS shop_id,t?.source_id AS employee_id,? AS statisticDate,? AS bizType,count(*) AS amount FROM v4_user.member_source t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.source_type=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.registry_shop_id,t?.source_id LIMIT ? OFFSET ?|5|7|1||0|0|951268|333177|101|53|
|v4_user|SELECT es.tenant_id AS tenantId,es.tenant_app_id AS tenantAppId,es.member_erp_id AS id,count(DISTINCT if(es.sales_status=?,concat(es.dept_erp_id,?,es.sales_date),?)) AS saleNum,sum(if(es.sales_status=?,esd.amount_total,?)) AS totalSaleAmount,min(if(es.sales_status=?,es.sales_date,?)) AS firstSaleTime,max(if(es.sales_status=?,es.sales_date,?)) AS lastSaleTime,GROUP_CONCAT(DISTINCT if(es.sales_status=?,DATE_FORMAT(es.sales_date,?),?)) AS saleTimes FROM v4_sales.erp_sales es JOIN v4_sales.erp_sales_detail esd ON es.tenant_id=esd.tenant_id AND es.tenant_app_id=esd.tenant_app_id AND es.sales_erp_id=esd.sales_erp_id AND esd.sales_type IN(?) WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.is_sales=? AND es.sales_status>=? AND es.member_erp_id IN (?) GROUP BY es.tenant_id,es.tenant_app_id,es.member_erp_id|5|7|1||0|0|36047|16657|254|100|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(t?.finish_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(*) AS `finished` FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(t?.finish_time,?),t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name LIMIT ? OFFSET ?|5|20|9||0|0|2208321|855379|0|0|
|v4_user|SELECT t?.tenant_id,sp.tenant_app_id,sp.id AS shop_id,t?.id AS employee_id,sum(if(t?.oper_type=?,?,?)) AS `add`,sum(if(t?.oper_type=?,?,?)) AS `emp_del_customer`,sum(if(t?.oper_type=?,?,?)) AS `customer_del_emp` FROM v4_user.employee_external_bind_log t? JOIN tenant.employee t? ON t?.tenant_id=t?.tenant_id AND t?.employee_id=t?.id JOIN v4_employee.shop sp ON t?.tenant_id=sp.tenant_id AND t?.dept_erp_id=sp.dept_id WHERE t?.tenant_id=? AND sp.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,sp.tenant_app_id,sp.id,t?.id LIMIT ? OFFSET ?|5|8|2||0|0|1650069|739386|203|79|
|v4_user|SELECT es.tenant_id AS tenantId,es.tenant_app_id AS tenantAppId,es.member_erp_id AS id,count(DISTINCT if(es.sales_status=?,concat(es.dept_erp_id,?,es.sales_date),?)) AS saleNum,sum(if(es.sales_status=?,esd.amount_total,?)) AS totalSaleAmount,min(if(es.sales_status=?,es.sales_date,?)) AS firstSaleTime,max(if(es.sales_status=?,es.sales_date,?)) AS lastSaleTime,GROUP_CONCAT(DISTINCT if(es.sales_status=?,DATE_FORMAT(es.sales_date,?),?)) AS saleTimes FROM v4_sales.erp_sales es JOIN v4_sales.erp_sales_detail esd ON es.tenant_id=esd.tenant_id AND es.tenant_app_id=esd.tenant_app_id AND es.sales_erp_id=esd.sales_erp_id AND esd.sales_type IN(?) WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.is_sales=? AND es.sales_status>=? AND es.member_erp_id IN|4|5|1||0|0|35027|9495|2000|500|
|employee|SELECT * FROM `backlog_?`|4|25|17||0|0|2136508|1400874|2136508|1400874|
|account|SELECT DISTINCT vu.tenant_wechatapp_id tenant_app_id,date_format(vu.create_time,?)statistic_date,date_format(ue.sales_date,?)busi_date FROM value_added.value_added_user vu INNER JOIN value_added.value_added_user_extend ue ON vu.id=ue.id WHERE vu.tenant_wechatapp_id=? AND vu.update_time>=? AND vu.update_time<=? AND vu.state=? AND ue.sales_date IS NOT ?|4|8|2||0|0|37682|11515|0|0|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,t?.id,min(t?.recept_time) AS firstShopTime,max(t?.recept_time) AS lastShopTime,count(t?.id) AS enterShopNum FROM v4_user.reception_customer t? JOIN v4_user.member t? ON t?.tenant_id=t?.tenant_id AND t?.tenant_app_id=t?.tenant_app_id AND t?.external_user_id=t?.external_user_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.id IN (?) GROUP BY t?.tenant_id,t?.tenant_app_id,t?.id|3|9|4||0|0|2063940|910744|259|93|
|account|SELECT DISTINCT tenant_wechatapp_id tenant_app_id,date_format(payment_time,?)statistic_date FROM `order`.order_info WHERE tenant_wechatapp_id=? AND status=? AND finish_type IN (?) AND cancel_time>=? AND cancel_time<=?|3|3|1||0|0|57128|19045|0|0|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS try_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS potential_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS deal_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS tryNum,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS potentialNum,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS dealNum FROM v4_user.reception_customer t? JOIN v4_user.reception_customer_log t? ON t?.id=t?.reception_customer_id AND t?.oper_type IN(?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND t?.first_enter_shop=? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status LIMIT ? OFFSET ?|3|4|1||0|0|676675|330741|75|46|
|v4_user|SELECT DATE_FORMAT(t.finish_time,?) AS statistic_date,DATE_FORMAT(t.finish_time,?) AS statistic_month,t.tenant_id,t.tenant_app_id,t.finish_shop_id AS shop_id,t.maintain_employee_id AS employee_id,t.fail_reason,count(*) AS total FROM v4_user.potential_customer t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.`status`=? AND t.finish_time>=? AND t.finish_time<? GROUP BY DATE_FORMAT(t.finish_time,?),DATE_FORMAT(t.finish_time,?),t.tenant_id,t.tenant_app_id,t.finish_shop_id,t.maintain_employee_id,t.fail_reason LIMIT ? OFFSET ?|3|13|7||0|0|103612|36568|28|14|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.sales_date,es.dept_erp_id,es.employee_erp_id erpEmployeeId,sd.category_erp_id FROM tenant.erp_sales es JOIN tenant.erp_sales_detail sd ON sd.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=sd.tenant_wechatapp_id AND es.sales_erp_id=sd.sales_erp_id JOIN tenant.erp_sales_extend ee ON ee.tenant_id=sd.tenant_id AND sd.tenant_wechatapp_id=ee.tenant_wechatapp_id AND sd.sales_erp_id=ee.sales_erp_id AND sd.sales_index=ee.sales_index AND ee.not_add_value_plan=? WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND ee.create_time>=? AND ee.create_time<=? ORDER BY sd.id LIMIT ? OFFSET ?|3|3|1||0|0|55239|28594|5|3|
|account|SELECT ut.tenant_id,ut.tenant_wx_app_id tenant_app_id,ut.user_id,ut.create_time lastLoginTime FROM authorization_service.user_login_token ut WHERE ut.tenant_wx_app_id=? AND ut.create_time>=? AND ut.create_time<=? LIMIT ? OFFSET ?|3|3|1||0|0|3942|1496|3942|1496|
|v4_user|SELECT DATE_FORMAT(tt?.recept_time,?) AS statistic_date,DATE_FORMAT(tt?.recept_time,?) AS statistic_month,tt?.tenant_id,tt?.tenant_app_id,tt?.shop_id,tt?.employee_id,tt?.fieldName,tt?.fieldValue,count(*) AS total FROM (SELECT t?.recept_time,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,? AS fieldName,TRIM(? FROM JSON_EXTRACT(t?.checkin_labels,concat(SUBSTRING(TRIM(? FROM JSON_SEARCH(t?.checkin_labels,?,?)),?,LOCATE(?,TRIM(? FROM JSON_SEARCH(t?.checkin_labels,?,?)))-?),?))) AS fieldValue FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND JSON_CONTAINS(t?.checkin_labels,JSON_OBJECT(?,?)))tt? GROUP BY DATE_FORMAT(tt?.recept_time,?),DATE_FORMAT(tt?.recept_time,?),tt?.tenant_id,tt?.tenant_app_id,tt?.shop_id,tt?.employee_id,tt?.fieldName,tt?.fieldValue|3|3|1||0|0|322572|107602|174|97|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,? AS collectType,t?.combine_status,t?.combine_id FROM v4_user.reception_customer t? JOIN v4_user.member t? ON t?.tenant_id=t?.tenant_id AND t?.tenant_app_id=t?.tenant_app_id AND t?.external_user_id=t?.external_user_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.id LIMIT ? OFFSET ?|3|3|1||0|0|89150|58696|53|25|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.member_id AS id,t.total_sale_points AS totalSalePoints,t.total_used_points AS totalUsedPoints,t.balance AS balancePoints,t.total_add_points AS totalAddPoints,if(t.total_add_points>?,t.update_time,?) AS lastChangePointsTime,ifnull(m.combine_status,?) AS combineStatus,ifnull(m.combine_id,m.id) AS combineId FROM v4_user.member_points t JOIN v4_user.member m ON t.tenant_id=m.tenant_id AND t.member_id=m.id WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.update_time>=? AND t.update_time<? ORDER BY t.id LIMIT ? OFFSET ?|3|3|1||0|0|668831|333209|251|171|
|tenant|SELECT * FROM `erp_sales`|2|953|904||0|0|39599722|33519482|39599722|33519482|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status,count(*) AS total,ifnull(sum(CASE WHEN t?.customer_type=? OR (ifnull(t?.external_user_id,?)=? AND t?.member_id=?) THEN ? ELSE ? END),?)+count(DISTINCT CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id ELSE ? END)+count(DISTINCT CASE WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE ? END) AS persons FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status LIMIT ? OFFSET ?|2|6|4||0|0|215088|107549|194|108|
|account|SELECT eu.tenant_id,eu.tenant_wechatapp_id tenant_app_id,eu.user_id user_id,eu.employee_erp_id employee_user_id,? update_time FROM user_service.user_employee eu WHERE eu.tenant_wechatapp_id=? AND eu.update_time>=? AND eu.update_time<=? LIMIT ? OFFSET ?|2|5|3||0|0|3651|1839|3651|1839|
|account|SELECT gs.id,tw.tenant_id,tw.id tenant_app_id,gs.goods_name product_name FROM goods.goods gs INNER JOIN tenant.tenant_wechatapp tw ON gs.tenant_id=tw.tenant_id WHERE tw.id=? AND gs.create_time>=? AND gs.create_time<=? ORDER BY gs.id LIMIT ? OFFSET ?|2|2|1||0|0|32146|16073|0|0|
|v4_user|SELECT t.change_time FROM v4_user.member_change_log t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.member_id=? AND t.change_type=? ORDER BY t.id ASC LIMIT ?|2|25|14||0|0|2185367|1241463|0|0|
|account|SELECT pd.id product_id,? tenant_id,? tenant_wechatapp_id,pd.product_name,? product_type,pd.tag_price price,it.volume,it.id inventory_id,pd.create_time,? partner_id,? partner_name,pd.update_time FROM gift_mail.platform_product pd LEFT JOIN gift_mail.platform_inventory it ON pd.id=it.product_id LIMIT ? OFFSET ?|2|2|1||0|0|8752|4376|4376|2188|
|account|SELECT ur.tenant_id,ur.tenant_app_id,ur.user_id,ur.enter_shop_time FROM customer.tenant_user_received ur WHERE ur.tenant_app_id=? AND ur.create_time>=? AND ur.create_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|8010|8010|4|4|
|account|SELECT * FROM `account_flow`|1|118|118||0|0|16319806|16319806|16319806|16319806|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.registry_shop_id AS shopId,? AS statisticDate,t.source_type AS memberSource,count(*)amount FROM v4_user.member_source t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.create_time>=? AND t.create_time<? GROUP BY t.tenant_id,t.tenant_app_id,t.registry_shop_id,t.source_type LIMIT ? OFFSET ?|1|1|1||0|0|290953|290953|32|32|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_wechatapp_id AS tenantAppId,tb.erp_member_id AS memberId,t?.order_no,(CASE t?.source WHEN ? THEN ? ELSE ? END) AS orderSource,t?.product_fee AS totalGoodsFee,t?.discount_fee AS discountFee,t?.total_fee AS shouldPayFee,t?.online_wait_fee,t?.payment_fee,t?.payment_time,t?.offline_wait_fee,t?.offline_payment_fee,t?.freight_fee,t?.create_time AS orderTime,t?.send_time,t?.receive_time,t?.finish_time,t?.comment_time,t?.refund_start_time,t?.refund_end_time,t?.return_start_time,t?.return_end_time,(CASE t?.pay_way WHEN ? THEN ? ELSE ? END) AS payWay,(CASE t?.take_type WHEN ? THEN ? ELSE ? END)takeType,ifnull(t?.take_shop_id,?) AS take_shop_id,ifnull(t?.take_employee_id,?) AS take_employee_id,ifnull(t?.user_employee_id,?) AS user_employee_id,t?.manager_brokerage AS butlerBrokerage,(CASE t?.`status` WHEN ? THEN ? ELSE ? END) AS orderStatus,(CASE t?.finish_type WHEN ? THEN ? ELSE ? END)AS finishType,(CASE t?.business_type WHEN ? THEN ? ELSE ? END) AS shareSource,(CASE t?.share_user_type WHEN ? THEN t?.share_user_id ELSE ? END)share_employee_id,(CASE t?.share_user_type WHEN ? THEN t?.share_user_id ELSE ? END)shareMemberId FROM `order`.order_info t? JOIN user_service.tenant_member_bind tb ON tb.tenant_id=t?.tenant_id AND tb.tenant_app_id=t?.tenant_wechatapp_id AND tb.user_id=t?.user_id AND tb.tenant_id=? LEFT JOIN goods.share_detail t? ON t?.id=t?.order_id LEFT JOIN (SELECT s?.id,s?.business_type,s?.share_user_type,tb.erp_member_id AS share_user_id FROM goods.`share` s? JOIN user_service.tenant_member_bind tb ON tb.tenant_id=s?.tenant_id AND tb.tenant_app_id=s?.tenant_app_id AND tb.user_id=s?.share_user_id AND tb.tenant_id=? WHERE s?.tenant_app_id=? AND s?.share_user_type=? UNION ALL SELECT s?.id,s?.business_type,s?.share_user_type,s?.share_user_id FROM goods.`share` s? WHERE s?.tenant_app_id=? AND s?.share_user_type=?)t? ON t?.share_id=t?.id WHERE t?.tenant_wechatapp_id=? AND t?.update_time>=? AND t?.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|177772|177772|16|16|
|user_service|SELECT * FROM `user_employee_alloc_log`|1|113|113||0|0|23642123|23642123|23642123|23642123|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS try_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS potential_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,t?.id,?)) AS deal_total,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS tryNum,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS potentialNum,count(DISTINCT if(t?.oper_status&?>? AND t?.oper_type=?,(CASE WHEN t?.customer_type=? AND t?.member_id>? THEN t?.member_id WHEN t?.customer_type=? AND ifnull(t?.external_user_id,?)!=? THEN t?.external_user_id ELSE t?.id END),?)) AS dealNum FROM v4_user.reception_customer t? JOIN v4_user.reception_customer_log t? ON t?.id=t?.reception_customer_id AND t?.oper_type IN(?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id,t?.employee_id,t?.customer_type,t?.member_status LIMIT ? OFFSET ?|1|1|1||0|0|330545|330545|13|13|
|employee|SELECT * FROM `batch_step_execution_context`|1|2|2||0|0|334225|334225|334225|334225|
|employee|SELECT * FROM `backlog_bak`|1|2|2||0|0|66096|66096|66096|66096|
|v4_user|SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.update_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,? AS `status`,?*count(es.id) AS sales,?*sum(es.amount) AS amount FROM v4_employee.task_task t? JOIN v4_employee.task_invite_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status=? AND es.sales_date>=DATE_FORMAT(t?.start_time,?) AND es.sales_date<DATE_FORMAT(t?.end_time,?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`!=? AND t?.finish_time IS NOT ? AND es.update_time>=? AND es.update_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.update_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|127075|127075|0|0|
|employee|SELECT * FROM `label_task_employee`|1|5|5||0|0|1039876|1039876|1039876|1039876|
|employee|SELECT * FROM `batch_step_execution`|1|1|1||0|0|334225|334225|334225|334225|
|account|SELECT es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.member_erp_id,es.sales_erp_id lastSaleErpId,sd.category_erp_id lastCategoryId,ifnull(pc.category_name,sd.category_name) AS lastCategoryName,sd.stone_weight lastStoneWeight,sd.gold_weight lastGoldWeight,round(sd.amount_pay/if(sd.quantity=?,?,sd.quantity),?)price,sd.amount_pay salesBalance FROM tenant.erp_sales es INNER JOIN tenant.erp_sales_detail sd ON sd.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=sd.tenant_wechatapp_id AND es.sales_erp_id=sd.sales_erp_id LEFT JOIN tenant.erp_product_category pc ON es.tenant_id=pc.tenant_id AND sd.category_erp_id=pc.category_erp_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.member_erp_id=? AND es.sales_date>=? AND es.sales_status=? AND es.is_sales=? AND sd.sales_type=? ORDER BY es.sales_erp_id DESC,price DESC LIMIT ?|1|6|6||0|0|9972|9972|1|1|
|account|SELECT t.tenant_id,t.tenant_app_id,t.mall_product_id,t.shop_id,t.statistic_date,t.busi_date,sum(t.quantity)take_amount,sum(t.total_fee)take_order_fee FROM (SELECT date_format(if(od.take_type=?,od.send_time,od.receive_time),?)statistic_date,date_format(if(od.take_type=?,od.send_time,od.receive_time),?)busi_date,od.tenant_id,od.tenant_wechatapp_id tenant_app_id,dt.product_id mall_product_id,if(od.take_type=?,?,ifnull(ws.dept_erp_id,?))shop_id,dt.quantity,od.total_fee FROM `order`.order_info od INNER JOIN `order`.order_detail dt ON od.id=dt.order_id LEFT JOIN tenant.tenant_wechatapp_shop ws ON od.take_shop_id=ws.id WHERE od.tenant_wechatapp_id=? AND ((od.take_type=? AND od.receive_time>=? AND od.receive_time<=?) OR (od.take_type=? AND od.send_time>=? AND od.send_time<=?)))t GROUP BY t.tenant_id,t.tenant_app_id,t.mall_product_id,t.shop_id,t.statistic_date,t.busi_date LIMIT ? OFFSET ?|1|1|1||0|0|62596|62596|5|5|
|employee|SELECT * FROM `backlog_detail`|1|6|6||0|0|1429463|1429463|1429463|1429463|
|account|SELECT vau.id,vau.tenant_id,vau.tenant_wechatapp_id AS tenant_app_id,vaue.dept_erp_id AS erp_dept_id,vaue.employee_erp_id AS erp_emp_id,vau.user_id,DATE_FORMAT(vaue.sales_date,?) AS busi_date,vaue.category_erp_id,vau.amount_added AS value_add_amount,vau.state,vau.create_time,vau.update_time FROM value_added.value_added_user vau JOIN value_added.value_added_user_extend vaue ON vau.id=vaue.id WHERE vau.tenant_id=? AND vau.tenant_wechatapp_id=? AND vau.update_time>=? AND vau.update_time<=? ORDER BY vau.id LIMIT ? OFFSET ?|1|8|8||0|0|1665938|1665938|5000|5000|
|tenant|SELECT * FROM `erp_sales_back_?`|1|24|24||0|0|438960|438960|438960|438960|
|account|SELECT t.tenant_app_id,t.user_id,t.is_drawed_img FROM customer.tenant_user_image t WHERE t.tenant_app_id=? AND t.update_time>=? AND t.update_time<=? AND t.is_drawed_img=? GROUP BY t.tenant_app_id,t.user_id,t.is_drawed_img LIMIT ? OFFSET ?|1|1|1||0|0|5316|5316|0|0|
|item_manage|SELECT * FROM `task`|1|1|1||0|0|65359|65359|65359|65359|
|message_push|SELECT * FROM `message_log`|1|49|49||0|0|2808968|2808968|2808968|2808968|
|account|SELECT * FROM (SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.share_user_id AS user_id,t?.user_name AS user_name,t?.share_user_type AS user_identity,t?.business_id AS activity_id,t?.activity_name AS activity_name,DATE_FORMAT(oi.finish_time,?) AS busi_date,count(*) AS deal_amount,ifnull(sum(oi.total_fee),?) AS deal_money FROM goods.`share` t? JOIN goods.share_detail sd ON t?.id=sd.share_id JOIN ORDER.order_info oi ON sd.order_id=oi.id AND oi.tenant_wechatapp_id=? AND oi.status=? JOIN activity_service.activity t? ON t?.business_id=t?.id JOIN user_service.tenant_member t? ON t?.tenant_id=t?.tenant_id AND t?.tenant_app_id=t?.tenant_app_id AND t?.share_user_id=t?.user_id WHERE t?.tenant_app_id=? AND t?.share_user_type=? AND t?.business_type!=? AND oi.finish_time>=? AND oi.finish_time<=? GROUP BY t?.id,DATE_FORMAT(oi.finish_time,?) UNION ALL SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.share_user_id AS user_id,t?.employee_name AS user_name,t?.share_user_type AS user_identity,t?.business_id AS activity_id,t?.activity_name AS activity_name,DATE_FORMAT(oi.finish_time,?) AS busi_date,count(*) AS deal_amount,ifnull(sum(oi.total_fee),?) AS deal_money FROM goods.`share` t? JOIN goods.share_detail sd ON t?.id=sd.share_id JOIN ORDER.order_info oi ON sd.order_id=oi.id AND oi.tenant_wechatapp_id=? AND oi.status=? JOIN activity_service.activity t? ON t?.business_id=t?.id JOIN tenant.employee t? ON t?.share_user_id=t?.id WHERE t?.tenant_app_id=? AND t?.share_user_type=? AND t?.business_type!=? AND oi.finish_time>=? AND oi.finish_time<=? GROUP BY t?.id,DATE_FORMAT(oi.finish_time,?))tt ORDER BY tt.id ASC LIMIT ? OFFSET ?|1|1|1||0|0|17550|17550|0|0|
|v4_user|SELECT t?.tenant_id,sp.tenant_app_id,sp.id AS shop_id,t?.id AS employee_id,sum(if(t?.oper_type=?,?,?)) AS `add`,sum(if(t?.oper_type=?,?,?)) AS `emp_del_customer`,sum(if(t?.oper_type=?,?,?)) AS `customer_del_emp` FROM v4_user.employee_external_bind_log t? JOIN tenant.employee t? ON t?.tenant_id=t?.tenant_id AND t?.employee_id=t?.id JOIN v4_employee.shop sp ON t?.tenant_id=sp.tenant_id AND t?.dept_erp_id=sp.dept_id WHERE t?.tenant_id=? AND sp.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<|1|1|1||0|0|119427|119427|35|35|
|v4_user|SELECT tt.statistic_date,tt.statistic_month,tt.busi_date,tt.tenant_id,tt.tenant_app_id,tt.shop_id,tt.employee_id,tt.task_type,tt.task_template_id,tt.task_name,? AS status,sum(sale_count) AS sales,sum(sale_amount) AS amount FROM (SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=DATE_FORMAT(t?.create_time,?) AND es.sales_date<date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.`status`=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?),DATE_FORMAT(es.create_time,?) UNION ALL SELECT DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_date,DATE_FORMAT(DATE_ADD(t?.end_time,INTERVAL ? day),?) AS statistic_month,DATE_FORMAT(es.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,t?.task_type,t?.task_template_id,t?.task_name,count(es.id) AS sale_count,sum(es.amount) AS sale_amount FROM v4_employee.task_task t? JOIN v4_employee.task_system_task_template t? ON t?.tenant_id=t?.tenant_id AND t?.task_template_id=t?.id JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND t?.member_id=es.member_erp_id AND es.is_sales=? AND es.sales_status IN(?) AND es.sales_date>=date_add(DATE_FORMAT(t?.finish_time,?),INTERVAL ? DAY) AND es.sales_date<(DATE_ADD(DATE_FORMAT(t?.finish_time,?),INTERVAL ? MONTH)-INTERVAL DAY(DATE_FORMAT(t?.finish_time,?))-? DAY) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND|1|2|2||0|0|221393|221393|1|1|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.user_id AS id,t.grade_id AS gradeId FROM v4_user.member_grade t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.update_time>=? AND t.update_time<? ORDER BY t.id LIMIT ? OFFSET ?|1|1|1||0|0|290953|290953|148|148|
|corpwx|SELECT * FROM `corp_mini_qrcode_params`|1|2|2||0|0|782183|782183|782183|782183|
|erp_sync|SELECT * FROM `cwx_checkin_sync_log`|1|7|7||0|0|265871|265871|265871|265871|
|v4_user|SELECT DATE_FORMAT(tt?.recept_time,?) AS statistic_date,DATE_FORMAT(tt?.recept_time,?) AS statistic_month,DATE_FORMAT(tt?.create_time,?) AS busiDate,tt?.tenant_id,tt?.tenant_app_id,tt?.shop_id,tt?.fieldName,tt?.fieldValue,count(*) AS total FROM (SELECT t?.id AS reception_customer_id,t?.recept_time,t?.create_time,t?.tenant_id,t?.tenant_app_id,t?.shop_id,? AS fieldName,TRIM(? FROM JSON_EXTRACT(t?.checkin_labels,concat(SUBSTRING(TRIM(? FROM JSON_SEARCH(t?.checkin_labels,?,?)),?,LOCATE(?,TRIM(? FROM JSON_SEARCH(t?.checkin_labels,?,?)))-?),?))) AS fieldValue FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND JSON_CONTAINS(t?.checkin_labels,JSON_OBJECT(?,?)))tt? GROUP BY DATE_FORMAT(tt?.recept_time,?),DATE_FORMAT(tt?.recept_time,?),DATE_FORMAT(tt?.create_time,?),tt?.tenant_id,tt?.tenant_app_id,tt?.shop_id,tt?.fieldName,tt?.fieldValue|1|1|1||0|0|107470|107470|31|31|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.recept_time,?) AS `hour`,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,count(*) AS total FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id LIMIT ? OFFSET ?|1|1|1||0|0|107548|107548|70|70|
|account|SELECT es.id,es.tenant_id,es.tenant_app_id,es.employee_id,ey.employee_erp_id,ey.employee_name,ey.mobile_no,es.shop_id,es.dept_erp_id,ws.shop_name,ey.corp_wx_user_id corp_user_id,es.`status` AS employee_status FROM tenant.employee_shop es LEFT JOIN tenant.employee ey ON es.employee_id=ey.id LEFT JOIN tenant.tenant_wechatapp_shop ws ON es.shop_id=ws.id WHERE es.tenant_app_id=? LIMIT ? OFFSET ?|1|1|1||0|0|8430|8430|2810|2810|
|employee|SELECT * FROM `batch_job_execution_params`|1|1|1||0|0|638134|638134|638134|638134|
|account|SELECT t?.id,t?.tenant_id AS tenantId,t?.tenant_wechatapp_id AS tenantAppId,t?.template_id,t?.dept_erp_id,t?.employee_erp_id,t?.sales_erp_id,t?.sales_index,tb.erp_member_id AS memberId,t?.amount_pay,t?.amount_added,(CASE t?.state WHEN ? THEN ? ELSE ? END) AS status,if(t?.state=?,t?.coupon_user_id,?) AS couponId,t?.start_add_time,t?.create_time AS operTime FROM value_added.value_added_user t? LEFT JOIN value_added.value_added_user_extend t? ON t?.id=t?.id JOIN user_service.tenant_member_bind tb ON tb.tenant_id=t?.tenant_id AND tb.tenant_app_id=t?.tenant_wechatapp_id AND tb.user_id=t?.user_id AND tb.tenant_id=? WHERE t?.tenant_wechatapp_id=? AND t?.update_time>=? AND t?.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|15000|15000|5000|5000|
