|数据库名称|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 ?|662|11854|271||0|0|20896823|369605|7760|5000|
|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 ?|346|711|16||0|0|74014392|548984|1129|120|
|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 ?|313|5904|162||0|0|10725370|369568|1627|127|
|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|235|1530|88||0|0|9199056|165709|6878|452|
|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 ?|175|783|47||0|0|3477288|39424|6012|1740|
|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 ?|142|584|23||0|0|6341327|108618|725|159|
|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|112|425|48||0|0|3837518|85854|4550|434|
|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 ?|102|381|11||0|0|1457283|26187|59|30|
|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 ?|83|183|13||0|0|28137196|339857|11|10|
|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 ?|75|140|5||0|0|35236878|574113|828|115|
|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 ?|73|159|11||0|0|12159124|303608|681|139|
|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>=?|61|168|11||0|0|2015444|45196|61|1|
|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)|55|95|5||0|0|77100|2891|55|1|
|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 ?|49|392|117||0|0|12320506|1508014|501|64|
|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 ?|49|141|4||0|0|13080321|266980|0|0|
|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=?|43|82|6||0|0|9511952|382603|471|109|
|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|42|461|54||0|0|3407117|205985|2764|434|
|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|31|70|7||0|0|14921475|481446|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 ?|30|245|34||0|0|424201|30986|429|315|
|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 ?|29|85|6||0|0|24202458|1194614|132|54|
|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)|29|98|18||0|0|6185112|315110|29|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(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 ?|28|64|9||0|0|3452231|315670|4744|427|
|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 ?|25|41|2||0|0|5525211|370989|958|128|
|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 ?|21|48|5||0|0|279963|43601|0|0|
|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 ?|21|29|1||0|0|8805542|483802|0|0|
|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 ?|15|107|35||0|0|6409109|1716569|20|12|
|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 ?|12|20|2||0|0|2052052|333598|429|83|
|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 ?|12|27|4||0|0|2361967|315484|883|187|
|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|41|14||0|0|3712763|855382|95|60|
|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 ?|11|25|4||0|0|1703587|315446|1283|260|
|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|24|9||0|0|3443860|855382|0|0|
|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|7|11|3||0|0|101613|52658|472|171|
|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 ?|7|16|4||0|0|387435|95497|20|20|
|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 ?|7|10|1||0|0|1784938|345817|12645|5000|
|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|6|17|4||0|0|3657235|960698|599|108|
|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 ?|6|18|7||0|0|242588|108544|146|70|
|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 ?|6|23|8||0|0|2452414|855382|0|0|
|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|1114764|333582|110|58|
|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 ?|5|6|1||0|0|1584106|333576|293|169|
|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 ?|4|5|1||0|0|712406|178211|82|29|
|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<=?|4|10|5||0|0|29492|19071|0|0|
|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 ?|4|9|2||0|0|221732|94709|173|99|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.registry_shop_id AS shopId,date_format(?,?) 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.registry_shop_id=? AND t.create_time>=? AND t.create_time<DATE_ADD(?,INTERVAL ? Day) GROUP BY t.tenant_id,t.tenant_app_id,t.registry_shop_id,t.source_type|3|4|1||0|0|128791|51581|3|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,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|12|7||0|0|104674|37062|37|13|
|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|66003|28671|7|7|
|v4_user|SELECT ifnull(sum(esd.amount_pay),?) AS sales_money 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=? JOIN v4_employee.shop sp ON es.tenant_id=sp.tenant_id AND es.dept_erp_id=sp.dept_id JOIN tenant.employee emp ON es.tenant_id=emp.tenant_id AND es.employee_erp_id=emp.employee_erp_id WHERE es.tenant_id=? AND es.tenant_app_id=? AND sp.id=? AND emp.id=? AND es.is_sales=? AND es.sales_status=? AND es.sales_date=date_format(?,?)|3|3|1||0|0|12|7|3|1|
|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|2682|969|2682|969|
|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 ?|3|4|1||0|0|1221109|741790|219|97|
|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,tu.id FROM tenant.erp_sales es LEFT JOIN tenant.erp_sales_detail sd ON es.tenant_id=sd.tenant_id AND es.tenant_wechatapp_id=sd.tenant_wechatapp_id AND es.sales_erp_id=sd.sales_erp_id LEFT JOIN user_service.tenant_user tu ON tu.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=tu.tenant_app_id AND es.member_erp_id=tu.erp_member_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.create_time>=? AND es.create_time<=? AND es.sales_date=? AND es.sales_status=? AND es.is_sales=? AND sd.sales_type=? ORDER BY es.id LIMIT ? OFFSET ?|2|2|1||0|0|8269|5918|1795|1183|
|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 ?|2|3|2||0|0|274934|249919|68|52|
|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|3|2||0|0|9908|9115|4908|4115|
|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 ?|2|2|1||0|0|799|422|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 ?|2|2|1||0|0|355685|340030|72|66|
|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|28|15||0|0|2199964|1253616|0|0|
|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 ?|2|2|1||0|0|125366|62687|5|3|
|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 ?|2|4|3||0|0|1767808|1677400|10000|5000|
|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|2|2|1||0|0|217242|108638|163|90|
|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 ?|2|4|2||0|0|366283|352123|73|73|
|v4_user|SELECT ifnull(group_concat(DISTINCT IF(es.sales_status=?,sd.category_erp_id,?)),?)saleCategoryIds,ifnull(group_concat(DISTINCT IF(es.sales_status=?,ifnull(pc.category_name,sd.category_name),?)),?) AS saleCategoryNames,ifnull(GROUP_CONCAT(DISTINCT IF(es.sales_status=?,if(sd.sales_brand=? OR sd.sales_brand=?,?,sd.sales_brand),?)),?) AS salesBrand,ifnull(GROUP_CONCAT(DISTINCT IF(es.sales_status=?,if(sd.sales_craft=? OR sd.sales_craft=?,?,sd.sales_craft),?)),?) AS salesCraft FROM v4_sales.erp_sales es INNER JOIN v4_sales.erp_sales_detail sd ON sd.tenant_id=es.tenant_id AND es.tenant_app_id=sd.tenant_app_id AND es.sales_erp_id=sd.sales_erp_id AND sd.sales_type=? LEFT JOIN v4_sales.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_app_id=? AND es.member_erp_id IN (?) AND es.is_sales=? AND es.sales_status>=?|2|4|2||0|0|120717|60369|2|1|
|user_service|SELECT * FROM `user_employee_?`|2|7|4||0|0|1234777|835482|1234777|835482|
|account|SELECT cu.tenant_id,cu.tenant_app_id,cu.id AS coupon_id,od.total_fee,DATE_FORMAT(od.payment_time,?) AS saleDate 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.total_fee>? AND od.payment_time>=? AND od.payment_time<=? LIMIT ? OFFSET ?|2|2|1||0|0|31720|15860|0|0|
|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 ?|2|2|1||0|0|10425|8454|3475|2818|
|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 ?|2|3|1||0|0|30000|15000|10000|5000|
|account|SELECT count(?) FROM tenant.erp_sales t? LEFT JOIN tenant.erp_sales_extend? ese ON t?.tenant_id=ese.tenant_id AND t?.tenant_wechatapp_id=ese.tenant_app_id AND t?.sales_erp_id=ese.sales_erp_id LEFT JOIN warranty_service.warranty t? ON t?.tenant_wechatapp_id=t?.tenant_wechatapp_id AND t?.sales_erp_id=t?.erp_sales_id AND t?.is_disable=? WHERE t?.tenant_id=? AND t?.tenant_wechatapp_id=? AND t?.sales_status=? AND t?.is_sales=?|1|3|3||0|0|214121|214121|1|1|
|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|4034|4034|0|0|
|tenant|SELECT * FROM `erp_sales`|1|1090|1090||0|0|33588722|33588722|33588722|33588722|
|v4_employee|SELECT t?.average_score,emp.employee_name,es.sales_no,tm.member_name,tm.mobile_no FROM v4_sales.`comment`t? JOIN v4_sales.erp_sales es ON es.id=t?.order_id AND es.tenant_id=t?.tenant_id AND es.tenant_app_id=t?.tenant_app_id AND es.is_sales=? AND es.sales_status=? JOIN tenant.employee emp ON emp.tenant_id=t?.tenant_id AND emp.employee_erp_id=es.employee_erp_id LEFT JOIN v4_employee.shop sp ON es.tenant_id=sp.tenant_id AND es.dept_erp_id=sp.dept_id LEFT JOIN v4_user.member tm ON t?.tenant_id=tm.tenant_id AND t?.tenant_app_id=tm.tenant_app_id AND t?.member_id=tm.id WHERE t?.tenant_id=? AND sp.id IN (?) AND t?.create_time>=? AND t?.create_time<=? AND t?.average_score<t?.low_score|1|1|1||0|0|75283|75283|0|0|
|user_service|SELECT * FROM `user_employee`|1|85|85||0|0|14020417|14020417|14020417|14020417|
|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 ?,?,?) 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.update_time>=? AND t.update_time<? ORDER BY t.id LIMIT ? OFFSET ?|1|1|1||0|0|35650|35650|1556|1556|
|activity_service|SELECT * FROM `intelligent_push_msg_obj`|1|36|36||0|0|6188585|6188585|6188585|6188585|
|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 ?|1|3|3||0|0|108611|108611|108|108|
|activity_service|SELECT * FROM `intelligent_push_gift_qualitied`|1|1|1||0|0|510203|510203|510203|510203|
|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|291689|291689|34|34|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS recept_time FROM v4_user.reception_customer t? JOIN v4_user.reception_customer_log t? ON t?.id=t?.reception_customer_id AND t?.oper_type=? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? AND t?.oper_status&?=? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?)|1|1|1||0|0|338543|338543|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<? 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|339764|339764|9|9|
|employee|SELECT * FROM `batch_step_execution_context`|1|1|1||0|0|334225|334225|334225|334225|
|payment|SELECT * FROM `pay_order_msg`|1|24|24||0|0|693971|693971|693971|693971|
|employee|SELECT * FROM `backlog_system`|1|19|19||0|0|1460439|1460439|1460439|1460439|
|employee|SELECT * FROM `label_task_employee`|1|4|4||0|0|1039876|1039876|1039876|1039876|
|employee|SELECT * FROM `batch_step_execution`|1|1|1||0|0|334225|334225|334225|334225|
|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 ?|1|1|1||0|0|16092|16092|0|0|
|export|SELECT cu.id couponId,cu.coupon_name,cu.coupon_type,CASE cu.coupon_type WHEN ? THEN ? ELSE ? END couponTypeName,cu.coupon_no, CASE cu.source WHEN ? THEN ? ELSE ? END couponChannelName, CASE cu.coupon_state WHEN ? THEN ? ELSE ? END couponStateName,ce.user_name,ce.creator_user_name,round(cu.face_value/?,?) AS faceValue,round(cu.balance/?,?) AS balance,cu.begin_time,cu.end_time,ce.remark,ce.mobile_no,ce.creator_mobile_no,cu.create_time,ce.writeoff_time,cu.user_id,if(ce.source_user_type=?,ce.source_user_id,?)employeeId,ce.member_source_shop FROM coupon_service.coupon cu JOIN coupon_service.coupon_extend ce ON ce.tenant_id=? AND ce.tenant_app_id=? AND ce.id=cu.id JOIN coupon_service.coupon_market_order_detail cmod ON cmod.tenant_id=? AND cmod.tenant_app_id=? AND cmod.coupon_id=cu.id JOIN coupon_service.coupon_market_order cmo ON cmo.tenant_id=? AND cmo.tenant_app_id=? AND cmod.order_id=cmo.id AND cmo.pay_type=? WHERE cu.tenant_id=? AND cu.tenant_app_id=? AND cu.source=? AND cu.create_time>=? AND cu.create_time<=?|1|1|1||0|0|228745|228745|102|102|
|activity_service|SELECT * FROM `intelligent_marketing_activity_gift`|1|2|2||0|0|498054|498054|498054|498054|
|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|7|7||0|0|10007|10007|1|1|
|activity_service|SELECT * FROM `lottery_user`|1|3|3||0|0|688084|688084|688084|688084|
|v4_user|SELECT sp.id FROM v4_sales.erp_sales es JOIN v4_employee.shop sp ON sp.tenant_id=? AND es.dept_erp_id=sp.dept_id WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.member_erp_id IN (?) AND es.is_sales=? AND es.sales_status=? ORDER BY es.sales_erp_id ASC LIMIT ?|1|1|1||0|0|28668|28668|1|1|
|export|SELECT cu.id couponId,cu.coupon_name,cu.coupon_type,CASE cu.coupon_type WHEN ? THEN ? ELSE ? END couponTypeName,cu.coupon_no, CASE cu.source WHEN ? THEN ? ELSE ? END couponChannelName, CASE cu.coupon_state WHEN ? THEN ? ELSE ? END couponStateName,ce.user_name,ce.creator_user_name,round(cu.face_value/?,?) AS faceValue,round(cu.balance/?,?) AS balance,cu.begin_time,cu.end_time,ce.remark,ce.mobile_no,ce.creator_mobile_no,cu.create_time,ce.writeoff_time,cu.user_id,if(ce.source_user_type=?,ce.source_user_id,?)employeeId,ce.member_source_shop FROM coupon_service.coupon cu JOIN coupon_service.coupon_extend ce ON ce.tenant_id=? AND ce.tenant_app_id=? AND ce.id=cu.id WHERE cu.tenant_id=? AND cu.tenant_app_id=? AND cu.coupon_name LIKE CONCAT(CONCAT(?,?),?) AND cu.create_time>=? AND cu.create_time<=? AND ce.member_source_shop=?|1|6|6||0|0|117397|117397|913|913|
|tenant|SELECT * FROM `erp_sales_back_?`|1|24|24||0|0|438960|438960|438960|438960|
|employee|SELECT * FROM `backlog_file`|1|56|56||0|0|10212343|10212343|10212343|10212343|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,ifnull(s.dept_id,?) AS deptId,ifnull(e.employee_erp_id,?) AS empErpId,t.shop_id,t.employee_id,t.employee_name,t.`status`,t.create_time FROM v4_employee.employee t LEFT JOIN tenant.employee e ON t.tenant_id AND e.tenant_id AND t.employee_id=e.id LEFT JOIN v4_employee.shop s ON t.shop_id=s.id WHERE t.tenant_app_id=?|1|1|1||0|0|18841|18841|220|220|
|activity_service|SELECT * FROM `activity_gift_grant`|1|1|1||0|0|181225|181225|181225|181225|
|activity_service|SELECT * FROM `assist_task_user`|1|2|2||0|0|400022|400022|400022|400022|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.member_id AS id,t.source_type AS sourceType,t.registry_shop_id AS sourceShopId,if(t.source_type=?,t.source_id,?) AS sourceEmployeeId FROM v4_user.member_source 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|44616|44616|21|21|
|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 ?|1|2|2||0|0|10412|10412|0|0|
|export|SELECT cu.coupon_no,ce.source_user_id grantEmployeeId,ce.source_shop_id grantShopId,ce.user_name,ce.mobile_no,ce.create_time,if(cu.coupon_state=?,?,?)hasUsed,ce.writeoff_time,wl.shop_id,wl.employee_id,cu.coupon_type FROM coupon_service.coupon cu INNER JOIN coupon_service.coupon_extend ce ON cu.tenant_app_id=ce.tenant_app_id AND cu.id=ce.coupon_id LEFT JOIN coupon_service.coupon_write_off_log wl ON wl.coupon_id=cu.id AND wl.state=? WHERE cu.tenant_id=? AND cu.tenant_app_id=? AND cu.source=? AND cu.template_id=? AND ce.source_shop_id=? AND ce.source_user_id=? AND cu.create_time BETWEEN ? AND ? AND cu.coupon_state=?|1|3|3||0|0|26446|26446|56|56|
|message_push|SELECT * FROM `message_log`|1|42|42||0|0|2057067|2057067|2057067|2057067|
|activity_service|SELECT * FROM `intelligent_marketing_activity_msg`|1|15|15||0|0|1059554|1059554|1059554|1059554|
|v4_user|SELECT COUNT(*) AS total FROM v4_user.member m JOIN (SELECT recommend_id,count(*) AS recommend_count FROM v4_user.member WHERE tenant_id=? AND tenant_app_id=? AND recommend_id>? AND recommend_bind_time>=? AND recommend_bind_time<? GROUP BY recommend_id)x ON x.recommend_id=m.id WHERE m.tenant_id=? AND m.tenant_app_id=?|1|1|1||0|0|291730|291730|1|1|
|erp_sync|SELECT * FROM `cwx_checkin_sync_log`|1|11|11||0|0|266492|266492|266492|266492|
|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 goods_id,t?.goods_name AS goods_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 goods.goods 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 goods_id,t?.goods_name AS goods_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 goods.goods 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|38456|38456|0|0|
|account|SELECT * FROM `wx_redpacket_send_order`|1|11|11||0|0|886579|886579|886579|886579|
|employee|SELECT * FROM `batch_job_execution_params`|1|1|1||0|0|638134|638134|638134|638134|
