|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|user_service|select count(*) from user_service.tenant_member_info tmi left join user_service.user_employee ue on tmi.tenant_id = ue.tenant_id and tmi.user_id = ue.user_id and tmi.tenant_app_id = ue.tenant_wechatapp_id where ue.id is null and tmi.shop_id = $0 and tmi.tenant_app_id = $1 and tmi.tenant_id = $2|388|944|10||0|0|6563686|416856|388|1|
|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|135|275|8||0|0|1563899|26689|135|1|
|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|108|234|7||0|0|369901|6482|108|1|
|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|102|144|6||0|0|545575|14708|102|1|
|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)|88|197|11||0|0|8855786|211141|55|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|80|110|3||0|0|166632|4911|166632|4911|
|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|63|127|5||0|0|256599|7160|63|1|
|coupon_service|select cet.id, cet.coupon_id, cet.user_id, cet.coupon_type, cet.expire_time, if(cet.expire_time < now() and cet.status = $0, $1, cet.status) as status from coupon_service.coupon_expire_task cet join coupon_service.coupon_extend ce on ce.tenant_id = $2 and ce.tenant_app_id = $3 and ce.coupon_id = cet.coupon_id where cet.tenant_id = $4 and cet.tenant_app_id = $5 and cet.employee_id = $6 and cet.shop_id = $7|58|301|11||0|0|1389341|340950|4204|454|
|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)|51|78|5||0|0|19650734|385382|51|1|
|coupon_service|select count(*) from employee_give_coupon_log where tenant_app_id = $0 and coupon_push_id = $1|40|52|2||0|0|734092|30203|40|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|38|134|14||0|0|19648258|987208|8|1|
|comment_service|select * from comment_service.comment_reward where comment_id = $0 limit $1|37|52|4||0|0|13927145|380316|10|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 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|32|53|3||0|0|250449|13913|32|1|
|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|28|41|4||0|0|5090460|205970|22|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|22|51|6||0|0|10962842|498455|22|1|
|v4_user|select count(1) from member_source where source_id = $0 and tenant_id = $1 and tenant_app_id = $2|20|25|1||0|0|4118629|205964|20|1|
|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|19|32|5||0|0|61488|5794|19|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')|18|70|14||0|0|2647411|419709|15127|3570|
|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, null) 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 = $2 and st.tenant_app_id = $3 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $4 and it.tenant_app_id = $5 where t.status = $6 and task_type = $7 and task_template_id = $8 and shop_id = $9 and employee_id = $10 and (member_mobile_no = $11 or member_name like concat($12, $13, $14)) and finish_time is null and t.end_time > now() and t.tenant_id = $15 and t.tenant_app_id = $16 order by t.id desc limit $17|18|36|3||0|0|6118866|339949|54|9|
|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|18|21|1||0|0|146184|19296|18|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|17|26|2||0|0|190227|18560|170|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, $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|17|25|4||0|0|22832|1994|10769|948|
|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|15|142|16||0|0|1072348|112950|15|1|
|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)|13|28|4||0|0|6477951|498476|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_id = $1 and sneak_guest_maintain_id = $2|13|15|1||0|0|16739372|1287644|0|0|
|corpwx|update external_user set un_assign_flag = $0 where tenant_id = $1 and un_assign_flag = $2|13|29|5||0|0|365040|57308|0|0|
|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 task_template_id = $9 and shop_id = $10 and employee_id = $11 and arrival_shop_time >= $12 and arrival_shop_time < $13 and arrival_shop_time is not null and t.tenant_id = $14 and t.tenant_app_id = $15 order by t.id desc limit $16|13|25|3||0|0|4419135|339935|16|2|
|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|12|20|2||0|0|4079262|339949|45|9|
|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)|12|20|6||0|0|15452618|1288677|11|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, $57wm2wxudqaa69fhm9a21tfuh-lnggpudq$58wm2wxudqaaqbludhdbd5jukmog0lg4zw$59wm2wxudqaaosvi3cyjoeaul53bv46zpa$60wm2wxudqaaz8dez4fs6qnh6yl_vnbscw$61wm2wxudqaako2luxzddqctk0uf9rxgwq$62wm2wxudqaa2zkgrhvlba-jfrh_6jj8wq$63wm2wxudqaamu9_yert6847j9n_zg660w$64wm2wxudqaazyrxkgnskh30eqcq-ovl-a$65wm2wxudqaahsokvvcqhcxf9u4z9kqazg$66wm2wxudqaamdtlbav1wenwkfxles7bta$67wm2wxudqaaxhwvjr6shjqx9wfmwkwfoq$68wm2wxudqaaqkzh7ztd-dzngrpscvwsfw$69wm2wxudqaar3ch-r_ru3nimfzmcriyqq$70wm2wxudqaawuwzenjl5julden7peia8w$71wm2wxudqaa3d0zopxonpk8hoxsc-jkna$72wm2wxudqaagqkqyt5iawdy0dczy6ilra$73wm2wxudqaaffdy1t_c0gcgorlfpunzpq$74wm2wxudqaanwxap37iuwi6gili9csqhg$75wm2wxudqaa_v2_rlylulfmtzb7k76xgg$76wm2wxudqaayafyajjiuvkgqu_-5gzt0g$77wm2wxudqaacjt_s7w1ecjhlskp_d5ejg$78wm2wxudqaad9wqwlwpkatw6kr7cygdmq$79wm2wxudqaaqiakjg-d4herf8qx23zmvw$80wm2wxudqaancblvo0v92rz9meiwdtthw$81wm2wxudqaa9lfnmrsbosz6ww_sap0ehg$82wm2wxudqaavpdaavpo6qvdcs5dfedjxg$83wm2wxudqaaktwhigqf_ha4xtncvk8ibq$84wm2wxudqaawbcsk-h-0m1qtdmwz12glg$85wm2wxudqaaqe8m_fk8k8ulekk-kbxfww$86wm2wxudqaaeq3sm9sxzutq5v3d_p2yug$87wm2wxudqaa2n38nvr7fvaxjudhuep_ea$88wm2wxudqaa_mh9a_faplwwjda98nftog$89wm2wxudqaa0q7uyfaxf_b1kwt9nchjoa$90wm2wxudqaacjd72xa0ccoke8iasvnkpg$91wm2wxudqaaw1rvlqy52z9svl0hiuujia$92wm2wxudqaaee3912wrgqtdsett8c8-ba$93wm2wxudqaavbv2kazihuoh3q__hxsplg$94wm2wxudqaao3sp0_scnfnvyopikghr1q$95wm2wxudqaajaonskw_-jdcoztolwo81w$96wm2wxudqaaxgra6vyekwn2k1b6jlusqw$97wm2wxudqaataifesxhm4pfzrw3mrgsuq$98wm2wxudqaarepawdxrdqtngj0pomteoq$99wm2wxudqaabzh4fm8weorgojyxydff5g$100wm2wxudqaax1o_hipm_1alez0j29xutq$101wm2wxudqaaxbzblqv0nygszm9i2le2sg$102wm2wxudqaapkphn9xnstigsoo368dp0w$103wm2wxudqaaukimykep1m4xbdw5s5odbw$104wm2wxudqaa4brjkfplps3zswb9tyzjhq$105wm2wxudqaa4euzmaqerdxc6lpgaouphq$106wm2wxudqaag6qlxfypi_69eqjqzgz4vg$107wm2wxudqaa2ykuayc3elyub8jiqcp1xa$108wm2wxudqaafhfwmwvidmcyecbe0io8na$109wm2wxudqaazq625gqgak-xnyrngeaimq$110wm2wxudqaauajqmrytfhzrtkij0iiigg$111wm2wxudqaavwgysnumfd7rxacxbqsxrq$112wm2wxudqaahpqlmzswz9ikvjazsfu7lq$113wm2wxudqaa5lef3r_hsyhwenfty3wsiw$114wm2wxudqaai2adp8dhaskpc9udapjc1w$115wm2wxudqaabdfsnsfzo3vge75lqv4wxg$116wm2wxudqaaojt1fkf78lnojhcagpr5zw$117wm2wxudqaai82oj87vx7izrikg_a5xcw$118wm2wxudqaabpr2yin0xeo-q9348tlowa$119wm2wxudqaabybmlujy7gcyvzajabndnq$120wm2wxudqaa8rxqa8org4k7ek26a2d7ma$121wm2wxudqaao-ujtyxknzztcw0-9w3sta$122wm2wxudqaaknuqwrgsoh46robhr34-sw$123wm2wxudqaa5ggdjxm1tc5zomcggjqzvw$124wm2wxudqaa5gob7biatdvshyna3zzj9a$125wm2wxudqaa85k...|12|17|2||0|0|18290|1535|9007|756|
|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|11|22|7||0|0|3524974|463082|568|312|
|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)|10|30|13||0|0|12878828|1288259|20|4|
|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|10|18|3||0|0|5708954|577415|34|10|
|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)|9|11|2||0|0|33697|3779|9|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|9|11|1||0|0|69349|7717|54|6|
|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|8|120|29||0|0|808797|112106|8|1|
|v4_user|insert into employee_external_bind_log (id, external_user_id, corp_user_id, employee_id, oper_type, create_time, update_time, tenant_id) values (?, ?, ?, ?, ?, ?, ?, ?)|8|10|1||0|0|0|0|0|0|
|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|8|27|5||0|0|3998373|658260|8|1|
|v4_sales|select count(1) from v4_sales.erp_sales es where is_sales = true and sales_status = $0 and (es.sales_no like concat($1, $2) or es.member_erp_id = $3) and es.tenant_id = $4 and es.tenant_app_id = $5|8|11|2||0|0|1992208|249049|8|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|7|30|9||0|0|541679|77391|7|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|7|21|5||0|0|138400|26693|7|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|7|13|3||0|0|124240|41176|7|1|
|warranty_service|select count(*) from warranty where user_id = $0 and tenant_wechatapp_id = $1 and is_disable = $2|7|42|11||0|0|51543|9734|7|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)|7|7|1||0|0|9016271|1288639|18|3|
|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|7|16|3||0|0|304207|44388|65|11|
|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|7|13|3||0|0|124216|41174|7|1|
|order|select max(create_time) from `order`.order_operator_log where tenant_wechatapp_id = $0 and order_id = $1|6|24|4||0|0|4867298|811404|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|9|3||0|0|306296|177372|6|1|
|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|6|9|2||0|0|488066|81445|6|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, null) 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 = $2 and st.tenant_app_id = $3 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $4 and it.tenant_app_id = $5 where t.status = $6 and task_type = $7 and task_template_id = $8 and shop_id = $9 and employee_id = $10 and finish_time is null and t.end_time > now() and t.tenant_id = $11 and t.tenant_app_id = $12 order by t.id desc limit $13|6|8|1||0|0|741060|167145|60|10|
|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)|5|6|1||0|0|1568009|449304|5|1|
|v4_user|select count(1) from member where status = $0 and member_name like $1 and tenant_id = $2 and tenant_app_id = $3|5|5|1||0|0|1029596|205936|5|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|5|7|1||0|0|231492|66099|5|1|
|gift_mail|select count(*) from gift_mail.trade t left join gift_mail.trade_take tt on tt.trade_id = t.id where t.tenant_id = $0 and t.tenant_wechatapp_id = $1 and t.trade_type = $2 and t.order_status = $3 and t.take_type = $4 and tt.shop_id = $5|5|7|2||0|0|68060|13612|5|1|
|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|5|53|17||0|0|458792|113867|5|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|25870|8704|4|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)|4|5|1||0|0|5152210|1288268|13|5|
|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|4|4|1||0|0|325318|81373|80|20|
|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|17|5||0|0|3244378|811194|0|0|
|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|4|5|2||0|0|22836|6452|8|2|
|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|4|13|8||0|0|805015|407389|168|64|
|employee|update backlog set status = $0, finish_time = now() where tenant_app_id = $1 and employee_id = $2 and status in ($3, $4) and shop_id = $5|4|8|4||0|0|8769|3539|0|0|
|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|3|3|1||0|0|8052|3410|252|133|
|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|3|3|1||0|0|18728|8704|3|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|3|4|1||0|0|190977|66099|3|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|3|4|2||0|0|124854|58779|6|2|
|coupon_service|commit|3|3|1||0|0|0|0|0|0|
|employee|update backlog_system set status = $0, finish_time = now() where tenant_app_id = $1 and scene = $2|3|7|2||0|0|3231108|1077036|0|0|
|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|3|11|4||0|0|35401764|11800588|3|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 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))|3|3|1||0|0|14622|6527|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, $13, $14, $15, $16, $17, $18, $19, $20)|3|3|1||0|0|3864992|1288743|56|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)|3|10|7||0|0|3864293|1288255|15|5|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and maintain_employee_id = $3|3|4|1||0|0|18728|8704|3|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|3|3|1||0|0|7374|3099|26|9|
|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|4|1||0|0|158975|74419|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)|3|9|7||0|0|3863361|1288548|18|9|
|authorization_service|update user_login_token set status = $0 where login_token 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|3|4|1||0|0|3398|2129|0|0|
|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|3|5|2||0|0|1730001|577073|19|8|
|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|2|2|1||0|0|15571|7788|12|6|
|employee|select count(*) from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and expire_time between $4 and $5|2|37|26||0|0|156038|78019|2|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|2|31|23||0|0|100488|50244|2|1|
|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|2|3|1||0|0|0|0|0|0|
|employee|select count(*) from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and finish_time between $4 and $5|2|2|1||0|0|1472|736|2|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|2|4|2||0|0|2614548|1307319|680|385|
|value_added|update value_added_user set state = $0 where state = $1 and tenant_id = $2 and tenant_wechatapp_id = $3 and user_id = $4 and product_barcode = $5|2|4|2||0|0|290|145|0|0|
|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|2|8|4||0|0|49238|24619|9362|4681|
|employee|select id, scene, employee_id, member_user_name as username, finish_time, status from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and expire_time between $3 and $4 and status != $5 and scene not in ($6, $7) order by id desc limit $8|2|3|1||0|0|497635|248844|9|5|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6, $7) and t.create_time >= $8 and t.create_time < $9 group by date_format(t.create_time, '%d')|2|3|2||0|0|7466|3733|62|31|
|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)|2|2|1||0|0|411482|367390|20|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, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)|2|2|1||0|0|267017|209156|42|21|
|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|2|24|19||0|0|904810|452405|2|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_name like concat(concat($4, $5), $6) and cu.create_time >= $7 and cu.create_time <= $8|2|4|2||0|0|41365|20684|2|1|
|wx_gateway|select count(0) from wx_template_msg where tenant_id = $0 and tenant_app_id = $1|2|2|1||0|0|7167|3595|2|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_name like concat(concat($4, $5), $6)|2|54|34||0|0|293726|146863|2|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, ...|2|5|3||0|0|1945030|1143186|603|344|
|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|5925|3161|5925|3161|
|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|2|3|2||0|0|967603|689700|2|1|
|v4_employee|select count(1) from task_task where task_template_id = $0 and tenant_id = $1 and tenant_app_id = $2|2|3|1||0|0|278042|139021|2|1|
|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|2|24|19||0|0|902656|451328|10|5|
|employee|select id, scene, employee_id, member_user_name as username, finish_time, status from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and expire_time between $3 and $4 and status != $5 and scene not in ($6, $7) order by id desc limit $8, $9|2|29|20||0|0|5061524|2530762|8|4|
|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|2|7|3||0|0|23592564|11796282|20|10|
|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|2|3|2||0|0|15614|7807|0|0|
|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|2|17|8||0|0|147018|73539|6|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)|2|2|1||0|0|542380|426812|34|17|
|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)|2|10|9||0|0|432281|346483|104|52|
|employee|select t1.employee_id, t1.shop_id, t1.shouldaddnum, t1.addednum, ifnull(t2.marklabelnum, $0) as marklabelnum from ( select t.employee_id, t.shop_id, t.task_amount as shouldaddnum, t.finish_amount as addednum from employee.backlog t where t.tenant_id = $1 and t.tenant_app_id = $2 and t.shop_id = $3 and t.begin_time >= $4 and t.expire_time < $5 and t.scene = $6 ) t1 left join ( select t.employee_id, sum(t.finish_amount) as marklabelnum from employee.backlog t where t.tenant_id = $7 and t.tenant_app_id = $8 and t.begin_time >= $9 and t.expire_time < $10 and t.scene = $11 group by t.employee_id ) t2 on t1.employee_id = t2.employee_id order by t1.shop_id, t1.employee_id|2|8|4||0|0|780401|390206|20|11|
|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)|2|7|6||0|0|1534886|850827|270|135|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6) and t.create_time >= $7 and t.create_time < $8 group by date_format(t.create_time, '%d')|2|4|3||0|0|7466|3733|62|31|
|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)|2|4|2||0|0|518981|450639|6|3|
|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)|2|2|1||0|0|18700|11958|2|1|
|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 )|2|49|32||0|0|36980088|18490044|6|3|
|employee|select count(0) from ( select t.employee_id, t.shop_id, t.task_amount as shouldaddnum, t.finish_amount as addednum from employee.backlog t where t.tenant_id = $0 and t.tenant_app_id = $1 and t.begin_time >= $2 and t.expire_time < $3 and t.scene = $4 ) t1 left join ( select t.employee_id, sum(t.finish_amount) as marklabelnum from employee.backlog t where t.tenant_id = $5 and t.tenant_app_id = $6 and t.begin_time >= $7 and t.expire_time < $8 and t.scene = $9 group by t.employee_id ) t2 on t1.employee_id = t2.employee_id|2|5|3||0|0|701687|403938|2|1|
|employee|update backlog set leave_flag = $0 where tenant_app_id = $1 and employee_id = $2|2|3|2||0|0|7991|4545|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 ( $1wmxekdeqaafmcxyb-hvxvu5cnie, $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, $100wmxekdeqaavc0gqog4behcegjlmy9v5g$101wmxekdeqaa0ufabmrioitgziocmp17wa$102wmxekdeqaahtyf-4ywtrkg7flj5gyhia$103wmxekdeqaae59x5lo7kdd6uvkth9p2bw$104wmxekdeqaazfusupadrvhic74uyhptnw$105wmxekdeqaativvd_u-jz3gktqqa59v8w$106wmxekdeqaadrywrcishj7-nmyhdmggoq$107wmxekdeqaa01iwoio_wxfysholbtmdya$108wmxekdeqaahppwmxnk6ku0s6-n0ibtba$109wmxekdeqaak47r5dgqvysxwyjjehix5a$110wmxekdeqaahkh1dd_c-_4j19koln2n3q$111wmxekdeqaa5k_qjfp6290_q5oit1qmhg$112wmxekdeqaafrbkczapb70eeioagdp0za$113wmxekdeqaahfam9nafvksmsomuze3pbq$114wmxekdeqaaosw3sl11wynk-uupbastqq$115wmxekdeqaaa16uz1gztsyug3rc0awiyq$116wmxekdeqaavhsccfldjykn7x7tvijm4w$117wmxekdeqaaqwodgtscj05mfufuxodqwq$118wmxekdeqaayek-jrexnoa2s771lcwmgq$119wmxekdeqaa5p9vb0wl7iiae5j-pdxgpq$120wmxekdeqaaz2gicbfw25xr5svgkzdkba$121wmxekdeqaawfddg6ugyrg760e9p33osq$122wmxekdeqaas89hoaxwpwmk5sub6c9ina$123wmxekdeqaah1ioflvqw9s6dvv_iwfdpg$124wmxekdeqaa7q7...|2|3|1||0|0|2070|1035|952|476|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) and t.create_time >= $11 and t.create_time < $12 group by date_format(t.create_time, '%d')|2|3|2||0|0|8669|4936|62|31|
|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, $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)|2|2|1||0|0|1162984|815037|412|206|
|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)|1|1|1||0|0|311786|311786|41|41|
|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)|1|1|1||0|0|266125|266125|70|70|
|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|37256|37256|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)|1|1|1||0|0|212003|212003|73|73|
|tenant|select t.id as employeeid, t.tenant_id, t.employee_erp_id as employeeerpid, t.employee_name as employeename, t.employee_type_id as employeetypeid, t.employee_type as employeetype, t.shop_id, sp.shop_name, t.employee_no as employeeno, t.sex, t.mobile_no as mobileno, t.corp_wx_user_id, t.head_img_url as headimgurl, t.dept_erp_id, ed.dept_name as dept_erp_name, t.status from employee t left join tenant_wechatapp_shop sp on sp.tenant_id = t.tenant_id and t.shop_id = sp.id left join tenant.erp_department ed on ed.tenant_id = t.tenant_id and ed.dept_erp_id = t.dept_erp_id where t.tenant_id = $0 and t.status in ($1) order by t.id asc limit $2|1|1|1||0|0|42402|42402|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, $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)|1|3|3||0|0|850919|850919|181|181|
|employee|select scene from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and finish_time between $4 and $5 group by scene|1|14|14||0|0|61800|61800|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)|1|2|2||0|0|330916|330916|85|85|
|order|select id, tenant_id, tenant_wechatapp_id, order_id, user_id, user_name, shop_id, shop_name, operator_type, src_status, dst_status, full_message, remark, create_time, update_time, src_child_status, dst_child_status from order_operator_log where tenant_wechatapp_id = $0 and order_id = $1 and dst_status = $2 order by create_time desc|1|4|4||0|0|810833|810833|2|2|
|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)|1|1|1||0|0|850753|850753|98|98|
|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|1|1|1||0|0|21079|21079|1|1|
|tenant|select count(0) 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 exists ( select $2 from tenant.sneak_guest_maintain sgm where sg.id = sgm.sneak_guest_id and sgm.event_type = $3 and sgm.intention_info regexp $4 ) and exists ( select $5 from tenant.sneak_guest_maintain sgm where sg.id = sgm.sneak_guest_id and sgm.event_type = $6 and sgm.intention_info regexp $7 ) and sg.status = $8|1|8|8||0|0|33605|33605|1|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)|1|1|1||0|0|8177|8177|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)|1|5|5||0|0|1214867|1214867|66|66|
|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.create_time >= $4 and cu.create_time <= $5|1|1|1||0|0|32558|32558|1|1|
|user_service|select tmb.erp_member_id as member_erp_id, tm.tenant_id, tm.tenant_app_id, tm.mobile_no, tm.user_name, tmi.grade_id as grade_erp_id from user_service.tenant_member tm join user_service.tenant_member_bind tmb on tm.tenant_id = tmb.tenant_id and tm.id = tmb.id join user_service.tenant_member_info tmi on tm.tenant_id = tmi.tenant_id and tm.id = tmi.id where tmb.tenant_id = $0 and tmb.tenant_app_id = $1 and tmb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)|1|1|1||0|0|36|36|12|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, $34wm2wxudqaadp8tuka44ute7f9hkh0pdq$35wm2wxudqaaxdnlkmuazqceo-yvonisuq$36wm2wxudqaaghjtjmbq-7lgwqf3bqqg6a$37wm2wxudqaa8u7x_bsuulevuv6ctsxhwa$38wm2wxudqaagoorasbhrs0klnyaxbw4yq$39wm2wxudqaavsykedvbfyjt8msgonvvhg$40wm2wxudqaa2qkihombciaquwtz4gxeuq$41wm2wxudqaagk_iacn2_03v9wgkveqrww$42wm2wxudqaasoniwz6hsio-a3ca5ccgjq$43wm2wxudqaarfc5izmiv2s04tnncpzl3w$44wm2wxudqaaj4i1u9ljaw5djdsbsoqx-g$45wm2wxudqaa_q16w2jj4hy8vlyales2ba$46wm2wxudqaaxbxsl_wvpxr9w5kvgtfvia$47wm2wxudqaa4g94nwprsmqvq4psxiehyg$48wm2wxudqaarxqikbl5clwyfd3x4gq_2q$49wm2wxudqaa7rjxwtbfy5-ubrphs_tujw$50wm2wxudqaalgdd1otrhmqbift6ieuj5q$51wm2wxudqaal7kkjdz-xfewmk_i7h6wlg$52wm2wxudqaa01nvpg1blxyhm_o2_xyjlq$53wm2wxudqaazcuj8kwqmz83b31cvgq-uw$54wm2wxudqaavp3moxra5butdlfu9gv5kq$55wm2wxudqaarer1hx3my-ps69pd19xfwa$56wm2wxudqaa9rqnyggvxsx8h509v4ozzw$57wm2wxudqaawh2uqvrwgnkw7tjwgnauza$58wm2wxudqaantbwhrgf_a5ydaolp6lm3a$59wm2wxudqaakexyfthtfkoainx8vjlwxg$60wm2wxudqaabmuprvdlm0mfmvvb92cj1a$61wm2wxudqaa-fv15ytofcjc5plitvgi-q$62wm2wxudqaagsjrrmnl8k0xou5ek5gf_a$63wm2wxudqaa-3k6rnsec3pqzpw1j3xp8g$64wm2wxudqaa19izf-ar9-2vt0iitxyenw$65wm2wxudqaaywpgwurpijeivofrdt47bw$66wm2wxudqaa0ecdfn7i-xvcxn8vlyoubw$67wm2wxudqaaq1g3vpxj_fgsqeu1c_ureg$68wm2wxudqaa_smqnfupeod5xawgzs-hba$69wm2wxudqaasi35lywlwgn9pdwuy7ixrw$70wm2wxudqaa0j_waci3fsmuj9-5vdb8zw$71wm2wxudqaakhce4tfkmr4dypigv4oitw$72wm2wxudqaalyvaantt9ygydxmhv5odlg$73wm2wxudqaajso5esosuyk4hpwmajjtlg$74wm2wxudqaafin6zytrucykogqfkoyghw$75wm2wxudqaaeopwmlnlyr-prolkgybxkg$76wm2wxudqaaqfpkgtjg1hnpxxovgxzlxw$77wm2wxudqaavuedvywfq-e5ijlynxkedg$78wm2wxudqaaxbwjpovlzvpg-logbpec8q$79wm2wxudqaaaoammkshqkejlegflnmswg$80wm2wxudqaa0zhjdizplloweexzcrrzba$81wm2wxudqaas2yeoq9ssqdaykm_rnovzg$82wm2wxudqaa1folhtmlxfrchekrvwzpkg$83wm2wxudqaaafjrluwdff0hb2gzod2fxw$84wm2wxudqaal3v-njovcdtttmo__84j5q$85wm2wxudqaaeiii0mh_zmnv2gg6r1prvq$86wm2wxudqaah1j_hwtow6atvc9ixpvs7g$87wm2wxudqaabmnsagin5sthljyl3hgn2g$88wm2wxudqaakwte-p35ubidsjbnxwo5cw$89wm2wxudqaa_zuna8jucw_7hdybfmbytw$90wm2wxudqaae_uajs_nuksknh-recpnha$91wm2wxudqaa49vitt3zx3s2h359k_giea$92wm2wxudqaa5jqsgk9rmrjm1vudfukz5a$93wm2wxudqaaohcvdfa96kyu7shzvhnoga$94wm2wxudqaafd_i9s28m7hzcb5qr2adza$95wm2wxudqaa00ixgk3wo2bfndsmqsa6ha$96wm2wxudqaaawpbrhhgmzlnwnroq1pyyg$97wm2wxudqaadkdvttosubdfcxgcuewd-w$98wm2wxudqaa3rpuvdeen3b4pnydhj-1kq$99wm2wxudqaapsh96oierw5jfiwhf3puyq$100wm2wxudqaa2psg-23yhanyygtxokturw$101wm2wxudqaawirsbpvq3dkuspwdkh7b6a$102wm2wxudqaan63bwmro6ipqxxeah3rj5g$103wm2wxudqaazqzweykpb-inispqefb_za$104wm2wxudqaaogyf7tfmods5xweu_f_kaw$105wm2wxudqaacft9ghi2t0d_0wsyh375cq$106wm2wxudqaay7efsujh7iam_kbpzjueaa$107wm2wxudqaakfu9ckze4lendrtjiuazya$108wm2wxudqaa-mvgwm3bd4dvqxvwos2ywq$109wm2wxudqaa3-fhq6g-c8zk4y3d_gq41g$110wm2wxudqaa2ih8wnh4ds_g64wbtwabjq$111wm2wxudqaa2ddmfbsjzfuwykpqivw7zq$112wm2wxudqaagl0uw-wji13cou2uzxiwua$113wm2wxudqaajaydres6djx_8opujyptuq$114wm2wxudqaayvvp3udoxc5p1lczy0i-5w$115wm2wxudqaalysqzg4bxd3jhwzb9lwqdq$116wm2wxudqaaepnrqtpc4hf1vuqcgiij2g$117wm2wxudqaamyktuachll1glwtzavlbww$118wm2wxudqaaj_igzkwl7ixlabjqvqeuhg$119wm2wxudqaazhk4nfhych-miaplg7ahqw$120wm2wxudqaawjtqiwlndxqrgranlk3zlw$121wm2wxudqaac1vugxui6cjcvxedzjwpfw$122wm2wxudqaa8gg6cmm-ru2kjf-a_yrz7w$123wm2wxudqaaf3uiftmyqop1nfqql9rwxw$124wm2wxudqaaa_ehrjcskpfxuuwfg8dg2q$125wm2wxudqaatq2...|1|1|1||0|0|1638|1638|773|773|
|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)|1|1|1||0|0|801385|801385|170|170|
|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|41317|41317|13|13|
|wx_gateway|select count(*) from wx_gateway.wx_image where tenant_app_id = $0 and state = $1|1|2|2||0|0|211183|211183|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)|1|1|1||0|0|43324|43324|12|12|
|tenant|select count(*) from v4_user.member_grade|1|1|1||0|0|472479|472479|1|1|
|tenant|select id, tenant_id, tenant_app_id, user_id, status, group_label, maintain_level, remark, create_time, create_shop_id, create_employee_id, update_time, update_shop_id, update_employee_id, sales_amount, next_maintain_date, maintain_employee_id, sneak_guest_no, last_maintain_date, finish_date, fail_type, oid, user_type from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 order by id desc|1|2|2||0|0|12685|12685|3981|3981|
|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)|1|1|1||0|0|1214912|1214912|111|111|
|tenant|select count(0) from erp_sales_detail t1 left join erp_sales_detail_extend t2 on t2.tenant_id = t1.tenant_id and t2.tenant_wechatapp_id = t1.tenant_wechatapp_id and t2.sales_erp_id = t1.sales_erp_id and t2.sales_index = t1.sales_index left join erp_sales t3 on t3.tenant_id = t1.tenant_id and t3.tenant_wechatapp_id = t1.tenant_wechatapp_id and t3.sales_erp_id = t1.sales_erp_id where t1.tenant_id = $0 and t1.tenant_wechatapp_id = $1 and t3.tenant_id = t1.tenant_id and t3.tenant_wechatapp_id = t1.tenant_wechatapp_id and t3.member_erp_id = $2 and t3.sales_status = $3 and t3.is_sales = $4|1|1|1||0|0|7483|7483|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)|1|3|3||0|0|948777|948777|72|72|
|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, $62wm2wxudqaaiajxlxl6xeen9vxqpc, $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|1549|1549|756|756|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6, $7, $8) and t.create_time >= $9 and t.create_time < $10 group by date_format(t.create_time, '%d')|1|1|1||0|0|4720|4720|31|31|
|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|11|11||0|0|390187|390187|31|31|
|mysql|delete from message_push.message_log where create_time < date_sub(now(), interval $0 day)|1|60|60||0|0|2257810|2257810|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.create_time >= $4 and cu.create_time <= $5 and cu.template_id = $6 and cu.source = $7|1|1|1||0|0|2809|2809|1|1|
|export|select od.coupon_id, case o.pay_type when $0 then $1 when $2 then $3 when $4 then $5 when $6 then $7 else $8 end as paytypetext from coupon_service.coupon_market_order_detail od join coupon_service.coupon_market_order o on o.tenant_id = $9 and o.tenant_app_id = $10 and o.id = od.order_id where od.tenant_id = $11 and od.tenant_app_id = $12 and od.coupon_id in ($13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26)|1|1|1||0|0|9682|9682|14|14|
|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|11|11||0|0|390125|390125|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)|1|2|2||0|0|46162|46162|32|32|
|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()|1|1|1||0|0|340496|340496|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) and t.un_assign_flag = $85|1|1|1||0|0|451|451|220|220|
|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)|1|1|1||0|0|266101|266101|46|46|
|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, null) 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 = $2 and st.tenant_app_id = $3 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $4 and it.tenant_app_id = $5 where t.status = $6 and task_type = $7 and task_template_id = $8 and shop_id = $9 and employee_id = $10 and (member_mobile_no = $11 or member_name like concat($12, $13, $14)) and finish_time is null and t.end_time > now() and t.tenant_id = $15 and t.tenant_app_id = $16 order by t.id desc limit $17, $18|1|1|1||0|0|340025|340025|7|7|
|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|111|111||0|0|9133954|9133954|1655|1655|
|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 and es.is_sales = $5|1|1|1||0|0|3155|3155|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, $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)|1|4|4||0|0|1101387|1101387|215|215|
|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|1|1|1||0|0|793629|793629|32|32|
|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)|1|1|1||0|0|814924|814924|93|93|
|employee|select employee_id from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and finish_time between $4 and $5 group by employee_id|1|14|14||0|0|61790|61790|7|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, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23)|1|1|1||0|0|18658|18658|20|20|
|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|1|1||0|0|766793|766793|81|81|
|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)|1|1|1||0|0|380170|380170|15|15|
|tenant|select count(*) as amount from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and create_time <= $3|1|1|1||0|0|8704|8704|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)|1|1|1||0|0|272974|272974|48|48|
|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)|1|1|1||0|0|684091|684091|167|167|
|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) and t.scene = $5 and t.begin_time >= $6 and t.expire_time < $7 group by date_format(t.create_time, '%d')|1|2|2||0|0|4496|4496|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, $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)|1|2|2||0|0|773944|773944|209|209|
|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) and t.scene = $8 and t.begin_time >= $9 and t.expire_time < $10|1|1|1||0|0|5220|5220|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|1805636|1805636|0|0|
|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) and t.scene = $10 and t.begin_time >= $11 and t.expire_time < $12 group by date_format(t.create_time, '%d')|1|4|4||0|0|11168|11168|31|31|
|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|1805638|1805638|1023|1023|
|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|1|1|1||0|0|577356|577356|2|2|
|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, $15wm2wxudqaaky, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38wm2wxudqaa86zud4hsymeidkgqhg2spa$39wm2wxudqaa-31ydx46_zvw8pj5rolmwg$40wm2wxudqaaopsazq2tyhrvicm-qm0xla$41wm2wxudqaaofrsdhr5i6drm0nmzkjq8a$42wm2wxudqaaaebdcnemcbimojzwhhd2qa$43wm2wxudqaa75_8gqaqffqovhrhw8xbxa$44wm2wxudqaaxcmj6wnp3lgpxgshuohmug$45wm2wxudqaajvkrc3bdxgx5-ofuuzw_8w$46wm2wxudqaa48qhuyhzeqf4_dw1nencqg$47wm2wxudqaa8qjnvm7j8gr5r_dkuvnx8w$48wm2wxudqaagmq3ubh4qyvaoded3by8ea$49wm2wxudqaakklavon7glszgakx-gu5ya$50wm2wxudqaavqb4hq0ncl8k4vgpg9l3jw$51wm2wxudqaa5e-ahwdih3ct5jhq5s68wg$52wm2wxudqaaive9fxmgqh1wg2gmlsnpqa$53wm2wxudqaa3pt2bxazkbwh_utnmschcq$54wm2wxudqaaicrx0oay2bpgngl4uivy9w$55wm2wxudqaauwgl0hvxaxbpq5g9pn3r7w$56wm2wxudqaafb0doj-owtfshrrfof9qng$57wm2wxudqaamrahynrn6vejo3y85pas0q$58wm2wxudqaawxvjuglsj2mp66431xbejq$59wm2wxudqaa6fm2hebbq0lwcbgw1n2x-g$60wm2wxudqaanxoc0g9eamtrzrgt85tj-q$61wm2wxudqaaek8a-u7mt6ekqhjyqp66bw$62wm2wxudqaasydyqennap22gukypahn9q$63wm2wxudqaa_tigan6sdmmcmjmlbp-taw$64wm2wxudqaatha7pnxrz0_yahmuebtxyq$65wm2wxudqaaoryxd_2tg4fzajjvpst3tg$66wm2wxudqaay_aql426rksd1qmswhjk2q$67wm2wxudqaa1qvjm0my0awjz4hjegltzg$68wm2wxudqaat6e_kdnavpmqqazbhah8wa$69wm2wxudqaazlvrk6qzbc7txxp9eyllrg$70wm2wxudqaahz5sluzdcqfwfwpu1peuog$71wm2wxudqaak8azy8qu0jkignpl9ugx0a$72wm2wxudqaakwspfk3t8qfv1td44kgjrg$73wm2wxudqaasa7wloxoq6tc69p0foqpsg$74wm2wxudqaaegmnm4kyd0uuhldpxvrcrg$75wm2wxudqaavb8ufc3m-_ncz4y7ayk-ca$76wm2wxudqaag2qbnigia5gvlus1mn-saa$77wm2wxudqaamzebff5sbkitd7tkjqbgng$78wm2wxudqaaqbwduyot5w0lgwobrtheug$79wm2wxudqaa5dahbrnms7pp-5aqkagtog$80wm2wxudqaazggcmi73mkyfus9cagm69a$81wm2wxudqaa5p5qjgbf3lrgt7eaxx1doa$82wm2wxudqaa1xpymm98vy5obya94pk4xw$83wm2wxudqaaic_tamt8lbp76zqa9rfniq$84wm2wxudqaakddrrxlosyxcr1ka00_8ng$85wm2wxudqaacpqbjdfll1ikhcpr8gvkag$86wm2wxudqaapqbskbwzfshu2vdry-ifhg$87wm2wxudqaappjnq0jc20sak73ywhleba$88wm2wxudqaapxsimchev8g-eivwhc85ea$89wm2wxudqaajisgzxil8zt50kwn3-deba$90wm2wxudqaatatb0afns95m0afg8d3fig$91wm2wxudqaak6jynnlxryv4cuo8clysta$92wm2wxudqaaf5yo-kshmvdfglxmtx8mxa$93wm2wxudqaazsexiaiqshygr5odf4g7pa$94wm2wxudqaa_xdbfpj-nfxesie5swzula$95wm2wxudqaawiajiiaimtlchuzgpov8oq$96wm2wxudqaaijoi2qh2bafbmkxuojhdxg$97wm2wxudqaadjigo6fu_dzxnwqpwn22ma$98wm2wxudqaatpf4afsxvdkbf1kqk6_lsg$99wm2wxudqaadypo66f_feu1ysiffmottw$100wm2wxudqaadngwq7pwlnhlzsms8adu1w$101wm2wxudqaa6ggyxx6cxge6kq-khubfpq$102wm2wxudqaa6c_iwq0fy9iio83jlnnykw$103wm2wxudqaajgl5kbr6phsau5ve2nlt7w$104wm2wxudqaa46mhgkk06v1kxklgjs8xna$105wm2wxudqaagf-a42f3yf7uuao_6pkbsa$106wm2wxudqaa3umwabx-gpy-71qialquza$107wm2wxudqaauvnxm5fna-ebwncm22iegg$108wm2wxudqaa3l7lfftndezdzu3kgfydig$109wm2wxudqaawrjdwjh9iwe6pcj83hc_wg$110wm2wxudqaaccqztvh7tsmcivmr9c739q$111wm2wxudqaamelux-oq0ppzwihsqurwta$112wm2wxudqaakkssdwb-sqoi5j3dpmbq2q$113wm2wxudqaaadg9kfn1xpwdnhdsh_rmqq$114wm2wxudqaa_jyuod3x9yj8bzoemdnomq$115wm2wxudqaaigqyztctjwz2kpxpyq1cra$116wm2wxudqaac4_ryjg8yj4ymqbtcmtf1w$117wm2wxudqaa4gbqymzn2rtrzivcdymj2a$118wm2wxudqaao-6w9kfszqo6whlfhn75qg$119wm2wxudqaaitaqztdbuejokenhj6c0mw$120wm2wxudqaa7c6dso7zmxria-msmqcova$121wm2wxudqaajo_axinp98ppglty2tiw5g$122wm2wxudqaanias73s1pvnyw_3_zetcuw$123wm2wxudqaaoqa2h6blw-1en9333j1mew$124wm2wxudqaajf_...|1|1|1||0|0|1080|1080|510|510|
|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) and t.scene = $5 and t.begin_time >= $6 and t.expire_time < $7|1|2|2||0|0|4494|4494|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, $60wm2wxudqaasnnd3bpdfrffymztyewe9w$61wm2wxudqaaspona1rt37putvkalk3elq$62wm2wxudqaajupj5cfkmlvccy4suep-fg$63wm2wxudqaalfgpmz7ovxgu3rj_bonqqq$64wm2wxudqaacoaerxi-2_alx-wahonvdw$65wm2wxudqaak17likjta3w2h4siltqdlg$66wm2wxudqaajyptq5cq1ss45vhhwr2wtw$67wm2wxudqaaduel4anw-1emjmy0_6aw0w$68wm2wxudqaau_tdakagflmvpyhw6jcaiq$69wm2wxudqaaz8rqz6epi3_lo9_aseloyg$70wm2wxudqaavzvibxv6dtqqoszko, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88wm2wxudqaakuzmdrao1r4am2ri-bi-rg$89wm2wxudqaasdyukyvj-tsi9bnpxxtyra$90wm2wxudqaaotxvps91eqitdt_futtthw$91wm2wxudqaaybjkivtitm0wndhwh1ldgq$92wm2wxudqaadfe0_bnlz19qlscjwr9yga$93wm2wxudqaaywyi3xvz9mer8fpyyjoqsq$94wm2wxudqaakvue0rjeghiz6x7rtnexkw$95wm2wxudqaagjolpofxeoi59tgyotfp0a$96wm2wxudqaaw4tzcj45agr6mtemfrqhya$97wm2wxudqaacmqp7u_xzhhokmqqigorfw$98wm2wxudqaawtdptnvh6x_jzoc7jaomia$99wm2wxudqaav-wztkxhrp-gdekucifkzq$100wm2wxudqaalvytodss6fdhfkddeqiaua$101wm2wxudqaas0pbisxgrxfzzmrtrvw-gg$102wm2wxudqaak4zeesgw_3yn5pops3fm2q$103wm2wxudqaafysf_ibqn2kbz1wdj4jmda$104wm2wxudqaarlxpvdpv40udpu_uutkmcw$105wm2wxudqaa1ygccrx2zuaky28i2w_-8q$106wm2wxudqaa8r6qzzlwxp0fxz-qbqk1jw$107wm2wxudqaaveu71tyha_4mga1fo3n3bg$108wm2wxudqaaiwnmsa7fbszmwaira-yr8g$109wm2wxudqaamx7_zzrvtpxhmc6yxa2ska$110wm2wxudqaa6dy7jaqd_tx1zyvvuk1cnw$111wm2wxudqaa_ddmnhd9hzbalzem5rbrsw$112wm2wxudqaazeduljoy1omutqhhwbsx4g$113wm2wxudqaay1tlkxsnkdpppaauaxoz5g$114wm2wxudqaafox8nmgfvq7idxyzqymxyw$115wm2wxudqaa2px3qmr9lfxfxdhdnxyk3g$116wm2wxudqaavv5mwov-ps_pmq09bwmqxw$117wm2wxudqaabsvuhddz5ddx2gi_fjazvg$118wm2wxudqaakfxhxctjn5z33swmpk-mww$119wm2wxudqaazwcdfjbc4-a9-hxjfcvrlw$120wm2wxudqaaargur2c3gsceip7g7rhb7g$121wm2wxudqaa2kf3cwqrhznw8w_gkm5kma$122wm2wxudqaah6ut_pqrj6cmvxpwba2twg$123wm2wxudqaa0an4h8uqwthhwd5pjnou3a$124wm2wxudqaazd5...|1|1|1||0|0|1030|1030|509|509|
|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|198296|198296|80|80|
|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)|1|1|1||0|0|346970|346970|74|74|
|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) and t.scene = $10 and t.begin_time >= $11 and t.expire_time < $12|1|4|4||0|0|11106|11106|1|1|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2|1|1|1||0|0|2487|2487|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, $23wm2wxudqaacrvrjck9cn9gwiub9hq4jq$24wm2wxudqaa92i9wn5drdxzdjtm-bydca$25wm2wxudqaa-xxevdtcpc0tmmjdh1iyfg$26wm2wxudqaak7ceonxwpeco-iboc6xkbq$27wm2wxudqaaer75vqfbq5oe2nnonwlikg$28wm2wxudqaaj8d2m5g2l_ve_gxuw_xalw$29wm2wxudqaahdmim2gkuhrcwvc8ucvg1g$30wm2wxudqaaajup62zwthhwgquixwumng$31wm2wxudqaai9yrl3q3r7cqy8_ngcpoaq$32wm2wxudqaa6jquleh7_pevf-5uee1r9g$33wm2wxudqaax2e_0s0irqkgj0qf4x8a-q$34wm2wxudqaa58cbcrwhi5-f0qfnpcsi7g$35wm2wxudqaavrzriz7nijt8nwwdtu70qq$36wm2wxudqaaxo_-4gujcseqlxfilgjg4a$37wm2wxudqaajzz8ozj2o2j9fsc28lzugw$38wm2wxudqaa5yl3fehchxg0z0e0o79lsa$39wm2wxudqaaxnbcn2ir2lsl1aibhyv7aq$40wm2wxudqaaybxpbvitcwey2zycnozbug$41wm2wxudqaausbbbizphwsk_6xwy2p9pw$42wm2wxudqaaxfhmauci7u5b4euk9sg2ya$43wm2wxudqaaklndagzrfwrzfh1cx0seqw$44wm2wxudqaaodkm16tzjvyx8tog0syo8q$45wm2wxudqaal0b4zscr8jbthior2jcgea$46wm2wxudqaaquzoio8hrhwyoryiwkihgq$47wm2wxudqaagj6xsbgrougeepd8git9vg$48wm2wxudqaagrkv-wutdc4vnl6cd3ia1g$49wm2wxudqaaknpvzuqbhazb7wprfgfzrg$50wm2wxudqaaifkm2bkhhsvqizpaovigkq$51wm2wxudqaaoqudyiemjbc9jxkvbhqukq$52wm2wxudqaa_jmmd-fyw8dv_ppfmxob_a$53wm2wxudqaaqd_3uscknc9m_0ituhesmq$54wm2wxudqaafslqga1xgjc1ns9ys9ctpg$55wm2wxudqaattx46yfvsststvuebnws2g$56wm2wxudqaai1kbabnqtqmlaeyvghuyzw$57wm2wxudqaascpfyx6xhtqwnmvjsrhsow$58wm2wxudqaautaajfsa1zbpsqts2j6kqa$59wm2wxudqaahsit9d-iihgeiaw2ycqzsa$60wm2wxudqaatiumnaf-gdjcpjgbsaklqq$61wm2wxudqaa-bc-ardfmc3fivelsz4ttw$62wm2wxudqaasq7vyacewzyou_qao0pwcq$63wm2wxudqaamkyxm0o99q92hrldlhiclq$64wm2wxudqaaaz0xy8fj-fxyw6590xnqrq$65wm2wxudqaageo8pyzbtqbgz7m_-jo-ng$66wm2wxudqaahsleqzltkkfmnzyazkoa0w$67wm2wxudqaa-kf6cbwi1l3uanebmvrlga$68wm2wxudqaarkusd8jr7b6ma5-esff6lg$69wm2wxudqaahlozmzklr5eo7r3yqokr2g$70wm2wxudqaaowv6ejagpogm4mb_a8oy1q$71wm2wxudqaaa0mcqj0iy2-09-f_jcnbww$72wm2wxudqaazpswqkebgqijfw0fiv-eyg$73wm2wxudqaanlehecxzode42f5zw5jp1a$74wm2wxudqaaoydp49hp33vay5wejzf0cq$75wm2wxudqaaspotnxhhw7sivj1s65sqxg$76wm2wxudqaajvdsscs-xi439az-0cud0q$77wm2wxudqaadqwj_puc4nzfn97q9h0xtg$78wm2wxudqaai5o7srryljigrdq9oo4b9a$79wm2wxudqaafi9da3vl5wqv2zcqoows_a$80wm2wxudqaamvgogtckfcmk0yupljb05g$81wm2wxudqaaiqzdssflbksaq-71qgmr1q$82wm2wxudqaadvs_j4q4jdcdlumxxjihgq$83wm2wxudqaa8urvqubbzrrp8a80jmwmpw$84wm2wxudqaazdneovnipvexbxks-uhjaw$85wm2wxudqaa6hkbpcx-jtnkvliigcknlg$86wm2wxudqaakl5uqqcminlfu_auqzenbq$87wm2wxudqaaorkb7g3rsp-mw5_qje8e-q$88wm2wxudqaachxaaszey8jseva0ma1eqg$89wm2wxudqaa7p1mvynm4ajg8un98mbysa$90wm2wxudqaawxki7dcsdkz7qp_ivlomew$91wm2wxudqaaqhwhmuvlx9ajoe3fohwmsq$92wm2wxudqaahtckjyelbxveuavuqxbclw$93wm2wxudqaamzdawgcoqggob2z_ldsvxq$94wm2wxudqaa2ot8sdw5orpeih_ir5-0iw$95wm2wxudqaa8bhkw7zs3swo2pesm5it7a$96wm2wxudqaaa0saipvxk2luq3yn-wpn7w$97wm2wxudqaax0_w_885w2zizy5axbv3mg$98wm2wxudqaaxd69kojgatitqnaq60yhew$99wm2wxudqaask6ygd97ezza_fcrzeiuvg$100wm2wxudqaaspyl7uyuflahizjvbmqrkq$101wm2wxudqaastds_deeuurkiig8p5rvug$102wm2wxudqaae3lddlj7h7tai4trwze5og$103wm2wxudqaa50dak-1h2gcsgp-0s_2x3q$104wm2wxudqaa51d4hd73wo_qbnuhjfgwcq$105wm2wxudqaavkcmymrynum-ik6zi8yy-w$106wm2wxudqaa3zetsd1qihldnzmkdqpw-q$107wm2wxudqaap82q8sw69lj8clt8l-3irg$108wm2wxudqaaqgrgqftc9aa7nlfaubgy_a$109wm2wxudqaak0e6bb-9iljlajhxv376cw$110wm2wxudqaawnjxnomjamxgukj8bmxhda$111wm2wxudqaaifnvo5jesxidnjce58proq$112wm2wxudqaayx5bbucq5rck_wn_byztlq$113wm2wxudqaam7qlmewm11neuxda5lxtgg$114wm2wxudqaa35ydtrqlkvxxvxb3njadyq$115wm2wxudqaae-moapekmuwiygrsqihr0w$116wm2wxudqaau7bt7yuqdxxly-bebrodmq$117wm2wxudqaabule1snottd9bakdr7xt2q$118wm2wxudqaa0bnnygmyxv5te5xibannmq$119wm2wxudqaabw3z1qefzg52uabjaopsea$120wm2wxudqaay9kbgbd0jx5svqtzvc63jq$121wm2wxudqaakenqze8xv66a0coyb43bzg$122wm2wxudqaabje5vgdq5xwh4g7xbbej6g$123wm2wxudqaaul9v2yws1not6wxxawurng$124wm2wxudqaal2dboa5kyg-fmj_gawvpwq$125wm2wxudqaalqt...|1|2|2||0|0|1455|1455|703|703|
|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)|1|1|1||0|0|73483|73483|22|22|
|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, $20wm2wxudqaantn9qr14l722npvi1dcuzq$21wm2wxudqaavjvvvpm3gr9fdi3zkhuolg$22wm2wxudqaavmw_ux3izql_npdnnxskag$23wm2wxudqaavviu5hu4wb8eneewh18onq$24wm2wxudqaahzgtp2p5_zu9gvpcexlc6a$25wm2wxudqaapubzdpgf_8dk_oor73n-jq$26wm2wxudqaa8skzua0cqwy8o5lwxc1brg$27wm2wxudqaa_l2xeids7akw5pwgdt_hxg$28wm2wxudqaakexa74fsse2spnlwajxzqa$29wm2wxudqaaovtxh-cvstjv6q_mqse-nq$30wm2wxudqaajnx9io4_p2rwlfgst2zpdq$31wm2wxudqaahlwlfv9b1g1t7kpna4wakw$32wm2wxudqaa1o_g7zisnm-lkfhwqw7_tq$33wm2wxudqaagiqda_6ha6woa9veahnyjw$34wm2wxudqaa2z97ut3xvvbfqewixdxn_g$35wm2wxudqaa-h2-nlukuh8vvinuxzqxtg$36wm2wxudqaa4bfomfflj8ha9a7_pyadmq$37wm2wxudqaatrdavuvmuc8sgww30kmfww$38wm2wxudqaah4jrqkkpierzajntx46aog$39wm2wxudqaa5cnuqlkuv7ossgey_2qcbw$40wm2wxudqaaokgfwgvu5wsq2fc7lryuag$41wm2wxudqaa5th3hcq2nbjrt7e5rvb3jq$42wm2wxudqaau0kbarctndmbb4del5dw6q$43wm2wxudqaa7mjlz11bq1g2owmir-nxpg$44wm2wxudqaalcxm0u2lbliw3zulhkeu3g$45wm2wxudqaao4_9jdo41zwj1qibexyk1a$46wm2wxudqaai-pnkh-xb785qnnc0dojla$47wm2wxudqaatzgieyd78nlpcn2qyg9vrq$48wm2wxudqaatjzgsapjfjhbbrnalfjqma$49wm2wxudqaa9sy-jxklhxtppivkuuhpsa$50wm2wxudqaavb55hg8p5h0rgmnyo51yzw$51wm2wxudqaa2kkoncxhafvtlaafza8wow$52wm2wxudqaauz7uqqrfn7jmjvojcyri9q$53wm2wxudqaawabitavznnxygtez2xh5cw$54wm2wxudqaajx5cn2d8ojc07kizldizoq$55wm2wxudqaavcpm0eb6wbru6wctukkdfg$56wm2wxudqaanojvsq5t-e0l9p5kefop4q$57wm2wxudqaa_repasfshuqirreewbg1vq$58wm2wxudqaaslx1mzawzvktwf0pcyjgew$59wm2wxudqaaaovac7deiyomsu6iklxizg$60wm2wxudqaai5meogi4_e4vjoorpzy9ig$61wm2wxudqaabcua22cestc4aikuu12yka$62wm2wxudqaacjz1o3qt_wlhkaylvoyl6w$63wm2wxudqaaxipe-qtl37qqwdlox6zyua$64wm2wxudqaavpnw4shlxfb7ypfndw05jq$65wm2wxudqaa7odqm-sd70xe7gklnjwxcw$66wm2wxudqaakt-6l3kcwu5rgxhzj-c1wg$67wm2wxudqaaprnyr4p2gkutphpnbbk9wq$68wm2wxudqaah1nlhg1acjkbr1imyckmcg$69wm2wxudqaaxa55q2itraethkcrz-2vbg$70wm2wxudqaatjp186hpb_pvxhnhqmzjtq$71wm2wxudqaax956fbzbcig6htkbwnb2pw$72wm2wxudqaad6ocw9rdsh5dwrigb5ecrw$73wm2wxudqaankwxyyc_rsrgocyqpc47fg$74wm2wxudqaarouawaejlgtq91p4wmo6ba$75wm2wxudqaasuoepxknfok3qhxecty6nq$76wm2wxudqaabcxzbpsi_kabfygffk11lg$77wm2wxudqaaa7quk1rxfvgiggnjtskkwq$78wm2wxudqaacqvunjkqrg9ih0x5pol6hq$79wm2wxudqaaluutstmckxfa619yqy54ya$80wm2wxudqaacvvhjngywhxocr3wjm096a$81wm2wxudqaatxi9vcwvi__scnhrikfxkg$82wm2wxudqaadh068lvwu73lgzbjq_84aa$83wm2wxudqaa49qla3nw9rvze6peohbhdq$84wm2wxudqaaa5tq_zn_ctusapnplu6_vg$85wm2wxudqaa63pztqz3o5wecm8fayzowg$86wm2wxudqaax6tm4a0kssce0gnqsscrlq$87wm2wxudqaacibueumltatgy-4h2ijvsw$88wm2wxudqaajzq2caftgls527zrb0pmta$89wm2wxudqaaeu86mwzcmnvyndiqhleaog$90wm2wxudqaao5lb6xmeoenmljohnikipw$91wm2wxudqaa-aqpuda0myqp6quxcwdgpw$92wm2wxudqaaszj2q4yoqplcjriyuowjwa$93wm2wxudqaawm7pa3fcfz2iffr6ohawbw$94wm2wxudqaamgpqdudyoj1mi_fegg1-ha$95wm2wxudqaaoaoolff5scfwaaogzgtgdg$96wm2wxudqaaavxkocyogjwle8sc-5hn4w$97wm2wxudqaaunhhc_g97r7xkkd_qjvauq$98wm2wxudqaao8xzomrerket57nf7inauw$99wm2wxudqaabycalnuxldlg971rbfaxyg$100wm2wxudqaaaq07qf-encrtsb5-d-oinq$101wm2wxudqaaxy0kn8x4bqpntwlzbhz9jw$102wm2wxudqaafdlru352tsrzvcqbnvx_ow$103wm2wxudqaac2rkscqr7na2u99mrs1d5a$104wm2wxudqaa_3h4v2aft462rlnm6occ0q$105wm2wxudqaa-ib8soykohxzewyjgefhjg$106wm2wxudqaah3ba9kaoyovbdcf-r_z82q$107wm2wxudqaam8dx4grqxrz1f7xkjnlqzw$108wm2wxudqaanzbv6zvw7qolzapwqptknq$109wm2wxudqaak7b9hpfq5lhd_epikj7mfw$110wm2wxudqaagfup8-j1ss7zz0uo7j8ksg$111wm2wxudqaajwu_ciln3-ipk4qtudpbkg$112wm2wxudqaau_qi7ilox5kncp6pace8ea$113wm2wxudqaacvybq6begsqa0ruwuccomg$114wm2wxudqaaeligi9ihjb4eg1bh4cr7dw$115wm2wxudqaamvjc8bmt4llxp, $116, $117, $118, $119, $120, $121, $122, $123, $124 ) and ...|1|1|1||0|0|462|462|221|221|
|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) and t.scene = $8 and t.begin_time >= $9 and t.expire_time < $10 group by date_format(t.create_time, '%d')|1|1|1||0|0|5222|5222|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, $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)|1|1|1||0|0|1214923|1214923|122|122|
|tenant|select * from tenant.erp_sales where tenant_id = $0 and tenant_wechatapp_id = $1 and sales_no = $2|1|1|1||0|0|141707|141707|1|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 join ( select coupon_id from coupon_service.coupon_write_off_log wol where wol.tenant_id = $2 and wol.tenant_app_id = $3 and wol.state = $4 and wol.create_time >= $5 and wol.create_time <= $6 group by coupon_id ) w on w.coupon_id = cu.id where cu.tenant_id = $7 and cu.tenant_app_id = $8 and cu.coupon_name like concat(concat($9, $10), $11)|1|3|3||0|0|51610|51610|1|1|
|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|407548|407548|79|79|
|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)|1|1|1||0|0|428763|428763|114|114|
|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|5|5||0|0|1307251|1307251|317|317|
|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|1|1|1||0|0|449280|449280|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, $60wm2wxudqaajgzkypa6titojbwmurkmog$61wm2wxudqaaubt7v1vmkh5brhuluey9qg$62wm2wxudqaar0bjwkrqgmcst1mbdormpq$63wm2wxudqaadpfqa3tmvozoebjggtyjsw$64wm2wxudqaaiejd9qo1dyt3kchcniwbxg$65wm2wxudqaaenopofookyakhc3ibmdjcg$66wm2wxudqaahlu-hkhoyrw4kqqaux9q-q$67wm2wxudqaavjgh_ke5htgkzioua0uwsa$68wm2wxudqaafxvi-vdsymqxlyl5kzexfg$69wm2wxudqaadrftna7u_1orc2wm0jpipa$70wm2wxudqaarqjveathli59ta-c7s3rhq$71wm2wxudqaac9elqnjkee90ema9h1_vxa$72wm2wxudqaafqhpgk4ibooww8io8sxmrq$73wm2wxudqaa0aqxozzghzerj-2vahvrnw$74wm2wxudqaaucjw9vozwgkp_877z452pa$75wm2wxudqaahgfktrix1uabhmqu1ijzgw$76wm2wxudqaakqexcd1odwsnqykzyir9pw$77wm2wxudqaa7z-5sgz9cmpt35an3sen2g$78wm2wxudqaaqfibhbaq0f8umjvoyv0_cq$79wm2wxudqaaacozo8exlbss4gtkix6oia$80wm2wxudqaagcddvuxfuxuqg0kyedpjjg$81wm2wxudqaacxfgmzvsr97dmbcqobjdcg$82wm2wxudqaa7gi-xbpkc7wsrks5a_52qa$83wm2wxudqaak5ypcgqx6jocuzpj-ikhzq$84wm2wxudqaay7twewopw5czgnrvoafedw$85wm2wxudqaajwqe2bgvjpimt7m99aqvaw$86wm2wxudqaa-363ewfe_tilw6hh6qlydg$87wm2wxudqaajaebjn2p-zu064y4htzroq$88wm2wxudqaa1ymsq-8jlg4arcaewm4rza$89wm2wxudqaatnxe1kfkehhvfstz2orfsa$90wm2wxudqaa0o1gfmrr5jorxrggu9tbya$91wm2wxudqaairqei_hwdihvnt2rcfrokw$92wm2wxudqaawjtitsg6ozoasux8ufvm-w$93wm2wxudqaaup2nvoxn8njriphug6g8aq$94wm2wxudqaahqflrznlcgeqjmq5brinua$95wm2wxudqaadf7amujflygt9tsycckrja$96wm2wxudqaanugmxuko4uc5l_9fnz0qpg$97wm2wxudqaaew34dxpslyok-b6auk7hvw$98wm2wxudqaagunws9fgu6g5e7ze6jfvjw$99wm2wxudqaa7p50er9dpwxzdit4avdfsq$100wm2wxudqaakx8qnxm-qrbjoalrrygdxa$101wm2wxudqaau14fawlsmmjbq-qaloltfw$102wm2wxudqaap3h11kxefpdwbsl0dgq2ca$103wm2wxudqaa3jfh8jgyz3s049qhgbcfaq$104wm2wxudqaa3nkjciios2c6f3drlrqbha$105wm2wxudqaaryh0yoscq0phwdkbc9w4cw$106wm2wxudqaa6lr_u0xnfw3hcaorm_8zfa$107wm2wxudqaahkypcx3lkxa_t_4rtfrkga$108wm2wxudqaaa4ptm5a6fblqzhmdqf7pow$109wm2wxudqaa0s-mffcm8zzmweipxicjxw$110wm2wxudqaag9w-zs8vnyfgpbn8jnalfg$111wm2wxudqaawjma1tsp7hhb507nz4nwra$112wm2wxudqaaiwvrl-m5o8movd6bnnvguw$113wm2wxudqaafc_fituk2-zqxexlhk18yq$114wm2wxudqaapuc0j_09ykt4rn_iegyh1a$115wm2wxudqaawvttnc86jjywzxsutsphbg$116wm2wxudqaa4ibumhfhcesisecdoeehcg$117wm2wxudqaaaorzzvgpamvcsfjtsrw8ag$118wm2wxudqaattlyicqfw4jo_7dvzwvofa$119wm2wxudqaameaydf6iumjwimtimkuvbg$120wm2wxudqaan9qgv3hhqtt18ttyjdztga$121wm2wxudqaauc-mh78e7lghjllcg9biwa$122wm2wxudqaao4mlyj1durnkmwxchjcm8w$123wm2wxudqaazu8cdxzcg65pt20dtmdd6g$124wm2wxudqaapb2vwxsrlw-_n6886ct2hw$125wm2wxudqaatdl...|1|1|1||0|0|1239|1239|609|609|
|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)|1|1|1||0|0|1287548|1287548|13|13|
|tenant|select * from v4_user.member_grade|1|1|1||0|0|50001|50001|50001|50001|
|tenant|select distinct t1.category_erp_id, t1.category_name from erp_sales_detail t1 left join erp_sales t2 on t2.sales_erp_id = t1.sales_erp_id and t2.tenant_id = t1.tenant_id where t1.tenant_id = $0 and t1.tenant_wechatapp_id = $1 and ifnull(t1.category_name, $2) != $3 and t2.tenant_id = t1.tenant_id and t2.tenant_wechatapp_id = t1.tenant_wechatapp_id and t2.member_erp_id = $4 and t2.sales_status = $5 and t2.is_sales = $6|1|1|1||0|0|4556|4556|19|19|
|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)|1|2|2||0|0|814923|814923|92|92|
||delete from tenant.sjfx_dct_erp_sales_detail where create_time < $0|1|1|1||0|0|230768|230768|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)|1|1|1||0|0|310527|310527|97|97|
|erp_sync|insert into retry_data (id, tenant_id, tenant_app_id, business_type, operation_type, data_id, user_id, erp_member_id, need_erp_member_id, retry_times, msg, send_time, create_time, data) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|1|1|1||0|0|0|0|0|0|
|order|select count(0) from ( select o.id, o.order_no, o.user_name, o.take_type, o.mobile_no, od.product_name, od.image_url, if(take_shop_id is null, wait_take_shop_id, take_shop_id) as takeshopid, take_employee_user_name, o.receive_time, o.cancel_time, od.take_start_date, o.refund_start_time as refundtime, o.user_name as refundusername, o.status, oa.express_company, oa.express_no, om.mark from `order`.order_info o join `order`.order_detail od on od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and od.order_id = o.id left join `order`.order_mark om on om.tenant_id = $2 and om.tenant_app_id = $3 and om.order_id = o.id and om.status = $4 left join `order`.order_address oa on oa.tenant_id = $5 and oa.tenant_app_id = $6 and oa.order_id = o.id where o.tenant_id = $7 and o.tenant_wechatapp_id = $8 and o.take_type = $9 and (o.wait_take_shop_id = $10 or o.take_shop_id = $11) and o.status not in ($12, $13) order by o.id ) tmp_count|1|1|1||0|0|25414|25414|1|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 task_template_id = $9 and shop_id = $10 and employee_id = $11 and plan_arrival_shop_time >= $12 and plan_arrival_shop_time < $13 and plan_arrival_shop_time is not null and t.tenant_id = $14 and t.tenant_app_id = $15 order by t.id desc limit $16|1|3|3||0|0|339945|339945|7|7|
|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, $11, $12, $13) and t.scene = $14 and t.begin_time >= $15 and t.expire_time < $16|1|1|1||0|0|12269|12269|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)|1|1|1||0|0|105663|105663|30|30|
|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|2|2||0|0|684079|684079|155|155|
|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, $11) and t.scene = $12 and t.begin_time >= $13 and t.expire_time < $14|1|1|1||0|0|10043|10043|1|1|
|tenant|select * from `order`.order_info where tenant_id = $0 and tenant_wechatapp_id = $1 order by id desc|1|1|1||0|0|8088|8088|4044|4044|
|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|198218|198218|1|1|
|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, $11) and t.scene = $12 and t.begin_time >= $13 and t.expire_time < $14 group by date_format(t.create_time, '%d')|1|1|1||0|0|10105|10105|31|31|
|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)|1|2|2||0|0|801351|801351|136|136|
|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|1|1||0|0|1287504|1287504|10|10|
|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, $9|1|3|3||0|0|11796312|11796312|10|10|
|value_added|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 limit $20|1|3|3||0|0|37784|37784|2|2|
|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|802520|802520|597|597|
|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, $177)|1|1|1||0|0|766888|766888|176|176|
|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, $26wmxekdeqaa-vlkoap52gnqzuylm2yc1w$27wmxekdeqaavrjvnerdltajljvledgpuw$28wmxekdeqaazbjk00j-qspgvgofji53ew$29wmxekdeqaaia6sy0rzdz-mn43sz5zhqq$30wmxekdeqaah1bvc0iqn3k5vfxgv2vz8q$31wmxekdeqaauulacawzv773os-z-ky8fq$32wmxekdeqaaugybxxtpg3oiqxkvfunblg$33wmxekdeqaaoif3yhd8ofyzu8hv2bls2w$34wmxekdeqaa0swd-b36dbw-lrapkfmbng$35wmxekdeqaamuqhu0hhwxsclpijpbd_iq$36wmxekdeqaauq_dd1_w8clsfdgoftn0ta$37wmxekdeqaa0vlzk6l_xvrbjt8t9ey5vw$38wmxekdeqaasph9i-ck0vl7laqfyo1x_q$39wmxekdeqaakixwinkkw9dxqrg0rhmjzg$40wmxekdeqaa2t-eol68ayquv8ff1t9ilw$41wmxekdeqaasokpf0bvcagoyriqooka-q$42wmxekdeqaan9h_7ee6aozr9xxrd4lggg$43wmxekdeqaao36nmlgwpwifoxraggqung$44wmxekdeqaa3o4g7mvhxnsz48l1zfxyxg$45wmxekdeqaazxbariiubiix3rb4i2cc7q$46wmxekdeqaavqcz8uzzu7maomytcm2cbg$47wmxekdeqaa-wwq2h3ih7o6jwlcqgfgbq$48wmxekdeqaaoe7nirmjn2wqhpht5sfaza$49wmxekdeqaajgipa1sgymx7bfrn91sogq$50wmxekdeqaagzxsjuxmodzmg8xomaembq$51wmxekdeqaapbfehzoumzys26yi5wpfja$52wmxekdeqaa7cw4jrtzm0d7x5lsv1vnng$53wmxekdeqaay7anrqkr9uuo-7vau5w45g$54wmxekdeqaayi84keyrr_t7sa7e37izaq$55wmxekdeqaaijrdhtydmgl9h30nrgfvng$56wmxekdeqaac6cjgwm-l6t3yuir8ns43w$57wmxekdeqaauojzp4fjdbnf0ouguvmbzg$58wmxekdeqaaga4uzvhpxlbyibeunuj6lw$59wmxekdeqaaojqssdu9i29t0ywygombhw$60wmxekdeqaafg9pb6hrvkxdfr8poe3zqw$61wmxekdeqaabsvywl6dmey1hmpjd5lxow$62wmxekdeqaa-vunmsy19tuylnelscgxog$63wmxekdeqaawp9lu8riz_1pqc0eafskhw$64wmxekdeqaasnvlsihraodipolat3u39q$65wmxekdeqaadvzsuot0nn3ibvjlfalswq$66wmxekdeqaapm1xafxcrsxwj1vlm91m1g$67wmxekdeqaaa5awts3fod8e6fcga2pf6g$68wmxekdeqaawix8ji3ylunigc57pasbva$69wmxekdeqaalf_o-u-cbhihcz6h2x6cuw$70wmxekdeqaaeaprkjmom-dxv7ws-qz1vw$71wmxekdeqaalyds7ddcd8-bglsvz1ng2w$72wmxekdeqaaldatyxthn2udiv7kpq_srw$73wmxekdeqaadcycg7solgsjkpjgpfefha$74wmxekdeqaaxvtjxa6acvqkommevwkp1q$75wmxekdeqaaxln4ljwzu4psgdwht_5l5a$76wmxekdeqaaky6vv2fcuyclikmmyyv_zq$77wmxekdeqaazv4efhjzqsd-iqidlw_q-a$78wmxekdeqaa_lo07rbvufx5zrepygbv9w$79wmxekdeqaaxgdwx5bj9f06eawl3aenka$80wmxekdeqaasghryu7ljciuoyubrhddkq$81wmxekdeqaaxtn7jah_nuslpm5wxpknda$82wmxekdeqaag6ke7jms17yld0babd4oqg$83wmxekdeqaak51h4gkvyhrpvke1c7btha$84wmxekdeqaa4_wydsxh7zy-5_pfxskwfa$85wmxekdeqaaf5rumln4pa_mugcpwpuo-w$86wmxekdeqaam7i7xiupfxx2fwporhkwpa$87wmxekdeqaa8rboae-wfvkjer9ucjjsdg$88wmxekdeqaaonthuetmjyazxgifubpe4q$89wmxekdeqaanxxejribrfu1gjo2lwccnw$90wmxekdeqaayz-8bqvc3fihmpkydw1q4q$91wmxekdeqaa9aswfhr6lwaujneb2uwazw$92wmxekdeqaa8g6zjxj-wfnsh44dsxxe8a$93wmxekdeqaadqmhmdh93yzikqg4jimpfg$94wmxekdeqaa8ttie9kyuu7fhddxults_a$95wmxekdeqaawexj-l__50tipfqnm5jnha$96wmxekdeqaaemoxwxcyq6e6enu_fipzva$97wmxekdeqaabp9clsuv80ekug0egrhz9q$98wmxekdeqaaksvecrzsdteps6e6uyjyww$99wmxekdeqaa40t8svmcvuvmfelnjwvdrw$100wmxekdeqaaibaqaq1kwmx4vi8d450_aa$101wmxekdeqaa6k5_guvtubn-feorz-dwpq$102wmxekdeqaavunzibktks3x1msyte37fq$103wmxekdeqaakmtjo4kdag2khlmz9xldxa$104wmxekdeqaauctm6aiuobrd2wmrwxspea$105wmxekdeqaay5by9-xbtx5ymdoini0v0g$106wmxekdeqaasyltkfnsm5ehrpaiuhpciw$107wmxekdeqaagpwyjhar7rk6we, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|1|3|3||0|0|1431|1431|660|660|
|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)|1|6|6||0|0|1287410|1287410|11|11|
|erp_sync|delete from retry_data where id = $0|1|1|1||0|0|1|1|0|0|
|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)|1|1|1||0|0|9682|9682|14|14|
|v4_employee|select task_template_id as taskid, t.task_type, t2.name as taskname, ifnull(sum(if(finish_time is null, $0, $1)), $2) as num from task_task t join task_invite_task_template t2 on t.task_template_id = t2.id and t2.status = $3 and t2.tenant_id = $4 and t2.tenant_app_id = $5 where t.shop_id = $6 and t.`status` = $7 and t.end_time > current_date and t.tenant_id = $8 and t.tenant_app_id = $9 group by t.task_template_id, t.task_type, t2.name|1|1|1||0|0|26736|26736|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, $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)|1|5|5||0|0|1143065|1143065|223|223|
|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)|1|1|1||0|0|7296|7296|1|1|
|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|1|1||0|0|1805638|1805638|856|856|
|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 ( $1wm2wxudqaamwssueieu5wdmlyvrygb8w$2wm2wxudqaaoosiaap9mmq28ag9r4b1da$3wm2wxudqaanb11f69utyceac7qiltefg$4wm2wxudqaam9vpresmqqa2sjwkxcpqta$5wm2wxudqaa2rlotzfvsirqcxgmeqz0aa$6wm2wxudqaaq56dnpfnrqf4muqkxqpqhg$7wm2wxudqaapxih5wbfbj7bn3las4nvbg$8wm2wxudqaapxih5wbfbj7bn3las4nvbg$9wm2wxudqaad9xa14kyyme5ooalp8fvlg$10wm2wxudqaapwx79ialarjqsmcjo1hfua$11wm2wxudqaatwn2kpckjgw8tnlggwj_la$12wm2wxudqaajpbcxxyat-unaqxezvkjbq$13wm2wxudqaa-4ysrdjxgfrnkc8szriaqq$14wm2wxudqaa3ggpxg89wjxeuwcsrdz3eq$15wm2wxudqaauq1famcknmhq1xz9b7cmjw$16wm2wxudqaasoky-_xtomkxzuityvjhsq$17wm2wxudqaaxl4rbnnfwepeszhxwpu-_q$18wm2wxudqaa-rd3va_kb6eqlbyigzvuba$19wm2wxudqaa_fhcywprmihz0hpt4w11hg$20wm2wxudqaawhgpnj-vakknmobud16lea$21wm2wxudqaafarc3kpzo-ptciye6zxy0a$22wm2wxudqaaaugxxqyu7pzuvm6ty79gyq$23wm2wxudqaavpzlwgfj26p_-l5fr4bblg$24wm2wxudqaarer7yv2zlptqcnsrbxnxcq$25wm2wxudqaaujgf5mqbqkvl8vxqixrklw$26wm2wxudqaa0glz6qsthsgou7zaiqs8-g$27wm2wxudqaaolepsgltvdhowckmdcs-nq$28wm2wxudqaarf9kazidlcncttql0pmu_a$29wm2wxudqaas0_sxilu_gqbf7fgnc9csa$30wm2wxudqaahwlz_wc6lrlpcyxczhn48g$31wm2wxudqaa-f-ean6l3gyvbeapeqwkew$32wm2wxudqaabrm1extedbmn0noqb_q1la$33wm2wxudqaad7qnxrkpihmuykccab49hq$34wm2wxudqaanzjz6opamuqmkl9jmsga9g$35wm2wxudqaaz0uo4wfcyvapx9yzbvyg4a$36wm2wxudqaajeaw3eny1x_kb-kve8tmzq$37wm2wxudqaabvxkfny6tim_fws09t6hrq$38wm2wxudqaaev5lquoxxveacxikb9irwg$39wm2wxudqaah9qk7cljhlrhmjjmwu9nsw$40wm2wxudqaaymhbc-uwkjmqmknxr1hw6w$41wm2wxudqaaffyfyxcc_myaeqqzalyl2w$42wm2wxudqaa2j3bsilsv_rq1pn6b-ry3q$43wm2wxudqaarcest6baxbm4lb3oadvalg$44wm2wxudqaas9eww2zyc9fwaq0twjjajg$45wm2wxudqaaagbxzgm6oniu4gjsdlizxa$46wm2wxudqaa4oizfbsve4vdgaw2y7vkgg$47wm2wxudqaa_u3xknkg88ce21eddjwjww$48wm2wxudqaadgnoslkkxbu6xmput1b93w$49wm2wxudqaact0v1irehmrjtisoa21bmw$50wm2wxudqaangaj8hma-gfsoehupcesoa$51wm2wxudqaabzin0kkhyk9ej5xswdg_8w$52wm2wxudqaao5ptywul80fogb4nnukyjw$53wm2wxudqaadpees7siyh6qdi4bnp0imw$54wm2wxudqaaz_1cqxonyl9hpbmtk4oxzq$55wm2wxudqaag1rio8oogyp_3oy7zuiwmw$56wm2wxudqaa2h48rpproxmvxh1ko4fy3a$57wm2wxudqaadfybu-l4m3aw3uohktsemg$58wm2wxudqaat4cnkd8xzgqqqgla_o4fxa$59wm2wxudqaafklumxdxrxbkxrvdiffc1q$60wm2wxudqaacuvfxjhfyebjqkusginazq$61wm2wxudqaan8snfxipmhdbszlmu-jraa$62wm2wxudqaa1uobcs64j0zixxp3l0a0pg$63wm2wxudqaafiitfc-k4s28auqc1z99pw$64wm2wxudqaayb_nljboxk0hrgai97zg6a$65wm2wxudqaakrvnjwshbjmnf4wm-twr5g$66wm2wxudqaahxu5i8c3m03c1pturmzejq$67wm2wxudqaa7mu16zgpmodychys9yrhia$68wm2wxudqaase4bjk9b5msmgmz7hcjb7w$69wm2wxudqaarbwihphho7hpzq8tyyu2ug$70wm2wxudqaaz253we_u648rxdne50hiyg$71wm2wxudqaaibjsc8qgf_ey30_1e6dhdq$72wm2wxudqaahmeobgycxjbrg2tvaryh2a$73wm2wxudqaadunxm6eg7lda7ihtk4bhwg$74wm2wxudqaalxrbgcr75t2oeh2y8b0tmg$75wm2wxudqaa-jvud4_w9dgzmpd_wghamq$76wm2wxudqaaq57svpfjdu_gapd50vjhzw$77wm2wxudqaaqmpuxc7fvtglsldy5vn8ig$78wm2wxudqaacr_33z5quj9h_qcimdxjpq$79wm2wxudqaaj5njwecp_djihc2h4n_aog$80wm2wxudqaa3divje6cmqqyxlg5atqezg$81wm2wxudqaarorzthvzkax1bcvn2w3jra$82wm2wxudqaa3hlrp0dmfczpmtwcgckluw$83wm2wxudqaadapruwuscya2vyw9ilmbwq$84wm2wxudqaaxitjf6kbfzwrauurnipoqg$85wm2wxudqaa5_l9tnqzznwr9cz7a3qz8g$86wm2wxudqaam-cuvzzguct8ggitimx8wq$87wm2wxudqaaixfdkbqzcpvxv_5kmlgmsg$88wm2wxudqaat-0f5c3zdzzgyfrgsli1og$89wm2wxudqaaqzerizorxfswpkoiobi54w$90wm2wxudqaamjp6zpnejayoj60tz5xg2g$91wm2wxudqaa9avgruysqy3id-eetbuntq$92wm2wxudqaabgrsjkpo5orbk9acfconda$93wm2wxudqaaxog4ohptxuoflw2rul_zfa$94wm2wxudqaak1as9wvubt-5nhsassjb3w$95wm2wxudqaaqrn-ruqofxv31xdggxlkrg$96wm2wxudqaakbj9lbgkmfhss59zcso5fg$97wm2wxudqaazjosxrtwamwmctmn6r5big$98wm2wxudqaax-oima1cedwdxmfjysyhra$99wm2wxudqaa5mgeese0-znkrkyqch7b3g$100wm2wxudqaas2-c_7qnvvrjludkafdysa$101wm2wxudqaafvvb2egns7w_rdgr_zp0dg$102wm2wxudqaaetqyi7dea_fldogvs5na_w$103wm2wxudqaaefxl7vy2tk_whwalch4o3g$104wm2wxudqaaxjaax96qj_o2aid6-ynu3g$105wm2wxudqaa4g1dp5z2yha9kmqrk319sg$106wm2wxudqaawbzj2eldpmojie7bvo9tzq$107wm2wxudqaa7hs9tymwzl1k10707ae7fw$108wm2wxudqaaofnadaojhnf9xoimrysqfq$109wm2wxudqaackehukuszyjmsfvjnb_dfq$110wm2wxudqaanaluqwwkjmb-hsjox8i7ha$111wm2wxudqaa29aymjpvj-hk0-nqhiqing$112wm2wxudqaazgagrxudzei-djzcxubl-q$113wm2wxudqaa7ma4wwcelgtzyxsbko-zdg$114wm2wxudqaahruqhviuje5qe6-pamzkia$115wm2wxudqaaiihgoa393vznf3vfwc0z0q$116wm2wxudqaagw2jndin7egqpoxyrfayhw$117wm2wxudqaanfiy_1i5mh-vthhzt, $118, $119, $120, $121, $122, $123, $124, $125|1|2|2||0|0|1308|1308|629|629|
|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)|1|1|1||0|0|1287635|1287635|6|6|
|tenant|select distinct t1.sales_type from erp_sales_detail t1 left join erp_sales t2 on t2.sales_erp_id = t1.sales_erp_id and t2.tenant_id = t1.tenant_id where t1.tenant_id = $0 and t1.tenant_wechatapp_id = $1 and ifnull(t1.sales_type, $2) != $3 and t2.tenant_id = t1.tenant_id and t2.tenant_wechatapp_id = t1.tenant_wechatapp_id and t2.member_erp_id = $4 and t2.sales_status = $5 and t2.is_sales = $6|1|1|1||0|0|4550|4550|13|13|
|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)|1|1|1||0|0|7296|7296|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, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92)|1|1|1||0|0|948796|948796|91|91|
|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, $11, $12, $13) and t.scene = $14 and t.begin_time >= $15 and t.expire_time < $16 group by date_format(t.create_time, '%d')|1|1|1||0|0|12331|12331|31|31|
|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)|1|1|1||0|0|371794|371794|80|80|
|coupon_service|select t.id from coupon_service.template t left join coupon_service.coupon_scope s on s.tenant_id = t.tenant_id and s.tenant_app_id = t.tenant_app_id and s.template_id = t.id where t.coupon_type = $0 and t.tenant_id = $1 and t.tenant_app_id = $2 and (t.scope = $3 or s.scope = $4 and s.product_id = $5 or s.scope = $6 and s.classify_id = $7)|1|1|1||0|0|19814|19814|2|2|
|user_service|update user_service.tenant_member_info t1 join user_service.user_employee t2 on t1.tenant_id = t2.tenant_id and t1.tenant_app_id = t2.tenant_wechatapp_id and t1.user_id = t2.user_id set t1.shop_id = $0, t2.shop_id = $1 where t1.tenant_id = $2 and t1.tenant_app_id = $3 and t2.employee_id = $4 and t1.shop_id = $5|1|1|1||0|0|1966|1966|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|1|1||0|0|801333|801333|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)|1|2|2||0|0|766833|766833|121|121|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub(now(), interval $0 day)|1|19|19||0|0|597560|597560|0|0|
|coupon_service|select market_id as id, count(market_id) as quantity from ( select market_id from coupon_service.coupon_market_order where market_id in ($0) and order_state = $1 group by user_id, market_id ) number group by market_id|1|2|2||0|0|498336|498336|1|1|
|goods|select shop_id from goods.goods_take_shop where goods_id = $0 and activity_id = $1|1|1|1||0|0|98870|98870|20|20|
|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 exists ( select $2 from tenant.sneak_guest_maintain sgm where sg.id = sgm.sneak_guest_id and sgm.event_type = $3 and sgm.intention_info regexp $4 ) and sg.status = $5 order by sg.id desc limit $6, $7|1|1|1||0|0|581276|581276|5|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, $94wm2wxudqaamcs6rs2vwfxiwi3xde_oiw$95wm2wxudqaamgx98xhjsgfukga9lyc-_g$96wm2wxudqaaxsgvt8mvhhrcqyafsa2tna$97wm2wxudqaagaccv1iaehewxdygls3bkw$98wm2wxudqaa0rqca7wskxcdeue4cfpwgg$99wm2wxudqaaizzdk_htaywq-x, $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|1098|1098|536|536|
|timer|update task_info set next_time = $0 where id = $1|1|1|1||0|0|1|1|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)|1|1|1||0|0|20440|20440|4|4|
|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, $60wm2wxudqaaua2iyfse6erf4pnregi1ga$61wm2wxudqaalzwtyaifnqsa9jv5u5fr5a$62wm2wxudqaa09io_hot1wzmqgwvv5diha$63wm2wxudqaacb0riwvlrl3nixexlj52eq$64wm2wxudqaaiknr9-n_ubdqoqd05nnd6w$65wm2wxudqaa7r7zqnjwbnqvqa-a3mbk1w$66wm2wxudqaagnwpfiwesq4tuy42x0dmfa$67wm2wxudqaaitd5ggrx9mutuhoir6c4zg$68wm2wxudqaatamawaug6tdzixtdesovcg$69wm2wxudqaahs9sh1xr_xkxemddxdbvyw$70wm2wxudqaa8kdmovehqi3lhamz7puc3w$71wm2wxudqaaekflhaja4j0ptxew6nrkvw$72wm2wxudqaawkvxtwf9evrnzeqi7rle5w$73wm2wxudqaavoy_e81ad_v0x2gorv0jow$74wm2wxudqaahdxtw90cjaket48efpr27g$75wm2wxudqaaznnodtpaytxst5-gameymg$76wm2wxudqaak8je97a1e8d6je5h3w4nxg$77wm2wxudqaayh0zyrd8qakb8tarcejdqw$78wm2wxudqaa7myzwupcei6pqiokdnsm-q$79wm2wxudqaagru7ealqu8pzcjm77ckueg$80wm2wxudqaacuaityxwczn6qlub2tzica$81wm2wxudqaaekkcnlkosxvjzfrlelmwhg$82wm2wxudqaaxwhtluf42lossmruyhvufg$83wm2wxudqaababmtv_ks9_vpr-ooihkwa$84wm2wxudqaapqdmw0ywxjyqoykgjm4tuw$85wm2wxudqaal1xfyn114o0vea8a5njn1w$86wm2wxudqaazsujl2wws-sk7hiqhyojla$87wm2wxudqaac3lyry5yulqmzzuypzni4w$88wm2wxudqaaofmq7sschoji0zv9fws8rq$89wm2wxudqaa4aipwrcxsuulwo5_m2kvwq$90wm2wxudqaa0pgi77waacv_lhj1amwoeg$91wm2wxudqaatp3n0utluec1eol8f9i2xq$92wm2wxudqaakkijt4nmgszn0uj7nzrj7q$93wm2wxudqaajwrbxm45aikd85-ridrevw$94wm2wxudqaaxql7lyl_viyc1c1fuljjrg$95wm2wxudqaauzj8dyrcj8wsez6oxw6lbq$96wm2wxudqaaq_ogt561fp7rkbcj5_7zka$97wm2wxudqaaslk2ftjbhdbd-svuha4ikq$98wm2wxudqaabzrtlaeuvmvpng1-gwtd-w$99wm2wxudqaavltrph_udo3tsrhv6wnhva$100wm2wxudqaay36qaygjtoyqllxwcyg4mq$101wm2wxudqaaowb-ib3j2jybhqbnjettca$102wm2wxudqaa1helet4gm8ec6c033smkyw$103wm2wxudqaalcvijtgr2d3ftsunfxyyra$104wm2wxudqaaiplie3_3pxr4uhjzrspyzg$105wm2wxudqaahyffer0fvn11dvqbeld0jw$106wm2wxudqaa-fjaavhcr1heqqydhb9ypq$107wm2wxudqaamwexxmfxvhggineqhlzprq$108wm2wxudqaarsnscp0ws2x, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|1|1|1||0|0|872|872|415|415|
|wx_gateway|select count(0) from wx_gateway.wx_image where tenant_app_id = $0 and state = $1|1|2|2||0|0|211183|211183|1|1|
|timer|insert into task_execute_log (id, task_id, task_name, task_params, success, error_msg, create_time) values (?, ?, ?, ?, ?, ?, ?)|1|1|1||0|0|0|0|0|0|
|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|1|1|1||0|0|576468|576468|2|2|
|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.dept_erp_id = $17 and t2.employee_erp_id in ($18, $19, $20, $21, $22, $23, $24, $25) and t2.sales_date >= $26 and t2.sales_date < $27 and t1.state != $28 ) tmp_count|1|9|9||0|0|1804016|1804016|1|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)|1|1|1||0|0|1288781|1288781|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)|1|1|1||0|0|278147|278147|53|53|
|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|948946|948946|241|241|
|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, $111wm2wxudqaa7vqmgygajrc_izntwnkrlq$112wm2wxudqaax5yvheqki-ovinho, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|1|1|1||0|0|1173|1173|565|565|
|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)|1|1|1||0|0|127968|127968|60|60|
