|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|v4_user|SELECT img.id,img.tenant_id,img.tenant_app_id,de.warranty_id,sd.sales_erp_id,sd.sales_index,img.img_url,img.create_time AS img_create_time FROM v4_sales.warranty_detail_img img JOIN v4_sales.warranty_detail de ON img.warranty_detail_id=de.id JOIN v4_sales.erp_sales_detail sd ON sd.tenant_id=? AND de.sales_detail_id=sd.id WHERE img.tenant_id=? AND img.tenant_app_id=? AND img.create_time>=? AND img.create_time<? LIMIT ? OFFSET ?|838|5615|172||0|0|566299850|1238509|1143191|5000|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.sales_erp_id FROM v4_sales.warranty_can_added t? JOIN v4_sales.erp_sales t? ON t?.tenant_id=? AND t?.sales_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? LIMIT ? OFFSET ?|414|3776|93||0|0|93532255|755698|1992934|5000|
|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 ?|372|5568|193||0|0|10534216|372472|15274|5000|
|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 ?|326|6356|151||0|0|10942148|372460|2102|101|
|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,max(if(es.sales_status=? AND esd.sales_type=?,if(esd.quantity>?,round(esd.amount_pay/esd.quantity,?),?),?)) AS singleMaxMoney,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|275|1610|86||0|0|14180517|170520|7206|390|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.sales_erp_id,t?.member_id,t?.warranty_no,ifnull(t?.create_employee_id,?) AS create_employee_id,ifnull(t?.update_employee_id,?) AS update_employee_id,t?.is_disable,t?.create_time AS addedTime FROM v4_sales.warranty t? JOIN v4_sales.erp_sales t? ON t?.tenant_id=? AND t?.sales_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<? LIMIT ? OFFSET ?|220|967|36||0|0|39886387|727148|1030896|5000|
|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|127|495|49||0|0|4706485|133607|5346|457|
|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 ?|86|117|3||0|0|32823195|382427|2|2|
|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 ?|78|348|12||0|0|1259237|26656|109|68|
|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 ?|57|475|140||0|0|12551034|1576174|507|51|
|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=?|53|111|9||0|0|11876884|390770|495|86|
|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 ?|53|171|5||0|0|14188806|267717|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|44|500|61||0|0|3613151|211990|3276|382|
|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>=?|37|116|23||0|0|1045086|43599|37|1|
|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 ?|33|243|37||0|0|514549|30702|3132|2061|
|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 ?|32|79|9||0|0|4186134|334237|5175|381|
|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)|32|80|12||0|0|52404|3045|32|1|
|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|32|70|6||0|0|15558958|486306|0|0|
|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)|30|64|3||0|0|6272619|333631|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 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 ?|26|67|5||0|0|8151355|781789|1008|140|
|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 ?|25|39|3||0|0|9189626|486994|0|0|
|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 ?|23|52|3||0|0|15465800|837616|8|4|
|account|SELECT t.id,t.tenant_id,t.tenant_wechatapp_id,t.sales_erp_id,t.sales_index,t.sales_type,t.product_barcode,t.product_name,t.cert_no,t.hand_size,t.category_erp_id,t.category_name,t.stone_weight,t.gold_weight,t.total_weight,t.quantity,t.amount_total,t.amount_pay,ifnull(amount_pay/quantity,?) AS amount_avg,t.integral,ct.id AS pk_id,ct.change_type AS SYS_CHANGE_OPERATION FROM tenant.erp_sales_detail AS t RIGHT OUTER JOIN tenant.sjfx_dct_erp_sales_detail ct ON t.id=ct.id WHERE ct.version>? AND (t.tenant_id=?)|19|25|2||0|0|728|42|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 ?|15|32|4||0|0|213981|43873|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 ?|13|26|3||0|0|2655800|334083|1277|226|
|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|107|34||0|0|5780070|1716593|89|25|
|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 ?|11|37|5||0|0|54007|15000|29007|5000|
|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|36|9||0|0|3924349|855394|0|0|
|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 ?|11|15|2||0|0|5247534|487376|47328|5000|
|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 ?|10|17|4||0|0|1910536|335347|575|126|
|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 ?|10|24|8||0|0|465109|114135|340|103|
|employee|SELECT * FROM `backlog_?`|10|72|19||0|0|5819752|1578021|5819752|1578021|
|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 ?|10|17|2||0|0|670305|129864|38|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?.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 ?|9|16|2||0|0|1919037|334071|1301|308|
|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 ?|8|32|6||0|0|4873739|1316742|650|202|
|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=?|7|255|51||0|0|24424251|3489180|7|1|
|v4_user|SELECT create_time FROM v4_sales.erp_sales WHERE tenant_id=? AND tenant_app_id=? ORDER BY create_time ASC LIMIT ?,?|7|47|13||0|0|2913905|579190|7|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(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 ?|7|20|5||0|0|3350390|855394|0|0|
|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(?,?)|6|16|9||0|0|53|28|6|1|
|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|5|21|5||0|0|4544717|1198925|559|121|
|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<=?|5|7|2||0|0|63647|19181|0|0|
|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 ?|5|5|1||0|0|6198|1760|6198|1760|
|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|12|4||0|0|2260271|855394|24|24|
|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 ?|4|7|2||0|0|463914|259987|68|48|
|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 ?|4|13|5||0|0|76124|25329|67|33|
|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 ?|4|5|1||0|0|55814|15860|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(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 ?|3|5|3||0|0|1679|681|4|4|
|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|1148115|382989|103|96|
|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 ?|3|5|2||0|0|820132|335348|83|64|
|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|3|5|3||0|0|74719|54198|201|78|
|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>=?|3|16|12||0|0|195051|65020|3|1|
|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|2|1||0|0|228258|114255|167|167|
|v4_user|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.sales_erp_id FROM v4_sales.erp_sales t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.member_erp_id>? AND t?.should_comment=? AND t?.update_time>=? AND t?.update_time<? LIMIT ? OFFSET ?|2|2|1||0|0|174544|169544|10000|5000|
|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|13|10||0|0|1112408|965528|0|0|
|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 ?|2|3|1||0|0|45408|28974|17|11|
|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 ?|2|9|6||0|0|14333|10146|2|1|
|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|2|2|1||0|0|228136|114073|65|35|
|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 ?|2|2|1||0|0|36304|30615|0|0|
|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 ?|2|2|1||0|0|631041|335455|376|233|
|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|8160|8160|2|2|
|tenant|SELECT * FROM `erp_sales`|1|1015|1015||0|0|33935201|33935201|33935201|33935201|
|account|SELECT * FROM `account_flow`|1|116|116||0|0|16329714|16329714|16329714|16329714|
|v4_user|SELECT t.id,t.tenant_id,t.tenant_app_id,t.sales_erp_id,t.sales_index,t.product_barcode,t.category_erp_id,t.category_name,t.quantity,t.amount_pay,t.create_time,t.update_time FROM v4_sales.erp_sales_detail t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.sales_type=? AND t.sales_erp_id IN (?)|1|8|8||0|0|3|3|2|2|
|activity_service|SELECT * FROM `intelligent_push_msg_obj`|1|42|42||0|0|6328954|6328954|6328954|6328954|
|v4_user|SELECT es.recommend_id AS `key`,sum(esd.amount_pay) AS `value` 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 WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.sales_date>=date_format(?,?) AND es.sales_date<date_format(?,?) AND es.is_sales=? AND es.sales_status=? AND es.recommend_id IN (?) GROUP BY es.recommend_id|1|1|1||0|0|4067|4067|0|0|
|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|2|2||0|0|295353|295353|42|42|
|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|382555|382555|2|2|
|employee|SELECT * FROM `batch_step_execution_context`|1|1|1||0|0|334225|334225|334225|334225|
|account|SELECT tenant_id,tenant_app_id,user_id,member_image_flag,member_image_time FROM user_service.tenant_member_info WHERE tenant_id=? AND tenant_app_id=? AND member_image_flag=? AND update_time>=? AND update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|97719|97719|476|476|
|employee|SELECT * FROM `backlog_bak`|1|4|4||0|0|66096|66096|66096|66096|
|export|SELECT od.id,if(od.take_type=?,?,?)takeType,od.create_time,od.freight_fee,od.payment_fee,dt.price,dt.quantity,dt.art_no,dt.product_name,ad.user_name receiveName,ad.mobile_no,ad.shop_name,ad.address,ad.express_no,ad.express_company,od.user_name,od.update_time,od.receive_time,od.user_id,od.mobile_no buyMobileNo,od.remark,dt.spec,od.take_shop_name,od.take_employee_user_name,od.offline_payment_fee, CASE WHEN od.pay_way=? THEN ? ELSE ? END payWay,od.pay_id,od.payment_time, CASE WHEN od.status=? AND od.finish_type=? THEN ? WHEN od.status=? THEN ? WHEN od.status=? AND od.child_status=? THEN ? ELSE ? END statusName, CASE WHEN od.activity_type=? THEN ? ELSE ? END activityName,if(od.take_type=?,od.receive_time,?)takeTime FROM `order`.order_info od LEFT JOIN `order`.order_detail dt ON od.id=dt.order_id LEFT JOIN `order`.order_address ad ON od.id=ad.order_id WHERE od.tenant_wechatapp_id=? ORDER BY od.create_time DESC|1|1|1||0|0|19023|19023|6341|6341|
|employee|SELECT * FROM `backlog_system`|1|18|18||0|0|1480349|1480349|1480349|1480349|
|gift_mail|SELECT * FROM `trade`|1|2|2||0|0|219635|219635|219635|219635|
|v4_user|SELECT t.tenant_id,t.tenant_app_id,t.member_id AS id,t.shop_id AS belongShopId,t.employee_id AS belongEmployeeId,t.update_time AS assignButlerTime FROM v4_user.member_butler 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|295353|295353|180|180|
|employee|SELECT * FROM `batch_step_execution`|1|2|2||0|0|334225|334225|334225|334225|
|employee|SELECT * FROM `backlog_detail`|1|7|7||0|0|1429463|1429463|1429463|1429463|
|account|SELECT t.id,t.tenant_id,t.tenant_app_id,t.coupon_name,t.status,t.coupon_type FROM (SELECT ct.id,ct.tenant_id,ct.tenant_app_id,ct.coupon_name,ct.state status,ct.coupon_type FROM coupon_service.template ct WHERE ct.tenant_app_id=? AND ct.create_time>=? AND ct.create_time<=? UNION ALL SELECT ct.id,? tenant_id,? tenant_app_id,ct.coupon_name,ct.state status,ct.coupon_type FROM coupon_service.template ct WHERE ct.tenant_id=?)t LIMIT ? OFFSET ?|1|1|1||0|0|44835|44835|7|7|
|activity_service|SELECT * FROM `lottery_user`|1|3|3||0|0|691529|691529|691529|691529|
|gift_mail|SELECT * FROM `trade_take`|1|1|1||0|0|214212|214212|214212|214212|
|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|
|employee|SELECT * FROM `backlog_file`|1|58|58||0|0|10403254|10403254|10403254|10403254|
|v4_user|SELECT DATE_FORMAT(es.sales_date,?) AS statistic_date,DATE_FORMAT(es.sales_date,?) AS statistic_month,DATE_FORMAT(es.update_time,?) AS busi_date,es.tenant_id,es.tenant_app_id,ifnull(sp.id,?) AS shop_id,ifnull(emp.id,?) AS employee_id,? AS saleStatus,?*count(t?.id) AS `comment`,?*ifnull(sum(if(t?.average_score<t?.low_score,?,?)),?) AS low_comment,?*ifnull(sum(t?.average_score),?) AS score_total 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.sales_status=? LEFT JOIN tenant.employee emp ON es.tenant_id=emp.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 WHERE es.tenant_id=? AND es.tenant_app_id=? AND es.update_time>=? AND es.update_time<? GROUP BY es.tenant_id,es.tenant_app_id,sp.id,emp.id,DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.update_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|98090|98090|3|3|
|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,max(if(es.sales_status=? AND esd.sales_type=?,if(esd.quantity>?,round(esd.amount_pay/esd.quantity,?),?),?)) AS singleMaxMoney,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|1|16|16||0|0|14336|14336|461|461|
|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|2|2||0|0|42155|42155|0|0|
|account|SELECT t.id,t.tenant_id,t.tenant_wechatapp_id,t.sales_erp_id,t.sales_date,t.member_erp_id,t.dept_erp_id,t.employee_erp_id,t.amount,t.sales_status,t.is_sales,ct.id AS pk_id,ct.change_type AS SYS_CHANGE_OPERATION FROM tenant.erp_sales AS t RIGHT OUTER JOIN tenant.sjfx_dct_erp_sales ct ON t.id=ct.id WHERE ct.version>? AND (t.tenant_id=?)|1|1|1||0|0|14|14|0|0|
|goods|SELECT * FROM `share_detail`|1|1|1||0|0|177834|177834|177834|177834|
|v4_user|SELECT count(*) AS _count FROM v4_user.potential_customer t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.checkin_shop_id=? AND t.checkin_employee_id=? AND t.checkin_time>=? AND t.checkin_time<DATE_ADD(?,INTERVAL ? Day)|1|1|1||0|0|4|4|1|1|
|item_manage|SELECT * FROM `task`|1|4|4||0|0|65359|65359|65359|65359|
|activity_service|SELECT * FROM `intelligent_marketing_activity_msg`|1|14|14||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|160142|160142|1|1|
|goods|SELECT * FROM `goods_detail`|1|1|1||0|0|15556|15556|15556|15556|
|export|SELECT t?.id AS employeeId,t?.employee_name,t?.shop_id,sp.shop_name,ifnull(sum(t?.maintainCount),?) AS maintainCount,ifnull(sum(t?.maintainNum),?) AS maintainNum,ifnull(sum(t?.successNum),?) AS successNum,ifnull(sum(t?.failNum),?) AS failNum,ifnull(sum(t?.saleMoney),?) AS saleMoney FROM tenant.employee t? JOIN tenant.employee_shop t? ON t?.id=t?.employee_id JOIN tenant.tenant_wechatapp_shop sp ON t?.shop_id=sp.id LEFT JOIN (SELECT t.employee_id AS employeeId,count(?) AS maintainCount,count(DISTINCT t.sneak_guest_id) AS maintainNum,? AS successNum,? AS failNum,? AS saleMoney FROM (SELECT sgm.employee_id,g.id AS sneak_guest_id FROM tenant.sneak_guest g JOIN tenant.sneak_guest_maintain sgm ON sgm.sneak_guest_id=g.id WHERE g.tenant_app_id=? AND g.create_shop_id=? AND sgm.event_type IN(?) AND sgm.create_time>=? AND sgm.create_time<? UNION ALL SELECT g.maintain_employee_id AS employee_id,g.id AS sneak_guest_id FROM tenant.sneak_guest g JOIN tenant.sneak_guest_maintain sgm ON sgm.sneak_guest_id=g.id WHERE g.tenant_app_id=? AND g.create_shop_id=? AND g.fail_type=? AND sgm.event_type=? AND sgm.create_time>=? AND sgm.create_time<?)t GROUP BY employee_id UNION ALL SELECT t.employee_id AS employeeId,? AS maintainCount,? AS maintainNum,count(DISTINCT t.sneak_guest_id) AS successNum,? AS failNum,sum(sgs.`amount`) AS saleMoney FROM tenant.sneak_guest g JOIN tenant.sneak_guest_maintain t ON t.sneak_guest_id=g.id JOIN tenant.sneak_guest_sales sgs ON g.id=sgs.sneak_guest_id WHERE g.tenant_app_id=? AND g.create_shop_id=? AND t.event_type=? AND t.create_time>=? AND t.create_time<? GROUP BY t.employee_id UNION ALL SELECT g.maintain_employee_id AS employeeId,? AS maintainCount,? AS maintainNum,? AS successNum,count(DISTINCT t.sneak_guest_id) AS failNum,? AS saleMoney FROM tenant.sneak_guest g JOIN tenant.sneak_guest_maintain t ON t.sneak_guest_id=g.id WHERE g.tenant_app_id=? AND g.create_shop_id=? AND t.event_type=? AND g.fail_type=? AND t.create_time>=? AND t.create_time<? GROUP BY g.maintain_employee_id)t? ON t?.id=t?.employeeId WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.shop_id=? GROUP BY t?.id,t?.employee_name|1|1|1||0|0|102635|102635|35|35|
|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|295353|295353|213|213|
|account|SELECT u.id,u.tenant_id,u.tenant_app_id,tw.dept_erp_id AS shop_id,date_format(u.birthday,?) AS tempBirthDay,ifnull(u.birthday_is_lunar,?) AS birthdayIsLunar,u.memorial_name,date_format(u.memorial_day,?) AS tempMemorialDay,ifnull(u.memorial_day_is_lunar,?) AS memorialDayIsLunar,u.grade_id AS gradeErpId,if(u.birthday IS ?,?,?) AS fullFlag FROM user_service.tenant_member_info u LEFT JOIN tenant.tenant_wechatapp_shop tw ON u.shop_id=tw.id WHERE u.tenant_id=? AND u.tenant_app_id=? AND u.update_time>=? AND u.update_time<=? ORDER BY u.tenant_id,u.id LIMIT ? OFFSET ?|1|1|1||0|0|115687|115687|2968|2968|
|h5link|SELECT * FROM `h5_link`|1|1|1||0|0|35139|35139|35139|35139|
|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|1|11|11||0|0|19823|19823|457|457|
|account|SELECT t.tenant_id,t.tenant_app_id,t.coupon_id,t.statistic_date,t.create_channel,t.coupon_type,t.busi_date,count(*)amount FROM (SELECT cu.tenant_id,cu.tenant_app_id,cu.template_id coupon_id,cu.source create_channel,date_format(rt.create_time,?)statistic_date,cu.coupon_type,date_format(cu.create_time,?)busi_date FROM coupon_service.coupon cu INNER JOIN coupon_service.user_coupon_give_record rt ON cu.tenant_app_id=rt.tenant_app_id AND cu.id=rt.coupon_id WHERE rt.tenant_app_id=? AND rt.create_time>=? AND rt.create_time<=? AND rt.user_id>?)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 ?|1|1|1||0|0|52880|52880|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 ?|1|1|1||0|0|9621|9621|3207|3207|
|employee|SELECT * FROM `batch_job_execution_params`|1|3|3||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|5817|5817|1939|1939|
