|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|account|SELECT tenant_wechatapp_id tenant_app_id,member_erp_id FROM tenant.erp_sales WHERE tenant_id=? AND tenant_wechatapp_id=? AND update_time BETWEEN ? AND ? GROUP BY tenant_wechatapp_id,member_erp_id LIMIT ? OFFSET ?|3|3|1||0|0|249|224|1|1|
|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|2|4|3||0|0|140557|70279|0|0|
|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|1045|854|1045|854|
|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|2|7|3||0|0|1785841|892922|186|102|
|v4_user|SELECT DATE_FORMAT(t?.create_time,?) AS statistic_date,DATE_FORMAT(t?.create_time,?) AS statistic_month,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.scene AS channleName,t?.template_id AS templateId,ct.coupon_name,? AS `status`,count(es.id) AS `order`,ifnull(sum(es.amount),?) AS dealAmount FROM v4_coupon.coupon t? JOIN v4_coupon.coupon_template ct ON t?.template_id=ct.id JOIN v4_coupon.coupon_write_off t? ON t?.id=t?.coupon_id AND t?.type=? JOIN v4_sales.erp_sales_detail esd ON esd.tenant_id=? AND convert(t?.id,char)=esd.product_barcode AND esd.sales_type=? JOIN v4_sales.erp_sales es ON es.tenant_id=? AND es.tenant_app_id=? AND es.sales_erp_id=esd.sales_erp_id AND t?.business_id=es.sales_erp_id AND es.sales_status IN(?) WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.create_time,?),t?.tenant_id,t?.tenant_app_id,t?.scene,t?.template_id,ct.coupon_name LIMIT ? OFFSET ?|2|2|1||0|0|50|50|0|0|
|account|SELECT t.tenant_id,t.tenant_app_id,t.shop_id,t.user_id,t.scene,t.busi_date,count(*)total_amount FROM (SELECT bg.id,bg.tenant_id,bg.tenant_app_id,ifnull(ws.dept_erp_id,?)shop_id,ifnull(ey.employee_erp_id,?)user_id,bg.status,bg.scene,date_format(bg.expire_time,?)busi_date FROM employee.backlog_? bg INNER JOIN tenant.tenant_wechatapp_shop ws ON bg.shop_id=ws.id INNER JOIN tenant.employee ey ON bg.employee_id=ey.id WHERE bg.tenant_app_id=? AND bg.scene NOT IN(?) AND bg.create_time>=? AND bg.create_time<=?)t GROUP BY t.tenant_id,t.tenant_app_id,t.shop_id,t.user_id,t.scene,t.busi_date LIMIT ? OFFSET ?|2|2|1||0|0|11352|7742|1206|934|
|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.is_sales=? 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 ?|2|3|1||0|0|142054|71029|1|1|
|account|SELECT min(create_time)create_time FROM coupon_service.template WHERE tenant_id=? AND tenant_app_id=?|2|4|2||0|0|44240|22123|2|1|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.member_id,t?.member_name,t?.mobile_no AS phone,count(*) AS `used` FROM v4_giftmall.trade t? JOIN v4_user.member t? ON t?.tenant_id=t?.tenant_id AND t?.member_id=t?.id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.trade_type=? AND t?.order_status=? AND t?.update_time>=? AND t?.update_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.member_id,t?.member_name,t?.mobile_no LIMIT ? OFFSET ?|2|4|2||0|0|11132|6578|584|584|
|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 ?|2|4|2||0|0|55932|28668|2|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.create_time>=? AND tu.create_time<=? ORDER BY id LIMIT ? OFFSET ?|2|2|1||0|0|2|2|0|0|
|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=? AND (od.mobile_no=? OR ad.mobile_no=?) AND (od.status=?) ORDER BY od.create_time DESC|2|4|2||0|0|345500|172752|2|1|
|account|SELECT * FROM (SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.share_user_id AS user_id,t?.user_name AS user_name,t?.share_user_type AS user_identity,t?.business_id AS activity_id,t?.activity_name AS activity_name,DATE_FORMAT(oi.finish_time,?) AS busi_date,count(*) AS deal_amount,ifnull(sum(oi.total_fee),?) AS deal_money FROM goods.`share` t? JOIN goods.share_detail sd ON t?.id=sd.share_id JOIN ORDER.order_info oi ON sd.order_id=oi.id AND oi.tenant_wechatapp_id=? AND oi.status=? JOIN activity_service.activity t? ON t?.business_id=t?.id JOIN user_service.tenant_member t? ON t?.tenant_id=t?.tenant_id AND t?.tenant_app_id=t?.tenant_app_id AND t?.share_user_id=t?.user_id WHERE t?.tenant_app_id=? AND t?.share_user_type=? AND t?.business_type!=? AND oi.finish_time>=? AND oi.finish_time<=? GROUP BY t?.id,DATE_FORMAT(oi.finish_time,?) UNION ALL SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.share_user_id AS user_id,t?.employee_name AS user_name,t?.share_user_type AS user_identity,t?.business_id AS activity_id,t?.activity_name AS activity_name,DATE_FORMAT(oi.finish_time,?) AS busi_date,count(*) AS deal_amount,ifnull(sum(oi.total_fee),?) AS deal_money FROM goods.`share` t? JOIN goods.share_detail sd ON t?.id=sd.share_id JOIN ORDER.order_info oi ON sd.order_id=oi.id AND oi.tenant_wechatapp_id=? AND oi.status=? JOIN activity_service.activity t? ON t?.business_id=t?.id JOIN tenant.employee t? ON t?.share_user_id=t?.id WHERE t?.tenant_app_id=? AND t?.share_user_type=? AND t?.business_type!=? AND oi.finish_time>=? AND oi.finish_time<=? GROUP BY t?.id,DATE_FORMAT(oi.finish_time,?))tt ORDER BY tt.id ASC LIMIT ? OFFSET ?|2|4|2||0|0|9984|6978|0|0|
|v4_user|SELECT DATE_FORMAT(t?.create_time,?) AS statistic_date,DATE_FORMAT(t?.create_time,?) AS statistic_month,DATE_FORMAT(t?.update_time,?) AS busi_date,t?.tenant_id,t?.tenant_app_id,t?.product_id,t?.product_name,t?.category_id AS classifyId,t?.category_name AS classifyName,ifnull(tt.take_shop_id,?) AS usedShopid,sum(t?.quantity) AS used,count(t?.member_id) AS used_member,sum(t?.pay_points) AS used_point,sum(t?.pay_price) AS deal_amount FROM v4_giftmall.trade t? JOIN v4_giftmall.product t? ON t?.tenant_id=t?.tenant_id AND t?.product_id=t?.id JOIN v4_giftmall.category t? ON t?.category_id=t?.id LEFT JOIN v4_giftmall.trade_take tt ON t?.id=trade_id WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.trade_type=? AND t?.order_status=? AND t?.update_time>=? AND t?.update_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.product_id,t?.product_name,t?.category_id,t?.category_name,ifnull(tt.take_shop_id,?),DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.create_time,?),DATE_FORMAT(t?.update_time,?) LIMIT ? OFFSET ?|2|7|6||0|0|21799|15214|41|41|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?) AS statistic_date,DATE_FORMAT(t?.recept_time,?) AS statistic_month,DATE_FORMAT(t?.recept_time,?) AS `hour`,DATE_FORMAT(t?.create_time,?) AS busi_date,t?.shop_id,count(*) AS total FROM v4_user.reception_customer t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.create_time>=? AND t?.create_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.recept_time,?),DATE_FORMAT(t?.create_time,?),t?.shop_id LIMIT ? OFFSET ?|2|14|10||0|0|130368|106165|121|85|
|account|SELECT es.sales_date,es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.dept_erp_id shop_id,es.employee_erp_id user_id,count(*)amount,sum(if(tu.id>?,?,?))register_amount FROM tenant.erp_sales es LEFT JOIN user_service.tenant_user tu ON es.tenant_id=tu.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.sales_status=? AND es.is_sales=? AND es.create_time>=? AND es.create_time<=? AND es.sales_date=? GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.sales_date,es.dept_erp_id,es.employee_erp_id|2|2|1||0|0|3409|2469|289|175|
|account|SELECT t.tenant_id,t.tenant_app_id,t.template_id,t.statistic_date,t.busi_date,count(*)amount FROM (SELECT cu.tenant_id,cu.tenant_app_id,au.template_id,date_format(cu.create_time,?)statistic_date,date_format(cu.create_time,?)busi_date FROM coupon_service.coupon cu INNER JOIN value_added.value_added_user au ON cu.tenant_app_id=au.tenant_wechatapp_id AND cu.id=au.coupon_user_id WHERE cu.tenant_app_id=? AND cu.create_time>=? AND cu.create_time<=?)t GROUP BY t.tenant_id,t.tenant_app_id,t.template_id,t.statistic_date,t.busi_date LIMIT ? OFFSET ?|1|1|1||0|0|135|135|0|0|
|platform|SELECT * FROM `valueaddedlog`|1|2|2||0|0|31774|31774|31774|31774|
|score_player|SELECT * FROM `supervise_record`|1|1|1||0|0|18399|18399|18399|18399|
|v4_sales|SELECT * FROM `warranty_detail_img`|1|60|60||0|0|1387377|1387377|1387377|1387377|
|v4_sales|SELECT * FROM `value_added_record`|1|17|17||0|0|2521362|2521362|2521362|2521362|
|position|SELECT * FROM `geo_position`|1|341|341||0|0|10054382|10054382|10054382|10054382|
|tenant|SELECT * FROM `employee_tenant_user`|1|1|1||0|0|35879|35879|35879|35879|
|account|SELECT es.sales_date,es.tenant_id,es.tenant_wechatapp_id tenant_app_id,es.dept_erp_id shop_id,es.employee_erp_id user_id,count(*)amount FROM warranty_service.warranty wt INNER JOIN tenant.erp_sales es ON es.tenant_id=? AND wt.tenant_wechatapp_id=es.tenant_wechatapp_id AND wt.erp_sales_id=es.sales_erp_id WHERE wt.tenant_wechatapp_id=? AND wt.is_disable=? AND wt.create_time>=? AND wt.create_time<=? GROUP BY es.tenant_id,es.tenant_wechatapp_id,es.sales_date,es.dept_erp_id,es.employee_erp_id|1|1|1||0|0|1830|1830|300|300|
|v4_user|SELECT * FROM `cwx_external_user`|1|170|170||0|0|5423875|5423875|5423875|5423875|
|authorization_service|SELECT login_token FROM authorization_service.user_login_token WHERE user_id=? AND tenant_id=? AND tenant_wx_app_id=? ORDER BY id DESC LIMIT ?,?|1|1|1||0|0|1|1|1|1|
|shop_work|SELECT * FROM `task_item`|1|72|72||0|0|1091587|1091587|1091587|1091587|
|sms|SELECT * FROM `sms_report`|1|957|957||0|0|10759606|10759606|10759606|10759606|
|shop_work|SELECT * FROM `work_report`|1|3|3||0|0|19290|19290|19290|19290|
|shop_work|SELECT * FROM `attached`|1|7|7||0|0|116545|116545|116545|116545|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,tb.erp_member_id AS memberId,t?.card_no,(CASE t?.`oper_type` WHEN ? THEN ? ELSE ? END) AS oper_type,t?.oper_amount,t?.real_oper_amount-t?.oper_amount AS give_amount,t?.oper_time FROM account.store_card_detail t? JOIN account.store_card t? ON t?.store_card_id=t?.id JOIN user_service.tenant_member_bind tb ON tb.tenant_id=t?.tenant_id AND tb.tenant_app_id=t?.tenant_app_id AND tb.user_id=t?.user_id AND tb.tenant_id=? WHERE t?.tenant_app_id=? AND t?.oper_result=? AND t?.create_time>=? AND t?.create_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|5639|5639|0|0|
|v4_user|SELECT * FROM `employee_external_bind_log`|1|86|86||0|0|12052709|12052709|12052709|12052709|
|account|SELECT es.id,es.tenant_id,es.tenant_wechatapp_id AS tenant_app_id,sp.id AS shop_id,emp.id AS employee_id,mb.user_id,es.sales_erp_id,es.sales_date,es.erp_create_time AS deal_time FROM tenant.erp_sales es JOIN tenant.tenant_wechatapp_shop sp ON sp.tenant_id=es.tenant_id AND es.tenant_wechatapp_id=sp.tenant_wechatapp_id AND es.dept_erp_id=sp.dept_erp_id JOIN tenant.employee emp ON es.tenant_id=emp.tenant_id AND es.employee_erp_id=emp.employee_erp_id JOIN user_service.tenant_member_bind mb ON es.tenant_id=mb.tenant_id AND es.tenant_wechatapp_id=mb.tenant_app_id AND es.member_erp_id=mb.erp_member_id WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.sales_status=? AND es.is_sales=? AND es.create_time>=? AND es.create_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|2433|2433|545|545|
|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|450|450|0|0|
|account|SELECT t.busi_date,t.tenant_id,t.tenant_app_id,t.shop_id,t.employee_id,t.statistic_date,t.coupon_id,ifnull(sum(ifnull(t.total_fee,?)),?)amount FROM (SELECT date_format(cu.create_time,?)busi_date,cu.tenant_id,cu.tenant_app_id,ifnull(ws.dept_erp_id,?)shop_id,ifnull(ey.employee_erp_id,?)employee_id,date_format(od.payment_time,?)statistic_date,cu.template_id coupon_id,od.total_fee 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 INNER JOIN coupon_service.coupon_extend ce ON cu.tenant_app_id=ce.tenant_app_id AND cu.id=ce.coupon_id LEFT JOIN tenant.tenant_wechatapp_shop ws ON ce.source_shop_id=ws.id LEFT JOIN tenant.employee ey ON ce.source_user_id=ey.id WHERE od.tenant_wechatapp_id=? AND od.status>=? AND cu.source=? AND od.payment_time>=? AND od.payment_time<=?)t GROUP BY t.busi_date,t.tenant_id,t.tenant_app_id,t.shop_id,t.employee_id,t.statistic_date,t.coupon_id LIMIT ? OFFSET ?|1|9|9||0|0|43378|43378|0|0|
|payment|SELECT * FROM `pay_order_msg`|1|135|135||0|0|691429|691429|691429|691429|
|score_player|SELECT * FROM `supervise_record_image`|1|1|1||0|0|21294|21294|21294|21294|
|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|3|3||0|0|39918|39918|13306|13306|
|v4_sales|SELECT * FROM `warranty_can_added`|1|111|111||0|0|3559529|3559529|3559529|3559529|
|account|SELECT min(create_time)create_time FROM tenant.erp_sales WHERE tenant_id=? AND tenant_wechatapp_id=?|1|1|1||0|0|0|0|1|1|
|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?.update_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?.update_time>=? AND t?.update_time<? AND t?.is_sales=? AND t?.sales_status=? 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?.update_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|3383|3383|10|10|
|shop_work|SELECT * FROM `report_data_source`|1|8|8||0|0|57893|57893|57893|57893|
|platform|SELECT * FROM `custommadeorderstatus`|1|1|1||0|0|37709|37709|37709|37709|
|user_service|SELECT * FROM `user_source`|1|101|101||0|0|18738686|18738686|18738686|18738686|
|payment|SELECT * FROM `refund_order`|1|2|2||0|0|14285|14285|14285|14285|
|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 ?|1|25|25||0|0|1230601|1230601|0|0|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,t?.maintain_shop_id AS shopId,t?.maintain_employee_id AS employeeId,sum(if(t?.event_type=?,?,?)) AS maintain_times,count(DISTINCT if(t?.event_type IN(?),t?.potential_customer_id,?)) AS maintain_trade,count(DISTINCT if(t?.event_type=?,t?.potential_customer_id,?)) AS success_trade,count(DISTINCT if(t?.event_type=?,t?.potential_customer_id,?)) AS failed_trade,sum(if(t?.event_type=?,t?.deal_sale_amount,?)) AS deal_amount FROM v4_user.potential_customer_maintain t? JOIN v4_user.potential_customer t? ON t?.id=t?.potential_customer_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?.maintain_shop_id,t?.maintain_employee_id LIMIT ? OFFSET ?|1|1|1||0|0|1032|1032|40|40|
|platform|SELECT * FROM `employee`|1|1|1||0|0|10068|10068|10068|10068|
|sms|SELECT * FROM `sms_send`|1|1007|1007||0|0|9379665|9379665|9379665|9379665|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.employee_id,if(t?.member_erp_id>?,?,t?.member_erp_id) AS memberId,t?.shop_id,(CASE t?.scene WHEN ? THEN ? ELSE ? END) AS taskType,t?.create_time AS taskCreateTime,t?.begin_time AS beginTime,t?.expire_time AS expireTime,t?.finish_time AS finishTime,(CASE t?.`status` WHEN ? THEN ? ELSE ? END) AS status FROM employee.backlog_? t? WHERE t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|6902|6902|1902|1902|
|activity_service|SELECT * FROM `intelligent_marketing_activity_gift`|1|2|2||0|0|498054|498054|498054|498054|
|account|SELECT sales_date,tenant_id,tenant_wechatapp_id tenant_app_id,dept_erp_id shop_id,employee_erp_id user_id,count(*)amount FROM tenant.erp_sales WHERE tenant_id=? AND tenant_wechatapp_id=? AND sales_status IN (?) AND is_sales=? AND create_time>=? AND create_time<=? GROUP BY tenant_id,tenant_app_id,sales_date,dept_erp_id,employee_erp_id|1|1|1||0|0|224|224|1|1|
|payment|SELECT * FROM `refund_order_msg`|1|15|15||0|0|14285|14285|14285|14285|
|v4_sales|SELECT * FROM `warranty_detail`|1|86|86||0|0|4564262|4564262|4564262|4564262|
|tenant|SELECT * FROM `employee_shop`|1|3|3||0|0|93535|93535|93535|93535|
|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=? LEFT 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 t?.tenant_app_id=? AND sp.id=? AND t?.create_time>=? AND t?.create_time<=? AND t?.average_score<t?.low_score|1|4|4||0|0|70509|70509|0|0|
|account|SELECT t?.id,tb.tenant_id,t?.tenant_wechatapp_id AS tenantAppId,t?.employee_erp_id AS saleEmployeeId,t?.dept_erp_id AS saleDeptId,t?.erp_sales_id AS salesErpId,tb.erp_member_id AS memberId,t?.warranty_no AS warrantyNo,(CASE t?.is_disable WHEN ? THEN ? ELSE ? END) AS status,t?.create_time AS operTime,t?.has_read hasRead FROM warranty_service.warranty t? JOIN user_service.tenant_member_bind tb ON tb.tenant_id=? AND tb.tenant_app_id=t?.tenant_wechatapp_id AND tb.user_id=t?.user_id WHERE t?.tenant_wechatapp_id=? AND t?.version IN (?) AND t?.is_disable=? AND t?.update_time>=? AND t?.update_time<=? ORDER BY t?.id ASC LIMIT ? OFFSET ?|1|1|1||0|0|24|24|8|8|
|account|SELECT tu.id,tu.tenant_id tenantId,tu.tenant_app_id tenantAppId,tu.user_id userId,tu.user_name userName,tu.mobile_no mobileNo,tu.create_time createTime,? updateTime,tu.sex,? sourceType,if(tu.mobile_no IS ?,?,?)registerFlag,tu.status FROM user_service.tenant_member tu WHERE tu.tenant_id=? AND tu.tenant_app_id=? AND tu.create_time>=? AND tu.create_time<=? ORDER BY tu.tenant_id,tu.id LIMIT ? OFFSET ?|1|1|1||0|0|0|0|0|0|
|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|
|shop_work|SELECT * FROM `task_old`|1|1|1||0|0|3211|3211|3211|3211|
|shop_work|SELECT * FROM `manage_report`|1|1|1||0|0|662|662|662|662|
|v4_user|SELECT t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id,? AS statisticDate,? AS bizType,count(*) AS amount FROM v4_employee.task_task t? WHERE t?.tenant_id=? AND t?.tenant_app_id=? AND t?.task_type=? AND t?.finish_time>=? AND t?.finish_time<? GROUP BY t?.tenant_id,t?.tenant_app_id,t?.shop_id,t?.employee_id LIMIT ? OFFSET ?|1|1|1||0|0|5479|5479|0|0|
|account|SELECT t.tenant_id,t.tenant_app_id,t.coupon_id,t.statistic_date,t.coupon_type,t.ambassador_id,ifnull(sum(ifnull(t.total_fee,?)),?)amount,t.busi_date FROM (SELECT cu.tenant_id,cu.tenant_app_id,cu.template_id coupon_id,date_format(od.payment_time,?)statistic_date,cu.coupon_type,ce.source_user_id ambassador_id,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 INNER JOIN coupon_service.coupon_extend ce ON cu.tenant_app_id=ce.tenant_app_id AND cu.id=ce.coupon_id WHERE od.tenant_wechatapp_id=? AND od.status>=? AND cu.source=? 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.coupon_type,t.ambassador_id,t.busi_date LIMIT ? OFFSET ?|1|20|20||0|0|43378|43378|0|0|
|v4_user|SELECT count(*) FROM v4_activity.lottery_log t WHERE t.tenant_id=? AND t.tenant_app_id=? AND t.member_id=? AND t.create_time>=? AND t.create_time<DATE_ADD(?,INTERVAL ? day)|1|1|1||0|0|15461|15461|1|1|
|v4_user|SELECT create_time FROM v4_user.member WHERE tenant_id=? AND tenant_app_id=? ORDER BY create_time ASC LIMIT ?,?|1|1|1||0|0|122387|122387|1|1|
|tenant|SELECT * FROM `erp_employee`|1|5|5||0|0|88494|88494|88494|88494|
|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>=?|1|24|24||0|0|58807|58807|1|1|
|platform|SELECT * FROM `tbhy_hyda_sync`|1|1|1||0|0|15838|15838|15838|15838|
|v4_sales|SELECT * FROM `warranty`|1|105|105||0|0|2632089|2632089|2632089|2632089|
|platform|SELECT * FROM `custommadeorder`|1|3|3||0|0|11805|11805|11805|11805|
|account|SELECT esd.id,es.tenant_id,es.tenant_wechatapp_id AS tenantAppId,es.sales_erp_id,esd.sales_index,es.dept_erp_id,es.employee_erp_id,es.member_erp_id,es.sales_status,es.sales_date,esd.category_erp_id,ifnull(esde.sales_brand,?) AS sales_brand,ifnull(esde.sales_craft,?) AS sales_craft,esd.amount_total,esd.amount_pay,esd.quantity,round(esd.amount_pay/esd.quantity,?) AS amount_avg 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 AND esd.sales_type=? LEFT JOIN tenant.erp_sales_detail_extend esde ON esde.tenant_id=esd.tenant_id AND esde.tenant_wechatapp_id=esd.tenant_wechatapp_id AND esde.sales_erp_id=esd.sales_erp_id AND esde.sales_index=esd.sales_index WHERE es.tenant_id=? AND es.tenant_wechatapp_id=? AND es.update_time>=? AND es.update_time<=? AND es.sales_status IN(?) LIMIT ? OFFSET ?|1|1|1||0|0|0|0|0|0|
|qrcode_service|SELECT * FROM `qrcode`|1|9|9||0|0|77875|77875|77875|77875|
|qrcode_login|SELECT * FROM `qrcode_log`|1|1|1||0|0|8271|8271|8271|8271|
|account|SELECT t?.id,t?.tenant_id,t?.tenant_app_id,t?.goods_id AS goodsId,t?.goods_name AS goodsName,t?.barcode,t?.spec,t?.sales_volume AS salesVolume,t?.quantity FROM goods.goods_sku t? JOIN goods.goods t? ON t?.goods_id=t?.id WHERE t?.tenant_app_id=? AND t?.update_time>=? AND t?.update_time<=? LIMIT ? OFFSET ?|1|1|1||0|0|22542|22542|0|0|
|user_service|SELECT * FROM `wx_member_card_redirect`|1|8|8||0|0|855584|855584|855584|855584|
|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|1350|1350|450|450|
|platform|SELECT * FROM `callbacklog`|1|3|3||0|0|34421|34421|34421|34421|
|platform|SELECT * FROM `bargainapplication`|1|1|1||0|0|59587|59587|59587|59587|
|account|SELECT pd.id product_id,? tenant_id,? tenant_wechatapp_id,pd.product_name,? product_type,pd.tag_price price,it.volume,it.id inventory_id,pd.create_time,? partner_id,? partner_name,pd.update_time FROM gift_mail.platform_product pd LEFT JOIN gift_mail.platform_inventory it ON pd.id=it.product_id LIMIT ? OFFSET ?|1|2|2||0|0|4366|4366|2183|2183|
|v4_user|SELECT * FROM `employee_external_bind`|1|76|76||0|0|7106383|7106383|7106383|7106383|
|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,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=? 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 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,es.employee_erp_id,DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.update_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|202|202|0|0|
|sms|SELECT * FROM `sms_send_back`|1|1|1||0|0|16036|16036|16036|16036|
|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,?) 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.is_sales=? AND es.sales_status IN(?) 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 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,DATE_FORMAT(es.sales_date,?),DATE_FORMAT(es.sales_date,?),DATE_FORMAT(t?.create_time,?) LIMIT ? OFFSET ?|1|1|1||0|0|70259|70259|0|0|
|account|SELECT od.tenant_id,od.tenant_wechatapp_id tenant_app_id,od.user_id,count(?)order_amount FROM `order`.order_info od WHERE od.tenant_wechatapp_id=? AND od.status IN (?) AND od.user_id IN (?) GROUP BY od.tenant_id,od.tenant_wechatapp_id,od.user_id|1|1|1||0|0|507|507|20|20|
|account|SELECT * FROM `wx_redpacket_send_order`|1|42|42||0|0|886381|886381|886381|886381|
|v4_user|SELECT * FROM `member_butler_update_error`|1|13|13||0|0|1591768|1591768|1591768|1591768|
|tenant|SELECT * FROM `employee_qrcode`|1|2|2||0|0|66933|66933|66933|66933|
|platform|SELECT * FROM `productdesc`|1|1|1||0|0|2228|2228|2228|2228|
