|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|user_service|select ue.employee_id as employeeid, count(*) as quantity from user_service.user_employee ue where ue.employee_id in ($0) and ue.tenant_id = $1 and ue.tenant_wechatapp_id = $2 and ue.shop_id = $3 group by ue.employee_id|181|289|9||0|0|798427|46180|181|1|
|v4_sales|select * from v4_sales.erp_sales_detail where sales_erp_id = $0 and product_barcode = $1|172|216|8||0|0|180110009|1047609|173|2|
|corpwx|select id, tenant_id, tenant_app_id, external_user_id, wx_user_id from external_user_bind where (tenant_id = $0 and tenant_app_id = $1 and external_user_id = $2) or (tenant_id = $3 and tenant_app_id = $4 and wx_user_id = $5)|170|350|19||0|0|16426701|214229|112|1|
|corpwx|select id, tenant_id, cwx_user_id, user_id, old_user_id, union_id, name, sex, avatar, tenant_user_id, un_assign_flag, corp_user_id, wx_user_id, create_time, update_time from external_user where tenant_id = $0 and cwx_user_id = $1|96|132|4||0|0|217413|5580|217413|5580|
|tenant|select sales_date from tenant.erp_sales where tenant_id = $0 and tenant_wechatapp_id = $1 and member_erp_id = $2 and sales_erp_id < $3 and is_sales = $4 and sales_status = $5 order by sales_erp_id asc limit $6|75|149|4||0|0|819757|27855|75|1|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume desc, p.tag_price asc, p.id desc limit $2|72|94|2||0|0|593773|8258|432|6|
|v4_sales|select * from v4_sales.erp_sales_detail where sales_erp_id = $0 and sales_type = $1 order by sales_index|72|558|25||0|0|75394815|1047617|287|14|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1)|63|99|12||0|0|86473064|1373483|54|2|
|v4_user|select id, shop_id, mobile_no, member_name, head_img_url, sex, birthday, birthday_is_lunar, memorial_name, memorial_day, memorial_day_is_lunar, address, interest, wx_union_id, mini_open_id, h5_open_id, wx_card_code, recommend_id, recommend_bind_time, external_user_id, status, combine_status, combine_id, tenant_id, tenant_app_id, create_time, update_time from member where (mobile_no = $0 or wx_card_code = $1) and tenant_id = $2 and tenant_app_id = $3 limit $4|57|88|4||0|0|10613278|210647|47|1|
|tenant|select es.id, es.sales_no, es.sales_date, es.member_erp_id, es.sales_erp_id, es.is_sales from erp_sales es where es.tenant_id = $0 and es.tenant_wechatapp_id = $1 and es.sales_status = $2 and es.sales_no like concat($3, $4) order by es.sales_date desc limit $5|54|105|7||0|0|23295786|998207|8|1|
|activity_service|select count(*) > $0 from activity_service.online_sign_user_sign_log where tenant_app_id = $1 and user_id = $2 and to_days(create_time) = to_days($3)|49|67|2||0|0|19518480|398444|49|1|
|coupon_service|select count(*) from employee_give_coupon_log where tenant_app_id = $0 and coupon_push_id = $1|47|67|5||0|0|1128594|36680|47|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126|45|52|1||0|0|52383|1563|24123|742|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2)|42|59|6||0|0|57648122|1373380|74|3|
|user_service|select count(0) from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5|41|68|6||0|0|431547|96780|41|1|
|v4_sales|select * from erp_sales where sales_erp_id = $0 limit $1|38|226|19||0|0|20523068|540202|38|1|
|comment_service|select * from comment_service.comment_reward where comment_id = $0 limit $1|31|54|8||0|0|11954139|393632|5|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)|23|30|1||0|0|31571922|1373210|451|21|
|v4_coupon|select count(*) from ( select grant_id from v4_coupon.coupon where put_id = $0 and member_id = $1 and tenant_id = $2 and tenant_app_id = $3 group by grant_id ) c|23|38|3||0|0|1983743|86426|23|1|
|v4_user|select count(*) as total from member_source where source_id = $0 and tenant_id = $1 and tenant_app_id = $2|22|30|2||0|0|4633497|210647|22|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3)|21|25|1||0|0|28825530|1373380|58|6|
|v4_sales|select count(*) as total from warranty where member_id in ($0) and is_disable = $1 and tenant_id = $2 and tenant_app_id = $3|19|36|7||0|0|2005120|105551|19|1|
|gift_mail|select count(0) from ( select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume desc, p.tag_price asc, p.id desc ) tmp_count|19|24|2||0|0|137978|7262|19|1|
|coupon_service|select ifnull(sum(quantity), $0) from coupon_service.coupon_market_order where market_id = $1 and user_id = $2 and order_state = $3|19|43|7||0|0|9876846|520030|19|1|
|corpwx|update external_user set un_assign_flag = $0 where tenant_id = $1 and un_assign_flag = $2|18|52|7||0|0|479230|57322|0|0|
|coupon_service|select * from coupon_service.coupon_market_order where pay_type in ($0, $1) and order_state = $2 and update_time <= date_sub(now(), interval $3 minute)|17|40|7||0|0|8835946|520081|0|0|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume desc, p.tag_price asc, p.id desc limit $2, $3|17|22|1||0|0|141263|8390|102|6|
|tenant|select count(*) from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.tenant_id = s.tenant_id and sg.tenant_app_id = s.tenant_app_id and sg.id = s.sneak_guest_id join tenant.employee e on e.tenant_id = s.tenant_id and e.id = s.employee_id where s.tenant_id = $0 and s.tenant_app_id = $1 and sg.create_shop_id = $2 and (sg.fail_type is null or sg.fail_type = $3) and s.event_type = $4 and s.create_time between $5 and $6|15|23|3||0|0|30503|2417|15|1|
|coupon_service|select count(0) from coupon_service.employee_give_coupon_log egcl where egcl.employee_give_coupon_id = $0 and egcl.shop_id = $1 and egcl.employee_id = $2|15|19|2||0|0|178967|21069|15|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4)|15|21|3||0|0|20589596|1373457|53|4|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6)|14|15|1||0|0|19214862|1373028|76|7|
|coupon_service|select cmod.coupon_id, cmo.pay_type from coupon_service.coupon_market_order_detail cmod join coupon_service.coupon_market_order cmo on cmo.tenant_id = $0 and cmo.tenant_app_id = $1 and cmo.id = cmod.order_id where cmod.tenant_id = $2 and cmod.tenant_app_id = $3 and cmod.coupon_id in ($4)|14|157|18||0|0|1167758|88791|14|1|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.next_maintain_date >= $3 and sg.next_maintain_date <= $4 and sg.status = $5 order by sg.id desc limit $6|14|28|7||0|0|8396201|615454|67|10|
|v4_employee|select t.id as task_id, task_type, if(task_type = $0, st.description, it.description) as description, if(task_type = $1, st.quick_reply, it.quick_reply) as quick_reply, task_name, member_id, member_name, member_mobile_no, member_sex, member_level, t.start_time, t.end_time, datediff(t.end_time, $2) as left_days, send_coupons, recv_coupons, st.coupons, t.accept_time, t.plan_arrival_shop_time, t.arrival_shop_time, t.trade_time from task_task t left join task_system_task_template st on st.id = t.task_template_id and st.tenant_id = $3 and st.tenant_app_id = $4 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $5 and it.tenant_app_id = $6 where t.status = $7 and task_type = $8 and system_task_type = $9 and t.start_time <= $10 and t.end_time > $11 and shop_id = $12 and employee_id = $13 and finish_time is null and t.tenant_id = $14 and t.tenant_app_id = $15 order by t.id desc limit $16|14|32|10||0|0|5809954|414998|19|2|
|tenant|select count(0) from erp_sales es where es.tenant_id = $0 and es.tenant_wechatapp_id = $1 and es.sales_date >= $2 and es.employee_erp_id = $3 and es.sales_status = $4|13|20|2||0|0|42459|4259|13|1|
|user_service|select t1.id, t1.user_id as userid, t1.user_name as username, t1.sex, t1.mobile_no as mobileno, t1.head_img_url as headimg from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5 order by ue.update_time desc, t1.id desc limit $6|12|20|3||0|0|168916|53998|120|10|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id = $4 and t.scene = $5 and t.begin_time >= $6 and t.expire_time < $7|12|17|2||0|0|91152|42932|12|1|
|employee|select count(0) from ( select distinct t.user_id, t.user_type from backlog t where t.tenant_id = $0 and t.tenant_app_id = $1 and t.employee_id = $2 and t.scene = $3 and t.begin_time >= $4 and t.expire_time < $5 and t.finish_amount = $6 ) table_count|12|18|2||0|0|91184|42934|12|1|
|corpwx|select count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id = $1 and t.create_time >= $2 and t.create_time < $3|12|23|6||0|0|262747|25367|12|1|
|coupon_service|select cu.id, cu.coupon_name, cu.coupon_type, cu.coupon_no, cu.source as couponchannel, cu.coupon_state, ce.user_name, ce.creator_user_name as creatorname, if(coupon_type in ($0, $1), cu.face_value, round(cu.face_value / $2, $3)) as facevalue, cu.begin_time, cu.end_time, ce.remark, ce.mobile_no, ce.creator_mobile_no, cu.create_time, cu.user_id, round(cu.balance / $4, $5) as balance, ce.source_user_id, ce.source_user_type, ce.member_source_shop from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $6 and ce.tenant_app_id = $7 and ce.id = cu.id where cu.tenant_id = $8 and cu.tenant_app_id = $9 and cu.coupon_no = $10 limit $11|11|127|42||0|0|3220553|292780|11|1|
|user_service|select count(0) from user_service.tenant_member tm where tm.tenant_id = $0 and tm.tenant_app_id = $1 and (tm.user_name like concat($2, $3, $4) or tm.mobile_no = $5)|10|17|3||0|0|4528762|452910|10|1|
|coupon_service|select cu.id, cu.coupon_name, cu.coupon_type, cu.coupon_no, cu.source as couponchannel, cu.coupon_state, ce.user_name, ce.creator_user_name as creatorname, if(coupon_type in ($0, $1), cu.face_value, round(cu.face_value / $2, $3)) as facevalue, cu.begin_time, cu.end_time, ce.remark, ce.mobile_no, ce.creator_mobile_no, cu.create_time, cu.user_id, round(cu.balance / $4, $5) as balance, ce.source_user_id, ce.source_user_type, ce.member_source_shop from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $6 and ce.tenant_app_id = $7 and ce.id = cu.id where cu.tenant_id = $8 and cu.tenant_app_id = $9 and cu.coupon_name like concat(concat($10, $11), $12) limit $13|10|25|3||0|0|1694643|169465|200|20|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.coupon_name like concat(concat($4, $5), $6)|10|290|56||0|0|2058651|205926|10|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7)|10|12|2||0|0|13725772|1373380|60|7|
|coupon_service|select count(1) from coupon_service.coupon_expire_task where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and employee_id = $3 and status = $4 and expire_time > now()|10|16|2||0|0|562899|66305|10|1|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.coupon_no = $4|10|341|70||0|0|2927776|292780|10|1|
|tenant|select esd.id, esd.sales_erp_id, es.employee_name, esd.product_barcode, es.sales_no, es.member_erp_id, esd.category_name, es.sales_date, esd.category_erp_id, esd.product_name, esd.cert_no, esd.amount_pay, esd.sales_index, ifnull(ee.not_add_value_plan, $0) as not_add_value_plan from erp_sales_detail esd join erp_sales es 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 left join erp_sales_extend ee on ee.tenant_id = es.tenant_id and es.tenant_wechatapp_id = ee.tenant_wechatapp_id and es.sales_erp_id = ee.sales_erp_id and esd.sales_index = ee.sales_index where esd.tenant_id = $1 and es.sales_status = $2 and es.tenant_wechatapp_id = $3 and esd.product_barcode = $4 order by es.sales_date desc|10|40|6||0|0|257596|37043|48414|6482|
|tenant|select count(0) from ( select es.id, es.sales_no, es.sales_date, es.sales_erp_id, es.amount, ifnull(shop.shop_name, ed.dept_name) as dept_name, es.employee_name from tenant.erp_sales es join tenant.erp_department ed on ed.dept_erp_id = es.dept_erp_id and ed.tenant_id = $0 left join tenant.tenant_wechatapp_shop shop on shop.dept_erp_id = ed.dept_erp_id and shop.tenant_wechatapp_id = $1 where es.member_erp_id = $2 and es.tenant_id = $3 and es.tenant_wechatapp_id = $4 and es.sales_status = $5 and not exists ( select i.id from tenant.erp_sales_ignore i where i.tenant_id = $6 and i.tenant_app_id = $7 and es.sales_erp_id = i.erp_sales_id ) ) table_count|9|11|1||0|0|32537779|4016229|9|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8)|9|10|1||0|0|12354005|1373091|65|8|
|employee|select id, tenant_id, tenant_app_id, shop_id, employee_id, user_id, external_user_id, mobile_no, scene, status, begin_time, expire_time, create_time, update_time, directional_task_id, member_erp_id, finish_time, md5_str, tenant_open_id, data from backlog_system where tenant_app_id = $0 and scene = $1 and status = $2 and create_time between $3 and $4|9|19|7||0|0|3627677|481986|442|275|
|tenant|select es.id, es.sales_no, es.sales_date, es.sales_erp_id, es.amount, ifnull(shop.shop_name, ed.dept_name) as dept_name, es.employee_name from tenant.erp_sales es join tenant.erp_department ed on ed.dept_erp_id = es.dept_erp_id and ed.tenant_id = $0 left join tenant.tenant_wechatapp_shop shop on shop.dept_erp_id = ed.dept_erp_id and shop.tenant_wechatapp_id = $1 where es.member_erp_id = $2 and es.tenant_id = $3 and es.tenant_wechatapp_id = $4 and es.sales_status = $5 and not exists ( select i.id from tenant.erp_sales_ignore i where i.tenant_id = $6 and i.tenant_app_id = $7 and es.sales_erp_id = i.erp_sales_id ) order by es.sales_date desc limit $8|8|9|1||0|0|32031643|4014881|80|10|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.next_maintain_date >= $3 and sg.next_maintain_date <= $4 and sg.status = $5 order by sg.id desc limit $6, $7|7|11|3||0|0|4034743|615332|31|10|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31wm2wxudqaanb36iub49wacjbarzmysia$32wm2wxudqaa78choqfrvqrz0cbinhbslq$33wm2wxudqaamr79dsvynlg7gpjuc4eb2q$34wm2wxudqaa1sldbnth01vre_ut9zxtfg$35wmjqwhcaaa8bywwoqsw6buzwuzoc4cia$36wm2wxudqaataxxtt2b2fhgf1gxmmvjzw$37wm2wxudqaapkvd9j6itezoqq4lc4weia$38wm2wxudqaa_drpgxyhybmjyrclmvneda$39wm2wxudqaa9wsnd3ikc4h_wnzk1k2vwq$40wm2wxudqaawrqmqq536yxjq3xa0rr6hq$41wmjqwhcaaarxdyqymopzdjb9slxtj1pw$42wm2wxudqaamv2zzpdufldbo3tleltwha$43wm2wxudqaacij0ajowxptusrccayjwpa$44wmjqwhcaaaudtxshbzi47h8zg2lmfiww$45wm2wxudqaapgprrlcs_rezp6ksmyb-ba$46wmjqwhcaaavbzityr8oepm_upewsb-3q$47wm2wxudqaaybzvqy5h78mpm_xsh4oqtg$48wm2wxudqaavdimr_rrfqhjgpufuwmumg$49wm2wxudqaawqdaajmeyaiz3o-ti90q7a$50wm2wxudqaaqqzspdldclj9a6gixlmr9a$51wm2wxudqaag2s5wolesnpcs6ryrjgqqa$52wm2wxudqaap49a5nqg3gida7jh-y2bfw$53wm2wxudqaaiykzbpmur-jw9zg9i02ala$54wm2wxudqaatqn0c9k-1w88wvnlrnabtq$55wm2wxudqaa0fdp55ibna_vfoxljtvg0a$56wm2wxudqaa1bsxdpaegmpkfvqlo8ekza$57wm2wxudqaa6exhngpywmbjqfjjk7ptzq$58wm2wxudqaaphxkzvo_bzt9pn_mtamo7g$59wm2wxudqaaoyiuvw7yydunarj1jd_yrg$60wm2wxudqaaogcp4xupgcynhttvvjqqwq$61wm2wxudqaagc0zhfrfsrkpggzmorqn9w$62wm2wxudqaaqg6c66mlqprefeh7v5-v7g$63wm2wxudqaabjcjmazsexk7tnvvkb2xxq$64wm2wxudqaao4rvz0wu3hk8ojhfjyvh-a$65wm2wxudqaanedyao5xa-he3nx2whvaia$66wm2wxudqaaqjxypr47jtgjwnomin6cma$67wm2wxudqaarza7ae60bnfndwp1cdukxa$68wm2wxudqaa7wrik0z_bnhv1otbrhamaa$69wm2wxudqaanagpzywpppkvfvkb5xqtya$70wm2wxudqaajarrjo39dvgcwii84evdig$71wm2wxudqaayuid, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114wm2wxudqaasr08gxp-b1edpl4n1nckpg$115wm2wxudqaambfauwzn_eza1l, $116, $117, $118, $119, $120, $121, $122, $123, $124|7|11|1||0|0|8120|1160|3766|538|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5)|7|8|1||0|0|9608185|1372989|33|6|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122wm2wxudqaai53eymxt5kbvgnayy1-bka$123wm2wxudqaajpgwh5z-qhbhmnfglz7zfa$124wmjqwhcaaa6_yvdwu7a3johxvrrdyjkg$125wm2wxudqaacwi9...|7|10|1||0|0|9121|1303|4095|585|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.status = $3 order by sg.id desc limit $4, $5|6|9|2||0|0|3691449|615459|41|9|
|tenant|select count(*) from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.id = s.sneak_guest_id where s.tenant_id = $0 and s.tenant_app_id = $1 and s.shop_id = $2 and s.event_type = $3 and s.create_time between $4 and $5|6|7|2||0|0|16897|3278|6|1|
|v4_sales|select count(*) as total from v4_sales.erp_sales es join v4_sales.warranty_can_added wca on wca.sales_id = es.id and wca.tenant_id = $0 and wca.tenant_app_id = $1 left join v4_sales.warranty w on w.sales_id = es.id and w.tenant_id = $2 and w.tenant_app_id = $3 where is_sales = true and sales_status = $4 and (es.sales_no like concat($5, $6) or es.member_erp_id = $7) and es.tenant_id = $8 and es.tenant_app_id = $9|6|9|2||0|0|1533687|255647|6|1|
|user_service|select count(0) from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 where t1.tenant_id = $2 and t1.tenant_app_id = $3|6|7|1||0|0|422342|289058|6|1|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.status = $3 order by sg.id desc limit $4|6|10|3||0|0|3691431|615392|31|9|
|tenant|select count(0) from ( select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, ey.employee_name as maintainemployeename, sg.last_maintain_date, ws.shop_name as createshopname, sg.status, sg.create_time, t1.employee_name as createemployeename, sg.finish_date, sg.fail_type, gs.sales_id, gs.sales_no, w1.shop_name as salesshopname, gs.sales_date, gs.product_name, gs.product_quantity, gs.amount as salesamount, if(sg.status = $0, case when sg.fail_type = $1 then $2 when sg.fail_type = $3 then $4 else ifnull(emp.employee_name, $5) end, $6) as operfailemployeename from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id left join tenant_wechatapp_shop ws on sg.create_shop_id = ws.id left join employee t1 on sg.create_employee_id = t1.id left join sneak_guest_sales gs on sg.tenant_app_id = gs.tenant_app_id and sg.id = gs.sneak_guest_id left join tenant_wechatapp_shop w1 on gs.shop_id = w1.id left join tenant.sneak_guest_maintain gm on gm.sneak_guest_id = sg.id and gm.event_type = $7 left join employee emp on gm.employee_id = emp.id where sg.tenant_app_id = $8 order by sg.id desc ) tmp_count|6|17|4||0|0|1867020|685028|6|1|
|order|select od.id, od.order_no as orderno, od.status, od.take_type as taketype, od.create_time as createtime, od.remark, od.total_fee as totalfee, od.freight_fee as freightfee, od.discount_fee as discountfee, od.take_id as takeid, od.payment_fee as paymentfee, dt.product_id as productid, dt.price, dt.quantity, dt.sku_id as skuid, dt.art_no as artno, dt.image_url as imageurl, dt.product_name as productname, dt.take_remark as takeremark, dt.take_day as takeday, od.product_fee as productfee, ad.user_name as receivename, ad.mobile_no as mobileno, ad.shop_name as shopname, ad.address, ad.express_no as expressno, ad.express_company as expresscompany, od.user_name as username, od.update_time as updatetime, od.child_status as childstatus, od.finish_type as finishtype, od.receive_time as receivetime, od.user_id as userid, od.mobile_no as buymobileno, od.edit_fee_flag as editfeeflag, dt.spec as spec, od.source, od.take_shop_id, od.take_shop_name, od.take_employee_user_id, od.take_employee_user_name, od.activity_type, od.activity_id, od.offline_payment_fee, od.online_wait_fee, od.offline_wait_fee, od.pay_way, od.take_employee_id, od.pay_id from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and (od.mobile_no = $2 or ad.mobile_no = $3) order by od.create_time desc limit $4|6|8|1||0|0|522054|87147|20|4|
|warranty_service|select count(*) from warranty where user_id = $0 and tenant_wechatapp_id = $1 and is_disable = $2|5|17|7||0|0|23595|10281|5|1|
|coupon_service|select cmod.coupon_id, cmo.pay_type from coupon_service.coupon_market_order_detail cmod join coupon_service.coupon_market_order cmo on cmo.tenant_id = $0 and cmo.tenant_app_id = $1 and cmo.id = cmod.order_id where cmod.tenant_id = $2 and cmod.tenant_app_id = $3 and cmod.coupon_id in ($4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23)|5|7|1||0|0|209903|82933|100|20|
|v4_employee|select $0 as task_type, t1.id as invite_task_id, t1.name, ifnull(t2.undo_count, $1) as undo_count, t1.invite_time as invite_task_start_time, ifnull(t1.interrupt_time, t1.end_time) as invite_task_end_time from task_invite_task_template t1 left join ( select t.task_template_id as id, sum(if(t.finish_time is null, $2, $3)) as undo_count from task_task t where t.task_type = $4 and t.`status` = $5 and t.end_time > $6 and t.shop_id = $7 and t.employee_id = $8 and t.tenant_id = $9 and t.tenant_app_id = $10 group by t.task_template_id ) t2 on t1.id = t2.id where t1.status in ($11, $12, $13) and t1.tenant_id = $14 and t1.tenant_app_id = $15 order by t1.id desc|5|7|2||0|0|32955|8355|20|4|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and maintain_employee_id = $3|5|7|1||0|0|29908|11071|5|1|
|v4_sales|select id, warranty_id, sales_detail_id, tenant_id, tenant_app_id, create_time, update_time from warranty_detail where warranty_id = $0 and tenant_id = $1 and tenant_app_id = $2|5|6|1||0|0|1195665|239313|9|4|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and create_shop_id = $1 and maintain_employee_id = $2 and status = $3 and next_maintain_date between $4 and $5|5|7|1||0|0|29908|11071|5|1|
|user_service|select * from user_service.user_employee where employee_erp_id = $0 and tenant_id = $1 and tenant_wechatapp_id = $2 and date_format(update_time, '%y-%m-%d %h') = date_format(now(), '%y-%m-%d %h')|5|29|14||0|0|696109|328532|1424|1242|
|value_added|select $0 as limitdaytype, t.tenant_wechatapp_id as tenantappid, t.user_id as userid, min(ue.employee_erp_id) as employee_erp_id, ue.dept_erp_id, group_concat(t.product_barcode order by product_barcode asc) as productcode, group_concat(t.product_name order by product_barcode asc) as productname from value_added_user t inner join value_added_user_extend ue on t.id = ue.id where t.tenant_wechatapp_id = $1 and t.state = $2 and t.start_add_time >= date_add(date_format($3, '%y-%m-%d'), interval $4 * (t.add_days - $5) day) and t.start_add_time < date_add(date_format($6, '%y-%m-%d'), interval $7 * (t.add_days - $8) + $9 day) group by t.tenant_wechatapp_id, t.user_id, ue.dept_erp_id|5|13|8||0|0|1155091|416240|443|248|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)|5|5|1||0|0|6863017|1372882|47|10|
|corpwx|select msg_type from corpwx.mini_app_msg where tenant_id = $0 group by msg_type union select $1 from corpwx.task_card_send_record where tenant_id = $2|4|99|41||0|0|1990456|505390|6|2|
|order|select max(create_time) from `order`.order_operator_log where tenant_wechatapp_id = $0 and order_id = $1|4|17|4||0|0|3427932|857296|4|1|
|wx_gateway|select id, tenant_id, tenant_app_id, wx_template_id, employee_id, busi_id, busi_type, url, push_time, category, title, content, status, retry_amount, remark, create_time, update_time, del_flag from wx_template_push where push_time <= $0 and status = $1 and category = $2 and del_flag = $3|4|6|2||0|0|32812|8203|0|0|
|employee|select count(*) from label_task_employee t1 join label_task_setting t2 on t1.label_task_id = t2.id and t2.disabled = $0 where t1.tenant_app_id = $1 and t1.shop_id = $2 and t1.visit_status > $3 and t1.finish_time >= date_sub(current_date, interval $4 day) and t1.finish_time < current_date|4|5|1||0|0|80417|48662|4|1|
|tenant|select count(*) as amount from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and maintain_employee_id = $3 and create_time <= $4|4|5|1||0|0|25770|11071|4|1|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3|4|50|21||0|0|777700|194438|4|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, ...|4|11|5||0|0|4247325|1320585|1773|571|
|order|select id from order_operator_log where tenant_wechatapp_id = $0 and order_id = $1 and src_child_status = $2 and dst_child_status = $3 order by create_time desc limit $4|4|16|4||0|0|3427612|857164|0|0|
|corpwx|select template_id, name from corpwx.app_template where template_id in ( select template_id from corpwx.mini_app_msg where tenant_id = $0 and template_id is not null group by template_id union all select templateid from ( select replace(json_extract(msg_content, $1), $2, $3) as templateid from corpwx.task_card_send_record where tenant_id = $4 ) a where templateid is not null group by templateid )|4|176|63||0|0|80314214|20086510|8|3|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)|4|5|1||0|0|5490238|1373016|65|18|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and (od.mobile_no = $2 or ad.mobile_no = $3)|4|7|2||0|0|348039|87147|4|1|
|corpwx|select count(0) from ( select template_id, msg_type, msg_content, err_msg, create_time, to_user from corpwx.mini_app_msg where tenant_id = $0 union select replace(json_extract(msg_content, $1), $2, $3) as templateid, $4, msg_content, err_msg, create_time, to_user from corpwx.task_card_send_record where tenant_id = $5 ) a where 1 = 1|4|99|41||0|0|2055170|537113|4|1|
|v4_sales|select id, warranty_id, sales_detail_id, tenant_id, tenant_app_id, create_time, update_time from warranty_detail where warranty_id = $0 and sales_detail_id = $1 and tenant_id = $2 and tenant_app_id = $3|4|5|1||0|0|955257|239101|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70wm2wxudqaagc4eu9eh4pl1mngn2vb8fq$71wm2wxudqaao4vmygaixetag76dqbptka$72wm2wxudqaaacqrj1la3zfentrqjppnig$73wm2wxudqaafunsptcqyfugvyxgcyktgw$74wm2wxudqaabscdx5um99l5h8ulaevrsa$75wm2wxudqaaqstbh1jiwwlrro7hpdup2a$76wm2wxudqaakz0cstemd5p-y05gnnh9yq$77wm2wxudqaaw4wc6lwuriczv3kis90l2q$78wm2wxudqaahg1x3hm4kt-uypurslulvq$79wm2wxudqaape_rignhpdp73y-yivb2cg$80wmjqwhcaaaazmupk_n5zkmbjjkakjozq$81wm2wxudqaatujbdadtoe7duemrmb58jq$82wm2wxudqaabwvrjikkwhtusj6xf0fota$83wm2wxudqaa8mteuuumutle4gb7o88-wa$84wm2wxudqaaswmtc_byofbu5jnb4olcww$85wm2wxudqaa0qf21lchygnnatvfe6qexa$86wm2wxudqaagwhf8kcklksygem4ul4iyw$87wm2wxudqaa6pidpgexfhjr79ukhi_wpg$88wmjqwhcaaa7opvtlnucsws7ly_l5vdjg$89wm2wxudqaaph0nrf1-qfyoqunqd4rpdg$90wm2wxudqaaylflrwgwq7jxcr9bqeahlg$91wmjqwhcaaamyejsokit9ijxgglapsh6w$92wm2wxudqaakgpv1x_g-xdyfmonorvbtg$93wm2wxudqaa94p3x12fw2lura68xxkx-w$94wm2wxudqaa1mx3are36f-gfoa5dchegq$95wm2wxudqaahynze7bkqpho1hskimggkq$96wm2wxudqaaqv9oskxjwybzk-gxnbbebg$97wm2wxudqaagjbw9qwjx8v7v5dzb1mndw$98wm2wxudqaaodqwwn2bnxm5tn-v7aeo4w$99wm2wxudqaa6qkemk3dyunhkwteuojgca$100wm2wxudqaaswxfxc2xn3fax71ikgrjka$101wm2wxudqaa5e7pqsffbn-raaw3ozld5q$102wm2wxudqaaia80bf5j-uznuy5gooxdxq$103wm2wxudqaa924f2wilnbp48rdzeasb_a$104wm2wxudqaalcrhlgfb1bdhgeyxgtihaq$105wmjqwhcaaakzefbbp5e5aira0ddf_zmw$106wm2wxudqaap_t-aw67voa7upkrkj7fpg$107wm2wxudqaao9ru-xpg5rlmztrkicowjg$108wm2wxudqaain5kvzn0tjwenhknn4j0_w$109wmjqwhcaaawe2wxtid9v955ch-rmnfgq$110wm2wxudqaac6kvudrdfwjdzdsufb1cpa$111wmjqwhcaaar_upiiganhccmhzicli94a$112wm2wxudqaabsf5lififpb6sdj59na_iw$113wmjqwhcaaaojjmhpikjmxyb9sn4a8brg$114wm2wxudqaadbai1lcpb0sjnhds_br02a$115wm2wxudqaaqxkzfbj1sbhp-vwemcgeva$116wm2wxudqaaqtz8m8_a35vzh5zsjj46sw$117wm2wxudqaaa6zl31ozj6taspiukfmp5a$118wm2wxudqaav-64czvqb4-1pf_t_b02og$119wm2wxudqaao7xujbepmstvtd94oc_jzw$120wm2wxudqaazx13oj23301ajowwe7c5dq$121wmjqwhcaaaetqp7kyakxg5xopsf1tfag$122wm2wxudqaaqsy15alqt7xuhpelgyzdbg$123wmjqwhcaaaoq05dehcx76uwgjeyc2grq$124wm2wxudqaazm25xuiick7raeffnzxqla$125wm2wxudqaabf_f...|3|3|1||0|0|10506|3502|5145|1715|
|user_service|select tm.user_id as id, tm.user_name as username, tm.head_img_url as headimgurl, tm.user_name as nickname, tm.mobile_no as mobile, tm.sex from user_service.tenant_member tm join user_service.user_employee ue on ue.tenant_id = $0 and ue.tenant_wechatapp_id = $1 and tm.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where tm.tenant_id = $4 and tm.tenant_app_id = $5 order by tm.id desc limit $6|3|3|1||0|0|16878|7974|36|12|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119wm2wxudqaa-ztmp35ugpjiifkxnde45a$120wm2wxudqaaezko0k7ulqvoriu-uti32g$121wm2wxudqaat5d-hsjwmlixgp11dzw1ow$122wmjqwhcaaao630vpurbshp6amvnqozpw$123wm2wxudqaa3idhln0p2ojojueu7gc5ra$124wm2wxudqaambeyqno_lap47qmxmkrmva$125wmjqwhcaaa2ram...|3|4|1||0|0|4779|1593|2259|753|
|erp_app|insert into app_status(id, tenant_id, app_name, version, pid) values (?, ?, ?, ?, ?) on duplicate key update version = $0, pid = $1, online_status_time = $2|3|3|1||0|0|0|0|0|0|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9)|3|4|1||0|0|4117810|1373247|25|9|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1|3|8|4||0|0|109869|53847|3|1|
|tenant|select count(distinct concat(dept_erp_id, $0, sales_date)) as total from tenant.erp_sales where tenant_id = $1 and tenant_wechatapp_id = $2 and member_erp_id = $3 and sales_status = $4 and is_sales = $5|3|8|3||0|0|57943|27854|3|1|
|v4_coupon|select * from v4_coupon.sales_give_coupon_record where put_id = $0 and sales_id = $1 and rule_id = $2 and tenant_id = $3 and tenant_app_id = $4 limit $5|3|5|2||0|0|247931|82663|0|0|
|user_service|select tm.user_id as id, tm.user_name as username, tm.head_img_url as headimgurl, tm.user_name as nickname, tm.mobile_no as mobile, tm.sex from user_service.tenant_member tm where tm.tenant_id = $0 and tm.tenant_app_id = $1 and (tm.user_name like concat($2, $3, $4) or tm.mobile_no = $5) order by tm.id desc limit $6|3|4|2||0|0|1365136|456127|3|1|
|order|select count(*) as amount 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 = $0 and od.take_type = $1 and od.type = $2 and od.status = $3 and ad.shop_id = $4 and dt.take_start_date = $5|3|4|2||0|0|19462|6537|3|1|
|v4_employee|select t.id as task_id, task_type, if(task_type = $0, st.description, it.description) as description, if(task_type = $1, st.quick_reply, it.quick_reply) as quick_reply, task_name, member_id, member_name, member_mobile_no, member_sex, member_level, t.start_time, t.end_time, datediff(t.end_time, $2) as left_days, send_coupons, recv_coupons, st.coupons, t.accept_time, t.plan_arrival_shop_time, t.arrival_shop_time, t.trade_time from task_task t left join task_system_task_template st on st.id = t.task_template_id and st.tenant_id = $3 and st.tenant_app_id = $4 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $5 and it.tenant_app_id = $6 where t.status = $7 and task_type = $8 and system_task_type = $9 and t.start_time <= $10 and t.end_time > $11 and t.finish_time >= $12 and t.finish_time < $13 and shop_id = $14 and employee_id = $15 and finish_time is not null and t.tenant_id = $16 and t.tenant_app_id = $17 order by t.id desc limit $18|3|11|6||0|0|1245002|415004|10|5|
|tenant|select distinct s.employee_id as id, e.employee_name from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.id = s.sneak_guest_id join tenant.employee e on s.tenant_id = e.tenant_id and s.employee_id = e.id where s.tenant_id = $0 and s.tenant_app_id = $1 and sg.create_shop_id = $2 and (sg.fail_type is null or sg.fail_type = $3) and s.event_type = $4 and s.create_time between $5 and $6|3|7|4||0|0|33354|21500|34|15|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)|3|3|1||0|0|4117158|1372590|33|11|
|user_service|select count(0) from user_service.tenant_member tm join user_service.tenant_member_info tmi on tm.tenant_id = tmi.tenant_id and tm.id = tmi.id left join user_service.user_employee t3 on tm.user_id = t3.user_id and tm.tenant_id = t3.tenant_id and tm.tenant_app_id = t3.tenant_wechatapp_id where t3.id is null and tmi.shop_id = $0 and tmi.tenant_id = $1 and tmi.tenant_app_id = $2|3|5|3||0|0|136377|92968|3|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)|3|3|1||0|0|4118069|1373124|36|12|
|user_service|select count(0) from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5 and (t1.mobile_no like concat($6, $7) or t1.user_name like concat($8, $9, $10))|2|3|2||0|0|9187|4957|2|1|
|goods|select * from goods_take_shop where tenant_id = $0 and goods_id = $1 and activity_id = $2 order by create_time desc|2|2|1||0|0|204022|102037|9|5|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104wm2wxudqaazoidbw1sov8qytiuatbe3w$105wm2wxudqaapyru0v5gxct8_9-tfqafug$106wmjqwhcaaagqlcigrysorj9dpmvafpbq$107wm2wxudqaadc-9wjafrn41v9bhyfsv3g$108wm2wxudqaaaaidgm1sghkqqreye4-kka$109wm2wxudqaa_yitcvxg_hfyk-qyakgb3q$110wmjqwhcaaabkzkusxseyhddm7lkaestg$111wm2wxudqaakfya2tlwv4nlwzdzcndr4q$112wm2wxudqaazdkrppnnfs6azfwmaea1fg$113wm2wxudqaata6qixpqddnknaeiib3rua$114wm2wxudqaaogsd5ybjcpemxw1lq_zlla$115wm2wxudqaaruyrwfrvutf_i6zlgc3bpa$116wmjqwhcaaahsnm3arrfgxz8ooimydmbw$117wm2wxudqaa-ocqn148dkux5nq-ogum1w$118wm2wxudqaa1p6ajp_ys0z3f9mf_bmgug$119wm2wxudqaa28zu_zl_lf7v5csgifxjra$120wm2wxudqaanqhjpwwkafo05leilh7lww$121wm2wxudqaa7t0uleqtom0m84rzv5yncq$122wm2wxudqaaw5hhqetoj65hnzxbvewgcq$123wm2wxudqaanocv2sxx2zf5wcpm26s6jq$124wm2wxudqaadsopoqzobyxarg-_otjcja$125wm2wxudqaa6_ev...|2|2|1||0|0|10988|5494|5404|2702|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118)|2|2|1||0|0|1172966|820762|234|117|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115)|2|3|2||0|0|1745679|924920|228|114|
|v4_sales|select count(*) from v4_sales.erp_sales where employee_erp_id = $0 and sales_status = $1 and is_sales = true and tenant_id = $2 and tenant_app_id = $3|2|4|3||0|0|10782|5391|2|1|
|user_service|select count(0) from user_service.tenant_member tm join user_service.tenant_member_info tmi on tmi.tenant_id = $0 and tmi.tenant_app_id = $1 and tm.id = tmi.id where tm.tenant_id = $2 and tm.tenant_app_id = $3 and (tm.user_name like concat($4, $5, $6) or tm.mobile_no = $7)|2|2|1||0|0|469869|270819|2|1|
|user_service|select * from user_employee where tenant_wechatapp_id = $0 and employee_id = $1|2|2|1||0|0|6150|3395|6150|3395|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71)|2|6|5||0|0|1517650|1228468|140|70|
|tenant|select count(0) from ( select shop.*, dept.dept_name, count(es.id) as employeescount from tenant_wechatapp_shop shop left join erp_department dept on shop.dept_erp_id = dept.dept_erp_id and shop.tenant_id = dept.tenant_id left join employee_shop es on shop.id = es.shop_id and es.status in ($0, $1) where shop.tenant_wechatapp_id = $2 and shop.status in ($3, $4) and shop.status = $5 group by shop.id ) table_count|2|3|1||0|0|165783|82992|2|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23)|2|5|3||0|0|178431|108184|44|22|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)|2|3|1||0|0|284290|241306|48|24|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.coupon_name like concat(concat($4, $5), $6) and cu.create_time >= $7 and cu.create_time <= $8|2|23|19||0|0|47124|23562|2|1|
|user_service|select count(0) from user_service.tenant_member tm join user_service.user_employee ue on ue.tenant_id = $0 and ue.tenant_wechatapp_id = $1 and tm.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where tm.tenant_id = $4 and tm.tenant_app_id = $5|2|5|4||0|0|119681|79350|2|1|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2|2|3|1||0|0|22145|11074|2|1|
|v4_user|select count(*) as total from member where status = $0 and member_name like $1 and tenant_id = $2 and tenant_app_id = $3|2|2|1||0|0|421217|210630|2|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153)|2|4|3||0|0|1644133|865306|304|152|
|user_service|select tenant_id, id, tenant_app_id, user_id, shop_id, birthday, birthday_is_lunar, address, memorial_name, memorial_day, memorial_day_is_lunar, interest, grade_id, create_time, update_time from tenant_member_info where tenant_id = $0 and tenant_app_id = $1 and user_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172|2|2|1||0|0|5970|3122|5970|3122|
|tenant|select sp.id as shopid, sp.shop_name as shopname, ifnull(sum(tt.maintaincount), $0) as maintaincount, ifnull(sum(tt.maintainnum), $1) as maintainnum, ifnull(sum(tt.successnum), $2) as successnum, ifnull(sum(tt.failnum), $3) as failnum, ifnull(sum(tt.salemoney), $4) as salemoney from tenant.tenant_wechatapp_shop sp left join ( select g.create_shop_id as shop_id, count(1) as maintaincount, count(distinct t.sneak_guest_id) as maintainnum, $5 as successnum, $6 as failnum, $7 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 = $8 and (g.fail_type is null or g.fail_type = $9) and t.event_type in ($10, $11, $12) and t.create_time >= $13 and t.create_time < $14 group by g.create_shop_id union all select g.create_shop_id as shop_id, $15 as maintaincount, $16 as maintainnum, count(distinct t.sneak_guest_id) as successnum, $17 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 = $18 and t.event_type in ($19) and t.create_time >= $20 and t.create_time < $21 group by g.create_shop_id union all select g.create_shop_id as shop_id, $22 as maintaincount, $23 as maintainnum, $24 as successnum, count(distinct t.sneak_guest_id) as failnum, $25 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 = $26 and g.fail_type = $27 and t.event_type in ($28) and t.create_time >= $29 and t.create_time < $30 group by g.create_shop_id ) tt on sp.id = tt.shop_id where sp.status = $31 and sp.tenant_wechatapp_id = $32 group by sp.id, sp.shop_name order by sp.id|2|2|1||0|0|1676107|990005|50|25|
|comment_service|select c.*, cr.busi_id, cr.give_prize, cr.give_type from comment_service.comment c left join comment_service.comment_reward cr on cr.comment_id = c.id where c.id in ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)|2|3|2||0|0|787096|393653|40|20|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18)|2|2|1||0|0|2745934|1373051|38|22|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)|2|3|2||0|0|2744985|1372784|21|11|
|v4_coupon|select count(*) as total from ( select c.id, c.display_name, c.type as coupontype, round(c.face_value / $0, $1) as facevalue, round(c.face_value / $2, $3) as points, c.face_value as discount, c.begin_time, c.end_time, c.template_id, round(c.use_threshold / $4) as usethreshold, ce.exchange_goods, case when c.begin_time > now() and c.coupon_status = $5 then $6 else c.coupon_status end as coupon_status from v4_coupon.coupon c join v4_coupon.coupon_extend ce on ce.id = c.id and ce.tenant_id = $7 and ce.tenant_app_id = $8 where c.member_id = $9 and c.tenant_id = $10 and c.tenant_app_id = $11 ) c|2|3|2||0|0|172545|86308|2|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)|2|2|1||0|0|2745826|1373280|27|15|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)|2|3|2||0|0|2745535|1373070|34|18|
|order|select count(1) as total, ifnull(sum(if(od.status > $0, od.payment_fee, $1)), $2) as paymentfee, ifnull(sum(if(od.status > $3, od.offline_payment_fee, $4)), $5) as offlinepaymentfee, ifnull(sum(if(od.status > $6, od.payment_fee + od.offline_payment_fee, $7)), $8) as paytotalfee from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $9 and od.tenant_wechatapp_id = $10|2|5|4||0|0|96966|53847|2|1|
|employee|update backlog_system set status = $0, finish_time = now() where tenant_app_id = $1 and scene = $2|2|5|3||0|0|2238320|1119160|0|0|
|coupon_service|select * from coupon_service.coupon_can_give where coupon_id = $0 limit $1|2|4|2||0|0|487406|243704|2|1|
|corpwx|select * from ( select template_id, msg_type, msg_content, err_msg, create_time, to_user from corpwx.mini_app_msg where tenant_id = $0 union select replace(json_extract(msg_content, $1), $2, $3) as templateid, $4, msg_content, err_msg, create_time, to_user from corpwx.task_card_send_record where tenant_id = $5 ) a where 1 = 1 order by create_time desc limit $6|2|2|1||0|0|1074266|537133|40|20|
|coupon_service|select count(1) from coupon_service.coupon_expire_task where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and expire_time > now()|2|2|1||0|0|131068|65534|2|1|
|order|select count(1) as total, ifnull(sum(if(od.status > $0, od.payment_fee, $1)), $2) as paymentfee, ifnull(sum(if(od.status > $3, od.offline_payment_fee, $4)), $5) as offlinepaymentfee, ifnull(sum(if(od.status > $6, od.payment_fee + od.offline_payment_fee, $7)), $8) as paytotalfee from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $9 and od.tenant_wechatapp_id = $10 and (od.mobile_no = $11 or ad.mobile_no = $12)|2|4|2||0|0|173751|86880|2|1|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and dt.product_name like concat($2, $3, $4)|2|4|2||0|0|67027|58370|2|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43wm2wxudqaas0q5ddrkmtdkynlfx_3mua$44wm2wxudqaaxnbrfrxcb_kua-rpdfntaq$45wm2wxudqaacyrypeszjmwq8s8csg7wrq$46wm2wxudqaaullfcbykj8uwvxcuv20wda$47wm2wxudqaatjk_ui3chftmddnbcdh9bg$48wm2wxudqaajo9dx01dvhfnamg-uhapbw$49wm2wxudqaaahswttbw3dr40xarpufasa$50wm2wxudqaai6ontcf8od-_bprdmdftvw$51wm2wxudqaa2ykuayc3elyub8jiqcp1xa$52wm2wxudqaaov3-4qdogepe9jbuvcbvda$53wm2wxudqaa5lef3r_hsyhwenfty3wsiw$54wm2wxudqaanshjh3fu8voq9orrtxt51g$55wm2wxudqaaqla576sui3evgsbg6ya7lg$56wm2wxudqaazpjffejbavjzzvvzoypd0a$57wm2wxudqaanwkdwjois7mttgv53_atwg$58wm2wxudqaaio4xlo9nvjc-0fslkuz5qq$59wm2wxudqaa9bymaybu5zz9qv7tvynava$60wm2wxudqaa_blpzjl_qpo8sklycaoqiw$61wm2wxudqaagay1wlinbei_rrup5r9z-q$62wm2wxudqaalrrv7lqcuyxfliowsvo6gg$63wm2wxudqaae2ra9vvcs1x8nrtstkgvxq$64wm2wxudqaahbe-35sgcmnqrbfpodt_jw$65wm2wxudqaaabxomegfbcg5hj1n2_0jfw$66wm2wxudqaalj6clwoul1krld4fqi0uxw$67wm2wxudqaawduvalksa2cmm9yrpmehyg$68wm2wxudqaalhubmlzn2dd9p8w0kmblqa$69wm2wxudqaahsvjtnozthwfkxjlhzxqka$70wm2wxudqaatlpnfqaeakkbzyxk0xhq1a$71wm2wxudqaaai6zycdkdn8mn5-ol_hbga$72wm2wxudqaaopmcomxtwpxeenjrpo_tia$73wm2wxudqaagkfhsy_u9ym0gfmvoid1bw$74wm2wxudqaaaffismtxd0thbqevl6o7fw$75wm2wxudqaak8cw45ji9fvr-wykaoit5g$76wm2wxudqaak8eo8yyjxbpezlwb4gcnpa$77wm2wxudqaazijvivgtslaxfb8pzmyixg$78wm2wxudqaacv3olcbnjlk1mugptbefbq$79wm2wxudqaahw58clcgqjhc4fe_acykww$80wm2wxudqaajonhe8s1smec3ehzfu5tra$81wm2wxudqaas5zyyj9tvk6vdw9wy0r0vg$82wm2wxudqaa21kif96ewraiuxrz81nlxa$83wm2wxudqaauk4diauxcdazrje2ff3r3g$84wm2wxudqaatphnogymp4fiytrhvodf9q$85wm2wxudqaawldc8q9-0mcxg5n6f0rmhg$86wm2wxudqaaaxkxqmqzp2nonlvdnh7vgg$87wm2wxudqaafmj0264rkbadeskg2k8udg$88wm2wxudqaagyg-l9fgneyhk9dvqh_dqq$89wm2wxudqaas8gwmsjwbb_hncxgevxfna$90wm2wxudqaaxdag0kfgjet5vxhjirbzgq$91wm2wxudqaa1uacwsihi43pglnjdey82q$92wm2wxudqaalkwitokewmdi17fujgytta$93wm2wxudqaazyrbcn5lbvq73ib1va4utg$94wm2wxudqaaz6etsw0jz8akvjtiaoljyq$95wm2wxudqaajfgcitqyclsv1ebl2kxe-a$96wm2wxudqaanzjqo_qlinaexasixncraw$97wm2wxudqaavtwxuuhm1tzfitbpjwcsaa$98wm2wxudqaan_d8_tcn77qttgbg8ljyfg$99wm2wxudqaaubz9z6nfxlposblghdgtwa$100wm2wxudqaav1hpen0gv3nrf9fbhvcnig$101wm2wxudqaasv0_yw34z_a1lwv-ldnu5g$102wm2wxudqaa0fbrrhpq3rb3belfcdcf-g$103wm2wxudqaa2x2mvivsjkhjgycfkrnkjg$104wm2wxudqaadhpbokkxptdstd-v5x0eaw$105wm2wxudqaaaj8x8pcii2ly5xopn-9jmw$106wm2wxudqaaxudqgksdyrclkklpqkao-a$107wm2wxudqaac8sgvzjzltrhk79jvtjuzg$108wm2wxudqaak-t2m2ycinglbbmqzeakjq$109wm2wxudqaadmmrqeg_wzirb0dvpqbnva$110wm2wxudqaarporf6bkazvyonxhrn6o2w$111wm2wxudqaag1nosjtrbbj7dfrsrptr6g$112wm2wxudqaafwoql1drpofth7ppqbrjuw$113wm2wxudqaa1empsbpgwj-qq6-cum17vg$114wm2wxudqaax9ik3rqr7o7zg7zszfp61q$115wm2wxudqaajwr4cnog2zdacjb_cm1x6w$116wm2wxudqaa9t4etat2a1tevg4zi544uw$117wm2wxudqaa66togsbp6jtaboznjyj_oa$118wm2wxudqaao8bwhhzkkanoqqn7c08ulg$119wm2wxudqaaxpixmhngadpad7jjsklmja$120wm2wxudqaanzmxakmdxh7mf3jp2mwcfg$121wm2wxudqaaieoavwlsnfyb3admbganfa$122wm2wxudqaapnvop3dyeray_jmdpm60aw$123wm2wxudqaayscht98xmheapuvbw9iqda$124wm2wxudqaa5dt7ptxkpnxmzkg5vniluw$125wm2wxudqaaxzr...|2|3|2||0|0|3376|1688|1672|836|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6)|1|2|2||0|0|92262|92262|5|5|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174)|1|1|1||0|0|954679|954679|173|173|
|order|select id, type, operator_type as operatortype, operator_result as operatorresult, reason_label as reasonlabel, reason_value as reasonvalue, remark, create_time as createtime, status from order_service_log where order_id = $0 order by create_time desc|1|1|1||0|0|19993|19993|0|0|
|user_service|select tenant_id, id, tenant_app_id, user_id, wx_user_id, erp_member_id, customer_user_id, wx_union_id, create_time, update_time, external_user_id from tenant_member_bind where tenant_id = $0 and tenant_app_id = $1 and user_id in ($2, $3, $4, $5, $6, $7, $8, $9)|1|1|1||0|0|8|8|8|8|
|order|select count(*) from `order`.order_info where tenant_id = $0 and tenant_wechatapp_id = $1 and take_type = $2 and status = $3 and (wait_take_shop_id = $4 or take_shop_id = $5)|1|1|1||0|0|4691|4691|1|1|
|user_service|select obj.id, obj.total, case when @rowtotal = obj.total then @rownum when @rowtotal := obj.total then @rownum := @rownum + $0 when @rowtotal = $1 then @rownum := @rownum + $2 end as rank_idx from ( select us.from_id as id, count(1) as total from user_source us where us.tenant_id = $3 and us.tenant_wechatapp_id = $4 and us.shop_id = $5 and us.create_time >= $6 and us.create_time < $7 and us.source_type = $8 and us.from_id is not null and us.shop_id is not null group by us.from_id order by count(1) desc ) obj, ( select @rownum := $9, @rowtotal := null ) r|1|1|1||0|0|3359|3359|8|8|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44) and t.un_assign_flag = $45|1|2|2||0|0|99|99|46|46|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51)|1|1|1||0|0|130049|130049|50|50|
|activity_service|select count(distinct user_id) from user_trace where tenant_app_id = $0 and activity_id = $1 and status != $2|1|1|1||0|0|3515|3515|1|1|
|coupon_service|select * from coupon_service.coupon where datediff(date_format(end_time, '%y-%m-%d'), date_format(now(), '%y-%m-%d')) = $0 and coupon_state in ($1)|1|101|101||0|0|9487299|9487299|2237|2237|
|employee|select date_format(t.create_time, '%d') as monthday, ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10) and t.scene = $11 and t.begin_time >= $12 and t.expire_time < $13 group by date_format(t.create_time, '%d')|1|1|1||0|0|14394|14394|11|11|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, ...|1|3|3||0|0|809426|809426|283|283|
|value_added|select count(0) from ( select t1.id, t2.sales_no as salesno, date_format(t2.sales_date, '%y-%m-%d') as salesdate, date_format(t1.start_add_time, '%y-%m-%d') as valueadddate, t2.dept_erp_id as shopid, t1.shop_name as shopname, t2.employee_erp_id as userid, t2.employee_name as username, t1.product_name as productname, t1.amount_pay as amountpay, t1.id as valueaddno, t1.amount_added as valueaddamount, t1.state, if(t1.state = $0, t1.coupon_user_id, null) as valueaddcoupon, t1.user_id as memberuserid, case when start_add_time > $1 then $2 when date_add(start_add_time, interval add_days day) > $3 and state = $4 then $5 when date_add(start_add_time, interval add_days + keeping_days day) > $6 and date_add(start_add_time, interval add_days day) < $7 and state = $8 then $9 when date_add(start_add_time, interval add_days + keeping_days day) < $10 and amount_added > $11 and state = $12 then $13 else $14 end as addedstatus from value_added.value_added_user t1 join value_added.`value_added_user_extend` t2 on t1.id = t2.id where t1.tenant_wechatapp_id = $15 and exists ( select null from value_added.value_added_category t3 join value_added.value_added_template t4 on t3.template_id = t4.id and t4.is_disable = $16 where t1.tenant_wechatapp_id = t3.tenant_wechatapp_id and t2.category_erp_id = t3.erp_product_category_id ) and t2.sales_date >= $17 and t2.sales_date < $18 and t1.state != $19 ) tmp_count|1|3|3||0|0|37420|37420|1|1|
|v4_sales|select count(*) as total from v4_sales.warranty w join v4_sales.erp_sales es on es.id = w.sales_id and es.tenant_id = $0 and es.tenant_app_id = $1 where w.member_id in ($2) and is_disable = false and w.tenant_id = $3 and w.tenant_app_id = $4|1|1|1||0|0|105580|105580|1|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110) and t.un_assign_flag = $111|1|1|1||0|0|302|302|142|142|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)|1|1|1||0|0|75189|75189|12|12|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91)|1|2|2||0|0|924920|924920|90|90|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158)|1|1|1||0|0|1228555|1228555|157|157|
|value_added|select id, tenant_wechatapp_id as tenantwechatappid, user_id as userid, template_id as templateid, sales_erp_id as saleserpid, product_name as productname, shop_name as shopname, product_barcode as productbarcode, amount_total as amounttotal, amount_pay as amountpay, amount_added as amountadded, state as state, add_days, added_percent_per_day as addedpercentperday, devalue_percent_per_day as devaluepercentperday, keeping_days as keepingdays, exchange_days as exchangedays, coupon_user_id as couponuserid, sales_index as salesindex, start_add_time as createtime, date_add(start_add_time, interval add_days - $0 day), date_add(start_add_time, interval add_days + keeping_days - $1 day) from value_added_user where keeping_days > $2 and state = $3 and start_add_time = date_add(curdate(), interval $4 * (add_days - $5) day)|1|11|11||0|0|1840051|1840051|877|877|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)|1|1|1||0|0|44240|44240|13|13|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)|1|1|1||0|0|1372668|1372668|15|15|
|v4_user|select count(*) as total from potential_customer where maintain_shop_id = $0 and status in ($1, $2) and tenant_id = $3 and tenant_app_id = $4|1|1|1||0|0|392|392|1|1|
|tenant|select shop.*, dept.dept_name, count(es.id) as employeescount from tenant_wechatapp_shop shop left join erp_department dept on shop.dept_erp_id = dept.dept_erp_id and shop.tenant_id = dept.tenant_id left join employee_shop es on shop.id = es.shop_id and es.status in ($0, $1) where shop.tenant_wechatapp_id = $2 and shop.status in ($3, $4) and shop.status = $5 group by shop.id order by shop.create_time desc limit $6|1|1|1||0|0|82920|82920|20|20|
|authorization_service|select id, tenant_id, account_id, type, login_name, hash_password, salt, user_id, employee_id, tenant_app_id, status, create_time, update_time from login_account where type = $0 and login_name = $1|1|1|1||0|0|60039|60039|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38)|1|1|1||0|0|193658|193658|37|37|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69)|1|1|1||0|0|85694|85694|68|68|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129)|1|2|2||0|0|820773|820773|128|128|
|v4_coupon|select count(*) as total from coupon where member_id = $0 and scene = $1 and scene_id = $2 and tenant_id = $3 and tenant_app_id = $4|1|1|1||0|0|86274|86274|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82)|1|8|8||0|0|349194|349194|81|81|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8)|1|1|1||0|0|44227|44227|7|7|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59)|1|1|1||0|0|245823|245823|58|58|
|v4_sales|select count(distinct es.id) from v4_sales.erp_sales es join v4_sales.erp_sales_detail esd on esd.sales_erp_id = es.sales_erp_id and esd.sales_type in ($0, $1, $2, $3, $4, $5, $6, $7) and member_erp_id in ($8) and esd.tenant_id = $9 and esd.tenant_app_id = $10 where es.tenant_id = $11 and es.tenant_app_id = $12|1|1|1||0|0|22376|22376|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24)|1|1|1||0|0|241305|241305|23|23|
|v4_coupon|select tenant_id, tenant_app_id, member_id, count(1) as total from v4_coupon.coupon where datediff(date_format(end_time, '%y-%m-%d'), date_format(now(), '%y-%m-%d')) = $0 and coupon_status in ($1) group by tenant_id, tenant_app_id, member_id|1|1|1||0|0|90908|90908|7|7|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and od.order_no like concat($2, $3, $4)|1|1|1||0|0|4303|4303|1|1|
|v4_sales|select member_erp_id from v4_sales.erp_sales where sales_status = $0 and sales_date < $1 and member_erp_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30) and tenant_id = $31 and tenant_app_id = $32 group by member_erp_id|1|1|1||0|0|9072|9072|29|29|
|order|select od.id, od.order_no as orderno, od.status, od.take_type as taketype, od.create_time as createtime, od.remark, od.total_fee as totalfee, od.freight_fee as freightfee, od.discount_fee as discountfee, od.take_id as takeid, od.payment_fee as paymentfee, dt.product_id as productid, dt.price, dt.quantity, dt.sku_id as skuid, dt.art_no as artno, dt.image_url as imageurl, dt.product_name as productname, dt.take_remark as takeremark, dt.take_day as takeday, od.product_fee as productfee, ad.user_name as receivename, ad.mobile_no as mobileno, ad.shop_name as shopname, ad.address, ad.express_no as expressno, ad.express_company as expresscompany, od.finish_type as finishtype, od.send_time as sendtime, od.receive_time as receivetime, od.finish_time as finishtime, od.child_status as childstatus, od.send_good_remark as sendgoodremark, od.service_flag as serviceflag, od.coupon_id as couponid, od.tenant_wechatapp_id as tenantappid, od.tenant_id from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.status = $0 and od.send_time <= $1 and od.take_type = $2|1|2|2||0|0|209946|209946|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119)|1|2|2||0|0|772518|772518|118|118|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176)|1|1|1||0|0|772575|772575|175|175|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4wm2wxudqaaifnzdz6pmnz87uz168waka$5wm2wxudqaajd7ppz01z5exdkjsrx0czw$6wmjqwhcaaaqk37zysuple2chggum-z1w$7wmjqwhcaaac1_oi83495jjoqmgagzy9q$8wmjqwhcaaanbcrnf58mgugtecxg0swyw$9wmjqwhcaaae3senn2tbsgqqitnwmjo1w$10wmjqwhcaaazb7pcfmtesvz2szfy51t8w$11wm2wxudqaaro58xdba8r2fzd4i-jciyw$12wmjqwhcaaa6kpmkist1iemdc_x5yff0q$13wm2wxudqaawkltz9awmcmk8b0qsqex3g$14wm2wxudqaadhjavuptjraban9ofbglug$15wm2wxudqaam-hvgjrxzqukh7vxtu8vww$16wmjqwhcaaaj3ct0utsb1k8kgb54pkbpw$17wm2wxudqaallmps7jv1mv6dudlewgakw$18wmjqwhcaaaurs0ycbk9hhx5egk2trtuw$19wm2wxudqaaz9ap6asngjx7a3aqlr_krw$20wm2wxudqaak_domgsfuwipm7xtmpqsfq$21wmjqwhcaaai125ldrta7mvyw4bbpjovg$22wmjqwhcaaaploldbqaxf5qu0sji7bqqa$23wmjqwhcaaal1sh233ote0fdwzuxwtewg$24wm2wxudqaaqyt7chpviiuojsscjm6xtw$25wmjqwhcaaadwpptf4pdqfmzvleqwcvkw$26wmjqwhcaaaxcjztxjrfbock83vtp6gcw$27wmjqwhcaaadh6jxzbbjdi1cf7rsqatca$28wm2wxudqaaywtfokudnxaqafpa723bcg$29wm2wxudqaaspldnree9gfn506d1dvzxw$30wm2wxudqaampipjlzzhorp-k49u6wetw$31wmjqwhcaaacfnniuscmdgemipdlkxeeq$32wmjqwhcaaa0bpfvtuyriwrfxeymtrdag$33wm2wxudqaaunabwolg9fsenx4micpb7q$34wm2wxudqaau5af5923myz44devxl6pmw$35wmjqwhcaaaaum-r3htsecwp6a0-zyqaw$36wm2wxudqaavzmwxsrnxirjwfgz39ns0a$37wmjqwhcaaadkxaw6btw8pcx8vfvf260w$38wmjqwhcaaaoa7n15o5ca4aemcjc5d6ta$39wm2wxudqaafmg0_c56tf5eulrf6jjkyq$40wm2wxudqaa6ybigdyg9n6oc8apgw5mya$41wm2wxudqaa8hrz7sy0uszfauzdkfzyoq$42wm2wxudqaaqjrdu2ee-0x77cb264gdja$43wm2wxudqaaqh4tpj2s-pkhypmowr_ksg$44wm2wxudqaaew6lzsbrnoqse9bwjfkowa$45wm2wxudqaak8ix7kikgoguxlfeqqcjgw$46wm2wxudqaa5muxffc6bbzgogz1pjkoiq$47wm2wxudqaa8ic4wmgit97bgjjbrvxxca$48wm2wxudqaack4zfjjqgp40bx7fxd6rvg$49wmjqwhcaaafqo7lrapb1tl9xloiqn1dq$50wm2wxudqaa3nrypcj_nlr_cpbofjud5q$51wmjqwhcaaaxhairddhemtjcnde-psica$52wmjqwhcaaabsflodzriimg6qw2rcxemw$53wmjqwhcaaaadmaecmh-airh7hbpslj9w$54wm2wxudqaarpoq7beyevjlfrlnwavctw$55wm2wxudqaags1_o6cmikpxtc-gwzn21w$56wmjqwhcaaacsjagxf2jhwk344kb7qfyq$57wm2wxudqaakmrdmsii1wsg_ioxv8vkvg$58wm2wxudqaazssdr_bnqauyenkw_uw9va$59wm2wxudqaaqmvvkbknquyc9nxygl6zbq$60wmjqwhcaaa0f4dpig1fbzrpnucbrr1sw$61wm2wxudqaa6r9uctdjzouni9v6umfefq$62wmjqwhcaaavnwrepjq-hgpdo3vmldgww$63wm2wxudqaagriqk3ydgbhufcsovze8pq$64wm2wxudqaahdf_hlzujj_yvsinoq, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|1|1|1||0|0|1076|1076|499|499|
|tenant|select count(*) from ( select s.sneak_guest_id from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.id = s.sneak_guest_id and (sg.fail_type is null or sg.fail_type = $0) where s.tenant_id = $1 and s.tenant_app_id = $2 and s.shop_id = $3 and s.event_type = $4 and s.create_time between $5 and $6 group by s.sneak_guest_id ) a|1|5|5||0|0|21626|21626|1|1|
|goods|select shop_id from goods.goods_take_shop where goods_id = $0 and activity_id = $1|1|1|1||0|0|102018|102018|8|8|
||update v4_user.member_import set memorial_day = null where memorial_day = $0 and tenant_id = $1|1|1|1||0|0|244912|244912|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80)|1|1|1||0|0|954585|954585|79|79|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43wm2wxudqaajcmladfl3rpocj4oqcpfsa$44wm2wxudqaahdv1vdi1ujln-c6pd4oh6a$45wm2wxudqaaoh_vfrcux2wgnxkyvmst3g$46wm2wxudqaamhd4kxv51hhhzpervl3g6g$47wm2wxudqaav7zj4uchadgu3o9nyxnuha$48wm2wxudqaa-2qnj2fly2vm8svjgjzxng$49wm2wxudqaabwdsmqmjfzwvwtwukqb8aq$50wm2wxudqaapw9cpfanpo0ttepezag28a$51wm2wxudqaacyyhmnp_5xubouiykoiaaq$52wm2wxudqaahbuwlxy7lts7apjpe4airg$53wm2wxudqaacyagqorwwmtdftovqxosjq$54wm2wxudqaaisxa0elncgg7xwnimtephg$55wm2wxudqaavcybkn8xjo7ky8kdynujrg$56wm2wxudqaat86g1nlbterqq7ckuqfgzg$57wmjqwhcaaadikxbi7fza48qkaj7tivww$58wm2wxudqaa0owxmgi0oewqyfaa39csbg$59wmjqwhcaaanozya4doosorwf5rx_4-hw$60wm2wxudqaa3eo4b5_dhrruwpfazlu_eg$61wm2wxudqaakqpq3lrse5j-cpo3rk7f8q$62wm2wxudqaaq41pyzckmkv8r1j0endo8w$63wmjqwhcaaaqmukn615kxzhjrewxwuvjg$64wm2wxudqaarvh61byuhavvszgjxy-00q$65wm2wxudqaadm-8dv2f4y1wll0tt4wcfw$66wm2wxudqaagicdxj4lhkfagfr2fmtjoa$67wm2wxudqaae47bihe3gch4-_npbjyavg$68wmjqwhcaaa03qz4_bkf7cxbd-bkgmydq$69wm2wxudqaafajjazi6wjvgmnxzt7doxg$70wm2wxudqaazxnkbf6ggqx637jkzdpyua$71wm2wxudqaaiyr8ybo6mitojo3pqmmjng$72wm2wxudqaacdp9ajsgs5d8rff7ekzc5w$73wm2wxudqaawanx0-wty6_dadnyaydggq$74wm2wxudqaa1f_enpuy_u-yz8xvx0ac8q$75wmjqwhcaaaz-ispauxtfrehadeorxihw$76wm2wxudqaa6hvxr9y3y-olk94vfx3tmq$77wm2wxudqaaerc3sfxtzmhrcwyyoslulq$78wm2wxudqaags4ki3u-dy8i9px1jm-mia$79wm2wxudqaagivzvpv1qhk6dgnws2mvqg$80wm2wxudqaaztif_y1mzmsstrsuy2loxg$81wm2wxudqaa7drmpxx2uiwfhwfsk1xsuw$82wm2wxudqaaz6zx5cc-clmq-aodzfy-2g$83wm2wxudqaaxupn9bmecwrvxckpjgez4q$84wm2wxudqaavly9bb5cjj-d6m16b139eg$85wm2wxudqaagkupw8c07m7de89vwsweqq$86wm2wxudqaasgainxapjo2nhxbfesngda$87wmjqwhcaaanxrzc27p7xqbye2tbxxyvq$88wm2wxudqaasp8e65_rwetombjpboebqw$89wm2wxudqaauyxfkldgiz9wiukfnvuorq$90wm2wxudqaacizbmhn-mfy-uxo7w5kvha$91wm2wxudqaangu5yxc3pw_fbpehhyxlmq$92wm2wxudqaa75ifw-ur2u-iseoqqzylja$93wm2wxudqaaccdw7espwe4rc_iiicidkw$94wm2wxudqaan_ml5rqdsbmpyfwjigmiaa$95wm2wxudqaashopj1gi4ndf-9s9eyd0aw$96wm2wxudqaargz2obb9r0zrbi2pgm2gqa$97wm2wxudqaa3ivbrtphekuo85po97n6kg$98wmjqwhcaaahxuuxbheflkielmgmprffg$99wm2wxudqaahtl4xeydaeo-xghhsp-n9w$100wm2wxudqaagkhrpftyyarzbt-qdzoeha$101wm2wxudqaaz3c8vwr0jri9s9uk9rknjg$102wm2wxudqaa1iw7fjspmfwh67-5kwdymq$103wm2wxudqaarl6kxbybadraljg4xgf6_w$104wm2wxudqaaczrixb68li8tylg5sdf9zg$105wmjqwhcaaa1nvkxo7kt2kmylcskxuicw$106wmjqwhcaaadpwkww0rgizkg7cz-i1giw$107wm2wxudqaa5ng2pd_ujlpbqgtls5-hwq$108wmjqwhcaaap8r-madc-sayfrv_osveqq$109wm2wxudqaa_5praoivdkgguugs94b0jq$110wm2wxudqaatkekdaat5d1uyofozky2ng$111wm2wxudqaalyrb4cgj_f_i6atjgpyoua$112wm2wxudqaanwvewsovnmltyblyocpbta$113wm2wxudqaa7m-wfvhoal_f9ga03adw4w$114wm2wxudqaapepwqikxyvofqyofan2y1g$115wmjqwhcaaaa8ddttlqbao_fh_modaknw$116wmjqwhcaaaawemeknhf3vl_pn4zi5zsg$117wm2wxudqaaaxw9pvo4v-amuymkwvc07g$118wm2wxudqaa58sogjnkmltuvcqjkvktow$119wm2wxudqaa-95p-ii3yzriun_alh0rew$120wm2wxudqaakjvwzlxsqs40wm5ebdrgna$121wmjqwhcaaarnpsov80qd_wsrypobdslg$122wmjqwhcaaa6nd7-d5sjprzsxbjrm0h4w$123wm2wxudqaarc4mqcfusnqxheai9_0ovg$124wmjqwhcaaayj8mjqns6vkqlcvfoxcz8a$125wm2wxudqaadr4q...|1|1|1||0|0|1307|1307|600|600|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28)|1|1|1||0|0|456154|456154|27|27|
|mysql|delete from message_push.message_log where create_time < date_sub(now(), interval $0 day)|1|63|63||0|0|2287685|2287685|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101wmjqwhcaaau0mdudssfxtyyv-mnvuv7q$102wm2wxudqaatesc1zsltjs8-mtlbivpeq$103wm2wxudqaa3iy-bldvxztanvtzwase2g$104wm2wxudqaafkxhl-7tqipfeudx6olvna$105wm2wxudqaa1pkpnl6bs-iatutyh3mn0g$106wm2wxudqaawxhryv9h_962wjrgm-fy5g$107wm2wxudqaadp3tvdgessxuwneyhl9_mg$108wm2wxudqaaohpg64iyz-_jlb5hhqipvw$109wm2wxudqaasupwnpbcyrnukc-jlzpjfa$110wmjqwhcaaaagaccleaec8vzlf_fn7ibg$111wm2wxudqaagrtoith-s5nmr4evxh8o7w$112wmjqwhcaaas-szci1fic1yns37afm9gg$113wm2wxudqaayhckfkd8hq4qmysdblloka$114wm2wxudqaapppqi35hrvo1t3xmrcyrxq$115wm2wxudqaavrizs-jti4cc1401oglgma$116wm2wxudqaadwst6o-uamovawrdc9v6zw$117wmjqwhcaaauh8y2cklhk39s3j7nx2xyg$118wm2wxudqaag86wxplcxqrfnhi-hu9aaw$119wmjqwhcaaam1oiumum9csna0mojz2csq$120wm2wxudqaaxc5b2r7qful851yekggvkw$121wm2wxudqaazeeqailvuf9g65mxetlyua$122wmjqwhcaaasukoqxq-9xjfpmjjai96aw$123wm2wxudqaaprbtwr6chjgnledgl8bd7w$124wmjqwhcaaax-ade9as9iesg6hy4jz2ba$125wm2wxudqaau_gz...|1|1|1||0|0|2404|2404|1166|1166|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53)|1|1|1||0|0|772452|772452|52|52|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86wm2wxudqaaozhahhw9t3rtommc3tbwzw$87wm2wxudqaaamqzsf9_neyqcq133fhkxa$88wm2wxudqaan8jwal02vb87kxpkxrb4xg$89wm2wxudqaanplohxfq1_vpcth3hqo5qg$90wm2wxudqaa5bg-tz69qpr8z9b07f99pq$91wm2wxudqaatzyllh2_g4gizt0fy9q8oa$92wmjqwhcaaabybmsualno4ajdb3qs2fbg$93wm2wxudqaaujtni8uaw7obn6eucz23bw$94wm2wxudqaa6nqswvseenydxtfj3cxkka$95wm2wxudqaaq-gqecsge6y6_j3ysi5frq$96wm2wxudqaaefvvrhqoqzuayzkmjgsd0g$97wm2wxudqaan3prqspgxibgsazaav1zgg$98wm2wxudqaaxethf7wc7n7dami9-fhgrq$99wm2wxudqaa-muv3bv8sq3zohfic3ivca$100wm2wxudqaa6yjueytck5vfzltkjfnhca$101wm2wxudqaadleiduuxdcuoxemalpjk7w$102wm2wxudqaad9l9uefaftvcdatwtp0pva$103wm2wxudqaa-v6ojcualourflrd9juliq$104wm2wxudqaahzocohcthb1pnwgsq8drfq$105wm2wxudqaaieuimfbxtflgjszgjtgx4g$106wm2wxudqaa0rct81d8ktdirjzhxcbcza$107wm2wxudqaa4gr17_r9jpibyyqlnrs8sq$108wm2wxudqaaljooygkuq4xth5ve77cprg$109wm2wxudqaahbrrvlaqcu4pk54t2ssfwg$110wmjqwhcaaafb7m88akkx4fhqezeoytoa$111wm2wxudqaanczny3z6ra6tyvaw8c5y8a$112wm2wxudqaa3iq1tisyypjru_nmyfde4g$113wmjqwhcaaac6b96po5kiyl6v4vfi5xqa$114wmjqwhcaaa1sa5mnfzhnsakdqlvpsjha$115wm2wxudqaae5obtl9e0kgfbzhwck-mcq$116wm2wxudqaabs89vsvk_vk2ghzbhp-rxg$117wm2wxudqaa-8qt0oyo1qdkoopswai1ea$118wm2wxudqaaccgjd7k_21vmn2e3iekqmq$119wmjqwhcaaatkyiqe88dqhqtysjfxlygg$120wm2wxudqaavw2zt49owj2nso4upidoua$121wmjqwhcaaahhngccgsdgkoupazuc82fa$122wm2wxudqaagin-4ab-kr1sfjbo_ive2a$123wm2wxudqaa-3cmtngjl59_8rjrwruhsq$124wm2wxudqaan70duocdoqqbjgslcis9pa$125wm2wxudqaadzk1...|1|1|1||0|0|1340|1340|609|609|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price desc, p.id desc limit $2, $3|1|1|1||0|0|8384|8384|6|6|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95)|1|3|3||0|0|954600|954600|94|94|
|user_service|select ue.user_id as id, tm.user_name as username, tm.head_img_url as headimgurl, tm.user_name as nickname, tm.mobile_no as mobile, tm.sex from user_service.user_employee ue join user_service.tenant_member tm on tm.tenant_id = ue.tenant_id and tm.tenant_app_id = ue.tenant_wechatapp_id and tm.user_id = ue.user_id where ue.employee_id = $0 and ue.tenant_id = $1 and ue.tenant_wechatapp_id = $2 and ue.shop_id = $3 order by tm.id desc limit $4|1|1|1||0|0|4948|4948|10|10|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7)|1|1|1||0|0|52829|52829|6|6|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4wmjqwhcaaace2mffwqhcxghnftssvagg$5wm2wxudqaayl2gvetyvt3657dtqktugw$6wm2wxudqaa4tkxbuu5ol-lydglvzhyeg$7wm2wxudqaa3b137_3ebo-_up_3e9xezq$8wm2wxudqaaurjn4jq95juq8jlws0wcjg$9wm2wxudqaavh-ktqnajxgm0ik0-r9kja$10wmjqwhcaaayuzdwbj-yey68ki7plzs8a$11wm2wxudqaafslbkhdf2ypgjbcwo3b14g$12wm2wxudqaa0-xulw-pmqy1tghnqdqyqg$13wm2wxudqaawjpndhgtntslmk8vjnvx2g$14wm2wxudqaadupjq15jlmuf_ekgds8xsa$15wm2wxudqaa4-kwubmauah6shwcrohgia$16wm2wxudqaabxbbjweypkyecddcn8k7sq$17wm2wxudqaacw4n5bjilkgpzjxok0j-cq$18wm2wxudqaa7fzgpdplqakmdqwte73suq$19wm2wxudqaa4n2f1je3rzbqkqr8lzq7-q$20wm2wxudqaa0ick448k9dcwdwew_bap_w$21wm2wxudqaawzkery7exuewudri-6ithg$22wm2wxudqaasujyyzkjwv0fe91whojvya$23wm2wxudqaa_s9zka7jgytvba8r5mhktg$24wm2wxudqaasxg4nxtd1pl24yq2r96ofa$25wmjqwhcaaa3776uzpar1y5pky6ilmddw$26wm2wxudqaaeboahqr6wydb0btd1bofig$27wm2wxudqaaoeedwpehv10_gr5bbba8lg$28wm2wxudqaa1ato6dri7_nvhu4hzrepxq$29wm2wxudqaa7sdt2ecjxn-pa8kk3s28jw$30wm2wxudqaaix7ndigi7jlzekpwopig0w$31wm2wxudqaav47xtie9fltzmzrsi3bwua$32wm2wxudqaay32abaiefzpnxm42tnn9pg$33wm2wxudqaadhwj5usjdpwkp6y_rpio6g$34wm2wxudqaaucyskv5p9542irq8vimy2a$35wmjqwhcaaaut313sdrutq3sfk4v_e8jw$36wm2wxudqaae_puuqhyjzlhaei-efk4bw$37wm2wxudqaaqvd7vxo35pyi9zp1zj3aja$38wmjqwhcaaauitvlwx2u5tlf1oqzq45kg$39wmjqwhcaaar1wfdb-eigafqbyb1akxsw$40wm2wxudqaawd5oivkjqfrlrr0bkaplrw$41wm2wxudqaarddwnvzdhpqtxfh3fwpi3a$42wm2wxudqaafr5c7lvf2phmw-8zaamygw$43wm2wxudqaac_1btom37n41j6qa-kj41g$44wm2wxudqaadf48nrp-4cifpi4lg6yqfg$45wmjqwhcaaalauutb1zurkzwcy7qce7na$46wm2wxudqaaggrvb4tynpygdywubyusxg$47wm2wxudqaa7o1j91j1czntpenefiezqq$48wm2wxudqaa8ouo6jawuxvwibn9gmsw-w$49wm2wxudqaahqt9bbncx7dj_o5hb6jnvg$50wm2wxudqaaqwn7qnelllroylurkl1pjw$51wm2wxudqaacg8rjko6jwqcer2lzit6ca$52wm2wxudqaau75cbifzx9nsmsrzsz9nvq$53wm2wxudqaarnxpco4sc1xia1ogzuvoqa$54wm2wxudqaandgtcl6zbs1y8p, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65wm2wxudqaan8uufwmpip2xa6a446p1yq$66wm2wxudqaawxlnqiil7ibqrr-knmt3fq$67wm2wxudqaapznf59ntcpjs1fih5uaswa$68wm2wxudqaam4bjjiyyktk5lchcqf-w7w$69wm2wxudqaa7csovmnvxoso-a5jxr0vsq$70wm2wxudqaawyvrtmsqbcvow9zpdupsvg$71wm2wxudqaad0yrcpuyk_6f482hkdawua$72wm2wxudqaarpxusg8nobme_5njpqcp-q$73wm2wxudqaaminobj3s-geeviwn6un5uq$74wm2wxudqaahtq2urrlqqhvhv5w6xyqiq$75wm2wxudqaaosbc8lbyc0ixkwsbo81vuq$76wm2wxudqaazmujzitpm6xusbudpblz0w$77wm2wxudqaauqf2dakfnsp-m3tq9bpwvg$78wm2wxudqaaeqde0krosthbmqikcznoew$79wm2wxudqaad0y_0ewa9g0int85pc-ilg$80wm2wxudqaafzsmv-ajbyn248pjgevu-g$81wm2wxudqaab5su32i0iq4c0q6oq18uoa$82wm2wxudqaaowrmlvodiyydl8xn5eah_a$83wm2wxudqaafrarmme0ookyil12wqwjeg$84wm2wxudqaaoj3isbtro-tknny0z8a2_g$85wm2wxudqaakn2sk1quhslmird4vlfvda$86wm2wxudqaa8_0et6zcv33nipqaqfweua$87wm2wxudqaanl9clsk7ynu05rcpogg3lq$88wm2wxudqaa7njg_xkjrsvyosgzcrnftq$89wm2wxudqaannu3lzrmxpbnfxpvopkjua$90wm2wxudqaa4mfetaypzaw1rqwtgkls9q$91wm2wxudqaayzcy_acl-zr84g-m_rdqvq$92wm2wxudqaauiirgrgt5sbbcf_55knjjw$93wm2wxudqaaptmwd9gbpxjupyj-ryfegq$94wm2wxudqaarbqhdcvdfm_8nqh8ilxr4w$95wm2wxudqaaa40u62qkwx3gfiu1ixd-dq$96wm2wxudqaa_br1-sfufdh4oax11hb-jg$97wm2wxudqaaa9a0sz5kwhmki2chi9js7g$98wm2wxudqaaxzul-v4729zulitcsugzrq$99wm2wxudqaakvtejob6c7npjhoy2etx_g$100wm2wxudqaauwr1o__ba2bztgxx0-wqlg$101wm2wxudqaa75rqs2as2vjhs_zdqdugeq$102wm2wxudqaayi5qhh62yjucpnttgl9q8q$103wm2wxudqaan4tkqymibwk2uucacpjotg$104wm2wxudqaapbisszx12zfmodcpnd2usa$105wm2wxudqaa-bkx1eu8mfqc7o-wlcwchq$106wmjqwhcaaahrgca75-rsxd5ulnvpbgyw$107wm2wxudqaasizqkrubxfj-cgjpb4a13q$108wmjqwhcaaamedmrlcgnu2f1g42hhvmja$109wm2wxudqaa8qpibhswq2dhvdafiae5sg$110wmjqwhcaaara_uw_lyescmaredrdjuvq$111wm2wxudqaaog8h-2crwghxalpbpv5b7q$112wm2wxudqaa06tsvdo6-21szvab5izv1g$113wm2wxudqaaol6wcuibcxi1j3tnsr1tyq$114wm2wxudqaate-jjklnmcyw8q0sf0iihw$115wmjqwhcaaa-3q8uipvfuh0sqwnfa8dkw$116wm2wxudqaan4xvrrb0quety8r4m9plrq$117wm2wxudqaaifzbmfspfcjtewlu8-nleg$118wm2wxudqaah9khphsvzz9abfxq1kb6zg$119wm2wxudqaax_no9lebfecepdwdbmi8oq$120wm2wxudqaacg9nugdbpynmpvha7wtcfw$121wm2wxudqaaozzhsdpzdtcvsmhmxxssmq$122wm2wxudqaal3qe0yk3odla-vmurtlf-q$123wm2wxudqaa5orn0vwfhu8p8lhc_sjnta$124wm2wxudqaartw0...|1|1|1||0|0|1304|1304|605|605|
|order|select count(1) as total, ifnull(sum(if(od.status > $0, od.payment_fee, $1)), $2) as paymentfee, ifnull(sum(if(od.status > $3, od.offline_payment_fee, $4)), $5) as offlinepaymentfee, ifnull(sum(if(od.status > $6, od.payment_fee + od.offline_payment_fee, $7)), $8) as paytotalfee from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $9 and od.tenant_wechatapp_id = $10 and dt.product_name like concat($11, $12, $13)|1|1|1||0|0|8657|8657|1|1|
|tenant|select e.id, e.employee_name from ( select distinct sgm.employee_id from tenant.sneak_guest sg join tenant.sneak_guest_maintain sgm on sgm.sneak_guest_id = sg.id where sg.tenant_id = $0 and sg.tenant_app_id = $1 and sg.update_shop_id = $2 and sgm.event_type in ($3, $4, $5) and (sg.fail_type is null or sg.fail_type = $6) and sgm.create_time between $7 and $8 ) t join tenant.employee e on e.id = t.employee_id|1|1|1||0|0|32832|32832|7|7|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231 ...|1|2|2||0|0|542009|542009|231|231|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112wm2wxudqaafntlfqrqilakiqfy64gblg$113wm2wxudqaamcoj07eitdfkqhaxxeanya$114wm2wxudqaadsutfg-taoowaiwa3atufw$115wm2wxudqaa6z_rnxdcaymxjljliqvjra$116wmjqwhcaaarvpeov083w9su68jfylgdw$117wm2wxudqaa10a6eyecthbczcts082frg$118wm2wxudqaayn6iiqsfooxg7p66ohkj8a$119wm2wxudqaa7632gpkmdgln0j2gkj3qea$120wm2wxudqaacasrmlbm3jl5vij1qqncfq$121wm2wxudqaag-h6smpiz1aegiaxf3ucrg$122wm2wxudqaafns9cdajfjouft2naqhv3q$123wm2wxudqaae48uxubcfugakrzfy2rggw$124wm2wxudqaauplk1kqwz8omicdawwj5dw$125wm2wxudqaa189v...|1|1|1||0|0|1011|1011|467|467|
|value_added|select $0 as limitdaytype, t.tenant_wechatapp_id, t.user_id, min(ue.employee_erp_id) as employee_erp_id, ue.dept_erp_id, group_concat(t.product_barcode order by product_barcode asc) as productcode, group_concat(t.product_name order by product_barcode asc) as productname from value_added_user t inner join value_added_user_extend ue on t.id = ue.id where t.tenant_wechatapp_id = $1 and t.state = $2 and t.start_add_time >= date_add(date_format($3, '%y-%m-%d'), interval $4 * (t.add_days + t.keeping_days - $5) day) and t.start_add_time < date_add(date_format($6, '%y-%m-%d'), interval $7 * (t.add_days + t.keeping_days - $8) + $9 day) group by t.tenant_wechatapp_id, t.user_id, ue.dept_erp_id|1|1|1||0|0|416258|416258|93|93|
|activity_service|select id, tenant_id, tenant_app_id, activity_id, user_id, day, continuous_day, has_subscribe, user_name, create_time, update_time, first_sign_time, mobile_no from online_sign_user where tenant_app_id = $0 and user_id = $1|1|4|4||0|0|119043|119043|0|0|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.template_id = $4|1|1|1||0|0|614|614|1|1|
|order|select od.id, od.order_no as orderno, od.status, od.take_type as taketype, od.create_time as createtime, od.remark, od.total_fee as totalfee, od.freight_fee as freightfee, od.discount_fee as discountfee, od.take_id as takeid, od.payment_fee as paymentfee, dt.product_id as productid, dt.price, dt.quantity, dt.sku_id as skuid, dt.art_no as artno, dt.image_url as imageurl, dt.product_name as productname, dt.take_remark as takeremark, dt.take_day as takeday, od.product_fee as productfee, od.finish_type as finishtype, od.send_time as sendtime, od.receive_time as receivetime, od.finish_time as finishtime, od.child_status as childstatus, od.send_good_remark as sendgoodremark, od.service_flag as serviceflag, od.coupon_id as couponid, od.tenant_wechatapp_id as tenantappid, od.tenant_id as tenantid, od.pay_id as payid, od.user_id as userid, od.user_name as username, od.mobile_no as buymobileno, od.activity_id, od.offline_payment_fee, od.activity_type, dt.spec, od.take_shop_id, od.take_shop_name, od.take_employee_user_id, od.take_employee_user_name from order_info od left join order_detail dt on od.id = dt.order_id where od.status = $0 and od.receive_time <= $1|1|2|2||0|0|210062|210062|116|116|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156)|1|1|1||0|0|1228553|1228553|155|155|
|tenant|select count(0) from ( select sg.employee_id as employeeid, sg._actual as actualnum, sg._maintain as continuenum, sg._failure as failnum, sg._success as dealnum, e.employee_name, e.head_img_url from ( select sgm.employee_id, count(distinct sneak_guest_id) as _actual, sum(_maintain) as _maintain, sum(_success) as _success, sum(_failure) as _failure, max(sgm.create_time) as create_time from ( select sgm.employee_id, sneak_guest_id, if(event_type = $0, $1, $2) as _maintain, if(event_type = $3, $4, $5) as _success, if(event_type = $6, $7, $8) as _failure, sgm.create_time as create_time from tenant.sneak_guest_maintain sgm join tenant.sneak_guest sg on sgm.sneak_guest_id = sg.id where sgm.tenant_id = $9 and sgm.tenant_app_id = $10 and sgm.shop_id = $11 and sgm.create_time between $12 and $13 and sgm.event_type in ($14, $15, $16) and (sg.fail_type is null or sg.fail_type = $17) ) sgm where 1 = 1 group by sgm.employee_id ) sg join tenant.employee e on e.id = sg.employee_id order by sg.create_time desc ) tmp_count|1|5|5||0|0|21716|21716|1|1|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10) and t.scene = $11 and t.begin_time >= $12 and t.expire_time < $13|1|1|1||0|0|14372|14372|1|1|
|value_added|update value_added_user set amount_added = if($0 > (added_percent_per_day / $1 * if($2 >= timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $3 - add_days, timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $4, add_days) - devalue_percent_per_day / $5 * if($6 >= timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $7 - add_days - keeping_days, $8, timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $9 - add_days - keeping_days)) * amount_pay, $10, (added_percent_per_day / $11 * if($12 >= timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $13 - add_days, timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $14, add_days) - devalue_percent_per_day / $15 * if($16 >= timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $17 - add_days - keeping_days, $18, timestampdiff(day, date_format(start_add_time, '%y-%m-%d'), current_date) + $19 - add_days - keeping_days)) * amount_pay), update_time = now() where state = $20 and update_time <= curdate() and (start_add_time >= date_add(curdate(), interval -(add_days + keeping_days - $21) day) or (amount_added > $22 and start_add_time < date_add(curdate(), interval -(add_days + keeping_days - $23) day)))|1|21|21||0|0|1839988|1839988|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52)|1|1|1||0|0|275820|275820|51|51|
|user_service|select obj.id, obj.shop_id, obj.total, case when @rowtotal = obj.total then @rownum when @rowtotal := obj.total then @rownum := @rownum + $0 when @rowtotal = $1 then @rownum := @rownum + $2 end as rank_idx from ( select us.from_id as id, us.shop_id, count(1) as total from user_source us where us.tenant_id = $3 and us.tenant_wechatapp_id = $4 and us.create_time >= $5 and us.create_time < $6 and us.source_type = $7 and us.from_id is not null and us.shop_id is not null group by us.from_id, us.shop_id order by count(1) desc ) obj, ( select @rownum := $8, @rowtotal := null ) r|1|1|1||0|0|3617|3617|94|94|
|gift_mail|select ifnull(count(1), $0) as amount from trade where tenant_wechatapp_id = $1 and user_id = $2 and order_status in ($3, $4)|1|1|1||0|0|13377|13377|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)|1|1|1||0|0|427295|427295|11|11|
|value_added|select id, tenant_wechatapp_id as tenantwechatappid, user_id as userid, template_id as templateid, sales_erp_id as saleserpid, product_name as productname, shop_name as shopname, product_barcode as productbarcode, amount_total as amounttotal, amount_pay as amountpay, amount_added as amountadded, state as state, add_days, added_percent_per_day as addedpercentperday, devalue_percent_per_day as devaluepercentperday, keeping_days as keepingdays, exchange_days as exchangedays, coupon_user_id as couponuserid, sales_index as salesindex, start_add_time as createtime, date_add(start_add_time, interval add_days - $0 day), date_add(start_add_time, interval add_days + keeping_days - $1 day) from value_added_user where state = $2 and start_add_time = date_add(curdate(), interval $3 * (add_days + keeping_days - $4) day)|1|2|2||0|0|1840051|1840051|739|739|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27)|1|1|1||0|0|363569|363569|26|26|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58)|1|2|2||0|0|333745|333745|57|57|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40)|1|1|1||0|0|119350|119350|39|39|
|v4_user|select id, member_name, mobile_no, head_img_url, combine_status, combine_id from member where (mobile_no like $0 or member_name like $1) and tenant_id = $2 and tenant_app_id = $3 limit $4|1|1|1||0|0|210628|210628|1|1|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume asc, p.id desc limit $2, $3|1|1|1||0|0|8264|8264|6|6|
||delete from v4_user.member_import where tenant_id = $0|1|9|9||0|0|307598|307598|0|0|
|employee|commit|1|1|1||0|0|0|0|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9)|1|6|6||0|0|180857|180857|8|8|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136)|1|1|1||0|0|865272|865272|135|135|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub(now(), interval $0 day)|1|33|33||0|0|952583|952583|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232|1|3|3||0|0|865534|865534|266|266|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65)|1|1|1||0|0|375795|375795|64|64|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232\...|1|1|1||0|0|1320400|1320400|386|386|
|corpwx|update token set type = $0, corp_id = $1, suite_id = $2, suite_ticket = $3, agent_id = $4, agent_auth_code = $5, agent_ticket = $6, token = $7, expire_time = $8, status = $9, create_time = $10, update_time = $11, failed_times = $12, failed_reason = $13 where id = $14|1|1|1||0|0|1|1|0|0|
|user_service|select t1.id, t1.user_id as userid, t1.user_name as username, t1.sex, t1.mobile_no as mobileno, t1.head_img_url as headimg from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5 order by ue.update_time desc, t1.id desc limit $6, $7|1|1|1||0|0|2663|2663|10|10|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232 ...|1|4|4||0|0|822963|822963|248|248|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36)|1|1|1||0|0|253175|253175|35|35|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13wmjqwhcaaawljwpmf-ej272pbplinchq$14wm2wxudqaa_jv0zz9jjh5guksbkevita$15wm2wxudqaaszj9_6gsqffroh9yrvimoq$16wmjqwhcaaaem8btcxcxq-eapkfzlgdba$17wmjqwhcaaajyh9fcvpifv73ntsix9hmg$18wmjqwhcaaacm796c4eh0jscssxeobclw$19wmjqwhcaaabaghfwwlhgrmalelezo_6a$20wmjqwhcaaar-nivaohcppqhgoecadgrw$21wm2wxudqaaipp72-qpqpsopjqld0jzpq$22wm2wxudqaaifxkchaxjssdgcwmaolqwq$23wm2wxudqaa2inaycnnjeczxbjftvmeag$24wm2wxudqaaqcocd2c_-sekfb0yjiubhw$25wmjqwhcaaa28iswgdsjfzpvmhbxbigqw$26wmjqwhcaaa5y37woynm1riuji0_z-zyq$27wm2wxudqaa_3mubjeff4vf7xueioyfeq$28wm2wxudqaa6jgd3lftfmlfk-a5i1j3ew$29wm2wxudqaa2zzbzftrhoall6tb7hplmw$30wm2wxudqaa_eazfavrcclkh076ouiwga$31wm2wxudqaaivocptnw1tj-ikqnn9nhtg$32wm2wxudqaaiphv_canqpafwoyn1uht_g$33wmjqwhcaaapbtk9-9nqqhjiccs3qwxoq$34wmjqwhcaaasdwpt6u1h-xfrfqr8gi0sq$35wm2wxudqaa-1i7wt7eo50ohfumpxleaw$36wm2wxudqaak1vsamnc_pmqhkdme_js1q$37wm2wxudqaah2s7kxpdegc1szfhhwoqea$38wmjqwhcaaat, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|1|1|1||0|0|1517|1517|710|710|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103)|1|4|4||0|0|924920|924920|102|102|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)|1|1|1||0|0|210736|210736|21|21|
|tenant|select count(*) from erp_sales es where tenant_id = $0 and member_erp_id = $1 and tenant_wechatapp_id = $2 and sales_status = $3 and (comment_id is null or comment_id = $4) and sales_date >= $5 and not exists ( select i.id from tenant.erp_sales_ignore i where i.tenant_id = $6 and i.tenant_app_id = $7 and es.sales_erp_id = i.erp_sales_id )|1|1|1||0|0|890|890|1|1|
|v4_sales|select ifnull(count(*), $0) as sales_count, ifnull(sum(amount), $1) as sales_amount from erp_sales where member_erp_id in ($2) and is_sales = true and sales_status = $3 and tenant_id = $4 and tenant_app_id = $5|1|3|3||0|0|8748|8748|1|1|
|v4_sales|select es.id as salesid, es.sales_no, es.sales_date, es.member_erp_id as memberid, w.warranty_no from v4_sales.erp_sales es join v4_sales.warranty_can_added wca on wca.sales_id = es.id and wca.tenant_id = $0 and wca.tenant_app_id = $1 left join v4_sales.warranty w on w.sales_id = es.id and w.tenant_id = $2 and w.tenant_app_id = $3 where is_sales = true and sales_status = $4 and (es.sales_no like concat($5, $6) or es.member_erp_id = $7) and es.tenant_id = $8 and es.tenant_app_id = $9 order by es.sales_date desc, es.id desc limit $10|1|1|1||0|0|255583|255583|1|1|
|gift_mail|select * from ( select p.id, p.default_image_url, p.product_name, p.product_type, p.tag_price, ifnull(pp.integral_price, ifnull(( select min(inventory.price) from gift_mail.inventory where inventory.product_id = p.id ), $0)) as price, p.volume, p.category_id, p.product_status, $1 as quantity, pp.partner_id as partner_id, p.topping from gift_mail.product p left join gift_mail.partner_product pp on p.id = pp.product_id left join gift_mail.product_status ps on ps.product_id = p.id where p.tenant_id = $2 and product_status = $3 and (p.is_disable is null or p.is_disable = $4) and (ps.tenant_wechatapp_id = $5 or p.product_type = $6) ) p where p.topping = $7 order by p.volume desc, p.id desc limit $8, $9|1|1|1||0|0|16503|16503|6|6|
|tenant|select sum(tt.maintaincount) as maintaincount, sum(tt.maintainnum) as maintainnum, sum(tt.successnum) as successnum, sum(tt.failnum) as failnum, sum(tt.salemoney) as salemoney from ( select count(1) as maintaincount, count(distinct t.sneak_guest_id) as maintainnum, $0 as successnum, $1 as failnum, $2 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 = $3 and (g.fail_type is null or g.fail_type = $4) and t.event_type in ($5, $6, $7) and t.create_time >= $8 and t.create_time < $9 union all select $10 as maintaincount, $11 as maintainnum, count(distinct t.sneak_guest_id) as successnum, $12 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 = $13 and t.event_type in ($14) and t.create_time >= $15 and t.create_time < $16 union all select $17 as maintaincount, $18 as maintainnum, $19 as successnum, count(distinct t.sneak_guest_id) as failnum, $20 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 = $21 and g.fail_type = $22 and t.event_type in ($23) and t.create_time >= $24 and t.create_time < $25 ) tt|1|1|1||0|0|561064|561064|1|1|
|tenant|select count(0) from ( select sg.id, sneak_guest_no, sg.status, user_id, smg.time, if(sg.status = $0, e.employee_name, $1) as maintainemployeename, smg._count as maintainnum, sg.update_employee_id from tenant.sneak_guest sg join tenant.employee e on e.id = sg.maintain_employee_id join ( select sneak_guest_id, count(*) as _count, min(create_time) as time from tenant.sneak_guest_maintain where tenant_id = $2 and tenant_app_id = $3 and shop_id = $4 and employee_id = $5 and event_type in ($6, $7, $8) and create_time between $9 and $10 group by sneak_guest_id ) smg on smg.sneak_guest_id = sg.id where sg.tenant_id = $11 and sg.tenant_app_id = $12 and (sg.fail_type is null or sg.fail_type = $13) ) tmp_count|1|5|5||0|0|21480|21480|1|1|
||delete from tenant.sjfx_dct_erp_sales_detail where create_time < $0|1|1|1||0|0|269959|269959|0|0|
