|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|v4_sales|select * from v4_sales.erp_sales_detail where sales_erp_id = $0 and product_barcode = $1|851|1934|68||0|0|1361629759|1600571|851|1|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8, $9, $10, $11, $12, $13) and t1.tenant_id = $14 and t1.tenant_app_id = $15|836|1598|12||0|0|1735464090|2115360|7059|10|
|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|799|1541|9||0|0|2267364|14771|799|1|
|corpwx|select id, tenant_id, cwx_user_id, user_id, union_id, name, create_time, update_time, sex, avatar, tenant_user_id, un_assign_flag, corp_user_id, wx_user_id from external_user where tenant_id = $0 limit $1, $2|520|808|5||0|0|138851100|292100|52000|100|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.maintain_employee_id = $4 and t2.`status` in ($5, $6) and t1.tenant_id = $7 and t1.tenant_app_id = $8|503|4187|47||0|0|4291462989|23902672|17578|109|
|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)|374|2048|56||0|0|30314475|214682|240|2|
|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|144|218|6||0|0|227439|5610|227439|5610|
|comment_service|select * from comment_service.comment_reward where comment_id = $0 limit $1|135|349|12||0|0|52604948|397021|26|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|120|167|3||0|0|988556|8248|720|6|
|v4_sales|select * from v4_sales.erp_sales_detail where sales_erp_id = $0 and sales_type = $1 order by sales_index|114|1434|51||0|0|182385655|1600580|579|20|
|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)|106|212|8||0|0|42519433|401232|106|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)|98|320|27||0|0|136337018|1392584|81|2|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and maintain_employee_id = $3|96|207|6||0|0|552189|10945|96|1|
|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|96|207|6||0|0|552189|10945|96|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|92|189|6||0|0|566137|10945|92|1|
|coupon_service|select count(*) from employee_give_coupon_log where tenant_app_id = $0 and coupon_push_id = $1|90|148|10||0|0|2560886|36718|90|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|86|178|8||0|0|1158350|28118|86|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|81|310|23||0|0|42456824|524571|81|1|
|corpwx|select count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id = $1 and t.create_time >= $2 and t.create_time < $3|79|170|7||0|0|748092|25607|79|1|
|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()|78|162|8||0|0|3180594|67363|78|1|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.next_maintain_date >= $3 and sg.next_maintain_date <= $4 and sg.status = $5 order by sg.id desc limit $6|66|204|12||0|0|40562275|623331|254|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|66|136|5||0|0|547602|8297|0|0|
|v4_sales|select * from erp_sales where sales_erp_id = $0 limit $1|65|422|24||0|0|34649889|543875|65|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)|56|192|34||0|0|77908136|1392613|97|4|
|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|55|112|7||0|0|410806|92621|55|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|54|273|25||0|0|367966|16316|54|1|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id = $4 and t.scene = $5 and t.begin_time >= $6 and t.expire_time < $7|54|273|25||0|0|367818|16314|54|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, $3|47|67|3||0|0|389882|8572|282|6|
|gift_mail|select count(0) from ( select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume desc, p.tag_price asc, p.id desc ) tmp_count|46|59|2||0|0|334052|7262|46|1|
|v4_sales|select count(*) as total from warranty where member_id in ($0) and is_disable = $1 and tenant_id = $2 and tenant_app_id = $3|45|110|14||0|0|3964288|106166|45|1|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.status = $3 order by sg.id desc limit $4, $5|38|78|8||0|0|19868342|623182|280|10|
|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)|38|203|47||0|0|52865700|1392613|106|4|
|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|37|55|3||0|0|4798423|211534|32|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)|34|57|10||0|0|47306855|1392314|503|26|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price desc, p.id desc limit $2, $3|33|49|3||0|0|278196|8764|198|6|
|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)|32|54|4||0|0|228281|13479|32|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)|32|118|14||0|0|16771679|524529|2|1|
|v4_coupon|select count(*) from ( select grant_id from v4_coupon.coupon where put_id = $0 and member_id = $1 and tenant_id = $2 and tenant_app_id = $3 group by grant_id ) c|31|54|3||0|0|2729568|88269|31|1|
|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|30|50|3||0|0|154660|8435|118|4|
|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|29|74|9||0|0|60627|3665|29|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)|28|182|41||0|0|38953414|1392316|106|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, $38wm2wxudqaaaxkxqmqzp2nonlvdnh7vgg$39wm2wxudqaalkwitokewmdi17fujgytta$40wm2wxudqaaayg48efcmldpmr-kw0fdmw$41wm2wxudqaamsjy5gr0_1vpd22iaphklq$42wm2wxudqaadvbd-sm0ta2otcxuxrmfya$43wm2wxudqaajvna6j0jgsh7fquby__kzq$44wm2wxudqaap1z8gfsfxr8iexcldmtmfq$45wm2wxudqaaubz9z6nfxlposblghdgtwa$46wm2wxudqaa4asbmradza9yiwvvsjay9q$47wm2wxudqaacfvqgsqsj2uwiz9nwajisq$48wm2wxudqaaatcw_z1laocrp9bi_aw0-a$49wm2wxudqaanb5d3l35vazjxj1-7iiwiq$50wm2wxudqaa-emycxpauz97i5-jxchs7q$51wm2wxudqaa6rtrx0icljaj3gz0xcnq6w$52wm2wxudqaa21x25ncaq-zdlxo_gefkia$53wm2wxudqaa71v4hld2z74e8-gtggr2aw$54wm2wxudqaa8k5ma4bjxg0r180e692jhq$55wm2wxudqaapnvop3dyeray_jmdpm60aw$56wm2wxudqaatjxjochtethr7jv_g4zabw$57wm2wxudqaabw5yczmk5ifd1apntdqsvq$58wm2wxudqaa2efhdgxk94mvt3v5l8z5ba$59wm2wxudqaavjdpjizecmju2uc7xfplua$60wm2wxudqaa3ynrfmpqptaaeerppundxw$61wm2wxudqaasa9u7dub2w2xvjume1fp_w$62wm2wxudqaayuh0ezh-o0ppoodn_isnja$63wm2wxudqaafdtjhiobro67tnqmhbb4qw$64wm2wxudqaayberllzmasq9m7x93glqca$65wm2wxudqaaxsm_7nwrwkbo7adjxf9l7w$66wm2wxudqaapsvuzyf_39z_ssilb0yh0q$67wm2wxudqaavzfzl-maahblx2f9wcnmaq$68wm2wxudqaarzahhghbflqru0hjv6tqmw$69wm2wxudqaalkh3mrqcv0vljnn1ksm2za$70wm2wxudqaabyj41pijfirqxc1vf9fk9w$71wm2wxudqaad_zc5ff3suetd-m7bm2f9a$72wm2wxudqaai2qe7kurrxvojdo-hr6spg$73wm2wxudqaayniaxib-rr4alwq7mqnebg$74wm2wxudqaa2udd3fomv2mq1lqyz_4grq$75wm2wxudqaag-dqmqel0hwvlojfzvovjq$76wm2wxudqaagm4bixzerm_f3fwskhjpia$77wm2wxudqaa8jbf5b1iinvs3jmn9xv7uq$78wm2wxudqaacrzucqzpuflxewsicyarkq$79wm2wxudqaa3x2xbbu6mrulf9z-xy4sog$80wm2wxudqaavkgkpgxtvpgnx_krna5hva$81wm2wxudqaau2vgtoazci9s8jd9sx5yjw$82wm2wxudqaalubxg5hnkwu3aalu6vtk2q$83wm2wxudqaamkqyxgvx8wofjar-setvew$84wm2wxudqaaxjr0zg4nf4bygfnwsc0c-g$85wm2wxudqaaoigytuoaxmqespq0bd7f2a$86wm2wxudqaamng8x4saetd12pr_7crckw$87wm2wxudqaaxdvf7u4mzbvwi7vcmbj_oa$88wm2wxudqaawpcdfzexa9_ecglqxxyx_w$89wm2wxudqaamrzidtcj1u4ycl3nx1i1ag$90wm2wxudqaaxpbgc_94dwvrb-mdqbxhlw$91wm2wxudqaahslhhpkgzx8z7hkyw2hz1a$92wm2wxudqaa3hon1ha-kypemue1l_qk-g$93wm2wxudqaaonao8i5nnokuchfxrss_rq$94wm2wxudqaasbgj6u4w7file5zbnvudjq$95wm2wxudqaayvankd8kocbqi9ufbjkdkw$96wm2wxudqaagtnub7vh3jryykj4limilw$97wm2wxudqaapkardi_oew3fynlcqdukbq$98wm2wxudqaan7bz5vgojf87zzgu4hurzg$99wm2wxudqaaddjujavcd9omjqqds-_daw$100wm2wxudqaab5jht69pesuz-gaprkrcta$101wm2wxudqaamvawbvs9s5t-fjnzgu9i_q$102wm2wxudqaa8ytlvk1-lczgqpqwr80q9a$103wm2wxudqaart4ryxzndyapjyjzshy_og$104wm2wxudqaawdincjsz1ljwjpx_nant1a$105wm2wxudqaaa-myut-wpbotj_z1uuxtja$106wm2wxudqaag38ofsi5njctq3gbzn6jkg$107wm2wxudqaajplhhubeefzvum64bngszw$108wm2wxudqaas7qmo3_6-vxwxs6gvw2mfq$109wm2wxudqaaevmswhw11hsnmvn_yhqyxa$110wm2wxudqaa84zz-9yhdeybzc0ywv52va$111wm2wxudqaaffd_v4ts7fdlskz7i5ozra$112wm2wxudqaap9pok013m97z32wn7_nwwa$113wm2wxudqaavzhjwvo9nupqiwtu7fl90w$114wm2wxudqaarjpju028qwmymcnrw-iujq$115wm2wxudqaasgjiw1diygmyhn6g1qfhaq$116wm2wxudqaaxfudfelbdydll-mgz22zhw$117wm2wxudqaaotfvid57u2skcxgd3czyza$118wm2wxudqaaxxpdcamyaxxfdf9tpcmhtg$119wm2wxudqaaz_vh0znxooy1tdxdakf1sg$120wm2wxudqaaumw5cl3yyrbqe7rwpe4vfa$121wm2wxudqaak5bfjodgqb2uamvwhi3fhw$122wm2wxudqaafl6mrwisoomz-gheyxsbpq$123wm2wxudqaa2w2jkm9vpdfynszz9r257g$124wm2wxudqaatghv8ajg_bscuaozglb3ya$125wm2wxudqaa5iw...|28|52|5||0|0|44080|1578|21816|781|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price asc, p.id desc limit $2, $3|27|39|3||0|0|225252|8530|162|6|
|user_service|select id, wx_app_id, open_id, union_id, nick_name, user_name, mobile_no, head_img_url, is_subscribe, subscribe_time, unsubscribe_time, wx_card_code, wx_card_no, sex, country, province, city, plat_open_id, create_time, update_time from wx_user where wx_app_id = $0 and is_subscribe = $1 order by id limit $2, $3|27|30|1||0|0|3645206|139906|2700|100|
|v4_sales|select id, warranty_id, sales_detail_id, tenant_id, tenant_app_id, create_time, update_time from warranty_detail where warranty_id = $0 and tenant_id = $1 and tenant_app_id = $2|26|68|6||0|0|6412147|247260|43|5|
|v4_user|select count(*) as total from member_source where source_id = $0 and tenant_id = $1 and tenant_app_id = $2|24|45|6||0|0|5075716|211532|24|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|24|41|3||0|0|186648|11446|240|10|
|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|24|134|24||0|0|9506539|1000010|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, $5, $6, $7, $8)|23|35|3||0|0|31997908|1392399|108|8|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8, $9, $10, $11) and t1.tenant_id = $12 and t1.tenant_app_id = $13|22|26|3||0|0|37223976|1692288|131|8|
|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)|20|104|42||0|0|27827545|1392266|92|8|
|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)|20|58|22||0|0|27828051|1392256|103|7|
|goods|select * from goods_take_shop where tenant_id = $0 and goods_id = $1 and activity_id = $2 order by create_time desc|20|42|7||0|0|2046090|102372|732|68|
|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)|19|24|2||0|0|26436085|1392134|122|7|
|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|17|33|7||0|0|220635|21542|17|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)|17|25|3||0|0|23654927|1392613|110|10|
|v4_user|select id, member_id, external_user_id, serial_number, checkin_shop_id, checkin_employee_id, checkin_employee_name, checkin_time, maintain_shop_id, maintain_employee_id, maintain_employee_name, first_maintain_time, last_maintain_time, next_maintain_time, maintain_num, intention_num, latest_intention, status, finish_time, finish_shop_id, deal_employee_id, deal_employee_name, deal_sale_amount, fail_employee_id, fail_employee_name, fail_reason, remark, sex, cutomer_grade, maintain_level, tenant_id, tenant_app_id, create_time, update_time from potential_customer where (member_id = $0 or external_user_id = $1) and status in ($2, $3) and tenant_id = $4 and tenant_app_id = $5|16|35|4||0|0|125994|7907|4|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|16|22|2||0|0|53962|5118|16|1|
|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|15|49|11||0|0|443875|205083|15|1|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.status = $3 order by sg.id desc limit $4|15|30|6||0|0|8230599|623210|93|10|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8, $9, $10, $11, $12) and t1.tenant_id = $13 and t1.tenant_app_id = $14|15|22|3||0|0|27248247|1903797|135|9|
|corpwx|update external_user set un_assign_flag = $0 where tenant_id = $1 and un_assign_flag = $2|15|33|5||0|0|451900|57322|0|0|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)|15|30|9||0|0|20871078|1392617|143|10|
|youzan|select id, merchant_id, merchant_shop_id, sync_type, api_name, api_request, api_response, status, error_msg, retry_num, create_time, update_time from weimob_platform_sync_log where status = $0 and sync_type in ($1) and retry_num < $2|15|132|27||0|0|1684756|112318|0|0|
|order|select max(create_time) from `order`.order_operator_log where tenant_wechatapp_id = $0 and order_id = $1|15|76|9||0|0|13037377|869518|15|1|
|v4_employee|select t.id as task_id, task_type, if(task_type = $0, st.description, it.description) as description, if(task_type = $1, st.quick_reply, it.quick_reply) as quick_reply, task_name, member_id, member_name, member_mobile_no, member_sex, member_level, t.start_time, t.end_time, datediff(t.end_time, $2) as left_days, send_coupons, recv_coupons, st.coupons, t.accept_time, t.plan_arrival_shop_time, t.arrival_shop_time, t.trade_time from task_task t left join task_system_task_template st on st.id = t.task_template_id and st.tenant_id = $3 and st.tenant_app_id = $4 left join task_invite_task_template it on it.id = t.task_template_id and it.tenant_id = $5 and it.tenant_app_id = $6 where t.status = $7 and task_type = $8 and system_task_type = $9 and t.start_time <= $10 and t.end_time > $11 and shop_id = $12 and employee_id = $13 and finish_time is null and t.tenant_id = $14 and t.tenant_app_id = $15 order by t.id desc limit $16|14|79|33||0|0|6197208|442714|20|3|
|activity_service|select id, tenant_id, tenant_app_id, activity_id, user_id, day, continuous_day, has_subscribe, user_name, create_time, update_time, first_sign_time, mobile_no from online_sign_user where tenant_app_id = $0 and user_id = $1|14|28|3||0|0|1675760|119712|2|1|
|v4_sales|select id, warranty_id, sales_detail_id, tenant_id, tenant_app_id, create_time, update_time from warranty_detail where warranty_id = $0 and sales_detail_id = $1 and tenant_id = $2 and tenant_app_id = $3|13|31|7||0|0|3207522|247167|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4wm2wxudqaavviu5hu4wb8eneewh18onq$5wm2wxudqaahzgtp2p5_zu9gvpcexlc6a$6wm2wxudqaapubzdpgf_8dk_oor73n-jq$7wm2wxudqaa8skzua0cqwy8o5lwxc1brg$8wm2wxudqaakggksmuabrxql-hmchvk4a$9wm2wxudqaaslx1mzawzvktwf0pcyjgew$10wm2wxudqaax956fbzbcig6htkbwnb2pw$11wm2wxudqaasuoepxknfok3qhxecty6nq$12wm2wxudqaacqvunjkqrg9ih0x5pol6hq$13wm2wxudqaaoaoolff5scfwaaogzgtgdg$14wm2wxudqaaunhhc_g97r7xkkd_qjvauq$15wm2wxudqaao8xzomrerket57nf7inauw$16wm2wxudqaa-ib8soykohxzewyjgefhjg$17wm2wxudqaaibqkqsyjk0qsuag8dolkoq$18wm2wxudqaa8boq9-l2vhlkus9lrayvjq$19wm2wxudqaamufsgiimycioedpg4jigkg$20wm2wxudqaaaiaoksqw9015zzyl__tlpw$21wm2wxudqaarjfzf5sdxrw-sijn_1i9lq$22wm2wxudqaa877gvbw3czdxpuixsnbphg$23wm2wxudqaadidob67sjvhnqctqtoa8xg$24wm2wxudqaagdjk98vfpmdesbuqs03lmq$25wm2wxudqaav_exb_w4xk7a-zylk__1xg$26wm2wxudqaapxtwyp9utqj9u39cf-gsta$27wm2wxudqaagozhylmbqs1d-iajnsdawq$28wm2wxudqaaapypwrnbjhiwcnmomcdfew$29wm2wxudqaa6g2yofvp1pnlarxueybcsa$30wm2wxudqaad9ybojwrpwprm6g0gnf4bw$31wm2wxudqaasuy7nut8un2hoqz1ypjccw$32wm2wxudqaaovcwpbphtlj36wq_ciymva$33wm2wxudqaaguohzdflacc3khijnnp4bg$34wm2wxudqaa5wbj7xk7phcyau5kfm5e9g$35wm2wxudqaa519qyll_kndbe3rtnyftvq$36wm2wxudqaasj8dszpahz3ddqlcxscaia$37wm2wxudqaarekwqr5kjqjysycvgijbya$38wm2wxudqaaj4i4ighljl6s_zmeme2n1a$39wm2wxudqaaadih0sbdvshfzeg6mmtqsa$40wm2wxudqaaoxidd4l6wgeuzsvp50eftg$41wm2wxudqaaj3jiylmqmp10yeviesr4rg$42wm2wxudqaaixzpz_1_qv5m7vgvnlqxfq$43wm2wxudqaa0x5guctzkcb_9i1axurc7q$44wm2wxudqaah4to8jwud23yb6y3ikqz0g$45wm2wxudqaadslcyj6tknj6kblx4izbug$46wm2wxudqaaxdmiu9snjrta-qygbvxtmw$47wm2wxudqaa2xqlaznpovpmfjgo-efxea$48wm2wxudqaa8dgna9cvlb0lk0vbejzmwg$49wm2wxudqaamtokiki9sl2agijhexjowg$50wm2wxudqaac5zfku9ycliime2ftauhjg$51wm2wxudqaa9eitxvydbgwjsc45i_zfmg$52wm2wxudqaaa9btmz-5hl-ngbpm-_idqg$53wm2wxudqaamzsnm91eim_xg68fp3gdkq$54wm2wxudqaalcmjqaf6ludizbhluln-kw$55wm2wxudqaaj4g4bdhabprx25jh_ndztq$56wm2wxudqaaydxohn-uqhnk6zz1rnpljg$57wm2wxudqaautypy0esjsbny-02gjfn_a$58wm2wxudqaafrbyoqeuwiz9-cr0odzksg$59wm2wxudqaa5adnooobbir6dq3ow1bdvg$60wm2wxudqaaxlqmqj_037fx8z5i6ygfzw$61wm2wxudqaaae7hduo33djozzfpkv9sqa$62wm2wxudqaadkxmikrjgk_h9smjucz7ya$63wm2wxudqaa5u4wcqii2o5v0squfnubta$64wm2wxudqaazctwwdynaicmleyumjxccg$65wm2wxudqaanrso3lrazdxefmvxbdqf8a$66wm2wxudqaa78mrdorbdd8qa6bfhexamg$67wm2wxudqaapc8yxqsyf3d7hlg2ysj5qw$68wm2wxudqaauoyzptmm43uhq-wbhbhhaa$69wm2wxudqaa-asfwtt7tegghkyogkcx1q$70wm2wxudqaazzb5fiy__vykhqdofqbo5q$71wm2wxudqaansdvrhwejbv5z-qjtslgsq$72wm2wxudqaay4bbm3bo04y-khrmkzwtrg$73wm2wxudqaaspillqiwica-oezrwctkgw$74wm2wxudqaazayw8io3ufpzaaucyjnpna$75wm2wxudqaagqko-49ovpdhaken668gqg$76wm2wxudqaabya38-e8yxrorryfuz5ydg$77wm2wxudqaayv5qbblotxskh8h5l25qmq$78wm2wxudqaaltyovuw9ks_bu7bkyz7wqq$79wm2wxudqaaqzobgozoi4ucd-w2va41va$80wm2wxudqaauafwx_4zomshffrjyvuftq$81wm2wxudqaarbkud16yuq5xhpkqnyr7sq$82wm2wxudqaadujj9719sdx_qr8-cupnqg$83wm2wxudqaaovaazg_bbusndman_xmtng$84wm2wxudqaamemcev1heyowpcdt5v9tkg$85wm2wxudqaaszzwbjovoervo10qljhmqq$86wm2wxudqaa59fyxyverfzymkrtkroh4a$87wm2wxudqaaw4mozsitjmzfvrqclqa-nq$88wm2wxudqaavua0ctqzulgncknqtxdzlq$89wm2wxudqaaasbk6qogtnyvh_lmfemjiw$90wm2wxudqaazutcu7uzcvsxqmtp6sqxcw$91wm2wxudqaag8qgsvzidfr59uidgynuaq$92wm2wxudqaam5glh6piz38p4eeurtmlzw$93wm2wxudqaazuqa2d3f5dff5ijrifo_rq$94wm2wxudqaacmsk1pgnjkovkjwfjrhbxa$95wm2wxudqaav6bqhntsqsuelo4pmpgblq$96wm2wxudqaaqf139mxi5mn1qpjtfl06pw$97wm2wxudqaaqdtlpsuvc0xyes6xv4zllq$98wm2wxudqaaen7am8qv7vhdmjacj_u6lg$99wm2wxudqaaly29sb9pben-wmebafdl5g$100wm2wxudqaam7luqeyifal3d8wquqdnaq$101wm2wxudqaasfnnag6_kenvzwb4lwvu8w$102wm2wxudqaapfd0x9qzlgir7vtis022tg$103wm2wxudqaa5, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125|13|25|5||0|0|11102|854|5382|414|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4) and t1.tenant_id = $5 and t1.tenant_app_id = $6|13|34|9||0|0|1881003|211533|12|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|19|3||0|0|16696201|1392044|127|11|
|v4_sales|select count(*) as total from v4_sales.erp_sales es join v4_sales.warranty_can_added wca on wca.sales_id = es.id and wca.tenant_id = $0 and wca.tenant_app_id = $1 left join v4_sales.warranty w on w.sales_id = es.id and w.tenant_id = $2 and w.tenant_app_id = $3 where is_sales = true and sales_status = $4 and (es.sales_no like concat($5, $6) or es.member_erp_id = $7) and es.tenant_id = $8 and es.tenant_app_id = $9|11|24|3||0|0|5375760|488777|11|1|
|user_service|select count(0) from user_service.tenant_member tm where tm.tenant_id = $0 and tm.tenant_app_id = $1 and (tm.user_name like concat($2, $3, $4) or tm.mobile_no = $5)|11|17|3||0|0|3787452|453776|11|1|
|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|10|28|10||0|0|3783221|487359|494|272|
|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|10|19|4||0|0|115183|21730|10|1|
|user_service|select count(0) from wx_user where wx_app_id = $0 and is_subscribe = $1|10|64|34||0|0|1149822|141683|10|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 sg.maintain_employee_id = $2 and sg.status = $3|9|16|3||0|0|59470|11068|9|1|
|v4_user|select count(*) from member_change_log t1 where t1.change_type in ($0, $1) and t1.change_time >= $2 and t1.change_time < $3 and t1.new_shop_id = $4 and t1.tenant_id = $5 and t1.tenant_app_id = $6|8|15|4||0|0|733552|111916|8|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126|8|8|1||0|0|11949|1604|5614|760|
|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) and (od.status = $4 or od.status = $5 or od.status = $6 or od.status = $7)|8|11|2||0|0|551910|69102|8|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, $14, $15, $16, $17, $18, $19, $20, $21)|8|11|1||0|0|432|60|144|20|
|v4_coupon|select * from v4_coupon.sales_give_coupon_record where put_id = $0 and sales_id = $1 and rule_id = $2 and tenant_id = $3 and tenant_app_id = $4 limit $5|7|10|2||0|0|590152|84373|0|0|
|gift_mail|select count(0) from ( select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price desc, p.id desc ) tmp_count|7|9|2||0|0|50834|7262|7|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')|7|21|5||0|0|157690|26215|1343|397|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8, $9) and t1.tenant_id = $10 and t1.tenant_app_id = $11|7|11|2||0|0|6525330|1268916|42|6|
|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|16|4||0|0|92415|28119|7|1|
|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|7|398|82||0|0|18412660|2630380|49|7|
|gift_mail|select count(0) from ( select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price asc, p.id desc ) tmp_count|7|9|1||0|0|50834|7262|7|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) and (od.status = $4 or od.status = $5 or od.status = $6 or od.status = $7) order by od.create_time desc limit $8|7|10|2||0|0|547099|78303|38|12|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5) and t1.tenant_id = $6 and t1.tenant_app_id = $7|7|12|3||0|0|1380420|257490|12|2|
|order|select od.id, od.order_no as orderno, od.status, od.take_type as taketype, od.create_time as createtime, od.remark, od.total_fee as totalfee, od.freight_fee as freightfee, od.discount_fee as discountfee, od.take_id as takeid, od.payment_fee as paymentfee, dt.product_id as productid, dt.price, dt.quantity, dt.sku_id as skuid, dt.art_no as artno, dt.image_url as imageurl, dt.product_name as productname, dt.take_remark as takeremark, dt.take_day as takeday, od.product_fee as productfee, ad.user_name as receivename, ad.mobile_no as mobileno, ad.shop_name as shopname, ad.address, ad.express_no as expressno, ad.express_company as expresscompany, od.user_name as username, od.update_time as updatetime, od.child_status as childstatus, od.finish_type as finishtype, od.receive_time as receivetime, od.user_id as userid, od.mobile_no as buymobileno, od.edit_fee_flag as editfeeflag, dt.spec as spec, od.source, od.take_shop_id, od.take_shop_name, od.take_employee_user_id, od.take_employee_user_name, od.activity_type, od.activity_id, od.offline_payment_fee, od.online_wait_fee, od.offline_wait_fee, od.pay_way, od.take_employee_id, od.pay_id from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and (od.mobile_no = $2 or ad.mobile_no = $3) order by od.create_time desc limit $4|6|8|2||0|0|578883|96624|19|5|
|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|6|9|2||0|0|341706|96750|6|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|6|9|2||0|0|341706|96750|6|1|
|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|6|18|5||0|0|145108|65181|6|1|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7) and t1.tenant_id = $8 and t1.tenant_app_id = $9|6|8|1||0|0|2805820|846036|20|4|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2|6|10|3||0|0|39602|11198|6|1|
|v4_sales|select id, warranty_detail_id, media_id, wx_img_url, img_url, tenant_id, tenant_app_id, create_time, update_time from warranty_detail_img where warranty_detail_id in ($0) and tenant_id = $1 and tenant_app_id = $2|5|6|1||0|0|104068|20820|4|2|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6) and t1.tenant_id = $7 and t1.tenant_app_id = $8|5|13|5||0|0|1930878|386193|14|3|
|warranty_service|select count(*) from warranty where user_id = $0 and tenant_wechatapp_id = $1 and is_disable = $2|5|24|8||0|0|33333|10399|5|1|
|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)|5|6|1||0|0|101838|20392|30|28|
|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|5|6|1||0|0|12697|5137|49|20|
|gift_mail|select ifnull(sum(quantity), $0) from gift_mail.trade where tenant_wechatapp_id = $1 and user_id = $2 and trade_type = $3 and product_id = $4 and order_status in ($5, $6, $7) and source = $8|5|7|2||0|0|21843|5475|5|1|
|order|select ifnull(sum(if(od.status = $0, $1, $2)), $3) as "2", ifnull(sum(if(od.status = $4, $5, $6)), $7) as "3", ifnull(sum(if(od.status = $8, $9, $10)), $11) as "4", ifnull(sum(if(od.status = $12, $13, $14)), $15) as "5", count(1) as total, ifnull(sum(if(od.status > $16, od.payment_fee, $17)), $18) as paymentfee, ifnull(sum(if(od.status > $19, od.offline_payment_fee, $20)), $21) as offlinepaymentfee, ifnull(sum(if(od.status > $22, od.payment_fee + od.offline_payment_fee, $23)), $24) 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 = $25 and od.tenant_wechatapp_id = $26 and (od.mobile_no = $27 or ad.mobile_no = $28) and (od.status = $29 or od.status = $30 or od.status = $31 or od.status = $32)|5|6|1||0|0|344826|69078|5|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)|5|5|1||0|0|6957393|1391970|64|13|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)|5|5|1||0|0|6958660|1392307|75|19|
|user_service|select t1.id, t1.user_id as userid, t1.user_name as username, t1.sex, t1.mobile_no as mobileno, t1.head_img_url as headimg from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5 order by ue.update_time desc, t1.id desc limit $6, $7|5|14|4||0|0|37058|10784|50|10|
|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|5|13|6||0|0|3951142|1387914|5|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91wm2wxudqaalqbmjv-mrwi4ey9vh09ktw$92wmjqwhcaaam3vtzxr0_6nsc8cpxmilyg$93wmjqwhcaaazrapvxh6ooglfsa3a6kgig$94wmjqwhcaaareuj3nozyysw3d7zd7qiuq$95wm2wxudqaabybp-o-hgbckt0wousaxta$96wm2wxudqaazh5r80tzvhbfyhqyskrnbw$97wmjqwhcaaayqtfa5rq8jgbacnlpwt0sg$98wmjqwhcaaayzhedv2bsk_i1ucn0yz6gq$99wmjqwhcaaaxqgay355p-v92u45mvrt6g$100wmjqwhcaaacimkbzavc8de0httcuxqyg$101wmjqwhcaaauc20rcplaaqt24phmqvy7w$102wm2wxudqaagnxondbihb8zme0hhry0sa$103wm2wxudqaab4zstqxfavjzfmpnnfkuha$104wmjqwhcaaarntunilosr7bam7uro0icw$105wmjqwhcaaavdtx2bapf-rhfsxjil8ixa$106wmjqwhcaaax5uc9fp_hilzitk2h8p8cw$107wmjqwhcaaav2lc8-pw8apphbs7ytjgja$108wm2wxudqaas8rvugxacik4ullomrt53a$109wmjqwhcaaam97bxp0hpjlkais3egnilw$110wm2wxudqaaias0sp_k8nh_agwykx7t6w$111wm2wxudqaa8c-u4z75bo0fo_daqin6fw$112wmjqwhcaaaegfa8sd7okthgdejh3gfwg$113wmjqwhcaaaj1ylvg_hqhdxugmw4bumzw$114wmjqwhcaaatkhbqhjd9fcyj_qllc89ma$115wm2wxudqaa_8ehteumonvadnmrd0ap7q$116wmjqwhcaaaq3l2-yvk6c-gqxcykct0ta$117wm2wxudqaa2k1csc8bmoxkju8pr0fudw$118wmjqwhcaaajypjlzatb5_pubbz5y_j5a$119wmjqwhcaaamcpqy6rkl9yzm0pxmmawtq$120wmjqwhcaaahths0fqy0fpgxxhrfa3ijg$121wmjqwhcaaavpa-hcfadpkviw1qd4806g$122wmjqwhcaaaaf6subcxdntqjonjbqtzha$123wmjqwhcaaabpjqww76trtrnehtjjerhg$124wmjqwhcaaa0luthkphxwumk6ybwmxhvw$125wmjqwhcaaa-c6p...|5|8|1||0|0|2460|492|1170|234|
|coupon_service|select * from coupon_service.coupon_can_give where coupon_id = $0 limit $1|5|12|4||0|0|1221308|245239|5|1|
|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|5|6|1||0|0|14485|5464|645|262|
|v4_employee|select count(*) as total from task_task t join employee e on e.employee_id = t.employee_id and e.shop_id = t.shop_id and e.tenant_id = $0 and e.tenant_app_id = $1 left join ( select task_id, group_concat(file_url separator '|') as task_attaches from task_task_attach where tenant_id = $2 and tenant_app_id = $3 group by task_id ) tta on t.id = tta.task_id where t.status = $4 and system_task_type = $5 and t.shop_id = $6 and finish_time >= $7 and finish_time < $8 and t.employee_id = $9 and t.tenant_id = $10 and t.tenant_app_id = $11|5|6|2||0|0|492931|99580|5|1|
|tenant|select e.id, e.employee_name from ( select distinct sgm.employee_id from tenant.sneak_guest sg join tenant.sneak_guest_maintain sgm on sgm.sneak_guest_id = sg.id where sg.tenant_id = $0 and sg.tenant_app_id = $1 and sg.update_shop_id = $2 and sgm.event_type in ($3, $4, $5) and (sg.fail_type is null or sg.fail_type = $6) and sgm.create_time between $7 and $8 ) t join tenant.employee e on e.id = t.employee_id|5|21|15||0|0|238673|100567|42|12|
|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)|5|7|2||0|0|6956412|1391845|35|12|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and od.order_no like concat($2, $3, $4) and (od.status = $5 or od.status = $6 or od.status = $7 or od.status = $8)|5|10|5||0|0|114673|22938|5|1|
|v4_coupon|select count(*) as total from coupon where coupon_status = $0 and member_id = $1 and tenant_id = $2 and tenant_app_id = $3|4|6|2||0|0|410|104|4|1|
|v4_coupon|select count(*) as total from coupon where member_id = $0 and scene = $1 and scene_id = $2 and tenant_id = $3 and tenant_app_id = $4|4|9|5||0|0|266174|87991|4|1|
|order|select count(1) as total, ifnull(sum(if(od.status > $0, od.payment_fee, $1)), $2) as paymentfee, ifnull(sum(if(od.status > $3, od.offline_payment_fee, $4)), $5) as offlinepaymentfee, ifnull(sum(if(od.status > $6, od.payment_fee + od.offline_payment_fee, $7)), $8) as paytotalfee from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $9 and od.tenant_wechatapp_id = $10 and (od.mobile_no = $11 or ad.mobile_no = $12)|4|6|1||0|0|385614|96621|4|1|
|user_service|select tenant_id, id, tenant_app_id, user_id, mobile_no, user_name, head_img_url, sex, status, create_time, update_time from tenant_member where tenant_id = $0 and tenant_app_id = $1 and user_name like $2|4|7|2||0|0|1815001|453778|116|111|
|user_service|select count(0) from user_service.tenant_member tm join user_service.tenant_member_info tmi on tmi.tenant_id = $0 and tmi.tenant_app_id = $1 and tm.id = tmi.id where tm.tenant_id = $2 and tm.tenant_app_id = $3 and (tm.user_name like concat($4, $5, $6) or tm.mobile_no = $7)|4|4|1||0|0|559991|271807|4|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 (od.mobile_no = $2 or ad.mobile_no = $3)|4|6|1||0|0|385614|96621|4|1|
|gift_mail|select ifnull(sum(quantity), $0) from gift_mail.trade where tenant_wechatapp_id = $1 and user_id = $2 and product_id = $3 and trade_type = $4 and order_status in ($5, $6, $7) and to_days(create_time) = to_days(now()) and source = $8|4|6|2||0|0|51564|13479|4|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) and (od.status = $5 or od.status = $6 or od.status = $7 or od.status = $8)|4|12|4||0|0|184167|46061|4|1|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8, $9, $10) and t1.tenant_id = $11 and t1.tenant_app_id = $12|4|4|1||0|0|4909401|1480332|24|7|
|coupon_service|select cm.id, cp.coupon_type, t.coupon_name, cm.display_way, round(t.face_value / $0, $1) as facevalue, round(t.discount / $2, $3) as discount, t.face_value as point, tgl.get_quantity, cp.take_effect_way, cm.pay_type, cm.state, tgl.put_quantity - tgl.get_quantity as surplusquantity, cp.take_start_day, cp.take_effect_day, cp.begin_time, cp.end_time, tr.type as redpacktype, round(tr.min_price / $4, $5) as minprice, round(tr.max_price / $6, $7) as maxprice, round(cp.use_threshold / $8, $9) as usethreshold from coupon_service.coupon_market cm join coupon_service.coupon_push cp on cp.source_id = cm.id and cp.source = $10 and cp.state = $11 join coupon_service.template t on t.id = cp.template_id join coupon_service.template_grant_limit tgl on tgl.coupon_push_id = cp.id left join coupon_service.template_redpack tr on tr.template_id = t.id where cm.tenant_app_id = $12 and cm.state != $13 and cm.type = $14 order by cm.id desc limit $15|4|12|4||0|0|144695|36175|80|20|
|message_push|insert into message_log (id, tenant_id, tenant_app_id, user_id, scene_type, msg_id, post_data, create_time, update_time) values (?, ?, ?, ?, ?, ?, ?, ?, ?)|4|4|1||0|0|0|0|0|0|
|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|4|5|1||0|0|15139|4515|4|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|4|5|2||0|0|163338|47784|4|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|4|37|18||0|0|138760|34690|4|1|
|tenant|select esd.id, esd.sales_erp_id, es.employee_name, esd.product_barcode, es.sales_no, es.member_erp_id, esd.category_name, es.sales_date, esd.category_erp_id, esd.product_name, esd.cert_no, esd.amount_pay, esd.sales_index, ifnull(ee.not_add_value_plan, $0) as not_add_value_plan from erp_sales_detail esd join erp_sales es on es.tenant_id = esd.tenant_id and es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id left join erp_sales_extend ee on ee.tenant_id = es.tenant_id and es.tenant_wechatapp_id = ee.tenant_wechatapp_id and es.sales_erp_id = ee.sales_erp_id and esd.sales_index = ee.sales_index where esd.tenant_id = $1 and es.sales_status = $2 and es.tenant_wechatapp_id = $3 and esd.product_barcode = $4 order by es.sales_date desc|4|13|4||0|0|83546|25383|15974|4829|
|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.id desc limit $2, $3|4|5|1||0|0|33106|8308|24|6|
|v4_employee|select count(*) from ( 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 ) total|4|6|2||0|0|7939|2791|4|1|
|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|12|8||0|0|817384|417484|229|112|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price asc, p.id desc limit $2|4|4|1||0|0|32992|8248|24|6|
|corpwx|select count(0) from external_user where tenant_id = $0|4|9|2||0|0|1170824|292706|4|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|8|4||0|0|14036|5649|3|1|
|v4_user|select t1.id as memberid, t2.id as potentialcustomerid, t2.checkin_time as checkintime from member t1 join potential_customer t2 on t1.tenant_app_id = t2.tenant_app_id and (t1.id = t2.member_id or (t2.external_user_id != $0 and t1.external_user_id = t2.external_user_id)) and t2.tenant_id = $1 and t2.tenant_app_id = $2 where t2.maintain_shop_id = $3 and t2.id in ($4, $5, $6, $7, $8) and t1.tenant_id = $9 and t1.tenant_app_id = $10|3|16|10||0|0|3171945|1057325|15|5|
|v4_employee|select count(*) as total_count, count(finish_time) as finish_count, ifnull(sum(if(finish_time >= $0 and finish_time < $1, $2, $3)), $4) as todayfinishcount, count(send_coupons) as coupon_send_count, count(recv_coupons) as coupon_recv_count, count(accept_time) as accept_count, count(arrival_shop_time) as arrival_shop_count, count(trade_time) as trade_count from task_task where task_type = $5 and status = $6 and shop_id = $7 and employee_id = $8 and system_task_type = $9 and start_time <= $10 and end_time > $11 and tenant_id = $12 and tenant_app_id = $13|3|3|1||0|0|12268|6398|3|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)|3|3|1||0|0|926408|352968|171|57|
|coupon_service|select count(1) from coupon_service.coupon_expire_task where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and expire_time > now()|3|3|1||0|0|30962|14092|3|1|
|v4_sales|select es.id as salesid, es.sales_no, es.sales_date, es.member_erp_id as memberid, w.warranty_no from v4_sales.erp_sales es join v4_sales.warranty_can_added wca on wca.sales_id = es.id and wca.tenant_id = $0 and wca.tenant_app_id = $1 left join v4_sales.warranty w on w.sales_id = es.id and w.tenant_id = $2 and w.tenant_app_id = $3 where is_sales = true and sales_status = $4 and (es.sales_no like concat($5, $6) or es.member_erp_id = $7) and es.tenant_id = $8 and es.tenant_app_id = $9 order by es.sales_date desc, es.id desc limit $10|3|3|1||0|0|1466279|488781|9|5|
|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)|3|4|1||0|0|4175302|1392296|56|24|
|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 sg.status = $5|3|18|7||0|0|71229|23743|3|1|
|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|3|76|40||0|0|464220|205337|3|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)|3|4|2||0|0|36|12|12|4|
|gift_mail|select id, tenant_wechatapp_id, shop_id, shop_name, product_id, create_time, update_time from take_shop where product_id = $0|3|6|2||0|0|130365|43455|14|10|
|v4_employee|select tt.task_template_id as taskid, tt.task_name as taskname, tt.task_type, tt.system_task_type, count(*) as num from v4_employee.task_task tt join v4_employee.task_system_task_template st on tt.task_template_id = st.id and st.`status` = $0 and st.tenant_id = $1 and st.tenant_app_id = $2 where tt.task_type = $3 and tt.shop_id = $4 and tt.`status` = $5 and tt.start_time <= $6 and tt.end_time > $7 and tt.finish_time is null and tt.tenant_id = $8 and tt.tenant_app_id = $9 group by tt.task_template_id, tt.task_name, tt.system_task_type, tt.task_type|3|5|2||0|0|13321|5907|8|4|
|coupon_service|select count(0) from coupon_service.coupon_market cm join coupon_service.coupon_push cp on cp.source_id = cm.id and cp.source = $0 and cp.state = $1 join coupon_service.template t on t.id = cp.template_id join coupon_service.template_grant_limit tgl on tgl.coupon_push_id = cp.id left join coupon_service.template_redpack tr on tr.template_id = t.id where cm.tenant_app_id = $2 and cm.state != $3 and cm.type = $4|3|8|3||0|0|107981|35995|3|1|
|employee|update backlog set finish_amount = $0, finish_time = now(), status = $1 where tenant_id = $2 and tenant_app_id = $3 and scene = $4 and begin_time <= $5 and expire_time >= $6 and user_id = $7 and user_type = $8 and finish_amount = $9|3|11|6||0|0|82463|27734|0|0|
|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|3|38|19||0|0|463371|205861|3|1|
|order|select ifnull(sum(if(od.status = $0, $1, $2)), $3) as "2", ifnull(sum(if(od.status = $4, $5, $6)), $7) as "3", ifnull(sum(if(od.status = $8, $9, $10)), $11) as "4", ifnull(sum(if(od.status = $12, $13, $14)), $15) as "5", count(1) as total, ifnull(sum(if(od.status > $16, od.payment_fee, $17)), $18) as paymentfee, ifnull(sum(if(od.status > $19, od.offline_payment_fee, $20)), $21) as offlinepaymentfee, ifnull(sum(if(od.status > $22, od.payment_fee + od.offline_payment_fee, $23)), $24) 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 = $25 and od.tenant_wechatapp_id = $26 and od.order_no like concat($27, $28, $29) and (od.status = $30 or od.status = $31 or od.status = $32 or od.status = $33)|3|8|5||0|0|68799|22934|3|1|
|employee|update backlog_system set status = $0, finish_time = now() where tenant_app_id = $1 and scene = $2|3|6|2||0|0|2290497|1128917|0|0|
|goods|select shop_id from goods.goods_take_shop where goods_id = $0 and activity_id = $1|3|6|3||0|0|306783|102261|4|3|
|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)|3|5|2||0|0|552036|276005|36|12|
|v4_user|select count(*) as total from member_butler t1 join member t2 on t1.tenant_id = t2.tenant_id and t1.member_id = t2.id and t2.tenant_id = $0 and t2.tenant_app_id = $1 where t1.shop_id = $2 and t1.employee_id = $3 and t1.tenant_id = $4 and t1.tenant_app_id = $5|3|4|1||0|0|84988|28566|3|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|3|5|2||0|0|149380|67618|562|255|
|user_service|select tm.user_id as id, tm.user_name as username, tm.head_img_url as headimgurl, tm.user_name as nickname, tm.mobile_no as mobile, tm.sex from user_service.tenant_member tm join user_service.user_employee ue on ue.tenant_id = $0 and ue.tenant_wechatapp_id = $1 and tm.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where tm.tenant_id = $4 and tm.tenant_app_id = $5 order by tm.id desc limit $6|3|6|2||0|0|19856|7572|36|12|
|goods|select id, img_url, img_index from goods_img where goods_id = $0 order by update_time desc|2|3|2||0|0|52257|26129|5|3|
|order|select id, type, operator_type as operatortype, operator_result as operatorresult, reason_label as reasonlabel, reason_value as reasonvalue, remark, create_time as createtime, status from order_service_log where order_id = $0 order by create_time desc|2|2|1||0|0|40490|20245|0|0|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and dt.product_name like concat($2, $3, $4)|2|5|3||0|0|128662|64435|2|1|
|tenant|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 limit $18|2|3|1||0|0|411738|205869|20|10|
|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|2|3|2||0|0|25634|12817|2|1|
|user_service|select * from user_employee where tenant_wechatapp_id = $0 and employee_id = $1|2|2|1||0|0|6154|3399|6154|3399|
|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|2|2|1||0|0|1245747|623210|11|8|
|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|2|1||0|0|0|0|0|0|
|sms|select ifnull(sum(ifnull(t2.sms_size, $0) * t1.send_count), $1) as amount from sms_send t1 left join sms.sms_send_extend t2 on t1.biz_id = t2.biz_id where t1.tenant_app_id = $2 and t1.code = $3 and t1.create_time >= $4 and t1.create_time < $5|2|5|4||0|0|6810|3418|2|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)|2|2|1||0|0|2783828|1391991|27|14|
|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 order by i.volume asc, p.id desc limit $1|2|3|1||0|0|25120|12560|20|10|
|activity_service|select date_format(create_time, '%y-%m-%d') as `date`, count(*) as quantity from activity_service.online_sign_user_sign_log where tenant_app_id = $0 and date_format(create_time, '%y-%m-%d') between $1 and $2 group by date_format(create_time, '%y-%m-%d')|2|7|5||0|0|802345|401174|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102wmjqwhcaaaz-txif1kg16kwh1nkb09ua$103wm2wxudqaasvfnvsf-3gjy6rel7ruo9q$104wmjqwhcaaa-zv8jtidq2o96o3c9cwmdq$105wm2wxudqaanyftueqdmt1wka5eby-elq$106wmjqwhcaaajevh8ct5yglg91cdeswdbq$107wm2wxudqaaktnykfvrrluwsyj-bhzpoa$108wm2wxudqaayjx9swsvmggvdqs8dv5nvg$109wm2wxudqaa_d-6bvobs4mev3xk6ai08g$110wm2wxudqaacynuwfsrmp7kzuixuhfdoa$111wm2wxudqaaja8cpte7mbexnvaiwozm4a$112wm2wxudqaajhe9xtnk_-rezalwevinyg$113wmjqwhcaaaycglnhetzfbqcfrjo-cbrq$114wm2wxudqaake79j9lxierdh6h5ifiaeg$115wm2wxudqaaxl6wuinqcdx8qfr-_fsmaw$116wmjqwhcaaacpc3dwx9wo8biqr9bhsyvg$117wm2wxudqaayxxuaqfotwvhv0hfu93tca$118wmjqwhcaaaplhjufxad9ldwn56pifgog$119wm2wxudqaaiynfmhff1xe5-trwiowxpg$120wm2wxudqaammp57hyybssqjcr3nv3o1a$121wm2wxudqaaujhgiyfdgt1mueggdjexkg$122wmjqwhcaaac6jmdk5l6-hv1nsfqvjlwa$123wm2wxudqaap7jbacm77tjcbq8_ryvlbq$124wm2wxudqaaewqhoc85qluze3zajamzxq$125wmjqwhcaaagjtw...|2|2|1||0|0|2172|1086|1006|503|
|user_service|select tu.user_name as membername, tu.mobile_no as mobile, emg.grade_name as gradelevel, tu.user_id as memberuserid, tu.tenant_id as tenantid, tu.tenant_app_id as tenantappid, ue.employee_id as employeeid, ue.employee_erp_id as employeeerpid, tmb.erp_member_id as membererpid, tmi.shop_id from user_service.tenant_member tu join user_service.tenant_member_info tmi on tu.tenant_id = tmi.tenant_id and tu.id = tmi.id left join user_service.tenant_member_bind tmb on tu.tenant_id = tmb.tenant_id and tu.id = tmb.id left join user_service.erp_member_grade emg on tu.tenant_id = emg.tenant_id and tmi.grade_id = emg.grade_erp_id left join user_service.user_employee ue on tu.tenant_id = ue.tenant_id and 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 tu.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, ...|2|3|1||0|0|5000|2500|1000|500|
|v4_employee|select $0 as task_type, t.system_task_type, count(*) as undo_count from task_task t join task_system_task_template st on t.task_template_id = st.id and st.status = $1 and st.tenant_id = $2 and st.tenant_app_id = $3 where t.`status` = $4 and t.finish_time is null and t.end_time > $5 and shop_id = $6 and employee_id = $7 and t.task_template_id in ($8, $9, $10, $11) and t.tenant_id = $12 and t.tenant_app_id = $13 group by t.system_task_type|2|2|1||0|0|1617|925|5|3|
|gift_mail|select tt.shop_id from gift_mail.trade t join gift_mail.trade_take tt on tt.tenant_wechatapp_id = t.tenant_wechatapp_id and tt.trade_id = t.id where t.tenant_id = $0 and t.tenant_wechatapp_id = $1 and tt.shop_id is not null|2|3|1||0|0|10700|7470|5349|3734|
|activity_service|select id from activity_service.activity_qualified where tenant_app_id = $0 and activity_id = $1 and (user_id = $2 or open_id = $3) and invalid = false order by id desc limit $4|2|3|1||0|0|161824|80916|0|0|
|corpwx|commit|2|2|1||0|0|0|0|0|0|
|v4_user|select checkin_time, id from potential_customer where maintain_shop_id = $0 and status in ($1, $2) and tenant_id = $3 and tenant_app_id = $4|2|3|2||0|0|1264|632|697|349|
|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)|2|4|3||0|0|1476274|779848|212|106|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)|2|5|3||0|0|179143|108681|48|24|
|order|select count(*) as amount from `order`.order_info od left join `order`.order_detail dt on od.id = dt.order_id left join order.order_address ad on od.id = ad.order_id where od.tenant_wechatapp_id = $0 and od.take_type = $1 and od.type = $2 and od.status = $3 and ad.shop_id = $4 and dt.take_start_date = $5|2|2|1||0|0|8970|7784|2|1|
|payment|select id, tenant_id, tenant_app_id, goods_order_source, goods_order_no, pay_order_id, transaction_id, goods_amount, refund_amount, fee_type, refund_reason, refund_account, request_ip, user_id, user_identify, user_sub_identify, order_start_time, refund_id, settlement_refund_amount, refund_recv_accout, refund_request_source, refund_finish_time, refund_status, refund_status_desc, error_msg, wxappid, sub_wxappid, mch_id, sub_mch_id, callback_tag, callback_result, create_time, update_time from refund_order where callback_result in ($0, $1) and refund_status in ($2, $3) order by id asc limit $4|2|2|1||0|0|21020|10510|0|0|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)|2|2|1||0|0|2783981|1392006|35|18|
|user_service|select count(0) from user_service.tenant_member tm join user_service.user_employee ue on ue.tenant_id = $0 and ue.tenant_wechatapp_id = $1 and tm.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where tm.tenant_id = $4 and tm.tenant_app_id = $5|2|10|8||0|0|82438|79747|2|1|
|v4_sales|select ifnull(count(*), $0) as sales_count, ifnull(sum(amount), $1) as sales_amount from erp_sales where member_erp_id in ($2) and is_sales = true and sales_status = $3 and tenant_id = $4 and tenant_app_id = $5|2|5|3||0|0|17535|8768|2|1|
|gift_mail|select count(0) from ( select p.*, sp.take_type, ifnull(pp.integral_price, ifnull(( select min(inventory.price) from inventory where inventory.product_id = p.id ), $0)) as price, ifnull(t.quantity, $1) as quantity, pt.partner_name as vendorname, $2 as distance, c.categroy_name as categroy_name, pp.partner_id from product p inner join category c on c.id = p.category_id left join self_product sp on p.id = sp.product_id left join partner_product pp on p.id = pp.product_id left join partner pt on pt.id = pp.partner_id left join ( select product_id, sum(quantity) as quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where p.is_disable is null or p.is_disable = $3 ) p left join product_status ps on p.id = ps.product_id and ps.tenant_wechatapp_id = $4 where p.tenant_id = $5 and p.product_type = $6 and (ps.id is not null or p.tenant_wechatapp_id = $7)|2|3|1||0|0|103612|51832|2|1|
|v4_sales|select count(*) as total from v4_sales.warranty w join v4_sales.erp_sales es on es.id = w.sales_id and es.tenant_id = $0 and es.tenant_app_id = $1 where w.member_id in ($2) and is_disable = false and w.tenant_id = $3 and w.tenant_app_id = $4|2|9|6||0|0|212265|106137|2|1|
|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|5971|3116|5971|3116|
|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)|2|7|5||0|0|1289958|955535|150|75|
|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|3||0|0|1607007|822181|667|337|
|v4_sales|select count(distinct es.id) from v4_sales.erp_sales es join v4_sales.erp_sales_detail esd on esd.sales_erp_id = es.sales_erp_id and esd.sales_type in ($0, $1, $2, $3, $4, $5, $6, $7) and member_erp_id in ($8) and esd.tenant_id = $9 and esd.tenant_app_id = $10 where es.tenant_id = $11 and es.tenant_app_id = $12|2|2|1||0|0|4|2|2|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38wmjqwhcaaa6u8_fvjilfvxezsk91ucog$39wm2wxudqaa4paqbqq0sj9b1taoyu_rbg$40wm2wxudqaa2g6tgzcemuzvyrezch5cfq$41wm2wxudqaafiadnzrgifah6vw1tu-j2a$42wmjqwhcaaazmovgl4fidumve3hsdpw3g$43wmjqwhcaaaqxkopln9hbirknrsojwnhw$44wm2wxudqaa9y4qjm4fwiedrsxplrxaog$45wm2wxudqaab5jd0wkzowj_fpdoxpk_xq$46wm2wxudqaahtdpzfhk0cnl56_7wori1q$47wmjqwhcaaaqwg7gjyl8bqclqah_uumoa$48wm2wxudqaaqyyx8sfq9gg_jqo6ywn1qq$49wmjqwhcaaajyes8ptos8poaip2peps5w$50wmjqwhcaaa1daeln7tr6tffnxuj9rynq$51wmjqwhcaaargvog_nlklweyncc9qlpca$52wmjqwhcaaa_vo4z5isgqwtcuqb3b6a9a$53wm2wxudqaalz95-qboclcnp4inrl8cva$54wmjqwhcaaaf4v7gs75uqoyayoymfhoqq$55wm2wxudqaalnuha9hcmdnnhu15goadtq$56wmjqwhcaaawzoh-w_afhdqfywiw0cu6w$57wm2wxudqaa-owykc6s2beo9e8o0nyp5g$58wm2wxudqaavoowwxvbckksi8fdykvd_q$59wm2wxudqaathicjstts4c3um3vmfblsa$60wm2wxudqaamssmn60j2vxxapkycc02zg$61wm2wxudqaa3fco1n5vyxpx1hyddzcz6g$62wmjqwhcaaafofoidnbs3yuvtx5dkoztw$63wmjqwhcaaaqz4tvpn0uwa_ksru7z4k-w$64wm2wxudqaaz3ledvzkxbruio1vb5myqw$65wm2wxudqaak0tn8d3ydaexuobiggcvnq$66wm2wxudqaajgczwrmjuyuf6t3nmfunha$67wm2wxudqaamgqtckpkwv_nubjrhnuwxq$68wm2wxudqaa7gqhjzvg6qhdsxrcpkng3g$69wm2wxudqaaje4dbtmk5bzuny1z0sg8_q$70wm2wxudqaakhrxafj7iaibozlvt8e5fa$71wmjqwhcaaarx0p6lai9swfui1ze_mfdg$72wmjqwhcaaajakxfi1-hqvwwh0wi-r05a$73wm2wxudqaaiir1c5xnefahnbmzxi6rew$74wm2wxudqaazsf38z0go9qj-fqiy7chfw$75wmjqwhcaaadk68x8a6bykyfeezkknxbg$76wm2wxudqaawbaudxmqjc5y9r4qr8jlhg$77wm2wxudqaa7ely-ftmlo0ghwegylud_g$78wm2wxudqaawxh8c8rtnf7b_mmovl9pfq$79wm2wxudqaaki6recllecoguprpst_pew$80wm2wxudqaa7thy62or19yocsvzosvw0a$81wm2wxudqaaqtnigmsdbvpzaiehgduofw$82wm2wxudqaad-k-9inn8_an2opzme1pxq$83wm2wxudqaauf6jlhd-21plsfar0wahrq$84wm2wxudqaawyndromkmhwjtbwtna9law$85wm2wxudqaahu2hjagfkuhrc6o5ldp6_q$86wm2wxudqaauap9zgrr8-elms2cqtyfaa$87wm2wxudqaafj8yg1jmks-geiwst_o16q$88wmjqwhcaaahh1nehid4jkexavofcmyna$89wmjqwhcaaaef95n8iaufihogw-jhledw$90wm2wxudqaa6jpcovjx1obmmu1u8a5y-q$91wm2wxudqaadc26imb7lvmib03pppez7q$92wmjqwhcaaa50ubz1-wbugruwkaaqh4ca$93wm2wxudqaagr0-4vmhddlpy9dg-skpjq$94wmjqwhcaaamxp75cerhjmewixtssdzja$95wmjqwhcaaavvudr_l8kw1za5xeke4qva$96wm2wxudqaaviix6yqbvculrd6l2taaag$97wm2wxudqaarwmog3zin_xhs-xkvaco6g$98wm2wxudqaah4gz1lb1jpfy0dsce4cjfq$99wm2wxudqaacoz__azv_pngufyi3c8c6g$100wmjqwhcaaafm-g-um3dtvndvqupg9aka$101wmjqwhcaaa_m7xdx0sts3nahvcnqh9dg$102wm2wxudqaaacnu7g9kilaqfprr-doyqw$103wm2wxudqaa5yg6dfq00ldwdn-nwq-roa$104wm2wxudqaapmfhvihcmre0ctomybbcqw$105wm2wxudqaajzhauyfllrkd1onbt0xnjw$106wm2wxudqaam90mbcyl4qc0ffwswch-7a$107wmjqwhcaaallcidke36dix3rytbrg5_a$108wmjqwhcaaahxout2rayxtopmzel05jta$109wmjqwhcaaamkwm_v3lz1vj4uvkvurk4g$110wm2wxudqaapxb03mckwzktbk1wnaydeg$111wm2wxudqaa5sgnmyusc5wjt9acg4eujq$112wmjqwhcaaa-8kzits14umamp5xokhufw$113wmjqwhcaaauit-a7bp2q8o8w758kdcuq$114wm2wxudqaaas9ez5f7yzb-wsmvds7nba$115wm2wxudqaa0qnwryj1kggztqzd7_k_gw$116wmjqwhcaaawhsorhid4ygtw6zvsmbfxw$117wm2wxudqaasst10xr92qoijjijmj3azw$118wmjqwhcaaaqb5rpfdmhq-87indyubiqq$119wm2wxudqaagzsdmmvaklahxktvvsdarg$120wmjqwhcaaaxjuks6-jbhcuuiifebpetg$121wmjqwhcaaacvoy78i52ek2z4a-ouedtq$122wmjqwhcaaaru9-o0bq0s87gndaumgzww$123wm2wxudqaaz4ohhmbrouujb_zk5qozdg$124wm2wxudqaa65pobg7dwbi-qhvgajnnoq$125wm2wxudqaa6zxf...|2|2|1||0|0|2348|1174|1096|548|
|authorization_service|select id, tenant_id, account_id, type, login_name, hash_password, salt, user_id, employee_id, tenant_app_id, status, create_time, update_time from login_account where type = $0 and login_name = $1|2|3|2||0|0|120482|60241|2|1|
|v4_user|select maintain_employee_id, id from potential_customer where maintain_shop_id = $0 and status in ($1, $2) and tenant_id = $3 and tenant_app_id = $4|2|3|2||0|0|1264|632|697|349|
|v4_coupon|select count(*) as total from ( select c.id, c.display_name, c.type as coupontype, round(c.face_value / $0, $1) as facevalue, round(c.face_value / $2, $3) as points, c.face_value as discount, c.begin_time, c.end_time, c.template_id, round(c.use_threshold / $4) as usethreshold, ce.exchange_goods, case when c.begin_time > now() and c.coupon_status = $5 then $6 else c.coupon_status end as coupon_status from v4_coupon.coupon c join v4_coupon.coupon_extend ce on ce.id = c.id and ce.tenant_id = $7 and ce.tenant_app_id = $8 where c.member_id = $9 and c.tenant_id = $10 and c.tenant_app_id = $11 ) c|2|2|1||0|0|176119|88146|2|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|2|5|4||0|0|89682|44846|20|10|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by p.tag_price desc, p.id desc limit $2|2|2|1||0|0|16496|8248|12|6|
|activity_service|select count(*) from online_sign_user_sign_log where tenant_app_id = $0|2|7|5||0|0|802345|401174|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|5|3||0|0|2146864|1322107|569|329|
|v4_sales|select ifnull(sum(integral), $0) as points from v4_sales.erp_sales es join v4_sales.erp_sales_detail esd on esd.sales_erp_id = es.sales_erp_id and esd.tenant_id = $1 and esd.tenant_app_id = $2 where es.member_erp_id = $3 and es.sales_status = $4 and es.is_sales = true and esd.sales_type = $5 and es.tenant_id = $6 and es.tenant_app_id = $7|2|8|6||0|0|44590|22296|2|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) group by shop.id ) table_count|2|2|1||0|0|166365|83199|2|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 keeping_days > $2 and state = $3 and start_add_time = date_add(curdate(), interval $4 * (add_days - $5) day)|1|11|11||0|0|1846310|1846310|875|875|
|order|select ifnull(sum(if(od.status = $0, $1, $2)), $3) as "2", ifnull(sum(if(od.status = $4, $5, $6)), $7) as "3", ifnull(sum(if(od.status = $8, $9, $10)), $11) as "4", ifnull(sum(if(od.status = $12, $13, $14)), $15) as "5", count(1) as total, ifnull(sum(if(od.status > $16, od.payment_fee, $17)), $18) as paymentfee, ifnull(sum(if(od.status > $19, od.offline_payment_fee, $20)), $21) as offlinepaymentfee, ifnull(sum(if(od.status > $22, od.payment_fee + od.offline_payment_fee, $23)), $24) 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 = $25 and od.tenant_wechatapp_id = $26 and dt.product_name like concat($27, $28, $29) and (od.status = $30 or od.status = $31 or od.status = $32 or od.status = $33) and ad.shop_id = $34|1|2|2||0|0|45919|45919|1|1|
|activity_service|select count(*) from activity_signup_user_apply where activity_id = $0 and audit_status in ($1, $2, $3)|1|1|1||0|0|2449|2449|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)|1|2|2||0|0|773156|773156|60|60|
|v4_user|select count(*) as total from member where status = $0 and member_name like $1 and tenant_id = $2 and tenant_app_id = $3|1|1|1||0|0|211517|211517|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)|1|1|1||0|0|130359|130359|42|42|
|order|select count(*) from `order`.order_info where tenant_id = $0 and tenant_wechatapp_id = $1 and take_type = $2 and status = $3 and (wait_take_shop_id = $4 or take_shop_id = $5)|1|1|1||0|0|5722|5722|1|1|
|coupon_service|select tenant_id, tenant_app_id, employee_id, count(distinct user_id) as count from coupon_service.coupon_expire_task where tenant_id = $0 and tenant_app_id = $1 and status = $2 and expire_time > now() and expire_time between $3 and $4 group by tenant_id, tenant_app_id, employee_id|1|1|1||0|0|15074|15074|16|16|
|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, $14, $15)|1|1|1||0|0|42|42|14|14|
|v4_employee|select count(*) as total_count, count(finish_time) as finish_count from task_task t join task_invite_task_template t2 on t.task_template_id = t2.id and t2.tenant_id = $0 and t2.tenant_app_id = $1 where t2.invite_time < $2 and t.end_time > $3 and t2.status in ($4, $5, $6) and t.task_type = $7 and t.status = $8 and t.shop_id = $9 and t.tenant_id = $10 and t.tenant_app_id = $11|1|1|1||0|0|70914|70914|1|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97wmjqwhcaaau0mdudssfxtyyv-mnvuv7q$98wm2wxudqaatesc1zsltjs8-mtlbivpeq$99wm2wxudqaa3iy-bldvxztanvtzwase2g$100wm2wxudqaafkxhl-7tqipfeudx6olvna$101wm2wxudqaa1pkpnl6bs-iatutyh3mn0g$102wm2wxudqaawxhryv9h_962wjrgm-fy5g$103wm2wxudqaadp3tvdgessxuwneyhl9_mg$104wm2wxudqaaohpg64iyz-_jlb5hhqipvw$105wm2wxudqaasupwnpbcyrnukc-jlzpjfa$106wmjqwhcaaaagaccleaec8vzlf_fn7ibg$107wm2wxudqaagrtoith-s5nmr4evxh8o7w$108wmjqwhcaaas-szci1fic1yns37afm9gg$109wm2wxudqaayhckfkd8hq4qmysdblloka$110wm2wxudqaapppqi35hrvo1t3xmrcyrxq$111wm2wxudqaavrizs-jti4cc1401oglgma$112wm2wxudqaadwst6o-uamovawrdc9v6zw$113wmjqwhcaaauh8y2cklhk39s3j7nx2xyg$114wm2wxudqaag86wxplcxqrfnhi-hu9aaw$115wmjqwhcaaam1oiumum9csna0mojz2csq$116wm2wxudqaaxc5b2r7qful851yekggvkw$117wm2wxudqaazeeqailvuf9g65mxetlyua$118wmjqwhcaaasukoqxq-9xjfpmjjai96aw$119wm2wxudqaaprbtwr6chjgnledgl8bd7w$120wmjqwhcaaax-ade9as9iesg6hy4jz2ba$121wm2wxudqaau_gzx5v_xlulevg1en15qq$122wm2wxudqaabkkco1g1f1thy0ya_kpjig$123wm2wxudqaargvwbb7hdvch-9ppmipgga$124wm2wxudqaarnma94fubenzjjiddg42ng$125wm2wxudqaad46k...|1|1|1||0|0|2399|2399|1163|1163|
|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)|1|1|1||0|0|85762|85762|18|18|
|v4_user|select count(*) as total from potential_customer where maintain_shop_id = $0 and status in ($1, $2) and tenant_id = $3 and tenant_app_id = $4|1|1|1||0|0|554|554|1|1|
|message_push|insert into message_log (id, tenant_id, tenant_app_id, user_id, scene_type, msg_id, content, post_data, create_time, update_time) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|1|1|1||0|0|0|0|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23wm2wxudqaa5-fvqmhqi6q8yu83rhai0q$24wm2wxudqaawigvmy-xibqci1r5zcujrg$25wm2wxudqaamaoyfnybv772lkvfvkbyga$26wmjqwhcaaafyd5kiufztnmikoiof8g6q$27wm2wxudqaaam2sxkqsvpluxnqxvpi2mw$28wm2wxudqaarjxtsecwmozmraufzigzfa$29wmjqwhcaaahxb_cfthysyzt0pudb5b7w$30wm2wxudqaakdns3iwhaikbuy-pnbndxa$31wm2wxudqaabtmipet9ztu_6vg0nwxiyq$32wmjqwhcaaarlnvix5srzhinpg8i7gxxw$33wm2wxudqaa3y55jesmjw_ecdifedtq-q$34wm2wxudqaazjzyfeni_ze9t-pqdnpitw$35wmjqwhcaaagya84aym7xfhs7f95c20kw$36wmjqwhcaaaxiipr30vehqdyr0mqr8loa$37wmjqwhcaaatf9bwx32npm0qhc4ugenfa$38wmjqwhcaaa7jrwlkcncfvm-ilmgsuaoa$39wmjqwhcaaao9o5qfstk8fushgtbkkoow$40wm2wxudqaabgkd3zopvt5mil9xbnewlq$41wm2wxudqaaucwh5v2gby5sii3-vucebg$42wm2wxudqaai5e6pkxjto5gnyqgtugctw$43wmjqwhcaaaqe1uv2wmkj775ubwdrzfug$44wmjqwhcaaaqbgvocy3d-weoctosdz-mq$45wmjqwhcaaapo5ujmabdjg6mac9ov238g$46wm2wxudqaai54k4f_ongpozu7l4vxqhw$47wm2wxudqaad7yos81jno-czxg9pqtgpa$48wmjqwhcaaaye62jfug77kitkbkhtr9tw$49wm2wxudqaatgvara6b87cecjvv-rw9xq$50wm2wxudqaa5jqmgkoiybv6ccwbuvkaja$51wm2wxudqaahq2r_wepnrdfxy6nrvm7lw$52wm2wxudqaavmby0wjo98x84f6lvfrjjg$53wm2wxudqaaevrmclk67qxllrmv7egu-q$54wmjqwhcaaaqn-bcxp0fbqze6wapo_qqq$55wm2wxudqaae6v0bzsdtit_o32fqq78ra$56wm2wxudqaaub-h069tbqxbignr03hwmg$57wm2wxudqaa_d2_jk31ci08ctcjvvderw$58wm2wxudqaayhqsr1imdwfqjk-mfgmr_q$59wm2wxudqaa4btuyqdmr5eqjofzk5v8og$60wm2wxudqaa5lxomk7ufxulkyemt1gjgg$61wm2wxudqaaaiczbovwtdks7lf6bwch9w$62wm2wxudqaasinqsnrosnig5h0it89o-g$63wmjqwhcaaawlqm-pzkxbaepvyvuyq3jw$64wm2wxudqaab8avheoqy5ysd5adulhcxa$65wm2wxudqaajcqnvbb6we3hbqefy0u7eg$66wmjqwhcaaawew-xjmnbu0wg0keyg1idq$67wm2wxudqaa2_e94vhru3-uc82ienucog$68wm2wxudqaaa4s_psqrwchtl-_xtmldog$69wm2wxudqaaz42xuq1keychxi_xajzlmq$70wm2wxudqaaruamjy4cskuwuzzk73ufig$71wmjqwhcaaaklb2oays4pk0no5jgdj3mw$72wmjqwhcaaau53dcwuvaqdgyoyy9re3oa$73wm2wxudqaaofs6pyiiz3vykvjac_xzpq$74wmjqwhcaaatarzeaujysvwp6o6lad0xa$75wm2wxudqaarwh2qf9zdqutcoreyjvjpq$76wmjqwhcaaavlaeccctpybewfgok5qy2a$77wmjqwhcaaan62g_ii63lqgomznonvrwq$78wm2wxudqaayllwnvrhecluomawqczn8g$79wm2wxudqaapvt_ndfx56b7hihuhrzksw$80wm2wxudqaaytzs40uhito9osfm0omuog$81wmjqwhcaaapbtjrrlazsurdlzpdoyjcg$82wm2wxudqaa4hhwa73iw4_htrh3zalxeq$83wm2wxudqaatvyqezwreebqeym46j5snw$84wmjqwhcaaarm6wsnotdfqpivy3nbnzka$85wmjqwhcaaaggyjgugczjkjcfa-wh7ppq$86wm2wxudqaauk9abjahqfiuxg4mpkomxa$87wm2wxudqaaugoc_erjjabyaaouvi0oeq$88wm2wxudqaapvzd3ozitwhtr3mj47ahla$89wm2wxudqaa2foarqjujvh4epwuva2zpq$90wmjqwhcaaan7cmqtayruulpk98t0mnkg$91wm2wxudqaavlqb3wmzeg40drjso-tacw$92wmjqwhcaaazg6sw_0webwrhzcz5ucina$93wm2wxudqaatrnq9l2-c2rzsx48tljppg$94wm2wxudqaaxalsohjx3i6v8zeu4idira$95wmjqwhcaaagupfqyws84tm4eieegebkg$96wm2wxudqaalawymlktew0jd5nwrl9gdw$97wmjqwhcaaahkjxmb6zhyafmxw-rs9jvg$98wmjqwhcaaaahtvy2tn5mfndru_nqhsdg$99wmjqwhcaaabyulggklvrtf2gvyuf9zuq$100wm2wxudqaa58bd7qmna7abxhqa_sosjg$101wmjqwhcaaa1bqxrpm_v_ppjryfi7spuq$102wmjqwhcaaawf_sywff5stik1n9qejt6a$103wm2wxudqaajztci0bkgjzxesszyhz2lq$104wm2wxudqaa-tdm-sd8riou_ys9qnpe0q$105wm2wxudqaako9vgkis2uxlnoigmfohsa$106wmjqwhcaaa2jsczjcrjwdaetlnhmj1gg$107wmjqwhcaaaoiux6ix6jwcrcxa2uezwtg$108wmjqwhcaaaiaekarcr5kuiq8gvzyholq$109wm2wxudqaasgefszn9rcep_zalp4cz-a$110wm2wxudqaadfnswvpgkg6zjgqmifcpqw$111wm2wxudqaaylcyasb7ildcfodbzi3quq$112wm2wxudqaacj21ba_7w-a86imd7-_ssa$113wm2wxudqaa_7uzafpsdazbhjfnb4jxbw$114wmjqwhcaaaylbzjxaxpesh69lozxnx0q$115wm2wxudqaazdf6nkjguix5jnhrssb0zg$116wmjqwhcaaam2ppncfgeaptpblk1dcwag$117wm2wxudqaacbbgeue6xthbxjqvszkv4a$118wmjqwhcaaa0z6nj1p3umzhuecvbiscsw$119wmjqwhcaaazdilamga8rhnqoj-cxm9sw$120wm2wxudqaaws5skvaqon28_izwsffhnw$121wm2wxudqaazpemuyly209copdk7tvlog$122wm2wxudqaa2vftcutzlfiqf9ua0hhtma$123wm2wxudqaal-webayhl2zid5samh8mwa$124wmjqwhcaaax2ekvwskjspoc0ftwclmvw$125wm2wxudqaafwjs...|1|1|1||0|0|1071|1071|500|500|
|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|1|21|21||0|0|500253|500253|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)|1|5|5||0|0|1230403|1230403|61|61|
|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)|1|1|1||0|0|290052|290052|63|63|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub(now(), interval $0 day)|1|32|32||0|0|903519|903519|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)|1|8|8||0|0|463516|463516|33|33|
|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, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) and order_state = $20 group by user_id, market_id ) number group by market_id|1|2|2||0|0|527405|527405|9|9|
|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) and t.un_assign_flag = $43|1|2|2||0|0|254|254|124|124|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24)|1|1|1||0|0|364604|364604|23|23|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36)|1|1|1||0|0|955495|955495|35|35|
|message_push|delete from message_push.message_log where tenant_id = $0 and create_time < $1|1|1|1||0|0|38751|38751|0|0|
|mysql|delete from message_push.message_log where create_time < date_sub(now(), interval $0 day)|1|61|61||0|0|2282198|2282198|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9)|1|2|2||0|0|69529|69529|8|8|
|v4_sales|select count(s.sales_erp_id) from ( select esd.product_barcode, max(esd.sales_erp_id) as sales_erp_id, max(esd.category_erp_id) as category_erp_id from v4_sales.erp_sales es join v4_sales.erp_sales_detail esd on esd.sales_erp_id = es.sales_erp_id and esd.tenant_id = $0 and esd.tenant_app_id = $1 where dept_erp_id = $2 and employee_erp_id = $3 and es.sales_status = $4 and es.is_sales = true and es.tenant_id = $5 and es.tenant_app_id = $6 group by esd.product_barcode ) s left join v4_sales.value_added_ignore i on i.erp_sales_id = s.sales_erp_id and i.product_barcode = s.product_barcode and i.tenant_id = $7 and i.tenant_app_id = $8 left join v4_sales.value_added va on va.erp_sales_id = s.sales_erp_id and va.product_barcode = s.product_barcode and va.tenant_id = $9 and va.tenant_app_id = $10 left join v4_sales.value_added_category vac on vac.erp_category_id = s.category_erp_id and vac.status = $11 and vac.tenant_id = $12 and vac.tenant_app_id = $13 left join v4_sales.value_added_template vat on vat.id = vac.template_id and vat.status = $14 and vat.tenant_id = $15 and vat.tenant_app_id = $16 where va.id is null and i.id is null and vat.id is not null|1|1|1||0|0|88|88|1|1|
|order|select od.id, od.order_no as orderno, od.status, od.take_type as taketype, od.create_time as createtime, od.remark, od.total_fee as totalfee, od.freight_fee as freightfee, od.discount_fee as discountfee, od.take_id as takeid, od.payment_fee as paymentfee, dt.product_id as productid, dt.price, dt.quantity, dt.sku_id as skuid, dt.art_no as artno, dt.image_url as imageurl, dt.product_name as productname, dt.take_remark as takeremark, dt.take_day as takeday, od.product_fee as productfee, 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|213563|213563|0|0|
|gift_mail|select count(0) from ( select p.*, sp.take_type, ifnull(pp.integral_price, ifnull(( select min(inventory.price) from inventory where inventory.product_id = p.id ), $0)) as price, ifnull(t.quantity, $1) as quantity, pt.partner_name as vendorname, $2 as distance, c.categroy_name as categroy_name, pp.partner_id from product p inner join category c on c.id = p.category_id left join self_product sp on p.id = sp.product_id left join partner_product pp on p.id = pp.product_id left join partner pt on pt.id = pp.partner_id left join ( select product_id, sum(quantity) as quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where p.is_disable is null or p.is_disable = $3 ) p left join product_status ps on p.id = ps.product_id and ps.tenant_wechatapp_id = $4 where p.product_status = $5 and p.topping = $6 and p.tenant_id = $7 and (ps.id is not null or p.tenant_wechatapp_id = $8)|1|2|2||0|0|51751|51751|1|1|
|gift_mail|select count(0) from ( select p.id, p.default_image_url, p.product_name, p.product_type, p.tag_price, ifnull(pp.integral_price, ifnull(( select min(inventory.price) from gift_mail.inventory where inventory.product_id = p.id ), $0)) as price, p.volume, p.category_id, p.product_status, $1 as quantity, pp.partner_id as partner_id, p.topping from gift_mail.product p left join gift_mail.partner_product pp on p.id = pp.product_id left join gift_mail.product_status ps on ps.product_id = p.id where p.tenant_id = $2 and product_status = $3 and (p.is_disable is null or p.is_disable = $4) and (ps.tenant_wechatapp_id = $5 or p.product_type = $6) ) p where p.topping = $7|1|1|1||0|0|16438|16438|1|1|
|coupon_service|select id, tenant_id, tenant_app_id, template_id, shop_id, shop_name, create_time, update_time from coupon_limit_shop where tenant_id = $0 and template_id = $1|1|1|1||0|0|21830|21830|0|0|
|user_service|select ue.user_id as id, tm.user_name as username, tm.head_img_url as headimgurl, tm.user_name as nickname, tm.mobile_no as mobile, tm.sex from user_service.user_employee ue join user_service.tenant_member tm on tm.tenant_id = ue.tenant_id and tm.tenant_app_id = ue.tenant_wechatapp_id and tm.user_id = ue.user_id where ue.employee_id = $0 and ue.tenant_id = $1 and ue.tenant_wechatapp_id = $2 and ue.shop_id = $3 order by tm.id desc limit $4|1|1|1||0|0|1201|1201|10|10|
||delete from v4_user.sjfx_dct_member_grade where create_time < $0|1|1|1||0|0|191861|191861|0|0|
|corpwx|select template_id, name from corpwx.app_template where template_id in ( select template_id from corpwx.mini_app_msg where tenant_id = $0 and template_id is not null group by template_id union all select templateid from ( select replace(json_extract(msg_content, $1), $2, $3) as templateid from corpwx.task_card_send_record where tenant_id = $4 ) a where templateid is not null group by templateid )|1|32|32||0|0|20510414|20510414|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90wm2wxudqaalqbmjv-mrwi4ey9vh09ktw$91wmjqwhcaaam3vtzxr0_6nsc8cpxmilyg$92wmjqwhcaaazrapvxh6ooglfsa3a6kgig$93wmjqwhcaaareuj3nozyysw3d7zd7qiuq$94wm2wxudqaabybp-o-hgbckt0wousaxta$95wm2wxudqaazh5r80tzvhbfyhqyskrnbw$96wmjqwhcaaayqtfa5rq8jgbacnlpwt0sg$97wmjqwhcaaayzhedv2bsk_i1ucn0yz6gq$98wmjqwhcaaaxqgay355p-v92u45mvrt6g$99wmjqwhcaaacimkbzavc8de0httcuxqyg$100wmjqwhcaaauc20rcplaaqt24phmqvy7w$101wm2wxudqaagnxondbihb8zme0hhry0sa$102wm2wxudqaab4zstqxfavjzfmpnnfkuha$103wmjqwhcaaarntunilosr7bam7uro0icw$104wmjqwhcaaavdtx2bapf-rhfsxjil8ixa$105wmjqwhcaaax5uc9fp_hilzitk2h8p8cw$106wmjqwhcaaav2lc8-pw8apphbs7ytjgja$107wm2wxudqaas8rvugxacik4ullomrt53a$108wmjqwhcaaam97bxp0hpjlkais3egnilw$109wm2wxudqaaias0sp_k8nh_agwykx7t6w$110wm2wxudqaa8c-u4z75bo0fo_daqin6fw$111wmjqwhcaaaegfa8sd7okthgdejh3gfwg$112wmjqwhcaaaj1ylvg_hqhdxugmw4bumzw$113wmjqwhcaaatkhbqhjd9fcyj_qllc89ma$114wm2wxudqaa_8ehteumonvadnmrd0ap7q$115wmjqwhcaaaq3l2-yvk6c-gqxcykct0ta$116wm2wxudqaa2k1csc8bmoxkju8pr0fudw$117wmjqwhcaaajypjlzatb5_pubbz5y_j5a$118wmjqwhcaaamcpqy6rkl9yzm0pxmmawtq$119wmjqwhcaaahths0fqy0fpgxxhrfa3ijg$120wmjqwhcaaavpa-hcfadpkviw1qd4806g$121wmjqwhcaaaaf6subcxdntqjonjbqtzha$122wmjqwhcaaabpjqww76trtrnehtjjerhg$123wmjqwhcaaa0luthkphxwumk6ybwmxhvw$124wmjqwhcaaa-c6pu4-pe636crrdqnnzeq$125wm2wxudqaabroo...|1|2|2||0|0|488|488|232|232|
|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)|1|1|1||0|0|27|27|9|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|1|4|4||0|0|1404|1404|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)|1|1|1||0|0|44342|44342|2|2|
|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)|1|1|1||0|0|15|15|5|5|
|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)|1|1|1||0|0|6|6|2|2|
|coupon_service|select id, tenant_id, tenant_app_id, template_id, coupon_id, give_user_id, user_id, create_time, update_time from user_coupon_give_record where tenant_id = $0 and tenant_app_id = $1 and coupon_id = $2 and give_user_id = $3 and user_id = $4|1|1|1||0|0|1487|1487|0|0|
|gift_mail|select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume asc, p.id desc limit $2, $3|1|1|1||0|0|8272|8272|6|6|
|corpwx|insert into mini_app_msg (id, tenant_id, to_user, to_party, to_tag, msg_type, msg_scene, msg_id, msg_content, status, err_msg, template_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|1|1|1||0|0|0|0|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98wm2wxudqaazoidbw1sov8qytiuatbe3w$99wm2wxudqaapyru0v5gxct8_9-tfqafug$100wmjqwhcaaagqlcigrysorj9dpmvafpbq$101wm2wxudqaadc-9wjafrn41v9bhyfsv3g$102wm2wxudqaaaaidgm1sghkqqreye4-kka$103wm2wxudqaa_yitcvxg_hfyk-qyakgb3q$104wmjqwhcaaabkzkusxseyhddm7lkaestg$105wm2wxudqaakfya2tlwv4nlwzdzcndr4q$106wm2wxudqaazdkrppnnfs6azfwmaea1fg$107wm2wxudqaata6qixpqddnknaeiib3rua$108wm2wxudqaaogsd5ybjcpemxw1lq_zlla$109wm2wxudqaaruyrwfrvutf_i6zlgc3bpa$110wmjqwhcaaahsnm3arrfgxz8ooimydmbw$111wm2wxudqaa-ocqn148dkux5nq-ogum1w$112wm2wxudqaa1p6ajp_ys0z3f9mf_bmgug$113wm2wxudqaa28zu_zl_lf7v5csgifxjra$114wm2wxudqaanqhjpwwkafo05leilh7lww$115wm2wxudqaa7t0uleqtom0m84rzv5yncq$116wm2wxudqaaw5hhqetoj65hnzxbvewgcq$117wm2wxudqaanocv2sxx2zf5wcpm26s6jq$118wm2wxudqaadsopoqzobyxarg-_otjcja$119wm2wxudqaa6_evcrf3ytqvcda5rxpv6a$120wmjqwhcaaauswwt3fhtbnjkwafnthmjq$121wm2wxudqaalrim8sdu5g-3eq2cd4g5cw$122wm2wxudqaadteu69iwdw2kxw5agpbv_w$123wm2wxudqaa0aj0kmsr4ghnayrxg5rzpa$124wmjqwhcaaasmsft6nhnfm2g-l_zhl4ww$125wm2wxudqaab7k3...|1|1|1||0|0|5478|5478|2691|2691|
|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 order by i.volume asc, p.tag_price desc, p.id desc limit $1|1|1|1||0|0|12560|12560|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)|1|1|1||0|0|276178|276178|40|40|
|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|1230422|1230422|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, $76, $77)|1|1|1||0|0|773172|773172|76|76|
|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.activity_id = $11|1|2|2||0|0|21257|21257|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|45|45||0|0|1846306|1846306|0|0|
|authorization_service|select id, platform_user_id, user_id, wx_user_id, employee_id, shop_id, tenant_id, tenant_wx_app_id, account_id, login_way, login_code, login_token, roles, status, expire_time, create_time, update_time, login_ip, login_time, login_data, wx_app_user_id from user_login_token where tenant_id = $0 and employee_id = $1 and status = $2|1|2|2||0|0|1404|1404|1404|1404|
|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, $173, $174, $175, $176|1|1|1||0|0|12419|12419|12419|12419|
|employee|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 limit $7|1|22|22||0|0|13163|13163|0|0|
|tenant|select count(distinct sg.id) as createnum, count(sgm.id) as maintaincount from tenant.sneak_guest sg left join tenant.sneak_guest_maintain sgm on sg.id = sgm.sneak_guest_id and sgm.event_type = $0 and sgm.create_time >= $1 and sgm.create_time < $2 where sg.tenant_app_id = $3 and sg.create_time >= $4 and sg.create_time < $5 and sg.create_shop_id = $6|1|1|1||0|0|1391|1391|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, $43wm2wxudqaa2s3rxnbiavw-sb8c6xuufg$44wm2wxudqaaunf2hccpk-vtqovybj6fgw$45wm2wxudqaalhkdhokvxvnzcoer9nsvqq$46wmjqwhcaaaz0pxmhsi0mv0wkco9pvtxa$47wm2wxudqaaf8sdxzeohakjrdly_f14ww$48wm2wxudqaa6njprp4nm3mapnoiky-rgq$49wm2wxudqaaszb91cauwtxh2zg2zt8tja$50wmjqwhcaaajzfe9ti8c_gjlyky4jwcig$51wm2wxudqaaott_jqfbt0y9ulfaegh9xw$52wm2wxudqaav7rc4l6xotglxsq5fadlag$53wm2wxudqaaohvo-ieponwujqlwqnwc6a$54wmjqwhcaaa6dqfengrtmitqrmxfrtfaa$55wm2wxudqaaymu0spikxhghqjfwwnw0pq$56wmjqwhcaaalkson0w24bvbswjdtlnnla$57wmjqwhcaaaog-6h7mgjiohgbgrwyw4zq$58wm2wxudqaaqf60rkhkqsufvtw8-oxgjg$59wm2wxudqaak79nnf4lbf-e-mg8lxev4a$60wm2wxudqaakdrs78jwgy4aukmbcdqfiw$61wm2wxudqaaxzza2h_c5numyzrnjbquha$62wm2wxudqaadsrvinzuoo-zobg-umwjdq$63wmjqwhcaaafmuj_cky1xuqnozdknxqhg$64wmjqwhcaaajpdk_w0muujpt3hunlyarq$65wmjqwhcaaaoyqe5aza78msk5gjxlhnfg$66wmjqwhcaaadas6zyhyejo6ewgtu9pr6g$67wm2wxudqaaiqmunz423asgdmry7zdqdg$68wm2wxudqaamx-hwjgpwko8cvnwfztgfq$69wm2wxudqaaztfm08cr6v-jqm5judaoqg$70wm2wxudqaadgaq7eh0jz0s9gsk2a3ysg$71wm2wxudqaae9grv5avy-z1kyiufcj1xg$72wm2wxudqaa79ohc7jpu1ova582ebqveq$73wm2wxudqaaoodubvyekk6xwask0ji5eg$74wm2wxudqaax6wmppax16ov8s11b4t5eq$75wm2wxudqaa9hx5a9mgdq7ens68fv_ewg$76wmjqwhcaaarrhx35b7mzpvvw5mygzcya$77wm2wxudqaamqkwzf20lfmrqelgtms7pg$78wmjqwhcaaap_gee3gxoyjfmvdhr80k1a$79wm2wxudqaaudukpqh9c5ojm9q1mscrra$80wm2wxudqaa7h3gj6rz2h3duw3jtqa0ug$81wmjqwhcaaacahtx3nuqebfszzgeqszbg$82wm2wxudqaaeqx5ajp1lv_ewjwbt92x5w$83wmjqwhcaaakdplazduyugspa6obnlpdq$84wmjqwhcaaa3oqjunbbdcsz56syrfvnlg$85wm2wxudqaa86v0dvuioeo9zu-9n4viug$86wm2wxudqaanbicqi_riuft54puzlumoq$87wm2wxudqaaweqlctnph5f_nqc8qgciow$88wmjqwhcaaajh6jnylww3d_i_uh7atnlq$89wm2wxudqaaorzqe1iyq-ysvwi5mz8skg$90wm2wxudqaa6ahld6klkvqsl7g_nrjcrq$91wm2wxudqaazourcjms05qiwer7icdvwa$92wm2wxudqaaqbx1ti2m2e15wsyaaxzh4a$93wm2wxudqaaktvecexm-xuodqrvyww1-a$94wmjqwhcaaajtg2riedveokdjpcusaw4q$95wm2wxudqaaqubmsnjqjzstyyb7n_ny5a$96wm2wxudqaaofcn_jcj4kpplkaeap6dng$97wm2wxudqaa38wtbvdf5o1fblx2teesqq$98wmjqwhcaaacg-k_oqzad-x-auf1sr7fw$99wmjqwhcaaazjdyroi8urbrve0wmgcdag$100wm2wxudqaaravnxb1muun5tw7ygfrn0q$101wm2wxudqaa9snnvu1sqyoctrxa2b8baq$102wm2wxudqaay-jzp4puax_tj668dxsdcg$103wmjqwhcaaas1zkb8nlbceocyso83j1lg$104wm2wxudqaamvgbcp1nowsrp2ct2a7jvg$105wm2wxudqaavag6l4erkhih3-jzwogv_a$106wmjqwhcaaa-fe1f2b7hw_qzrra4_h8aa$107wmjqwhcaaamlxnxnvbxm0kc-slyt01da$108wm2wxudqaak8xtivaf3vwtuxda_kyzva$109wm2wxudqaamq8djgagw6gdndsm7rw_ww$110wm2wxudqaa1iibingxdr6pwf8opjf8tq$111wmjqwhcaaayvvqlin7l6kgcvk4emiu8q$112wm2wxudqaaalicb_jk5ho_uqpirq20fw$113wmjqwhcaaamuoegkly1zufl3uzz2svcg$114wm2wxudqaadhqoi6kqraqtnbqn8rssyq$115wm2wxudqaa85rmcfogzwmxzm7xiwbt9a$116wmjqwhcaaand4hrehpsiibeyx-1-jmpw$117wmjqwhcaaa3jd83bub6lgwt684schhjw$118wm2wxudqaaqqyg9owgvfxkvjil0x-ojg$119wm2wxudqaagk596dgh1wficbq397l75a$120wm2wxudqaaxvnzxadtglsmhczz-cxjpa$121wm2wxudqaall1fejccw-8ba0is2yzxua$122wmjqwhcaaalpgttgdnajzcuwffq0nieq$123wm2wxudqaazll-ndv_6sp7cjwa7y-hna$124wm2wxudqaa59yawqwb-9qnhhjbaxqisa$125wm2wxudqaaxa94...|1|1|1||0|0|1756|1756|832|832|
|h5link|select id, tenant_wechatapp_id, func_id, link_url, app_link_url, link_text, link_image_url, detail_id, create_time, update_time from h5_link where tenant_wechatapp_id = $0 and func_id = $1|1|1|1||0|0|494|494|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 expire_time between $4 and $5|1|2|2||0|0|8127|8127|1|1|
|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|1|4|4||0|0|2662|2662|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)|1|2|2||0|0|141234|141234|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)|1|2|2||0|0|241474|241474|16|16|
|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|1391570|1391570|16|16|
|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, $225, $226, $227, $228, $229)|1|5|5||0|0|1322005|1322005|227|227|
|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|417196|417196|63|63|
|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, $87wmjqwhcaaaz6kax3zry7zsxchdkwfp-g$88wm2wxudqaasjs_24m7wrlepxhuohmv_g$89wmjqwhcaaah-vg5epo028yjdqq97x9-g$90wmjqwhcaaannodp77gmkgg41wdwdqb6g$91wm2wxudqaafhezab91rwymnut75tqhyq$92wm2wxudqaaex_ib_od1rhp_6jh6yax0w$93wm2wxudqaa1ut3e5qykywavspn07ugkq$94wm2wxudqaaf3imxpgod0z5dks3bcsq9g$95wm2wxudqaapuioiirx3ksji_38-kbqzg$96wm2wxudqaafxdv0d_bcsirjvtf5xhusq$97wm2wxudqaap6aikr0c0uhesd52dwfxnq$98wm2wxudqaabfv23e_9t0hcpkrzfbbw6g$99wm2wxudqaa0_q8tjdmqfwd_ol2op2-kq$100wm2wxudqaamrxcuuxdctrr4fikxih_ea$101wm2wxudqaajefmwwomk7w38ewc8w6jka$102wmjqwhcaaa-qje7txhckqevezlp9sbpg$103wm2wxudqaa08bqz3eni1w29hztzkeoqa$104wmjqwhcaaavgqtp6oz7y04zyildjmamq$105wm2wxudqaaftpu8ri3ye9-2olc9xaxpw$106wm2wxudqaairknadh577j2sqbbzw-vha$107wm2wxudqaa99pmwbvxxfwu4ceneofosw$108wmjqwhcaaa_s2l4_i-f3nkpcqjh71bna$109wm2wxudqaaabi_qq3ywryijmhw-elhpg$110wm2wxudqaabrj7yevkmmitrs7va8bcyg$111wmjqwhcaaa64qo6kkh3cslrffqkhokeg$112wm2wxudqaalxwji2l02_bqgr71yneflg$113wm2wxudqaa2h_zuvlthfhsqjbs4caeeg$114wm2wxudqaarixtnbpwwbbq8pgybx1z2q$115wm2wxudqaa6fipzsh3r1oawq4bcpdneg$116wmjqwhcaaak17in1q5np9ydcjvq1dyqa$117wm2wxudqaarhplrk1hv-71ljwnacuciq$118wmjqwhcaaat1zh28pduto6r976gzhxpq$119wmjqwhcaaa0ozebdcf2olqib0j_myveg$120wmjqwhcaaah_f3vxu22s55v_lq4_xvtw$121wm2wxudqaaas2dacvxngrdqpjd-sqsda$122wm2wxudqaaw1errwiexottj7pg8ryaxg$123wm2wxudqaabwa9ifazjbzwbyg2wfhvkw$124wm2wxudqaal-4lr0pjg6z58gbqbrwsma$125wm2wxudqaa_yxn...|1|1|1||0|0|1087|1087|501|501|
|order|select count(1) as total, ifnull(sum(if(od.status > $0, od.payment_fee, $1)), $2) as paymentfee, ifnull(sum(if(od.status > $3, od.offline_payment_fee, $4)), $5) as offlinepaymentfee, ifnull(sum(if(od.status > $6, od.payment_fee + od.offline_payment_fee, $7)), $8) as paytotalfee from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $9 and od.tenant_wechatapp_id = $10 and dt.product_name like concat($11, $12, $13)|1|2|2||0|0|64227|64227|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)|1|1|1||0|0|43334|43334|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)|1|1|1||0|0|44398|44398|11|11|
|employee|select t1.label_task_id as labeltaskid, count(distinct employee_id) as employeenum, count(distinct user_id) as membernum from label_task_employee t1 join label_task_setting t2 on t1.label_task_id = t2.id and t2.disabled = $0 where t1.label_task_id in ($1, $2, $3, $4, $5, $6) group by t1.label_task_id|1|1|1||0|0|484587|484587|6|6|
|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|1|21|21||0|0|500253|500253|0|0|
|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|213683|213683|120|120|
|order|select count(0) from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.tenant_id = $0 and od.tenant_wechatapp_id = $1 and od.order_no like concat($2, $3, $4)|1|1|1||0|0|32174|32174|1|1|
||delete from v4_sales.sjfx_dct_erp_sales_extend1 where create_time < $0|1|4|4||0|0|258431|258431|0|0|
|gift_mail|select count(0) from ( select t.*, tt.can_take_date, tt.shop_id, tt.shop_name, tt.take_shop_name, tt.take_employee_name, ta.recipients, ta.user_tel, concat(ta.area, ta.address) as address, if(t.trade_type = $0 or t.trade_type = $1, pl.id, it.barcode) as barcode, if(t.trade_type = $2 or t.trade_type = $3, pl.default_image_url, p.default_image_url) as defaultimageurl from trade t left join trade_take tt on t.tenant_wechatapp_id = tt.tenant_wechatapp_id and t.id = tt.trade_id left join trade_addr ta on t.tenant_wechatapp_id = ta.tenant_wechatapp_id and t.id = ta.trade_id left join product p on p.id = t.product_id left join platform_product pl on pl.id = t.product_id left join inventory it on it.product_id = t.product_id and it.specification = t.specification left join trade_express te on te.tenant_wechatapp_id = t.tenant_wechatapp_id and te.trade_id = t.id where t.tenant_wechatapp_id = $4 and t.trade_type = $5 order by create_time desc ) tmp_count|1|1|1||0|0|11305|11305|1|1|
|coupon_service|select id, tenant_id, tenant_app_id, template_id, coupon_type, take_effect_way, take_start_day, take_effect_day, begin_time, end_time, source, source_id, can_give, need_booking, use_threshold, wx_card_id, state, create_time, update_time from coupon_push where tenant_id = $0 and tenant_app_id = $1 and wx_card_id = $2|1|1|1||0|0|1820|1820|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)|1|1|1||0|0|119710|119710|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, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153)|1|1|1||0|0|822003|822003|152|152|
|erp_sync|select * from erp_sync.retry_data where (need_erp_member_id = $0 or (need_erp_member_id = $1 and erp_member_id is not null)) and retry_times > $2 order by id|1|1|1||0|0|2832|2832|478|478|
|user_service|select ue.employee_id as employeeid, count(*) as quantity from user_service.user_employee ue where ue.employee_id in ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) and ue.tenant_id = $20 and ue.tenant_wechatapp_id = $21 and ue.shop_id = $22 group by ue.employee_id|1|1|1||0|0|23565|23565|18|18|
|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)|1|1|1||0|0|955589|955589|129|129|
|user_service|select tenant_id, id, tenant_app_id, user_id, wx_user_id, erp_member_id, customer_user_id, wx_union_id, create_time, update_time, external_user_id from tenant_member_bind where ( tenant_id = $0 and tenant_app_id = $1 and user_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $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|1|2|2||0|0|397|397|397|397|
|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|696434|696434|114|114|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7)|1|1|1||0|0|427428|427428|6|6|
|deliver|select * from express_address where user_id = $0 and type = $1|1|1|1||0|0|9570|9570|0|0|
|basepublish|select * from publish_item order by id desc|1|1|1||0|0|6833|6833|6833|6833|
|v4_coupon|select * from v4_coupon.coupon where coupon_no = $0 limit $1|1|1|1||0|0|93620|93620|1|1|
|v4_coupon|select tenant_id, tenant_app_id, member_id, count(1) as total from v4_coupon.coupon where datediff(date_format(end_time, '%y-%m-%d'), date_format(now(), '%y-%m-%d')) = $0 and coupon_status in ($1) group by tenant_id, tenant_app_id, member_id|1|1|1||0|0|94086|94086|2|2|
|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)|1|1|1||0|0|9|9|3|3|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231 ...|1|3|3||0|0|812838|812838|445|445|
|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, $63wm2wxudqaatvs_tz6kxewawzc5n5ddhg$64wm2wxudqaa2yf-xr-hqld5vnxg9diwsa$65wm2wxudqaafdonsfl92fkorn2phl2xqa$66wm2wxudqaat-rol5omfjo1edmvmjrowa$67wm2wxudqaax2igbhxpzx1oewche2cl_q$68wm2wxudqaa6hnax-5z05c6piplwxxvfg$69wm2wxudqaapnxeauduj5zxltt-0rik7q$70wmjqwhcaaajxclash7b0izh8gdfs2xqa$71wmjqwhcaaaauy1dwagcutgpulgvwrfmw$72wm2wxudqaacchs6mjynzzhwwfcyowzlg$73wmjqwhcaaajafffc-aesincuziuszbja$74wmjqwhcaaaa4vassyjcoqyxlwfrao0uq$75wmjqwhcaaas7nt04tzihtcxktt3xmbca$76wm2wxudqaak2ssdwdhek1mco0nfcn9fa$77wm2wxudqaarcey4md6ol_cg7sdiurr4w$78wm2wxudqaax2kpetei3l8cwfoff9uoia$79wm2wxudqaa30enalctogtp12aftxkucq$80wm2wxudqaanhwfmx0jnfid-sdddytb5w$81wm2wxudqaajqrhbffyl32ox2yv-tqmvq$82wm2wxudqaascyvfhrnpmpxpcyadfl-sq$83wm2wxudqaagnzcrvzwc-wwjdbtilc67w$84wm2wxudqaannmt_4_nexpdu2rszp4f-g$85wm2wxudqaaco28scveyo-dzee2yuuanq$86wm2wxudqaaypgor1dmxwrp442rzzaarq$87wmjqwhcaaaxwpjom0uacqiegxndl8hug$88wmjqwhcaaayhgaw1wfivp6c8szdkxneq$89wm2wxudqaakidiikczyumgtjaltafeea$90wm2wxudqaa2kutshhgciit_teei9x0oq$91wm2wxudqaa-xrj6djz5n1shquuu_scmg$92wm2wxudqaaofnojupgrgu4u4h6cuxueq$93wmjqwhcaaavu1po30fmzxba7wj3ew5tq$94wm2wxudqaaivywceyfp4tspill1flsow$95wm2wxudqaa6kgz1hpzmu_9ojayojp95q$96wmjqwhcaaabv6huhbtiurc6ygrlx9aja$97wmjqwhcaaa303rbq29ga1p-apucfekvg$98wm2wxudqaahi971kxfdlizr8d_jj4_lq$99wm2wxudqaauoisfljri1pccjmnagt9og$100wm2wxudqaayqykplgrjktucwuaw1timw$101wm2wxudqaalil51c46cyp86lyuysrxfg$102wm2wxudqaavi3bjp-hp6am7qqzvvfidg$103wmjqwhcaaakcjgkh8lmknastdqlnufkg$104wmjqwhcaaaywwz0o_kryh2ycddhypkdq$105wm2wxudqaaxbn5lnenkpn6xbiyq3pzqa$106wmjqwhcaaag9imhv8weevi3nz6yl_hta$107wm2wxudqaaatqzrxgzwtqsp5plwp5c1g$108wm2wxudqaaeiax2bwtu0yvqmry9raw6g$109wm2wxudqaae-vjrvykqagsip6um9lulq$110wm2wxudqaagdtctczsbfhsgvz9cwe_ha$111wm2wxudqaador6y9d0futlqpupqfsxmg$112wm2wxudqaa20gu3rakrl9y5ixramerla$113wm2wxudqaa6xgm2ayg1w56bykot8-mbq$114wm2wxudqaancflyazh34hqgsw7lmgrew$115wm2wxudqaajs5bahy0yo8zncbeurnbeg$116wmjqwhcaaaqsarhrijrcqda_p3vtx_qg$117wm2wxudqaa6hpyw3o_ppgcdfke_wjkea$118wm2wxudqaapbfepf5-edzmlz85s7yicw$119wmjqwhcaaaw5ozgilx9snmmy_fn-x5ba$120wm2wxudqaa6xivt4wrek6l5aq1gccg5q$121wmjqwhcaaaguefs1u63ijjopixbqpkhg$122wmjqwhcaaaa-7zgz8tthwjovroustb7g$123wm2wxudqaa_g5zoemecbk5qfzygatita$124wm2wxudqaa962ycguhcfui6biamtxdua$125wm2wxudqaar655...|1|1|1||0|0|1328|1328|627|627|
|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)|1|1|1||0|0|1391775|1391775|16|16|
|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)|1|1|1||0|0|21|21|7|7|
|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)|1|1|1||0|0|18|18|6|6|
||delete from tenant.sjfx_dct_erp_sales_detail where create_time < $0|1|1|1||0|0|225143|225143|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, $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)|1|1|1||0|0|1230495|1230495|153|153|
|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, $13wm2wxudqaab8zhtmu2xlbidwp3zz_e2g$14wm2wxudqaalm455hzcrfd3kbhgmqfmna$15wm2wxudqaa7jjgx4wllfjtsklm9rwpvg$16wm2wxudqaayxf9wbcyczrpsbpcqvnevw$17wm2wxudqaagrgligq3lyiexogh2rigqw$18wmjqwhcaaagjszja9za-555v9gbgtzvq$19wmjqwhcaaaybgpjlje32op1wremxw0cq$20wmjqwhcaaa845bwnzjydtmgxwxarxbiq$21wmjqwhcaaavmfezc4lbcyhr4hd5ghtpa$22wm2wxudqaapky5gxxv-asfveu3mn1nvq$23wm2wxudqaa1qb_3bfdac5_a4uqjphuha$24wm2wxudqaajkbfy4acbjebiksngtqkdw$25wm2wxudqaa-olnrhwjfd5pncn5azo8tg$26wmjqwhcaaaajemgo0f_1dcuqy8l_f5sq$27wmjqwhcaaam54lyhqf0t2zutabydxuza$28wmjqwhcaaa2xkmipcwljpe3dsqeditia$29wm2wxudqaacqiwkumy1_topkjpcngt1a$30wm2wxudqaa4hbs9hvxftywcydczwazvq$31wm2wxudqaakthxo881k4wr8izmovacmw$32wmjqwhcaaavzvzhhrnw67gkq5pjxe-qg$33wm2wxudqaalu6_ofxsog1geq0tyshmug$34wm2wxudqaaxl5ja0mjw-3g4r1ldp6n6g$35wm2wxudqaarxsrrce10ln4ecjs_ou7da$36wm2wxudqaatkvf7lcifnv6ssb4_ftzza$37wmjqwhcaaagghdseuwb5-ik0fpn5vkyw$38wm2wxudqaauhby_r85bdnwuypqowyqhw$39wm2wxudqaa7tds8jhb_atcbapaa9cg9a$40wm2wxudqaa45y6zxplyfo2pdsizfh3vw$41wm2wxudqaairys1o9u0jnmsuiitn3_tq$42wm2wxudqaayae_iatgfofhiz27lgrrcw$43wm2wxudqaapykdajeig8kg_xtvne9sag$44wm2wxudqaapsjlumdtexaqdznmodbxdw$45wmjqwhcaaag1dpeyr8lk23osuuij7waq$46wmjqwhcaaapw5ykmtg_tpfa8rnbzio-q$47wmjqwhcaaamwcp7oqbgm_tuc4prceufq$48wm2wxudqaap6fdssnwqadnn9uaxst1rq$49wmjqwhcaaavg_nz3yq3actp_9qvfkwwg$50wmjqwhcaaawo7p0yqjdzmzy9hzm5y63w$51wm2wxudqaaxpo6smj03cekk_zrncnusq$52wmjqwhcaaadqmkgtjb2sluetc73l3gja$53wmjqwhcaaail4v9soefffiit1wulr6ea$54wm2wxudqaa05jjk6sfl9esa45viohbta$55wm2wxudqaasnwghcevguwe9_hslkxdxw$56wm2wxudqaapms-v9_7nxoc5vdhafvrhg$57wmjqwhcaaa-2gpg6hl2vjqr4lkkomjnq$58wmjqwhcaaaxd5hglrw7vlj9zwgea51sg$59wm2wxudqaasaogl725ubkqutzujuchza$60wm2wxudqaam5pqa5jfnooeps96rtx0na$61wmjqwhcaaadfd9b0giksjlj5z4qwarrq$62wm2wxudqaadew5vqhjbbp5ltgru5oooa$63wm2wxudqaaompilrff4-s7tubkpimlqw$64wm2wxudqaaoqcz89dg_xsyivmsitejkq$65wmjqwhcaaaeiont-ebav7s3sopjsvuxw$66wmjqwhcaaat9frrcvytn-0-9vk-zqliq$67wm2wxudqaaquwcn5rrzz8rpq-u28meiw$68wm2wxudqaay2bdi7vaiehkj_pfx2l3qw$69wm2wxudqaaxwmpaejj3kusmvz3yzatbw$70wmjqwhcaaayyfzt4jtnwpzeafvgjyzxg$71wmjqwhcaaa_d2baoakxnkfxcntfqnuig$72wm2wxudqaapwsanc2zkmz1kxtiltiilw$73wmjqwhcaaayep6nzadfh57f2gpw9inja$74wm2wxudqaazeq_gtymbyhwqd9_lccwyg$75wmjqwhcaaatljollbnueg3ebepjsz9sw$76wm2wxudqaal5vp5zeu5jdu7qimry4uqq$77wm2wxudqaatxdwfuynfi_7rakgwzssmw$78wmjqwhcaaa2-p3h1zn2novhyqt-fjhtq$79wm2wxudqaa94vxbfmreuc75hksqswgxw$80wm2wxudqaajvngbo6p39szgowxok2fqg$81wm2wxudqaayf0dat-lu33gf57r6glbxq$82wm2wxudqaacdi6_gc3d2du_telxhvhuq$83wm2wxudqaaz6zwwmzwsswpolr11dfajg$84wm2wxudqaa_v3n3v9le-ktonvxjs67ca$85wmjqwhcaaauidmx67kudhn7ikbpmdb3w$86wm2wxudqaaiku3js-ae-ihnpx4mqb-8w$87wm2wxudqaa0vxvdyhn0h82iirws-n3pg$88wm2wxudqaaucpxqon8gb8oxxdcnpll2w$89wm2wxudqaafhuds-e3nulg-iavwv-1ua$90wm2wxudqaa0yh4ezl-ejd8v4luvrogkq$91wm2wxudqaaofqhfj7kq9rccxsoxun0aw$92wm2wxudqaag8vi0uzyz3a_ukmltkajhw$93wmjqwhcaaae9uoens9xindosvjuzf4aw$94wm2wxudqaasja6qvnf3t4e2lc7wshugg$95wm2wxudqaazb8bxtjyvr1381ekxweyiw$96wmjqwhcaaanutvfnlueoai-uewl3zrla$97wm2wxudqaaiuip963gtxxd344sf0ixua$98wm2wxudqaana0s_lxiddok6th2zmnq_a$99wm2wxudqaaxnkbzp8kf5nejy-esz6w-w$100wm2wxudqaavakr8vshuygux-j_witzvw$101wmjqwhcaaado9xawr6jx-scvcjqqhzqa$102wm2wxudqaaw8jqb1xozsdkrjgn2noilw$103wmjqwhcaaawppfgpkm0xfsiriqvoixvw$104wmjqwhcaaa11hjhy9givh1tcarx94dia$105wm2wxudqaaidt2fybgdmgmymqox5lgfw$106wm2wxudqaaarpr1qbf_kesozfqkgpsyg$107wm2wxudqaaeinu78xju9-ubgcsm-wwma$108wm2wxudqaaith91ppdfyraxgpomvs8ea$109wmjqwhcaaa2aogkzebjnshuama4o4-ug$110wmjqwhcaaa2gsk8zji8ysb2mk_lab6fg$111wm2wxudqaaorcflnhep7liozowznmjzq$112wm2wxudqaad7mvn0rpcebgmfd-cz2f6a$113wm2wxudqaagtb9j-7gijssuqx6yhm2_w$114wm2wxudqaadrwedo095xlgj0fcz0sw-w$115wm2wxudqaalphb_1tii2edm9pzea2qpw$116wm2wxudqaahcgqawdwhduhahtriksbvg$117wm2wxudqaa6qwgnfh2kmjtydpgkq6p-a$118wm2wxudqaanamhnvukq9njircg0kqaga$119wm2wxudqaarvgpjefpgkxfnhe-bwf-na$120wm2wxudqaa6_ljuyt6g706zebb8x_hrq$121wmjqwhcaaazhi_xsnw-yizxd2_xmgg5w$122wmjqwhcaaakzykdot94z8fq4dsaj8zwq$123wm2wxudqaa7n5xkov3kpte9zndf7glaa$124wm2wxudqaawr-zyn-rulyumlmoxflgfq$125wmjqwhcaaa_vpx...|1|1|1||0|0|1515|1515|696|696|
|employee|select * from backlog where tenant_app_id = $0 and employee_id = $1 and status in ($2, $3) and scene = $4 and shop_id = $5 and expire_time >= $6 order by id desc|1|1|1||0|0|202|202|2|2|
|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.activity_id = $2|1|2|2||0|0|21257|21257|1|1|
|coupon_service|select source_id, count(*) as quantity from coupon_service.coupon_push where source = $0 and state = $1 and source_id in ($2, $3, $4, $5) group by source_id|1|1|1||0|0|30381|30381|4|4|
|employee|select ifnull(sum(finish_amount), $0) as addednum from backlog t where t.tenant_id = $1 and t.tenant_app_id = $2 and t.shop_id = $3 and t.scene = $4 and t.begin_time >= $5 and t.expire_time < $6|1|1|1||0|0|2097|2097|1|1|
|message_push|insert into message_push.message_log_back select * from message_push.message_log where tenant_id = $0 and create_time < $1|1|1|1||0|0|38751|38751|0|0|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100wm2wxudqaaaxprptnfbnxixwnlhrveug$101wm2wxudqaaaydyd28urtnlqbdxmu6c5g$102wm2wxudqaawrgldfmmvnq9lmtahvaluq$103wm2wxudqaanjthihtslji1ehius4xncw$104wmjqwhcaaa5ux1-qbq9vtq0cbig0fxqa$105wmjqwhcaaafpthmdffodqnp5mp7zsqgg$106wm2wxudqaaplwq0vto2dave36a-43csq$107wm2wxudqaarpciptjaa4x2ovgmr5ixug$108wm2wxudqaach69u3yvfpgwfsgymjifww$109wm2wxudqaaeljwovr9ypsmjglhjbxuyw$110wm2wxudqaacj72kjuneljpj_0dlilxkw$111wmjqwhcaaafoo9fvuyfh07tfgfheokza$112wmjqwhcaaadzf7zb17widl_dw9fifqxw$113wm2wxudqaawushnzf7iolgtmjcdqqmkw$114wm2wxudqaa6-uy7vccbouchq-17xnvta$115wm2wxudqaaeqr5-yur_u34d8ydj_bhxq$116wmjqwhcaaaoborvrp-dkc6h-49nbkaoq$117wm2wxudqaaqkndrh_4e949nf15ekqpma$118wm2wxudqaahlf0ma7jtlvgif_h0ynmlq$119wmjqwhcaaawv-crnlmrijavj00eotoyg$120wm2wxudqaadnyqu7bfbi6xsfakfpsraa$121wm2wxudqaa0bn2dwzgsfr89ou1k154yw$122wm2wxudqaaunnuvvf3ecjscwt6yz0fig$123wmjqwhcaaam_9huorpsd08go-0qy1ohq$124wm2wxudqaa5ymbbhkgfp2nsjfmvkidbw$125wm2wxudqaa0hmp...|1|1|1||0|0|1814|1814|862|862|
|v4_employee|select left(start_time, $0) as day, count(*) as undo_count, datediff(end_time, $1) as left_days from task_task where task_type = $2 and status = $3 and system_task_type = $4 and finish_time is null and end_time > $5 and shop_id = $6 and employee_id = $7 and tenant_id = $8 and tenant_app_id = $9 group by left(start_time, $10), end_time|1|2|2||0|0|2794|2794|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)|1|3|3||0|0|865920|865920|85|85|
|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)|1|3|3||0|0|696437|696437|117|117|
|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 in ($2, $3) and t.order_status = $4 and t.take_type = $5 and tt.shop_id = $6|1|1|1||0|0|1771|1771|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|2|2||0|0|1846310|1846310|755|755|
|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, $66wm2wxudqaagc4eu9eh4pl1mngn2vb8fq$67wm2wxudqaao4vmygaixetag76dqbptka$68wm2wxudqaaacqrj1la3zfentrqjppnig$69wm2wxudqaafunsptcqyfugvyxgcyktgw$70wm2wxudqaabscdx5um99l5h8ulaevrsa$71wm2wxudqaaqstbh1jiwwlrro7hpdup2a$72wm2wxudqaakz0cstemd5p-y05gnnh9yq$73wm2wxudqaaw4wc6lwuriczv3kis90l2q$74wm2wxudqaahg1x3hm4kt-uypurslulvq$75wm2wxudqaape_rignhpdp73y-yivb2cg$76wmjqwhcaaaazmupk_n5zkmbjjkakjozq$77wm2wxudqaatujbdadtoe7duemrmb58jq$78wm2wxudqaabwvrjikkwhtusj6xf0fota$79wm2wxudqaa8mteuuumutle4gb7o88-wa$80wm2wxudqaaswmtc_byofbu5jnb4olcww$81wm2wxudqaa0qf21lchygnnatvfe6qexa$82wm2wxudqaagwhf8kcklksygem4ul4iyw$83wm2wxudqaa6pidpgexfhjr79ukhi_wpg$84wmjqwhcaaa7opvtlnucsws7ly_l5vdjg$85wm2wxudqaaph0nrf1-qfyoqunqd4rpdg$86wm2wxudqaaylflrwgwq7jxcr9bqeahlg$87wmjqwhcaaamyejsokit9ijxgglapsh6w$88wm2wxudqaakgpv1x_g-xdyfmonorvbtg$89wm2wxudqaa94p3x12fw2lura68xxkx-w$90wm2wxudqaa1mx3are36f-gfoa5dchegq$91wm2wxudqaahynze7bkqpho1hskimggkq$92wm2wxudqaaqv9oskxjwybzk-gxnbbebg$93wm2wxudqaagjbw9qwjx8v7v5dzb1mndw$94wm2wxudqaaodqwwn2bnxm5tn-v7aeo4w$95wm2wxudqaa6qkemk3dyunhkwteuojgca$96wm2wxudqaaswxfxc2xn3fax71ikgrjka$97wm2wxudqaa5e7pqsffbn-raaw3ozld5q$98wm2wxudqaaia80bf5j-uznuy5gooxdxq$99wm2wxudqaa924f2wilnbp48rdzeasb_a$100wm2wxudqaalcrhlgfb1bdhgeyxgtihaq$101wmjqwhcaaakzefbbp5e5aira0ddf_zmw$102wm2wxudqaap_t-aw67voa7upkrkj7fpg$103wm2wxudqaao9ru-xpg5rlmztrkicowjg$104wm2wxudqaain5kvzn0tjwenhknn4j0_w$105wmjqwhcaaawe2wxtid9v955ch-rmnfgq$106wm2wxudqaac6kvudrdfwjdzdsufb1cpa$107wmjqwhcaaar_upiiganhccmhzicli94a$108wm2wxudqaabsf5lififpb6sdj59na_iw$109wmjqwhcaaaojjmhpikjmxyb9sn4a8brg$110wm2wxudqaadbai1lcpb0sjnhds_br02a$111wm2wxudqaaqxkzfbj1sbhp-vwemcgeva$112wm2wxudqaaqtz8m8_a35vzh5zsjj46sw$113wm2wxudqaaa6zl31ozj6taspiukfmp5a$114wm2wxudqaav-64czvqb4-1pf_t_b02og$115wm2wxudqaao7xujbepmstvtd94oc_jzw$116wm2wxudqaazx13oj23301ajowwe7c5dq$117wmjqwhcaaaetqp7kyakxg5xopsf1tfag$118wm2wxudqaaqsy15alqt7xuhpelgyzdbg$119wmjqwhcaaaoq05dehcx76uwgjeyc2grq$120wm2wxudqaazm25xuiick7raeffnzxqla$121wm2wxudqaabf_fyphkf32fc5oepnntka$122wm2wxudqaayuizwgmankyo24zw0zqhza$123wm2wxudqaad9mxne9b7ukf9wqrgqknvq$124wmjqwhcaaafah56czjarupeauzrnj-1w$125wm2wxudqaazdke...|1|1|1||0|0|3564|3564|1745|1745|
|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.order_no like concat($11, $12, $13)|1|1|1||0|0|32174|32174|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)|1|1|1||0|0|543867|543867|132|132|
|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)|1|6|6||0|0|181154|181154|10|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, $39wm2wxudqaaaxkxqmqzp2nonlvdnh7vgg$40wm2wxudqaalkwitokewmdi17fujgytta$41wm2wxudqaaayg48efcmldpmr-kw0fdmw$42wm2wxudqaamsjy5gr0_1vpd22iaphklq$43wm2wxudqaadvbd-sm0ta2otcxuxrmfya$44wm2wxudqaajvna6j0jgsh7fquby__kzq$45wm2wxudqaap1z8gfsfxr8iexcldmtmfq$46wm2wxudqaaubz9z6nfxlposblghdgtwa$47wm2wxudqaa4asbmradza9yiwvvsjay9q$48wm2wxudqaacfvqgsqsj2uwiz9nwajisq$49wm2wxudqaaatcw_z1laocrp9bi_aw0-a$50wm2wxudqaanb5d3l35vazjxj1-7iiwiq$51wm2wxudqaa-emycxpauz97i5-jxchs7q$52wm2wxudqaa6rtrx0icljaj3gz0xcnq6w$53wm2wxudqaa21x25ncaq-zdlxo_gefkia$54wm2wxudqaa71v4hld2z74e8-gtggr2aw$55wm2wxudqaa8k5ma4bjxg0r180e692jhq$56wm2wxudqaapnvop3dyeray_jmdpm60aw$57wm2wxudqaatjxjochtethr7jv_g4zabw$58wm2wxudqaabw5yczmk5ifd1apntdqsvq$59wm2wxudqaa2efhdgxk94mvt3v5l8z5ba$60wm2wxudqaavjdpjizecmju2uc7xfplua$61wm2wxudqaa3ynrfmpqptaaeerppundxw$62wm2wxudqaasa9u7dub2w2xvjume1fp_w$63wm2wxudqaayuh0ezh-o0ppoodn_isnja$64wm2wxudqaafdtjhiobro67tnqmhbb4qw$65wm2wxudqaayberllzmasq9m7x93glqca$66wm2wxudqaaxsm_7nwrwkbo7adjxf9l7w$67wm2wxudqaapsvuzyf_39z_ssilb0yh0q$68wm2wxudqaavzfzl-maahblx2f9wcnmaq$69wm2wxudqaarzahhghbflqru0hjv6tqmw$70wm2wxudqaalkh3mrqcv0vljnn1ksm2za$71wm2wxudqaabyj41pijfirqxc1vf9fk9w$72wm2wxudqaad_zc5ff3suetd-m7bm2f9a$73wm2wxudqaai2qe7kurrxvojdo-hr6spg$74wm2wxudqaayniaxib-rr4alwq7mqnebg$75wm2wxudqaa2udd3fomv2mq1lqyz_4grq$76wm2wxudqaag-dqmqel0hwvlojfzvovjq$77wm2wxudqaagm4bixzerm_f3fwskhjpia$78wm2wxudqaa8jbf5b1iinvs3jmn9xv7uq$79wm2wxudqaacrzucqzpuflxewsicyarkq$80wm2wxudqaa3x2xbbu6mrulf9z-xy4sog$81wm2wxudqaavkgkpgxtvpgnx_krna5hva$82wm2wxudqaau2vgtoazci9s8jd9sx5yjw$83wm2wxudqaalubxg5hnkwu3aalu6vtk2q$84wm2wxudqaamkqyxgvx8wofjar-setvew$85wm2wxudqaaxjr0zg4nf4bygfnwsc0c-g$86wm2wxudqaaoigytuoaxmqespq0bd7f2a$87wm2wxudqaamng8x4saetd12pr_7crckw$88wm2wxudqaaxdvf7u4mzbvwi7vcmbj_oa$89wm2wxudqaawpcdfzexa9_ecglqxxyx_w$90wm2wxudqaamrzidtcj1u4ycl3nx1i1ag$91wm2wxudqaaxpbgc_94dwvrb-mdqbxhlw$92wm2wxudqaahslhhpkgzx8z7hkyw2hz1a$93wm2wxudqaa3hon1ha-kypemue1l_qk-g$94wm2wxudqaaonao8i5nnokuchfxrss_rq$95wm2wxudqaasbgj6u4w7file5zbnvudjq$96wm2wxudqaayvankd8kocbqi9ufbjkdkw$97wm2wxudqaagtnub7vh3jryykj4limilw$98wm2wxudqaapkardi_oew3fynlcqdukbq$99wm2wxudqaan7bz5vgojf87zzgu4hurzg$100wm2wxudqaaddjujavcd9omjqqds-_daw$101wm2wxudqaab5jht69pesuz-gaprkrcta$102wm2wxudqaamvawbvs9s5t-fjnzgu9i_q$103wm2wxudqaa8ytlvk1-lczgqpqwr80q9a$104wm2wxudqaart4ryxzndyapjyjzshy_og$105wm2wxudqaawdincjsz1ljwjpx_nant1a$106wm2wxudqaaa-myut-wpbotj_z1uuxtja$107wm2wxudqaag38ofsi5njctq3gbzn6jkg$108wm2wxudqaajplhhubeefzvum64bngszw$109wm2wxudqaas7qmo3_6-vxwxs6gvw2mfq$110wm2wxudqaaevmswhw11hsnmvn_yhqyxa$111wm2wxudqaa84zz-9yhdeybzc0ywv52va$112wm2wxudqaaffd_v4ts7fdlskz7i5ozra$113wm2wxudqaap9pok013m97z32wn7_nwwa$114wm2wxudqaavzhjwvo9nupqiwtu7fl90w$115wm2wxudqaarjpju028qwmymcnrw-iujq$116wm2wxudqaasgjiw1diygmyhn6g1qfhaq$117wm2wxudqaaxfudfelbdydll-mgz22zhw$118wm2wxudqaaotfvid57u2skcxgd3czyza$119wm2wxudqaaxxpdcamyaxxfdf9tpcmhtg$120wm2wxudqaaz_vh0znxooy1tdxdakf1sg$121wm2wxudqaaumw5cl3yyrbqe7rwpe4vfa$122wm2wxudqaak5bfjodgqb2uamvwhi3fhw$123wm2wxudqaafl6mrwisoomz-gheyxsbpq$124wm2wxudqaa2w2jkm9vpdfynszz9r257g$125wm2wxudqaatgh...|1|1|1||0|0|1574|1574|779|779|
|v4_sales|select count(*) from v4_sales.erp_sales where employee_erp_id = $0 and sales_status = $1 and is_sales = true and tenant_id = $2 and tenant_app_id = $3|1|1|1||0|0|1934|1934|1|1|
|user_service|select count(0) from ( select count(1) from user_source us where us.tenant_id = $0 and us.tenant_wechatapp_id = $1 and us.from_id = $2 and us.shop_id = $3 and us.create_time >= $4 and us.create_time < $5 and us.source_type = $6 and us.from_id is not null and us.shop_id is not null ) table_count|1|2|2||0|0|761|761|1|1|
|sms|select count(0) from ( select a.phone_numbers as phoneno, concat($0, a.sign_name, $1, case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end) as content, a.template_code, a.out_id as outid, a.template_param, a.create_time as sendtime, a.create_time as recevietime, a.code as state, ifnull(ifnull(e.sms_size, $2) * if(a.code = $3, a.send_count, $4), $5) as send_count, a.message, a.source_type from sms_send a left join sms.sms_send_extend e on a.biz_id = e.biz_id left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = $6 where a.tenant_id = $7 and a.tenant_app_id = $8 and a.create_time >= $9 and a.create_time < $10 order by a.create_time desc ) tmp_count|1|2|2||0|0|2485|2485|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)|1|1|1||0|0|773235|773235|139|139|
|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|254688|254688|30|30|
|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|1|1||0|0|1322009|1322009|231|231|
|goods|select * from goods gs where tenant_id = $0 and category_id in ( select id from goods_category where id = $1 or parent_id = $2 ) and status < $3 order by create_time desc|1|1|1||0|0|15017|15017|55|55|
|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|1|5|5||0|0|868923|868923|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)|1|1|1||0|0|865938|865938|94|94|
|coupon_service|select source_id, count(*) as quantity from coupon_service.coupon_push where source = $0 and state = $1 and source_id in ($2) group by source_id|1|1|1||0|0|30374|30374|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)|1|2|2||0|0|821940|821940|89|89|
|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) and (od.status = $5 or od.status = $6 or od.status = $7 or od.status = $8) and ad.shop_id = $9|1|2|2||0|0|45919|45919|1|1|
|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|453728|453728|1|1|
|goods|select count(0) from ( select gs.id, gs.tenant_id, gs.tenant_app_id, gs.category_id, gs.activity_id, gs.goods_name, gs.style_no, gs.base_sale_number, gs.limit_sale, if(gs.status = $0, gs.status, if(t.id is null, $1, $2)) as status, gs.thumbnail_img, gs.express_type, gs.take_stock_day, gs.take_remark, gs.express_fee, gs.create_time, gs.update_time, gs.sale_type, gs.take_start_time, gs.page_id, gs.pay_way, gs.advance_payment, gs.exchange_money, ifnull(sku.minprice, $3) as minprice, ifnull(sku.marketprice, $4) as marketprice, ifnull(sku.totalsalesvolume, $5) as totalsalesvolume, ifnull(sku.totalquantity, $6) as totalquantity, ifnull(number, $7) as skunumber, gs.topping from goods.goods gs left join ( select id, goods_id from goods.goods_up_app gu where gu.tenant_app_id = $8 ) t on gs.id = t.goods_id left join ( select goods_id, min(price) as minprice, max(market_price) as marketprice, sum(sales_volume) as totalsalesvolume, sum(quantity) as totalquantity, count(*) as number from goods.goods_sku where activity_id = $9 group by tenant_id, goods_id ) sku on sku.goods_id = gs.id where gs.tenant_id = $10 and gs.status < $11 order by gs.topping desc, sku.totalsalesvolume desc, gs.id desc ) tmp_count|1|1|1||0|0|62449|62449|1|1|
|coupon_service|select * from coupon_service.coupon where datediff(date_format(end_time, '%y-%m-%d'), date_format(now(), '%y-%m-%d')) = $0 and coupon_state in ($1)|1|393|393||0|0|9557030|9557030|1492|1492|
|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)|1|1|1||0|0|396700|396700|4|4|
