|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|coupon_service|select egc.id, tmp.coupon_name, tmp.coupon_type, tmp.remark, cp.take_effect_way, cp.take_start_day, cp.take_effect_day, date_format(cp.begin_time, '%y-%m-%d') as begin_time, date_format(cp.end_time, '%y-%m-%d') as end_time, egc.limit_grant_time, date_format(egc.grant_begin_time, '%y-%m-%d') as grant_begin_time, date_format(egc.grant_end_time, '%y-%m-%d') as grant_end_time, ifnull(tmp.face_value, $0) / $1 as face_value, tmp.face_value as point, ifnull(tmp.discount, $2) / $3 as discount, tmp.scope, tmp.product_name, if(egc.state = $4, $5, case when cp.end_time is not null and cp.end_time < now() then $6 when egc.limit_grant_time = $7 and egc.grant_end_time < now() then $8 when tgl.put_quantity <= ( select count(*) from coupon_service.employee_give_coupon_log where employee_give_coupon_id = egc.id ) then $9 else $10 end) as state, tr.type as redpacktype, ifnull(tr.min_price, $11) / $12 as minprice from coupon_service.employee_give_coupon egc inner join coupon_service.coupon_push cp on egc.template_id = cp.template_id and cp.source = $13 and egc.id = cp.source_id and cp.state = $14 inner join coupon_service.template tmp on egc.template_id = tmp.id and tmp.state = $15 inner join coupon_service.template_grant_limit tgl on cp.id = tgl.coupon_push_id left join coupon_service.template_redpack tr on tr.template_id = tmp.id where egc.tenant_app_id = $16 and egc.state = $17 and (egc.limit_grant_time = $18 or egc.grant_begin_time <= now()) and (egc.limit_shop = $19 or exists ( select $20 from coupon_service.employee_give_coupon_shop cs where egc.id = cs.employee_give_id and cs.shop_id = $21 )) and egc.limit_role in ($22, $23) order by state asc, egc.id desc limit $24, $25|291|1604|12||0|0|6410453873|26094284|2104|10|
|user_service|select count(*) from user_service.tenant_member_info tmi left join user_service.user_employee ue on tmi.tenant_id = ue.tenant_id and tmi.user_id = ue.user_id and tmi.tenant_app_id = ue.tenant_wechatapp_id where ue.id is null and tmi.shop_id = $0 and tmi.tenant_app_id = $1 and tmi.tenant_id = $2|266|517|5||0|0|4470559|118117|266|1|
|coupon_service|select egc.id, tmp.coupon_name, tmp.coupon_type, tmp.remark, cp.take_effect_way, cp.take_start_day, cp.take_effect_day, date_format(cp.begin_time, '%y-%m-%d') as begin_time, date_format(cp.end_time, '%y-%m-%d') as end_time, egc.limit_grant_time, date_format(egc.grant_begin_time, '%y-%m-%d') as grant_begin_time, date_format(egc.grant_end_time, '%y-%m-%d') as grant_end_time, ifnull(tmp.face_value, $0) / $1 as face_value, tmp.face_value as point, ifnull(tmp.discount, $2) / $3 as discount, tmp.scope, tmp.product_name, if(egc.state = $4, $5, case when cp.end_time is not null and cp.end_time < now() then $6 when egc.limit_grant_time = $7 and egc.grant_end_time < now() then $8 when tgl.put_quantity <= ( select count(*) from coupon_service.employee_give_coupon_log where employee_give_coupon_id = egc.id ) then $9 else $10 end) as state, tr.type as redpacktype, ifnull(tr.min_price, $11) / $12 as minprice from coupon_service.employee_give_coupon egc inner join coupon_service.coupon_push cp on egc.template_id = cp.template_id and cp.source = $13 and egc.id = cp.source_id and cp.state = $14 inner join coupon_service.template tmp on egc.template_id = tmp.id and tmp.state = $15 inner join coupon_service.template_grant_limit tgl on cp.id = tgl.coupon_push_id left join coupon_service.template_redpack tr on tr.template_id = tmp.id where egc.tenant_app_id = $16 and egc.state = $17 and (egc.limit_grant_time = $18 or egc.grant_begin_time <= now()) and (egc.limit_shop = $19 or exists ( select $20 from coupon_service.employee_give_coupon_shop cs where egc.id = cs.employee_give_id and cs.shop_id = $21 )) and egc.limit_role in ($22, $23) order by state asc, egc.id desc limit $24|208|715|11||0|0|2770569176|26094193|1681|10|
|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|77|148|4||0|0|993984|22105|77|1|
|coupon_service|select count(0) from coupon_service.employee_give_coupon_log egcl where egcl.employee_give_coupon_id = $0 and egcl.shop_id = $1 and egcl.employee_id = $2|53|106|4||0|0|22581183|426472|53|1|
|tenant|select count(*) from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.tenant_id = s.tenant_id and sg.tenant_app_id = s.tenant_app_id and sg.id = s.sneak_guest_id join tenant.employee e on e.tenant_id = s.tenant_id and e.id = s.employee_id where s.tenant_id = $0 and s.tenant_app_id = $1 and sg.create_shop_id = $2 and (sg.fail_type is null or sg.fail_type = $3) and s.event_type = $4 and s.create_time between $5 and $6|29|42|2||0|0|76806|4029|29|1|
|corpwx|select id, tenant_id, tenant_app_id, external_user_id, wx_user_id from external_user_bind where (tenant_id = $0 and tenant_app_id = $1 and external_user_id = $2) or (tenant_id = $3 and tenant_app_id = $4 and wx_user_id = $5)|27|47|6||0|0|2859748|195446|16|1|
|comment_service|select * from comment_service.comment_reward where comment_id = $0 limit $1|27|40|3||0|0|9026778|334650|4|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|26|45|5||0|0|244732|26858|401|64|
|coupon_service|select egc.id, tmp.coupon_name, tmp.coupon_type, tmp.remark, cp.take_effect_way, cp.take_start_day, cp.take_effect_day, date_format(cp.begin_time, '%y-%m-%d') as begin_time, date_format(cp.end_time, '%y-%m-%d') as end_time, egc.limit_grant_time, date_format(egc.grant_begin_time, '%y-%m-%d') as grant_begin_time, date_format(egc.grant_end_time, '%y-%m-%d') as grant_end_time, ifnull(tmp.face_value, $0) / $1 as face_value, tmp.face_value as point, ifnull(tmp.discount, $2) / $3 as discount, tmp.scope, tmp.product_name, if(egc.state = $4, $5, case when cp.end_time is not null and cp.end_time < now() then $6 when egc.limit_grant_time = $7 and egc.grant_end_time < now() then $8 when tgl.put_quantity <= ( select count(*) from coupon_service.employee_give_coupon_log where employee_give_coupon_id = egc.id ) then $9 else $10 end) as state, tr.type as redpacktype, ifnull(tr.min_price, $11) / $12 as minprice from coupon_service.employee_give_coupon egc inner join coupon_service.coupon_push cp on egc.template_id = cp.template_id and cp.source = $13 and egc.id = cp.source_id and cp.state = $14 inner join coupon_service.template tmp on egc.template_id = tmp.id and tmp.state = $15 inner join coupon_service.template_grant_limit tgl on cp.id = tgl.coupon_push_id left join coupon_service.template_redpack tr on tr.template_id = tmp.id where egc.tenant_app_id = $16 and egc.state = $17 and (egc.limit_grant_time = $18 or egc.grant_begin_time <= now()) and (egc.limit_shop = $19 or exists ( select $20 from coupon_service.employee_give_coupon_shop cs where egc.id = cs.employee_give_id and cs.shop_id = $21 )) and egc.limit_role in ($22, $23, $24) order by state asc, egc.id desc limit $25|24|36|2||0|0|123418000|6956191|226|10|
|coupon_service|select count(*) from employee_give_coupon_log where tenant_app_id = $0 and coupon_push_id = $1|24|33|2||0|0|396457|29355|24|1|
|user_service|select ue.employee_id as employeeid, count(*) as quantity from user_service.user_employee ue where ue.employee_id in ($0) and ue.tenant_id = $1 and ue.tenant_wechatapp_id = $2 and ue.shop_id = $3 group by ue.employee_id|23|29|1||0|0|118535|12153|23|1|
|tenant|select es.id, es.sales_no, es.sales_date, es.member_erp_id, es.sales_erp_id, es.is_sales from erp_sales es where es.tenant_id = $0 and es.tenant_wechatapp_id = $1 and es.sales_status = $2 and es.sales_no like concat($3, $4) order by es.sales_date desc limit $5|22|98|12||0|0|10193606|1090412|3|1|
|user_service|select count(0) from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id and t2.tenant_app_id = $0 and t2.shop_id = $1 join user_service.user_employee ue on t1.tenant_id = ue.tenant_id and t1.tenant_app_id = ue.tenant_wechatapp_id and t1.user_id = ue.user_id and ue.employee_id = $2 and ue.shop_id = $3 where t1.tenant_id = $4 and t1.tenant_app_id = $5|16|21|2||0|0|448720|119283|16|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)|16|21|2||0|0|15484730|968746|27|3|
|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|15|17|1||0|0|110673|7382|90|6|
|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)|14|31|10||0|0|13547998|967863|15|2|
|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)|13|17|2||0|0|4403432|338790|13|1|
|coupon_service|select egc.id, tmp.coupon_name, tmp.coupon_type, tmp.remark, cp.take_effect_way, cp.take_start_day, cp.take_effect_day, date_format(cp.begin_time, '%y-%m-%d') as begin_time, date_format(cp.end_time, '%y-%m-%d') as end_time, egc.limit_grant_time, date_format(egc.grant_begin_time, '%y-%m-%d') as grant_begin_time, date_format(egc.grant_end_time, '%y-%m-%d') as grant_end_time, ifnull(tmp.face_value, $0) / $1 as face_value, tmp.face_value as point, ifnull(tmp.discount, $2) / $3 as discount, tmp.scope, tmp.product_name, if(egc.state = $4, $5, case when cp.end_time is not null and cp.end_time < now() then $6 when egc.limit_grant_time = $7 and egc.grant_end_time < now() then $8 when tgl.put_quantity <= ( select count(*) from coupon_service.employee_give_coupon_log where employee_give_coupon_id = egc.id ) then $9 else $10 end) as state, tr.type as redpacktype, ifnull(tr.min_price, $11) / $12 as minprice from coupon_service.employee_give_coupon egc inner join coupon_service.coupon_push cp on egc.template_id = cp.template_id and cp.source = $13 and egc.id = cp.source_id and cp.state = $14 inner join coupon_service.template tmp on egc.template_id = tmp.id and tmp.state = $15 inner join coupon_service.template_grant_limit tgl on cp.id = tgl.coupon_push_id left join coupon_service.template_redpack tr on tr.template_id = tmp.id where egc.tenant_app_id = $16 and egc.state = $17 and (egc.limit_grant_time = $18 or egc.grant_begin_time <= now()) and (egc.limit_shop = $19 or exists ( select $20 from coupon_service.employee_give_coupon_shop cs where egc.id = cs.employee_give_id and cs.shop_id = $21 )) and egc.limit_role in ($22, $23, $24) order by state asc, egc.id desc limit $25, $26|13|18|1||0|0|82270212|6542781|114|10|
|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|12|23|3||0|0|3283400|388945|543|236|
|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|12|31|4||0|0|855899|79534|12|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')|12|42|7||0|0|1477766|271596|10014|3141|
|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|12|15|2||0|0|45738|6474|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_id = $1 and sneak_guest_maintain_id = $2|11|14|1||0|0|10645125|967747|5|1|
|order|select max(create_time) from `order`.order_operator_log where tenant_wechatapp_id = $0 and order_id = $1|10|33|4||0|0|6953992|695822|10|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3)|10|13|2||0|0|9676957|967741|25|3|
|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|10|50|10||0|0|430253|78049|10|1|
|corpwx|update external_user set un_assign_flag = $0 where tenant_id = $1 and un_assign_flag = $2|10|23|4||0|0|315198|65974|0|0|
|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|10|11|1||0|0|20648|3697|10|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|9|13|1||0|0|3932107|436978|9|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)|6|11|2||0|0|2621081|436976|0|0|
|tenant|select esd.id, esd.sales_erp_id, es.employee_name, esd.product_barcode, es.sales_no, es.member_erp_id, esd.category_name, es.sales_date, esd.category_erp_id, esd.product_name, esd.cert_no, esd.amount_pay, esd.sales_index, ifnull(ee.not_add_value_plan, $0) as not_add_value_plan from erp_sales_detail esd join erp_sales es on es.tenant_id = esd.tenant_id and es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id left join erp_sales_extend ee on ee.tenant_id = es.tenant_id and es.tenant_wechatapp_id = ee.tenant_wechatapp_id and es.sales_erp_id = ee.sales_erp_id and esd.sales_index = ee.sales_index where esd.tenant_id = $1 and es.sales_status = $2 and es.tenant_wechatapp_id = $3 and esd.product_barcode = $4 order by es.sales_date desc|6|12|4||0|0|78804|27093|15022|5097|
|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|13|5||0|0|50306|16110|681|326|
|warranty_service|select count(*) from warranty where user_id = $0 and tenant_wechatapp_id = $1 and is_disable = $2|5|21|5||0|0|33116|7892|5|1|
|tenant|select count(1) as total from tenant.erp_sales where tenant_id = $0 and tenant_wechatapp_id = $1 and member_erp_id = $2 and sales_status = $3 and is_sales = $4|5|10|3||0|0|90483|22104|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|7|2||0|0|167969|33607|45|9|
|gift_mail|select count(*) from gift_mail.trade t left join gift_mail.trade_take tt on tt.trade_id = t.id where t.tenant_id = $0 and t.tenant_wechatapp_id = $1 and t.trade_type = $2 and t.order_status = $3 and t.take_type = $4 and tt.shop_id = $5|5|6|1||0|0|66207|13242|5|1|
|user_service|select obj.id, obj.total, case when @rowtotal = obj.total then @rownum when @rowtotal := obj.total then @rownum := @rownum + $0 when @rowtotal = $1 then @rownum := @rownum + $2 end as rank_idx from ( select us.from_id as id, count(1) as total from user_source us where us.tenant_id = $3 and us.tenant_wechatapp_id = $4 and us.shop_id = $5 and us.create_time >= $6 and us.create_time < $7 and us.source_type = $8 and us.from_id is not null and us.shop_id is not null group by us.from_id order by count(1) desc ) obj, ( select @rownum := $9, @rowtotal := null ) r|5|13|5||0|0|48389|15150|42|15|
|employee|update backlog_system set status = $0, finish_time = now() where tenant_app_id = $1 and scene = $2|5|17|7||0|0|3747094|927887|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)|5|10|5||0|0|4838509|967754|35|9|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7)|5|5|1||0|0|4838498|967721|29|8|
|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|5|7|3||0|0|572413|426651|5|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.id in ( select t.sneak_guest_id from tenant.sneak_guest_maintain t where t.tenant_app_id = $2 and t.shop_id = $3 and t.event_type = $4 and t.intention_info regexp $5 ) and sg.status = $6|4|10|4||0|0|51188|12818|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)|4|4|1||0|0|3871857|968745|26|8|
|coupon_service|select * from coupon_service.coupon_not_received where tenant_id = $0 and tenant_app_id = $1 and wx_user_id = $2 and status = $3 and (expire_time > now() or expire_time is null)|4|5|1||0|0|1629183|409394|0|0|
|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|4|8|2||0|0|169354|63301|4|1|
|order|select id from order_operator_log where tenant_wechatapp_id = $0 and order_id = $1 and src_child_status = $2 and dst_child_status = $3 order by create_time desc limit $4|4|11|3||0|0|2782437|695802|0|0|
|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|10|6||0|0|734599|373614|365|295|
|authorization_service|update user_login_token set status = $0 where login_token in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110|3|4|2||0|0|6745|3528|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)|3|3|1||0|0|2903109|967730|18|9|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)|3|3|1||0|0|2903301|967856|19|14|
|comment_service|select c.*, cr.busi_id, cr.give_prize, cr.give_type from comment_service.comment c left join comment_service.comment_reward cr on cr.comment_id = c.id where c.id in ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)|3|3|1||0|0|1003569|334523|60|20|
|tenant|select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, sg.maintain_level, sg.maintain_employee_id, sg.create_time, sg.last_maintain_date, ey.employee_name as maintainemployeename, sg.status, sg.finish_date, sg.next_maintain_date from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id where sg.tenant_app_id = $0 and sg.create_shop_id = $1 and sg.maintain_employee_id = $2 and sg.status = $3 order by sg.id desc limit $4, $5|3|4|1||0|0|1303149|434592|3|1|
|tenant|select id, tenant_id, tenant_app_id, sneak_guest_maintain_id, sneak_guest_id, url, create_time, update_time from sneak_guest_maintain_file where tenant_app_id = $0 and sneak_guest_maintain_id in ($1, $2, $3, $4)|3|6|3||0|0|2904077|968558|10|5|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)|3|4|1||0|0|397667|228480|33|11|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3)|3|4|1||0|0|488554|426612|6|2|
|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|16|5||0|0|127246|78806|3|1|
|gift_mail|select count(0) from ( select p.id, p.product_name, p.tag_price, i.volume, p.product_status as status, p.default_image_url, i.quantity, i.market_price, if(prp.id is null, false, true) as hasrecommend from gift_mail.platform_product p join gift_mail.platform_inventory i on i.product_id = p.id left join gift_mail.platform_recommend_product prp on prp.tenant_app_id = $0 and prp.is_recommend = true and prp.platform_product_id = p.id where prp.id is null and p.product_status = $1 order by i.volume desc, p.tag_price asc, p.id desc ) tmp_count|2|2|1||0|0|12802|6401|2|1|
|employee|select t1.employee_id, t1.shop_id, t1.shouldaddnum, t1.addednum, ifnull(t2.marklabelnum, $0) as marklabelnum from ( select t.employee_id, t.shop_id, t.task_amount as shouldaddnum, t.finish_amount as addednum from employee.backlog t where t.tenant_id = $1 and t.tenant_app_id = $2 and t.shop_id = $3 and t.begin_time >= $4 and t.expire_time < $5 and t.scene = $6 ) t1 left join ( select t.employee_id, sum(t.finish_amount) as marklabelnum from employee.backlog t where t.tenant_id = $7 and t.tenant_app_id = $8 and t.begin_time >= $9 and t.expire_time < $10 and t.scene = $11 group by t.employee_id ) t2 on t1.employee_id = t2.employee_id order by t1.shop_id, t1.employee_id|2|6|3||0|0|626612|313314|15|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, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)|2|2|1||0|0|1936074|968392|30|20|
|tenant|select es.id, es.sales_no, es.sales_date, es.sales_erp_id, es.amount, ifnull(shop.shop_name, ed.dept_name) as dept_name, es.employee_name from tenant.erp_sales es join tenant.erp_department ed on ed.dept_erp_id = es.dept_erp_id and ed.tenant_id = $0 left join tenant.tenant_wechatapp_shop shop on shop.dept_erp_id = ed.dept_erp_id and shop.tenant_wechatapp_id = $1 where es.member_erp_id = $2 and es.tenant_id = $3 and es.tenant_wechatapp_id = $4 and es.sales_status = $5 and not exists ( select i.id from tenant.erp_sales_ignore i where i.tenant_id = $6 and i.tenant_app_id = $7 and es.sales_erp_id = i.erp_sales_id ) order by es.sales_date desc limit $8|2|3|1||0|0|6896004|3448002|20|10|
|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|2|3|2||0|0|11918|6241|2|1|
|wx_gateway|select count(0) from wx_template_msg where tenant_id = $0 and tenant_app_id = $1 and create_time between $2 and $3|2|10|5||0|0|34157|17081|2|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, $7|2|2|1||0|0|868592|434303|6|5|
|tenant|select shop.*, dept.dept_name, count(es.id) as employeescount from tenant_wechatapp_shop shop left join erp_department dept on shop.dept_erp_id = dept.dept_erp_id and shop.tenant_id = dept.tenant_id left join employee_shop es on shop.id = es.shop_id and es.status in ($0, $1) where shop.tenant_wechatapp_id = $2 and shop.status in ($3, $4) and shop.status = $5 group by shop.id order by shop.create_time desc limit $6|2|2|1||0|0|150280|75174|40|20|
|coupon_service|select cu.id, cu.coupon_name, cu.coupon_type, cu.coupon_no, cu.source as couponchannel, cu.coupon_state, ce.user_name, ce.creator_user_name as creatorname, if(coupon_type in ($0, $1), cu.face_value, round(cu.face_value / $2, $3)) as facevalue, cu.begin_time, cu.end_time, ce.remark, ce.mobile_no, ce.creator_mobile_no, cu.create_time, cu.user_id, round(cu.balance / $4, $5) as balance, ce.source_user_id, ce.source_user_type, ce.member_source_shop from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $6 and ce.tenant_app_id = $7 and ce.id = cu.id where cu.tenant_id = $8 and cu.tenant_app_id = $9 and cu.coupon_name like concat(concat($10, $11), $12) and (cu.coupon_state = $13 or (cu.coupon_state = $14 and ce.writeoff_time is not null)) limit $15|2|5|2||0|0|276572|138286|40|20|
|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|2|2|1||0|0|6899612|3449806|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)|2|2|1||0|0|1935389|967718|7|5|
|tenant|select count(0) from ( select sg.id, sneak_guest_no, sg.status, user_id, smg.time, if(sg.status = $0, e.employee_name, $1) as maintainemployeename, smg._count as maintainnum, sg.update_employee_id from tenant.sneak_guest sg join tenant.employee e on e.id = sg.maintain_employee_id join ( select sneak_guest_id, count(*) as _count, min(create_time) as time from tenant.sneak_guest_maintain where tenant_id = $2 and tenant_app_id = $3 and shop_id = $4 and employee_id = $5 and event_type in ($6, $7, $8) and create_time between $9 and $10 group by sneak_guest_id ) smg on smg.sneak_guest_id = sg.id where sg.tenant_id = $11 and sg.tenant_app_id = $12 and (sg.fail_type is null or sg.fail_type = $13) ) tmp_count|2|8|7||0|0|107879|77329|2|1|
|tenant|select count(0) from ( select sg.id, sg.sneak_guest_no, sg.user_id, sg.user_type, ey.employee_name as maintainemployeename, sg.last_maintain_date, ws.shop_name as createshopname, sg.status, sg.create_time, t1.employee_name as createemployeename, sg.finish_date, sg.fail_type, gs.sales_id, gs.sales_no, w1.shop_name as salesshopname, gs.sales_date, gs.product_name, gs.product_quantity, gs.amount as salesamount, if(sg.status = $0, case when sg.fail_type = $1 then $2 when sg.fail_type = $3 then $4 else ifnull(emp.employee_name, $5) end, $6) as operfailemployeename from sneak_guest sg left join employee ey on sg.maintain_employee_id = ey.id left join tenant_wechatapp_shop ws on sg.create_shop_id = ws.id left join employee t1 on sg.create_employee_id = t1.id left join sneak_guest_sales gs on sg.tenant_app_id = gs.tenant_app_id and sg.id = gs.sneak_guest_id left join tenant_wechatapp_shop w1 on gs.shop_id = w1.id left join tenant.sneak_guest_maintain gm on gm.sneak_guest_id = sg.id and gm.event_type = $7 left join employee emp on gm.employee_id = emp.id where sg.tenant_app_id = $8 order by sg.id desc ) tmp_count|2|5|2||0|0|1222328|611164|2|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|2|2|1||0|0|791903|434238|13|10|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.coupon_name like concat(concat($4, $5), $6)|2|37|26||0|0|280008|140004|2|1|
|user_service|select * from user_service.erp_member em join user_service.erp_member_info emi on em.tenant_id = emi.tenant_id and em.tenant_wechatapp_id = emi.tenant_wechatapp_id and em.member_erp_id = emi.erp_member_id where em.tenant_id = $0 and length(em.mobile_no) = $1 limit $2, $3|2|2|1||0|0|90112|51200|2048|1024|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.coupon_name like concat(concat($4, $5), $6) and (cu.coupon_state = $7 or (cu.coupon_state = $8 and ce.writeoff_time is not null))|2|22|18||0|0|280008|140004|2|1|
|corpwx|select t.tenant_id as tenantid, t.wx_user_id as wxuserid, t.union_id as wxunionid, t.user_id as externaluserid, ifnull(et.raw_external_user_id, t.old_user_id) as rawexternaluserid, t.corp_user_id as employeecorpuserid from corpwx.external_user t left join corpwx.external_userid_transform et on t.tenant_id = et.tenant_id and t.user_id = et.external_user_id where t.tenant_id = $0 and t.user_id in ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $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|2|2|1||0|0|3342|1891|1572|911|
|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|2|2|1||0|0|674817|337456|2|1|
|coupon_service|select cu.id, cu.coupon_name, cu.coupon_type, cu.coupon_no, cu.source as couponchannel, cu.coupon_state, ce.user_name, ce.creator_user_name as creatorname, if(coupon_type in ($0, $1), cu.face_value, round(cu.face_value / $2, $3)) as facevalue, cu.begin_time, cu.end_time, ce.remark, ce.mobile_no, ce.creator_mobile_no, cu.create_time, cu.user_id, round(cu.balance / $4, $5) as balance, ce.source_user_id, ce.source_user_type, ce.member_source_shop from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $6 and ce.tenant_app_id = $7 and ce.id = cu.id where cu.tenant_id = $8 and cu.tenant_app_id = $9 and cu.coupon_name like concat(concat($10, $11), $12) limit $13|2|4|2||0|0|276500|138250|40|20|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23)|2|4|2||0|0|194838|152184|44|22|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3|2|33|24||0|0|288420|144210|2|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|2|3|2||0|0|11910|6235|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|7|3||0|0|1616967|829400|698|366|
|employee|select count(*) from employee.backlog where tenant_id = $0 and tenant_app_id = $1 and shop_id = $2 and status = $3 and expire_time between $4 and $5|2|3|1||0|0|21290|10706|2|1|
|wx_gateway|select id, tenant_id, tenant_app_id, wx_template_id, employee_id, busi_id, busi_type, url, push_time, category, title, content, status, retry_amount, remark, create_time, update_time, del_flag from wx_template_push where push_time <= $0 and status = $1 and category = $2 and del_flag = $3|1|1|1||0|0|6727|6727|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)|1|1|1||0|0|236468|236468|61|61|
|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|1|1|1||0|0|78690|78690|10|10|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52)|1|1|1||0|0|42916|42916|51|51|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2 and maintain_employee_id = $3|1|1|1||0|0|6838|6838|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)|1|1|1||0|0|423697|423697|19|19|
||load data local infile $0 replace into table user_service.erp_member character set utf8mb4 fields terminated by $1 lines starting by $2 (tenant_id, tenant_wechatapp_id, member_erp_id, employee_erp_id, grade_erp_id, card_no, dept_erp_id, mobile_no, consumption_integral, user_name, @sex, @birthday, @birthday_is_lunar, @home_address, @memorialday, @memorialday_name, @memorialday_is_lunar, @interested, @amount, erp_create_time, status) set update_time = now()|1|1|1||0|0|0|0|0|0|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10, $11) and t.scene = $12 and t.begin_time >= $13 and t.expire_time < $14|1|2|2||0|0|7106|7106|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)|1|1|1||0|0|250121|250121|74|74|
|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|529969|529969|80|80|
|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)|1|1|1||0|0|967857|967857|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)|1|3|3||0|0|792638|792638|94|94|
|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)|1|1|1||0|0|826383|826383|140|140|
|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)|1|1|1||0|0|112367|112367|17|17|
|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|1|1||0|0|171101|171101|2|2|
|value_added|select id, tenant_wechatapp_id as tenantwechatappid, user_id as userid, template_id as templateid, sales_erp_id as saleserpid, product_name as productname, shop_name as shopname, product_barcode as productbarcode, amount_total as amounttotal, amount_pay as amountpay, amount_added as amountadded, state as state, add_days, added_percent_per_day as addedpercentperday, devalue_percent_per_day as devaluepercentperday, keeping_days as keepingdays, exchange_days as exchangedays, coupon_user_id as couponuserid, sales_index as salesindex, start_add_time as createtime, date_add(start_add_time, interval add_days - $0 day), date_add(start_add_time, interval add_days + keeping_days - $1 day) from value_added_user where state = $2 and start_add_time = date_add(curdate(), interval $3 * (add_days + keeping_days - $4) day)|1|1|1||0|0|1636501|1636501|957|957|
|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 ue.tenant_wechatapp_id = tu.tenant_app_id and ue.user_id = tu.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, $157|1|1|1||0|0|2210|2210|442|442|
|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|81|81||0|0|7661527|7661527|1905|1905|
|employee|select date_format(t.create_time, '%d') as monthday, ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9) and t.scene = $10 and t.begin_time >= $11 and t.expire_time < $12 group by date_format(t.create_time, '%d')|1|1|1||0|0|3749|3749|31|31|
|user_service|select us.from_id as id, count(1) as total from user_source us where us.tenant_id = $0 and us.tenant_wechatapp_id = $1 and us.shop_id = $2 and us.create_time >= $3 and us.create_time < $4 and us.source_type = $5 and us.from_id is not null and us.shop_id is not null group by us.from_id order by count(1) desc|1|1|1||0|0|15145|15145|6|6|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26)|1|1|1||0|0|363202|363202|25|25|
|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|1636501|1636501|1842|1842|
|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)|1|1|1||0|0|846768|846768|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)|1|2|2||0|0|64082|64082|3|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, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99)|1|1|1||0|0|494500|494500|98|98|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub(now(), interval $0 day)|1|43|43||0|0|1159785|1159785|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, \...|1|1|1||0|0|759800|759800|645|645|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58)|1|1|1||0|0|323726|323726|57|57|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $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)|1|1|1||0|0|826323|826323|110|110|
|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)|1|1|1||0|0|354578|354578|0|0|
|user_service|update user_service.tenant_member_info t1 join user_service.user_employee t2 on t1.tenant_id = t2.tenant_id and t1.tenant_app_id = t2.tenant_wechatapp_id and t1.user_id = t2.user_id set t1.shop_id = $0, t2.shop_id = $1 where t1.tenant_id = $2 and t1.tenant_app_id = $3 and t2.employee_id = $4 and t1.shop_id = $5|1|1|1||0|0|2532|2532|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)|1|1|1||0|0|82320|82320|13|13|
||delete from user_service.erp_member where tenant_id = $0|1|3|3||0|0|28368|28368|0|0|
|tenant|select sp.id as shopid, sp.shop_name as shopname, ifnull(sum(tt.maintaincount), $0) as maintaincount, ifnull(sum(tt.maintainnum), $1) as maintainnum, ifnull(sum(tt.successnum), $2) as successnum, ifnull(sum(tt.failnum), $3) as failnum, ifnull(sum(tt.salemoney), $4) as salemoney from tenant.tenant_wechatapp_shop sp left join ( select g.create_shop_id as shop_id, count(1) as maintaincount, count(distinct t.sneak_guest_id) as maintainnum, $5 as successnum, $6 as failnum, $7 as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id where g.tenant_app_id = $8 and (g.fail_type is null or g.fail_type = $9) and t.event_type in ($10, $11, $12) and t.create_time >= $13 and t.create_time < $14 group by g.create_shop_id union all select g.create_shop_id as shop_id, $15 as maintaincount, $16 as maintainnum, count(distinct t.sneak_guest_id) as successnum, $17 as failnum, sum(sgs.`amount`) as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id join tenant.sneak_guest_sales sgs on g.id = sgs.sneak_guest_id where g.tenant_app_id = $18 and t.event_type in ($19) and t.create_time >= $20 and t.create_time < $21 group by g.create_shop_id union all select g.create_shop_id as shop_id, $22 as maintaincount, $23 as maintainnum, $24 as successnum, count(distinct t.sneak_guest_id) as failnum, $25 as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id where g.tenant_app_id = $26 and g.fail_type = $27 and t.event_type in ($28) and t.create_time >= $29 and t.create_time < $30 group by g.create_shop_id ) tt on sp.id = tt.shop_id where sp.status = $31 and sp.tenant_wechatapp_id = $32 group by sp.id, sp.shop_name order by sp.id|1|1|1||0|0|779294|779294|24|24|
|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)|1|1|1||0|0|39234|39234|15|15|
|employee|select date_format(t.create_time, '%d') as monthday, ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10, $11, $12) and t.scene = $13 and t.begin_time >= $14 and t.expire_time < $15 group by date_format(t.create_time, '%d')|1|2|2||0|0|9314|9314|31|31|
|value_added|select t1.id, t2.sales_no as salesno, date_format(t2.sales_date, '%y-%m-%d') as salesdate, date_format(t1.start_add_time, '%y-%m-%d') as valueadddate, t2.dept_erp_id as shopid, t1.shop_name as shopname, t2.employee_erp_id as userid, t2.employee_name as username, t1.product_name as productname, t1.amount_pay as amountpay, t1.id as valueaddno, t1.amount_added as valueaddamount, t1.state, if(t1.state = $0, t1.coupon_user_id, null) as valueaddcoupon, t1.user_id as memberuserid from value_added.value_added_user t1 join value_added.`value_added_user_extend` t2 on t1.id = t2.id where t1.tenant_wechatapp_id = $1 and exists ( select null from value_added.value_added_category t3 join value_added.value_added_template t4 on t3.template_id = t4.id and t4.is_disable = $2 where t1.tenant_wechatapp_id = t3.tenant_wechatapp_id and t2.category_erp_id = t3.erp_product_category_id ) and t2.sales_date >= $3 and t2.sales_date < $4 and t1.state != $5 limit $6|1|3|3||0|0|36035|36035|5|5|
|coupon_service|select count(0) from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.tenant_id = $0 and ce.tenant_app_id = $1 and ce.id = cu.id where cu.tenant_id = $2 and cu.tenant_app_id = $3 and cu.create_time >= $4 and cu.create_time <= $5|1|1|1||0|0|5720|5720|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)|1|1|1||0|0|356911|356911|44|44|
|export|select coupon_id, create_time as writeofftime, ifnull(employee_name, user_name) writeoffusername, shop_name from coupon_service.coupon_write_off_log where tenant_app_id = $0 and coupon_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, $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, ...|1|9|9||0|0|71457|71457|71457|71457|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6, $7, $8, $9) and t.create_time >= $10 and t.create_time < $11 group by date_format(t.create_time, '%d')|1|2|2||0|0|3852|3852|31|31|
|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|1|1|1||0|0|6838|6838|1|1|
|mysql|delete from message_push.message_log where create_time < date_sub(now(), interval $0 day)|1|83|83||0|0|2979727|2979727|0|0|
||load data local infile $0 replace into table user_service.erp_member_info character set utf8mb4 fields terminated by $1 lines starting by $2 (tenant_id, tenant_wechatapp_id, erp_member_id, @employee_erp_id, @grade_erp_id, @card_no, @dept_erp_id, mobile_no, @consumption_integral, user_name, sex, birthday, birthday_is_lunar, home_address, memorialday, memorialday_name, memorialday_is_lunar, interested, amount, erp_create_time, @status) set update_time = now()|1|1|1||0|0|0|0|0|0|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9) and t.scene = $10 and t.begin_time >= $11 and t.expire_time < $12|1|1|1||0|0|3687|3687|1|1|
|coupon_service|select count(*) from coupon_not_received where tenant_app_id = $0 and coupon_push_id = $1 and status = $2|1|1|1||0|0|407783|407783|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153)|1|2|2||0|0|747638|747638|152|152|
|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|22|22||0|0|1636485|1636485|0|0|
|value_added|update value_added_user set state = $0 where state = $1 and tenant_id = $2 and tenant_wechatapp_id = $3 and user_id = $4 and product_barcode = $5|1|2|2||0|0|158|158|0|0|
|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|1|1|1||0|0|0|0|0|0|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)|1|1|1||0|0|200539|200539|16|16|
|user_service|select ue.id as useremployeeid, ue.tenant_id as tenantid, ue.tenant_wechatapp_id as tenantappid, ue.shop_id as shopid, tu.user_id as userid, tu.user_name as nickname, tu.user_name as username, tu.mobile_no as mobileno, tu.head_img_url as headimgurl from user_service.user_employee ue join user_service.tenant_member tu on tu.tenant_id = ue.tenant_id and ue.tenant_wechatapp_id = tu.tenant_app_id and ue.user_id = tu.user_id where ue.tenant_id = $0 and ue.tenant_wechatapp_id = $1 and ue.employee_id = $2 and ue.shop_id = $3|1|1|1||0|0|6050|6050|3025|3025|
|tenant|select sum(tt.maintaincount) as maintaincount, sum(tt.maintainnum) as maintainnum, sum(tt.successnum) as successnum, sum(tt.failnum) as failnum, sum(tt.salemoney) as salemoney from ( select count(1) as maintaincount, count(distinct t.sneak_guest_id) as maintainnum, $0 as successnum, $1 as failnum, $2 as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id where g.tenant_app_id = $3 and (g.fail_type is null or g.fail_type = $4) and t.event_type in ($5, $6, $7) and t.create_time >= $8 and t.create_time < $9 union all select $10 as maintaincount, $11 as maintainnum, count(distinct t.sneak_guest_id) as successnum, $12 as failnum, sum(sgs.`amount`) as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id join tenant.sneak_guest_sales sgs on g.id = sgs.sneak_guest_id where g.tenant_app_id = $13 and t.event_type in ($14) and t.create_time >= $15 and t.create_time < $16 union all select $17 as maintaincount, $18 as maintainnum, $19 as successnum, count(distinct t.sneak_guest_id) as failnum, $20 as salemoney from tenant.sneak_guest g join tenant.sneak_guest_maintain t on t.sneak_guest_id = g.id where g.tenant_app_id = $21 and g.fail_type = $22 and t.event_type in ($23) and t.create_time >= $24 and t.create_time < $25 ) tt|1|1|1||0|0|663410|663410|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)|1|8|8||0|0|328691|328691|77|77|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33)|1|1|1||0|0|317011|317011|32|32|
|employee|select date_format(t.create_time, '%d') as monthday, ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10, $11) and t.scene = $12 and t.begin_time >= $13 and t.expire_time < $14 group by date_format(t.create_time, '%d')|1|2|2||0|0|7168|7168|31|31|
|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|1|1|1||0|0|7388|7388|6|6|
|employee|update backlog set leave_flag = $0 where tenant_app_id = $1 and employee_id = $2|1|1|1||0|0|2071|2071|0|0|
|tenant|select count(*) from sneak_guest where tenant_app_id = $0 and status = $1 and create_shop_id = $2|1|2|2||0|0|8943|8943|1|1|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177)|1|1|1||0|0|757855|757855|176|176|
|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.tenant_member_bind tmb on tm.tenant_id = tmb.tenant_id and tm.id = tmb.id left join user_service.wx_user wu on tmb.wx_user_id = wu.id where tm.tenant_id = $0 and tm.tenant_app_id = $1 and tm.user_id not 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|3|3||0|0|149586|149586|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)|1|1|1||0|0|297829|297829|70|70|
|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, ...|1|1|1||0|0|2500|2500|500|500|
|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, $24wm2wxudqaaxxkieq98ob9gk7v7sh_uyg$25wm2wxudqaae1yg_q5kzomqnusvhpcx7w$26wm2wxudqaa9wgkqa-zgoaqmxkqawxdca$27wm2wxudqaajqyqggkijuelbrmkcjxeza$28wm2wxudqaazyq7_xdgv9ggpgm6dwxyjg$29wm2wxudqaaqeafi5ygs4mj4t-y40cdrw$30wm2wxudqaakd5bv-9nwrqcef7fgvkb8a$31wm2wxudqaa8z991zh3nxtiojaysvynfg$32wm2wxudqaacm3pe2wsp8sy5ltfkhfj8q$33wm2wxudqaalorulhpjzdoln-lb3syecw$34wm2wxudqaaly6e2cm8dzcb-caewjjnaq$35wm2wxudqaablvax3e2_axzy1rtrwet7g$36wm2wxudqaaxqoozi7aehhyrxykwuamna$37wm2wxudqaagknnwhhj4xpwpmwjqbzvtw$38wm2wxudqaau-hqu0wfie8nuk9878qpba$39wm2wxudqaa-m_jjys9wrs1wdsa0eu49w$40wm2wxudqaa4d2sjzuownwrat3hfeqdaa$41wm2wxudqaapzocvzg3edw3e4rvl1ixdq$42wm2wxudqaa9ffyt0wbhtxv5nylqnegaw$43wm2wxudqaaxk1_tnlc5s7c3npmcwkota$44wm2wxudqaan4dirtoqact2lpyrjbta6q$45wm2wxudqaafljmu-fkpfbleqora344zg$46wm2wxudqaasaopguo4ldjeygmklrowoq$47wm2wxudqaav5wl63trfzgulcr_b878ha$48wm2wxudqaasecoqjmqbptngyzrjyzmng$49wm2wxudqaao5dmhkteouhwzttyz434kg$50wm2wxudqaaabsssvphemu9kxbmb4ubfa$51wm2wxudqaafyf6grdyjzguxwwuorwamg$52wm2wxudqaac9o2glnq9t9rrh-hk98adw$53wm2wxudqaarbfmvguwjyioluvbp610aa$54wm2wxudqaabroqsmnctua14l2bhbgmqq$55wm2wxudqaaha8w7ete6yka1osykzt5va$56wm2wxudqaagudnrcq1rgr3lep9zsg2iq$57wm2wxudqaa-oymr_3j48t5osygagjana$58wm2wxudqaa86x3d2tbzdnvhnd7owyj-q$59wm2wxudqaaqtobj_uxtm2uuzfnzc19la$60wm2wxudqaaq0wmxzazswzt7rau7jvqww$61wm2wxudqaauoq_lbtlretma3cz6bifwq$62wm2wxudqaawahfblmiohzlwwrgv3qh8a$63wm2wxudqaauqi8fny2wvnyajscmahttq$64wm2wxudqaa3r9o_zkuckxliff4v6kwsg$65wm2wxudqaa_oyrtee44qdwxhqqh0dulq$66wm2wxudqaah0u5scqbn_e_vemvl-tfja$67wm2wxudqaaomxj0p37uuryjuc1lxqtua$68wm2wxudqaagfk_vdwbhocpvcz4vwmzeg$69wm2wxudqaag5nflkq4ch7llxpswiqxfq$70wm2wxudqaaivjmjm1gxz8drzaynssiha$71wm2wxudqaazekajvzj5jd0pbcti1smea$72wm2wxudqaaltgscfon0owqlho_sdvvcq$73wm2wxudqaahmo1tebyq81fx7cdkgsxoq$74wm2wxudqaabyb5ghwl2nqucu9xyqvrcg$75wm2wxudqaakz61jnl-3kg2oqk_y7i_va$76wm2wxudqaaquy_rl6wyhowc_0heqytnw$77wm2wxudqaaw85jheir_mnfcm0181rs9q$78wm2wxudqaakk7i_b4mpochpcxnzga-aa$79wm2wxudqaax9bg0h2vaum4eulykvxg4q$80wm2wxudqaauf1tdycaqtv76dg6vaqoiq$81wm2wxudqaaoalbh89wmpf6hvcascye8g$82wm2wxudqaamrf1orenar8iu6jt5jzp7a$83wm2wxudqaatawlqwso4r_kwobnrw7twq$84wm2wxudqaadlj5e4z6wlzzdb6lm0d82w$85wm2wxudqaa82palwvss9mb07pdtonkbg$86wm2wxudqaaafrjs73yyphnsikf4ht1na$87wm2wxudqaarxwwwjq4xw15x9wog5cc0a$88wm2wxudqaa5lpwfeq7eapwrkyljdqnmw$89wm2wxudqaablag6blstf4xuxgs7v2jgq$90wm2wxudqaa5fy4jafbdwyhk-zwjjo43q$91wm2wxudqaauali5opj1hptovztbyb0jq$92wm2wxudqaakjxda-v0sp0n2hgekendhg$93wm2wxudqaaa4p0mmewplwxffjjv3ntsg$94wm2wxudqaaky-ulovzo__ck1iednl3ma$95wm2wxudqaatnjd9bzoxibohliu1bmp6a$96wm2wxudqaaw5xm9qiu1v4cksw1xujv9q$97wm2wxudqaacnfuwc5u_4m7flsn38zk5a$98wm2wxudqaajzc2ajnkcuqa3eu1pbji2q$99wm2wxudqaaihe62vt9smqdcxope1sbow$100wm2wxudqaa3m73s-gqyqbzss7nqld8pw$101wm2wxudqaasmmvgs3o28nftokfpqoeow$102wm2wxudqaax3bwgasjuadegpjal0_flg$103wm2wxudqaas0zz-4c6u_zz0gf4hewcoa$104wm2wxudqaakvzeuishldyzr5s-bntd3w$105wm2wxudqaazktklq1yxywfylcvw9q-yw$106wm2wxudqaawbmdmj7rbk1pkyuwhw_gsq$107wm2wxudqaaklvaoii7fif5caeq7dav9g$108wm2wxudqaaqj3ecqd94euig3w7yvvbdw$109wm2wxudqaadcbiidban1x87_udcfjjwg$110wm2wxudqaajr1gkurzoyavgi6-7fc6tg$111wm2wxudqaa1dq7sse-loro_idsx08gzw$112wm2wxudqaaafvbmr_uhfv1fcsu5uvt5q$113wm2wxudqaaloo-n8tbqh5ycgl9iz821q$114wm2wxudqaaxt-ivhtvc422gxgbuao53g$115wm2wxudqaa0sdj7apdm9n6fheh9mfk5w$116wm2wxudqaau7cbotimkzfl7wzhye5ola$117wm2wxudqaajynbnom62k5w0_q_ctrz-g$118wm2wxudqaaujep7z4w99l4iepcmbqyda$119wm2wxudqaa9ydftvwk-2bkrhv1lflx8w$120wm2wxudqaa-19vegty4xe50figp4qpta$121wm2wxudqaajvbq_cw3lmzr4p-9tba8mw$122wm2wxudqaa5pk6phymudvp2vyuztxtqq$123wm2wxudqaaskkymsacswea6rsbvlzqwq$124wm2wxudqaactlh7qs7iuvd9tnvqzneww$125wm2wxudqaat5i...|1|1|1||0|0|1798|1798|870|870|
|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|1|1||0|0|6872|6872|0|0|
|employee|select ifnull(sum(task_amount), $0) as shouldmarknum, ifnull(sum(finish_amount), $1) as marklabelnum from backlog t where t.tenant_id = $2 and t.tenant_app_id = $3 and t.employee_id in ($4, $5, $6, $7, $8, $9, $10, $11, $12) and t.scene = $13 and t.begin_time >= $14 and t.expire_time < $15|1|2|2||0|0|9252|9252|1|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|1|1|1||0|0|3297|3297|3297|3297|
|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|1|1||0|0|171146|171146|49|49|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27)|1|1|1||0|0|214808|214808|26|26|
|tenant|select count(0) from ( select shop.*, dept.dept_name, count(es.id) as employeescount from tenant_wechatapp_shop shop left join erp_department dept on shop.dept_erp_id = dept.dept_erp_id and shop.tenant_id = dept.tenant_id left join employee_shop es on shop.id = es.shop_id and es.status in ($0, $1) where shop.tenant_wechatapp_id = $2 and shop.status in ($3, $4) and shop.status = $5 group by shop.id ) table_count|1|1|1||0|0|75282|75282|1|1|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6) and t.create_time >= $7 and t.create_time < $8 group by date_format(t.create_time, '%d')|1|1|1||0|0|3851|3851|31|31|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232 ...|1|3|3||0|0|759144|759144|317|317|
|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|1|1||0|0|3528|3528|3528|3528|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, ...|1|1|1||0|0|787605|787605|385|385|
|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)|1|4|4||0|0|1230740|1230740|82|82|
|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)|1|2|2||0|0|1230740|1230740|217|217|
|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)|1|1|1||0|0|846768|846768|142|142|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $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)|1|2|2||0|0|745778|745778|178|178|
|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|1|1||0|0|911|911|1|1|
||delete from user_service.erp_member_info where tenant_id = $0|1|3|3||0|0|28368|28368|0|0|
|corpwx|select date_format(t.create_time, '%d') as monthday, count(*) as addednum from external_user t where t.tenant_id = $0 and t.corp_user_id in ($1, $2, $3, $4, $5, $6, $7, $8) and t.create_time >= $9 and t.create_time < $10 group by date_format(t.create_time, '%d')|1|2|2||0|0|3851|3851|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)|1|1|1||0|0|269672|269672|76|76|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id as membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94)|1|3|3||0|0|826289|826289|93|93|
|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|2|2||0|0|757793|757793|114|114|
|value_added|select count(0) from ( select t1.id, t2.sales_no as salesno, date_format(t2.sales_date, '%y-%m-%d') as salesdate, date_format(t1.start_add_time, '%y-%m-%d') as valueadddate, t2.dept_erp_id as shopid, t1.shop_name as shopname, t2.employee_erp_id as userid, t2.employee_name as username, t1.product_name as productname, t1.amount_pay as amountpay, t1.id as valueaddno, t1.amount_added as valueaddamount, t1.state, if(t1.state = $0, t1.coupon_user_id, null) as valueaddcoupon, t1.user_id as memberuserid from value_added.value_added_user t1 join value_added.`value_added_user_extend` t2 on t1.id = t2.id where t1.tenant_wechatapp_id = $1 and exists ( select null from value_added.value_added_category t3 join value_added.value_added_template t4 on t3.template_id = t4.id and t4.is_disable = $2 where t1.tenant_wechatapp_id = t3.tenant_wechatapp_id and t2.category_erp_id = t3.erp_product_category_id ) and t2.sales_date >= $3 and t2.sales_date < $4 and t1.state != $5 ) tmp_count|1|3|3||0|0|35540|35540|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)|1|1|1||0|0|389625|389625|86|86|
|tenant|select distinct s.employee_id as id, e.employee_name from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.id = s.sneak_guest_id join tenant.employee e on s.tenant_id = e.tenant_id and s.employee_id = e.id where s.tenant_id = $0 and s.tenant_app_id = $1 and sg.create_shop_id = $2 and (sg.fail_type is null or sg.fail_type = $3) and s.event_type = $4 and s.create_time between $5 and $6|1|3|3||0|0|45194|45194|9|9|
|user_service|select tu.user_id, tm.shop_id, mb.erp_member_id membererpid, tu.mobile_no, tu.user_name, ue.employee_id, tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = $0 and tu.tenant_app_id = $1 and mb.erp_member_id in ( $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, ...|1|2|2||0|0|1230740|1230740|343|343|
|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|1|1|1||0|0|6838|6838|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)|1|3|3||0|0|846768|846768|108|108|
|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)|1|1|1||0|0|71628|71628|28|28|
||delete from tenant.sjfx_dct_erp_sales_detail where create_time < $0|1|1|1||0|0|237448|237448|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)|1|1|1||0|0|31892|31892|23|23|
