|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|494225|494225|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_476787156229165056 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_476787156229165056 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|2|2||0|0|916585|916585|4|4|
|statistic|select tmp.shopid id , tmp.shopname name , tmp.amount saleamount , tmp.addamount valueamount , tmp.addrate finishrate from ( select t.shop_id shopid , t.shop_name shopname , t.amount , t.addamount , if ( t.amount = 0 , 100 , round ( t.addamount*100/t.amount ) ) addrate , t.valueaddamount from ( select sd.shop_id , os.shop_name , sum ( finish_amount ) addamount , sum ( un_finish_amount ) +sum ( finish_amount ) amount , sum ( ifnull ( sd.value_add_amount , 0 ) ) valueaddamount from statistic.result_employee_value sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.shop_id = os.shop_id left join ( select ep.* from statistic.off_employee ep inner join ( select tenant_app_id , employee_user_id , max ( employee_erp_id ) employee_erp_id from statistic.off_employee group by tenant_app_id , employee_user_id ) dep on ep.tenant_app_id = dep.tenant_app_id and ep.employee_erp_id = dep.employee_erp_id and ep.employee_user_id = dep.employee_user_id ) oe on sd.tenant_app_id = oe.tenant_app_id and sd.user_id = oe.employee_user_id where sd.tenant_id = :1 and sd.shop_id != :2 and sd.user_id != :3 and sd.sales_date between :4 and :5 group by sd.shop_id , os.shop_name ) t ) tmp order by tmp.addrate desc|1|1|1||0|0|39152|39152|8|8|
|tag_service|delete from tag_service.label_vip_match_482207042405273600_482480185988485120 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_482207042405273600_482480185988485120 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|52846|52846|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|1376624|1376624|0|0|
|tag_service|delete from tag_service.label_vip_match_817878088380628992_817882720653852672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992_817882720653852672 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|74319|74319|0|0|
|platform|select count ( 1 ) from `smssent` where vendorid = :1 and success = true and date_sub ( date ( :2 ) , interval :3 day ) = date_format ( senttime , :4 )|1|4|4||0|0|66068|66068|1|1|
|statistic|select ue.tenant_wechatapp_id , ue.user_id , ifnull ( eu.user_id , ue.employee_erp_id ) employee_user_id , '2019-07-0723:59:59.0' update_time from user_service.user_employee ue left join tenant.employee_user eu on ue.tenant_wechatapp_id = eu.tenant_wechatapp_id and ue.employee_user_id = eu.id where ue.tenant_wechatapp_id = :1 and ue.update_time >= :2 and ue.update_time <= :3 limit :4 offset :5|1|1|1||0|0|14374|14374|177|177|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_822257848045047808_822262919524818944 where vip_id = :1|1|5|5||0|0|346509|346509|1|1|
|statistic|select bu.tenant_app_id , bu.user_id , count ( 1 ) order_amount from statistic.base_order_user bu left join statistic.order_info od on bu.tenant_app_id = od.tenant_app_id and bu.user_id = od.user_id where bu.tenant_app_id = :1 and od.status in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 ) group by bu.tenant_app_id , bu.user_id|1|1|1||0|0|37331|37331|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_907400816212623360 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|185357|185357|180|180|
|tag_service|delete from tag_service.label_vip_match_876595466006016000_876596932347273216 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_876595466006016000_876596932347273216 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|78515|78515|0|0|
|platform|select count ( 1 ) from coupondetail where vendorid = :1 and coupontype = :2 and couponstate = :3 and to_days ( :4 ) :5 to_days ( createtime ) = :6|1|2|2||0|0|318771|318771|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_821229068421742592 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|12|12||0|0|370428|370428|0|0|
|account|select id , tenant_id , tenant_wechatapp_id , account_type , user_id , mch_billno , send_name , mch_id , sub_mch_id , wxappid , msgappid , re_openid , total_amount , total_num , wishing , client_ip , act_name , remark , scene_id , risk_info , consume_mch_id , send_time , order_status , failure_reason , biz_id , biz_type , biz_tag , send_listid , need_callback , create_time , update_time , user_name , mobile_no , receive_time , refund_amount , refund_time from wx_redpacket_send_order where order_status in ( :1 , :2 ) order by id desc|1|2|2||0|0|17360|17360|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816096827580399616 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|4|4||0|0|166894|166894|0|0|
|platform|select ifnull ( eid , 0 ) as eid , ifnull ( shopid , 0 ) as sid , vendorid , count ( 1 ) as quantity from productcerts where vendorid = :1 and to_days ( :2 ) :3 to_days ( createtime ) = :4 group by eid , shopid , vendorid|1|1|1||0|0|28984|28984|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :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 ) and ( user.nick_name like concat ( :129 , :130 , :131 ) or user.mobile_no = :132 ) )|1|3|3||0|0|20349|20349|1|1|
|tag_service|delete from tag_service.label_vip_match_817517269994225664_817533420308570112 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817517269994225664_817533420308570112 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|32056|32056|0|0|
|tag_service|insert into tag_service.label_vip_match_816096827580399616_816103866541051904 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_816096827580399616_816103866541051904 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|56221|56221|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_885278795660111872 sd on vc.tenant_wechatapp_id = sd.tenant_app_id and vc.erp_product_category_id = sd.category_erp_id left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where vt.tenant_wechatapp_id = :2 and sd.sales_status = :3 and sd.sales_type = :4 and sd.create_time >= :5 and sd.create_time <= :6 and sd.value_add_no is null and os.shop_id != :7 and oe.employee_user_id != :8 limit :9 offset :10|1|2|2||0|0|2685103|2685103|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and user_id = :4 and user_name > :5 and shop_name > :6|1|12|12||0|0|1331024|1331024|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_480726380749918208 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|6|6||0|0|287548|287548|0|0|
|tag_service|delete from tag_service.label_vip_match_816869802005020672_816875333662851072 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816869802005020672_816875333662851072 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|49961|49961|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823844580729339904 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|90677|90677|107|107|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 ) and ( user.nick_name like concat ( :27 , :28 , :29 ) or user.mobile_no = :30 ) )|1|1|1||0|0|56003|56003|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_827516559562940416 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|420159|420159|29|29|
|tag_service|delete from tag_service.label_vip_match_823709122435256320_823710997448527872 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823709122435256320_823710997448527872 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|22726|22726|0|0|
|tag_service|insert into tag_service.label_vip_match_814019237554196480_814024519298617344 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_814019237554196480_814024519298617344 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|47613|47613|0|0|
|tag_service|delete from tag_service.label_vip_match_841816981308002304_841822506628247552 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_841816981308002304_841822506628247552 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|69986|69986|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|1|1|1||0|0|151465|151465|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_885418658174709760 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|98663|98663|0|0|
|statistic|select od.id , od.tenant_id , od.tenant_wechatapp_id tenant_app_id , od.order_no , od.source , od.type , od.activity_id , od.activity_type , od.user_id , od.user_name , od.mobile_no , od.take_type , td.shop_id , td.shop_name , od.coupon_id , dt.product_id goods_id , dt.product_name goods_name , dt.art_no style_no , dt.sku_id , dt.spec , gs.barcode , od.product_fee , od.freight_fee , od.discount_fee , od.total_fee , od.payment_fee , od.status , od.finish_type , od.take_shop_id , od.take_shop_name , od.take_employee_user_id , od.take_employee_user_name , od.manager_shop_id , od.manager_shop_name , od.manager_user_id , od.manager_user_name , od.manager_mobile_no , od.manager_brokerage , od.create_time , od.update_time , '2019-07-0723:59:59.0' collect_time , dt.quantity from `order`.order_info od left join order.order_detail dt on od.id = dt.order_id left join deliver.trade_deliver td on od.id = td.trade_id left join goods.goods_sku gs on dt.sku_id = gs.id where od.tenant_wechatapp_id = :1 and od.create_time >= :2 and od.create_time <= :3 limit :4 offset :5|1|1|1||0|0|39385|39385|67|67|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mt.sales_balance >= :4 and mb.register_flag = :5 ) tmp_count|1|3|3||0|0|33893|33893|1|1|
|tag_service|insert into tag_service.label_vip_match_882402759662481408_882404155665268736 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_882402759662481408_882404155665268736 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|68331|68331|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 ) and ( user.nick_name like concat ( :66 , :67 , :68 ) or user.mobile_no = :69 ) )|1|2|2||0|0|27014|27014|1|1|
|platform|select s.* , ifnull ( pc.certsquantity , 0 ) as certsquantity , ifnull ( va.addvaluequantity , 0 ) as addvaluequantity from ( /*昨天的销售记录*/ select eid , vendorid , sid , count ( 1 ) as salesquantity from saleslog sl where vendorid = :1 and to_days ( :2 ) :3 to_days ( salesdate ) = :4 group by eid , vendorid , sid ) s left join ( /*昨天质保单*/ select eid , count ( 1 ) as certsquantity from productcerts where vendorid = :5 and to_days ( :6 ) :7 to_days ( createtime ) = :8 group by eid ) pc on s.eid = pc.eid left join ( /*昨天的增值计划*/ select empid , count ( 1 ) as addvaluequantity from valueaddedlog where vendorid = :9 and to_days ( :10 ) :11 to_days ( createtime ) = :12 group by empid ) va on va.empid = s.eid|1|2|2||0|0|45044|45044|0|0|
|statistic|select eu.tenant_id , eu.tenant_wechatapp_id , eu.employee_erp_id , eu.user_id , ifnull ( ee.employee_name , tu.user_name ) user_name from tenant.employee_user eu left join tenant.erp_employee ee on eu.tenant_id = ee.tenant_id and eu.employee_erp_id = ee.employee_erp_id left join user_service.tenant_user tu on eu.tenant_wechatapp_id = tu.tenant_app_id and eu.user_id = tu.user_id limit :1 offset :2|1|4|4||0|0|19433|19433|5000|5000|
|tag_service|insert into tag_service.label_vip_match_819000302970638336_819053378054164480 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_819000302970638336_819053378054164480 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|49648|49648|0|0|
|tag_service|delete from tag_service.label_vip_match_816440425157005312_816442247884083200 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816440425157005312_816442247884083200 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|46400|46400|0|0|
|tag_service|insert into tag_service.label_vip_match_487569764496052224_487577238854832128 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_487569764496052224_487577238854832128 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|114762|114762|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_490810080325931008 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|152347|152347|1|1|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and status = :2 and date_sub ( curdate ( ) , interval :3 day ) = date_format ( salesdate , :4 )|1|4|4||0|0|120774|120774|0|0|
|tag_service|insert into tag_service.label_vip_match_471320523331211264_471366425118904320 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_471320523331211264_471366425118904320 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|35878|35878|0|0|
|tag_service|insert into tag_service.label_vip_match_828766757295529984_828828072282198016 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_828766757295529984_828828072282198016 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|58029|58029|0|0|
|tag_service|delete from tag_service.label_vip_match_889699715132813312_889999611513671680 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_889699715132813312_889999611513671680 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|87528|87528|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_907400816212623360 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|299237|299237|0|0|
|tag_service|delete from tag_service.label_vip_match_814020764498956288_823708811058520064 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814020764498956288_823708811058520064 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|32968|32968|0|0|
|tag_service|insert into tag_service.label_vip_match_876595466006016000_876596932347273216 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_876595466006016000_876596932347273216 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|39298|39298|0|0|
|gift_mail|select * from ( select p.* , sp.take_type , ifnull ( pp.integral_price , ifnull ( ( select min ( inventory.price ) from inventory where inventory.product_id = p.id ) , :1 ) ) as price , ifnull ( t.quantity , :2 ) quantity , pt.partner_name vendorname , 0.0 distance , c.categroy_name categroy_name , pp.partner_id partner_id from product p inner join category c on c.id = p.category_id left outer join self_product sp on p.id = sp.product_id left outer join partner_product pp on p.id = pp.product_id left outer join partner pt on pt.id = pp.partner_id left outer join ( select product_id , sum ( quantity ) quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where ( ( p.is_disable is null or p.is_disable = :3 ) ) ) as p left outer join product_status ps on p.id = ps.product_id where ( p.product_status = :4 and p.tenant_id = :5 and ( ps.tenant_wechatapp_id = :6 or p.product_type = :7 ) ) order by p.volume desc , p.id desc limit :8 , :9|1|1|1||0|0|7995|7995|6|6|
|tag_service|delete from tag_service.label_vip_match_822257848045047808_822267157453774848 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808_822267157453774848 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|70605|70605|0|0|
|statistic|delete from result_employee_value where tenant_app_id = :1|1|2|2||0|0|388908|388908|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|527697|527697|91|91|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|494225|494225|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.activity_id = :2|1|1|1||0|0|660705|660705|1|1|
|statistic|select t.statistic_date , t.tenant_id , t.tenant_app_id , t.src_type , t.page_id , t.business_name , count ( * ) push_amount from ( select date_format ( push_time , '%y-%m-%d' ) statistic_date , tenant_id , tenant_app_id , src_type , page_id , business_name from statistic.gift_pack where tenant_app_id = :1 and push_time >= :2 and push_time <= :3 ) t group by t.statistic_date , t.tenant_id , t.tenant_app_id , t.src_type , t.page_id , t.business_name limit :4 offset :5|1|5|5||0|0|561775|561775|0|0|
|value_added|-- 根据添加时间得出当前增值金额 update value_added_user set amount_added = if ( :1 > ( ( ( added_percent_per_day / :2 ) * if ( :3 >= timestampdiff ( day , date_format ( create_time , :4 ) , now ( ) ) :5 :6 :7 add_days , timestampdiff ( day , date_format ( create_time , :8 ) , now ( ) ) :9 :10 , add_days ) ) :11 ( ( devalue_percent_per_day / :12 ) * if ( :13 >= timestampdiff ( day , date_format ( create_time , :14 ) , now ( ) ) :15 :16 :17 add_days :18 keeping_days , :19 , timestampdiff ( day , date_format ( create_time , :20 ) , now ( ) ) :21 :22 :23 add_days :24 keeping_days ) ) ) * amount_pay , :25 , ( ( ( added_percent_per_day / :26 ) * if ( :27 >= timestampdiff ( day , date_format ( create_time , :28 ) , now ( ) ) :29 :30 :31 add_days , timestampdiff ( day , date_format ( create_time , :32 ) , now ( ) ) :33 :34 , add_days ) ) :35 ( ( devalue_percent_per_day / :36 ) * if ( :37 >= timestampdiff ( day , date_format ( create_time , :38 ) , now ( ) ) :39 :40 :41 add_days :42 keeping_days , :43 , timestampdiff ( day , date_format ( create_time , :44 ) , now ( ) ) :45 :46 :47 add_days :48 keeping_days ) ) ) * amount_pay ) , update_time = now ( ) where state = :49 and update_time <= curdate ( ) and ( create_time >= date_add ( curdate ( ) , interval :50 ( add_days :51 keeping_days :52 :53 ) day ) or ( amount_added > :54 and create_time < date_add ( curdate ( ) , interval :55 ( add_days :56 keeping_days :57 :58 ) day ) ) ) -- 判断条件 在增值时间内 增值金大于0 状态正常|1|2|2||0|0|134344|134344|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_827516559562940416 sd on vc.tenant_wechatapp_id = sd.tenant_app_id and vc.erp_product_category_id = sd.category_erp_id left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where vt.tenant_wechatapp_id = :2 and sd.sales_status = :3 and sd.sales_type = :4 and sd.create_time >= :5 and sd.create_time <= :6 and sd.value_add_no is null and os.shop_id != :7 and oe.employee_user_id != :8 limit :9 offset :10|1|2|2||0|0|627851|627851|600|600|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823844580729339904 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|177661|177661|179|179|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|18|18||0|0|1377473|1377473|102|102|
|tag_service|insert into tag_service.label_vip_match_817878088380628992_817882331640545280 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_817878088380628992_817882331640545280 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|34804|34804|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_885278795660111872 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_885278795660111872 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|5|5||0|0|2685103|2685103|0|0|
|statistic|update erp_sales_476787156229165056 set user_id = :1 , user_name = :2 , mobile_no = :3 where tenant_app_id = :4 and member_erp_id = :5 and user_name is null|1|1|1||0|0|4419|4419|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 ) and ( user.nick_name like concat ( :86 , :87 , :88 ) or user.mobile_no = :89 ) )|1|1|1||0|0|25876|25876|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|1376666|1376666|6|6|
|tag_service|delete from tag_service.label_vip_match_817878088380628992_817882952124895232 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992_817882952124895232 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|71305|71305|0|0|
|statistic|select t.user_id id , t.user_name name , t.score from ( select ec.user_id , ec.user_name , round ( ec.score/ec.amount ) score from ( select ec.user_id , ec.user_name , sum ( ec.score ) score , sum ( ec.amount ) amount from result_employee_comment ec where ec.tenant_id = :1 and ec.tenant_app_id = :2 and ec.shop_id = :3 and ec.statistic_date between :4 and :5 and ec.score > :6 and ec.user_id != :7 group by ec.user_id , ec.user_name ) ec ) t order by t.score desc|1|2|2||0|0|103577|103577|1|1|
|tag_service|delete from tag_service.label_vip_match_817161814168092672_817175909835513856 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817161814168092672_817175909835513856 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|45853|45853|0|0|
|tag_service|delete from tag_service.label_vip_match_490540971604447232_491197539744354304 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490540971604447232_491197539744354304 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|34356|34356|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_487569764496052224 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|110210|110210|0|0|
|statistic|select t.shop_id id , t.shop_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.shop_id , ec.shop_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.tenant_app_id = :3 and ec.sales_date between :4 and :5 group by ec.shop_id , ec.shop_name ) ec ) t order by t.finish_rate desc|1|5|5||0|0|927481|927481|2|2|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_816096827580399616 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|91121|91121|25|25|
|gift_mail|select * from ( select p.* , sp.take_type , ifnull ( pp.integral_price , ifnull ( ( select min ( inventory.price ) from inventory where inventory.product_id = p.id ) , :1 ) ) as price , ifnull ( t.quantity , :2 ) quantity , pt.partner_name vendorname , 0.0 distance , c.categroy_name categroy_name , pp.partner_id partner_id from product p inner join category c on c.id = p.category_id left outer join self_product sp on p.id = sp.product_id left outer join partner_product pp on p.id = pp.product_id left outer join partner pt on pt.id = pp.partner_id left outer join ( select product_id , sum ( quantity ) quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where ( ( p.is_disable is null or p.is_disable = :3 ) ) ) as p left outer join product_status ps on p.id = ps.product_id where ( p.product_status = :4 and p.tenant_id = :5 and ( ps.tenant_wechatapp_id = :6 or p.product_type = :7 ) ) order by p.volume desc , p.id desc limit :8|1|1|1||0|0|7942|7942|6|6|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|310455|310455|3|3|
|tag_service|delete from tag_service.label_vip_match_488003299602206720_885391961685602304 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_488003299602206720_885391961685602304 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|60500|60500|0|0|
|tag_service|insert into tag_service.label_vip_match_821229068421742592_821504909596737536 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_821229068421742592_821504909596737536 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|197690|197690|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) employee_user_id , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name , t.amount from ( select tenant_id , tenant_app_id , shop_id , employee_user_id , count ( * ) amount from statistic.member where tenant_app_id = :2 and create_time between :3 and :4 and register_flag = :5 group by tenant_id , tenant_app_id , shop_id , employee_user_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and ( t.employee_user_id = oe.employee_erp_id or t.employee_user_id = oe.employee_user_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name|1|1|1||0|0|402937|402937|51|51|
|employee|select * from backlog where tenant_app_id = :1 and user_id = :2 and status in ( :3 , :4 ) and scene = :5 and expire_time >= :6 order by create_time desc limit :7 , :8|1|2|2||0|0|79449|79449|9|9|
|platform|select `vendorid` , `vendormemberid` , `wechatmemberid` , `openid` , `payopenid` , `unionid` , `nickname` , `headimgurl` , `employeeid` , `luckybean` , `mobileno` , `createtime` , `updatetime` , `qrticket` , `qrurl` , `introducerid` , `id` from `member` where `vendorid` = :1 and `mobileno` = :2|1|8|8||0|0|9987|9987|9987|9987|
|tag_service|delete from tag_service.label_vip_match_821174502091165696_821180732360658944 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821174502091165696_821180732360658944 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|61934|61934|0|0|
|statistic|delete from statistic.batch_step_execution where step_execution_id <= :1|1|1|1||0|0|23162|23162|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|527060|527060|0|0|
|statistic|select t.tenant_id , t.tenant_app_id , t.coupon_id , if ( t.coupon_type = 4 , vt.template_name , ct.coupon_name ) coupon_name , t.statistic_date , t.create_channel , count ( 1 ) get_amount from ( select tenant_id , tenant_app_id , coupon_template_id coupon_id , create_channel , date_format ( create_time , '%y-%m-%d' ) statistic_date , coupon_type from statistic.coupon_user where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 ) t left join coupon_service.coupon_template ct on t.coupon_id = ct.id left join value_added.value_added_template vt on t.tenant_app_id = vt.tenant_wechatapp_id and t.coupon_id = vt.id group by t.tenant_id , t.tenant_app_id , t.coupon_id , ct.coupon_name , t.statistic_date , t.create_channel , t.coupon_type|1|5|5||0|0|405744|405744|0|0|
|tag_service|insert into tag_service.label_vip_match_836363095600320512_836442940199964672 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_836363095600320512_836442940199964672 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|66289|66289|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_827516559562940416 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|7|7||0|0|681734|681734|48|48|
|tenant|select *from tenant.erp_sales where tenant_wechatapp_id = :1 and to_days ( sales_date ) -to_days ( now ( ) ) = :2 and is_sales = true|1|4|4||0|0|707228|707228|160|160|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_821229068421742592 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|5|5||0|0|180178|180178|189|189|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_480726380749918208 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|134027|134027|49|49|
|tag_service|insert into tag_service.label_vip_match_490810080325931008_490828878219186176 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_490810080325931008_490828878219186176 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|140717|140717|0|0|
|tag_service|delete from tag_service.label_vip_match_817878088380628992_817882331640545280 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992_817882331640545280 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|68642|68642|0|0|
|user_service|select count ( 0 ) from user_employee ue join tenant_user tu on ue.user_id = tu.user_id and tu.tenant_id = :1 and tu.tenant_app_id = :2 join user u on tu.user_id = u.id where ue.employee_user_id = :3 and ue.tenant_id = :4 and tenant_app_id = :5|1|1|1||0|0|2469|2469|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823709122435256320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|37048|37048|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1376687|1376687|9|9|
|tag_service|delete from tag_service.label_vip_match_839295151019966464_839642460417216512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_839295151019966464_839642460417216512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|34344|34344|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|6|6||0|0|495320|495320|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823688108565368832 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|14|14||0|0|1079575|1079575|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_908917637281533952 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|27659|27659|0|0|
|tag_service|delete from tag_service.label_vip_match_822257848045047808_822282586666606592 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808_822282586666606592 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|70420|70420|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_827516559562940416 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_827516559562940416 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|1|1||0|0|681634|681634|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( t.grade_erp_id , -1 ) grade_erp_id , if ( t.grade_erp_id is null , '无' , ifnull ( gd.grade_name , '' ) ) grade_name , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.amount from ( select mb.tenant_id , mb.tenant_app_id , mb.shop_id , mt.grade_erp_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id , mt.grade_erp_id ) t left join statistic.grade gd on t.tenant_id = gd.tenant_id and t.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name|1|1|1||0|0|343256|343256|25|25|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|310429|310429|0|0|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where `bid` = :1 and `tasktype` = :2 and `tasktime` = :3 and `vendorid` = :4 and `uid` = :5|1|3|3||0|0|624328|624328|0|0|
|tag_service|insert into tag_service.label_vip_match_488003299602206720_488032253511864320 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_488003299602206720_488032253511864320 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|150755|150755|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_476787156229165056 sd on vc.tenant_wechatapp_id = sd.tenant_app_id and vc.erp_product_category_id = sd.category_erp_id left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where vt.tenant_wechatapp_id = :2 and sd.sales_status = :3 and sd.sales_type = :4 and sd.create_time >= :5 and sd.create_time <= :6 and sd.value_add_no is null and os.shop_id != :7 and oe.employee_user_id != :8 limit :9 offset :10|1|2|2||0|0|802732|802732|334|334|
|activity_service|select id , tenant_id , tenant_wechatapp_id , activity_id , acitivity_type , user_id , qualified_id , page_id , scene_type , scene_biz_id , create_time , update_time from activity_gift_grant where activity_id = :1 and acitivity_type = :2 and user_id = :3 and scene_type = :4|1|1|1||0|0|137918|137918|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|310723|310723|42|42|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_830220893509701632 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_830220893509701632 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|3|3||0|0|84718|84718|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :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 ) and ( user.nick_name like concat ( :207 , :208 , :209 ) or user.mobile_no = :210 ) )|1|3|3||0|0|222182|222182|1|1|
|tag_service|insert into tag_service.label_vip_match_486900027235635200_486927024615723008 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_486900027235635200_486927024615723008 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|98489|98489|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_818632945152598016 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|17620|17620|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|11|11||0|0|527824|527824|107|107|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_828766757295529984 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|131443|131443|59|59|
|tag_service|insert into tag_service.label_vip_match_480726380749918208_480728003618410496 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_480726380749918208_480728003618410496 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|3|3||0|0|184227|184227|0|0|
|tag_service|insert into tag_service.member_statistic_37b94d80a83514476d8d0f749ef02ad3 select t1.id , t1.tenant_id , t1.tenant_app_id , t2.shop_id , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employee_user_id , t2.grade_erp_id , t1.user_id as userid , t1.member_user_id as memberuserid , '' as shopname , '' as employeeusername , t1.user_name as username , t1.mobile_no as mobileno , t1.age , t1.sex , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , t1.birthday_is_lunar as birthdayislunar , t1.memorial_name as memorialname , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t1.source_type as sourcetype , t1.identity , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.cancel_flag as cancelflag , '' as gradename , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , t2.last_service_time as lastservicetime , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.category_name as categoryname from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320_823710703591407616 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and lvm.member_identity in ( :5 , :6 , :7 , :8 , :9 ) and lvm.lifecycle in ( :10 )|1|1|1||0|0|3324|3324|0|0|
|tag_service|delete from tag_service.label_vip_match_819000302970638336_819053378054164480 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_819000302970638336_819053378054164480 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|3|3||0|0|97334|97334|0|0|
|statistic|update erp_sales_823688108565368832 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|2|2||0|0|3449|3449|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_830220893509701632 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|84599|84599|38|38|
|customer|select count ( 0 ) from customer_face_pass t where :1 = :2 and t.id not in ( :3 ) and t.is_checkin = :4 and t.shop_id = :5 and t.person_type not in ( :6 )|1|10|10||0|0|143558|143558|1|1|
|activity_service|select count ( 0 ) from ( select t2.user_name as username , t2.data as userheadimg , ifnull ( t1.finished_time , t1.update_time ) as time , t1.cutdown_amount as cutdownamount , t2.partake_data as partakedata from activity_service.cutdown_price_activity_apply t1 join activity_service.user_trace t2 on t1.id = t2.user_apply_id and t2.step = :1 where t1.activity_id = :2 ) table_count|1|1|1||0|0|68991|68991|1|1|
|user_service|select tu.user_id as userid , tu.mobile_no as mobileno , tu.user_name as username , u.nick_name as nickname , u.head_img_url as headimgurl from tenant_user tu join `user` u on tu.user_id = u.id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and ( u.mobile_no = :3 or u.nick_name like concat ( :4 , :5 , :6 ) or tu.user_name like concat ( :7 , :8 , :9 ) )|1|1|1||0|0|263758|263758|1|1|
|platform|select count ( 1 ) from `taskassignment` ta where ta.tasktype = :1 and ( ta.taskstatus = :2 or ta.taskstatus = :3 ) and vendorid = :4 and uid = :5|1|1|1||0|0|624503|624503|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_828766757295529984 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|221259|221259|226|226|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|1377473|1377473|102|102|
|tag_service|delete from tag_service.label_vip_match_817878088380628992_836466365488484352 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992_836466365488484352 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|68434|68434|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_827516559562940416 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|420194|420194|34|34|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_836363095600320512 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|112567|112567|20|20|
|user_service|select ue.user_id as id , tu.user_name as username , u.head_img_url as headimgurl , u.nick_name as nickname , tu.mobile_no as mobile , tu.sex from user_employee ue join tenant_user tu on ue.user_id = tu.user_id and tu.tenant_id = :1 and tu.tenant_app_id = :2 join user u on tu.user_id = u.id where ue.employee_user_id = :3 and ue.tenant_id = :4 and tenant_app_id = :5 order by tu.bind_time desc|1|1|1||0|0|4115|4115|823|823|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 ) and ( user.nick_name like concat ( :88 , :89 , :90 ) or user.mobile_no = :91 ) )|1|1|1||0|0|25880|25880|1|1|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_816096827580399616 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_816096827580399616 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|5|5||0|0|91060|91060|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|527824|527824|107|107|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and tipfee > :2 and tippayno is not null and date_sub ( date ( :3 ) , interval :4 day ) = date_format ( tippaytime , :5 )|1|5|5||0|0|120774|120774|0|0|
|tag_service|delete from tag_service.label_vip_match_814020764498956288_823709181025492992 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814020764498956288_823709181025492992 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|26264|26264|0|0|
|tag_service|delete from tag_service.label_vip_match_839295151019966464_839652414381412352 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_839295151019966464_839652414381412352 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|28694|28694|0|0|
|tag_service|delete from tag_service.batch_job_execution_params where job_execution_id <= :1|1|2|2||0|0|274865|274865|0|0|
|tag_service|delete from tag_service.label_vip_match_469175049962786816_470281572487139328 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_469175049962786816_470281572487139328 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|47687|47687|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_826254702915141632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|46789|46789|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_488003299602206720 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|132845|132845|51|51|
|tag_service|insert into tag_service.label_vip_match_891434732540272640_891435946115981312 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_891434732540272640_891435946115981312 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|72076|72076|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_821229068421742592 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_821229068421742592 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|2|2||0|0|179821|179821|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|527074|527074|2|2|
|tag_service|delete from tag_service.label_vip_match_476787156229165056_864729529476812800 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_476787156229165056_864729529476812800 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|2|2||0|0|78727|78727|0|0|
|tag_service|delete from tag_service.label_vip_match_822257848045047808_822264540166144000 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808_822264540166144000 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|73431|73431|0|0|
|message_push|delete from message_log where to_days ( create_time ) -to_days ( now ( ) ) < :1|1|16|16||0|0|437042|437042|0|0|
|tag_service|insert into tag_service.label_vip_match_818623050667823104_818630542999207936 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_818623050667823104_818630542999207936 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|81457|81457|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_488003299602206720 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|6|6||0|0|586732|586732|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :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 ) and ( user.nick_name like concat ( :130 , :131 , :132 ) or user.mobile_no = :133 ) )|1|4|4||0|0|20348|20348|1|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_476787156229165056_476788488201703424 where vip_id = :1|1|4|4||0|0|331262|331262|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_827516559562940416 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|5|5||0|0|420691|420691|95|95|
|tag_service|delete from tag_service.label_vip_match_818707624273952768_818711793240154112 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818707624273952768_818711793240154112 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|65188|65188|0|0|
|statistic|select t.source_type , t.amount from ( select source_type , sum ( amount ) amount from statistic.result_add_shop_source where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 group by source_type ) t order by t.amount desc|1|1|1||0|0|136489|136489|3|3|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , sum ( tmp.cancel_amount ) cancel_amount , sum ( tmp.full_amount ) full_amount , sum ( tmp.bind_amount ) bind_amount , sum ( tmp.subscribe_amount ) subscribe_amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.cancel_amount , t.full_amount , t.bind_amount , t.subscribe_amount from ( select mb.tenant_id , mb.tenant_app_id , mb.shop_id , sum ( if ( mb.subscribe_flag = 0 , 1 , 0 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from statistic.member mb where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name|1|1|1||0|0|335948|335948|20|20|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_885278795660111872 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|29|29||0|0|2685103|2685103|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|495320|495320|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|494250|494250|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.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 , :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 ) and ( user.nick_name like concat ( :128 , :129 , :130 ) or user.mobile_no = :131 ) )|1|3|3||0|0|147106|147106|1|1|
|activity_service|select ut.id , ut.user_name , ut.mobile_no , ut.data userheadimg , at.activity_name , ut.create_time from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.activity_id = :2 order by ut.create_time desc limit :3|1|5|5||0|0|660712|660712|7|7|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_830220893509701632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|160908|160908|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_486900027235635200 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|63016|63016|0|0|
|tag_service|delete from tag_service.label_vip_match_491650258254827520_491661336049225728 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_491650258254827520_491661336049225728 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|32074|32074|0|0|
|user_service|select scene_id , count ( * ) as quantity , scene_type from user_service.user_source where scene_type = :1 and scene_id in ( :2 ) and tenant_wechatapp_id = :3 group by scene_id|1|2|2||0|0|24393|24393|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_834615931371048960 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|70724|70724|0|0|
|tag_service|delete from tag_service.label_vip_match_816450513213112320_816517667207815168 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816450513213112320_816517667207815168 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|1|1||0|0|29220|29220|0|0|
|tag_service|delete from tag_service.label_vip_match_821229068421742592_821504909596737536 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821229068421742592_821504909596737536 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|15|11||0|0|785959|392989|0|0|
|tag_service|delete from tag_service.label_vip_match_899878776672923648_902701957964152832 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_899878776672923648_902701957964152832 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|185507|92759|0|0|
|tag_service|delete from tag_service.label_vip_match_476787156229165056_476788488201703424 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_476787156229165056_476788488201703424 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|26|18||0|0|1324586|662312|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_817878088380628992 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|2|2|1||0|0|101279|51230|49|28|
|tag_service|delete from tag_service.label_vip_match_480726380749918208_480728003618410496 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_480726380749918208_480728003618410496 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|15|11||0|0|736026|368028|0|0|
|tag_service|insert into tag_service.label_vip_match_827516559562940416_827519836937560064 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_827516559562940416_827519836937560064 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|3||0|0|517944|259130|0|0|
|tag_service|delete from tag_service.label_vip_match_826954007829331968_826973052054052864 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826954007829331968_826973052054052864 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|16|10||0|0|1072557|536279|0|0|
|tag_service|delete from tag_service.label_vip_match_823844580729339904_823856782299402240 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823844580729339904_823856782299402240 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|19|13||0|0|1093247|546643|0|0|
|tag_service|delete from tag_service.label_vip_match_814019237554196480_814024519298617344 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814019237554196480_814024519298617344 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|4|3||0|0|190385|95193|0|0|
|tag_service|delete from tag_service.label_vip_match_469175049962786816_469517846737719296 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_469175049962786816_469517846737719296 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|4|2||0|0|57367|28685|0|0|
|activity_service|select id , tenant_id , tenant_app_id , activity_id , user_id , tenant_app_open_id , customize_page_id , qualitied_id , status , remark , create_time , update_time from intelligent_marketing_activity_gift where `status` = :1 limit :2 , :3|2|3|2||0|0|69320|34660|0|0|
|tag_service|delete from tag_service.label_vip_match_830220893509701632_830221803765940224 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_830220893509701632_830221803765940224 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|6|3||0|0|573752|286878|0|0|
|statistic|select bm.id , group_concat ( distinct sd.category_erp_id ) categoryid , group_concat ( distinct sd.category_name ) categoryname , min ( es.sales_date ) firstsalestime , max ( es.sales_date ) lastsalestime from base_user_member bu inner join member_extra bm on bu.tenant_app_id = bm.tenant_app_id and bu.user_id = bm.user_id inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where bu.tenant_app_id = :1 and sd.sales_type = :2 and es.sales_status = :3 group by bm.id order by bm.id limit :4 offset :5|2|6|4||0|0|75654|39108|129|83|
|tag_service|delete from tag_service.label_vip_match_818623050667823104_818630542999207936 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818623050667823104_818630542999207936 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|6|4||0|0|325468|162740|0|0|
|tag_service|insert into tag_service.label_vip_match_823844580729339904_823856782299402240 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_823844580729339904_823856782299402240 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|3|2||0|0|547234|273932|0|0|
|tag_service|delete from tag_service.label_vip_match_488003299602206720_488032253511864320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_488003299602206720_488032253511864320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|10|7||0|0|601152|300586|0|0|
|tag_service|delete from tag_service.label_vip_match_490810080325931008_490828878219186176 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490810080325931008_490828878219186176 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|7|5||0|0|562496|281248|0|0|
|tag_service|delete from tag_service.label_vip_match_816096827580399616_816103866541051904 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816096827580399616_816103866541051904 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|224798|112400|0|0|
|tag_service|delete from tag_service.label_vip_match_836363095600320512_836442940199964672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836363095600320512_836442940199964672 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|257470|128738|0|0|
|tag_service|delete from tag_service.label_vip_match_891434732540272640_891435946115981312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_891434732540272640_891435946115981312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|6|4||0|0|286817|143417|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.activity_name = :4 and t1.step = :5|2|8|4||0|0|1324238|662285|2|1|
|tag_service|delete from tag_service.label_vip_match_885278795660111872_885279553956712448 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_885278795660111872_885279553956712448 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|19|11||0|0|1366931|683531|0|0|
|tag_service|insert into tag_service.label_vip_match_822257848045047808_822262919524818944 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_822257848045047808_822262919524818944 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|6|4||0|0|693187|346823|0|0|
|tag_service|delete from tag_service.label_vip_match_822257848045047808_822262919524818944 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808_822262919524818944 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|26|18||0|0|1385468|692740|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_486900027235635200 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|5|3||0|0|141038|121713|0|0|
|tag_service|delete from tag_service.label_vip_match_828766757295529984_828828072282198016 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_828766757295529984_828828072282198016 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|230436|115230|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and user_name > :4 and shop_name > :5|2|28|15||0|0|2662048|1331024|2|1|
|tag_service|delete from tag_service.label_vip_match_882402759662481408_882404155665268736 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_882402759662481408_882404155665268736 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|272826|136416|0|0|
|tag_service|delete from tag_service.label_vip_match_827516559562940416_827519836937560064 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_827516559562940416_827519836937560064 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|16|11||0|0|1035267|517639|0|0|
|tag_service|delete from tag_service.label_vip_match_907400816212623360_907482231063232512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_907400816212623360_907482231063232512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|7|4||0|0|486278|243142|0|0|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.create_time >= :4 and mb.create_time <= :5 and mb.register_flag = :6 ) tmp_count|2|5|3||0|0|212646|106323|2|1|
|tag_service|delete from tag_service.label_vip_match_469175049962786816_469178094259933184 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_469175049962786816_469178094259933184 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|5|3||0|0|74720|37360|0|0|
|tag_service|delete from tag_service.label_vip_match_817517269994225664_817536856118829056 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817517269994225664_817536856118829056 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|3|2||0|0|208751|104377|0|0|
|tag_service|insert into tag_service.label_vip_match_826954007829331968_826973052054052864 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_826954007829331968_826973052054052864 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|2|1||0|0|536298|268159|0|0|
|tag_service|delete from tag_service.label_vip_match_814640285408600064_814650677526577152 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814640285408600064_814650677526577152 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|2|1||0|0|244561|122281|0|0|
|tag_service|insert into tag_service.label_vip_match_823688108565368832_823695523771879424 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_823688108565368832_823695523771879424 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|3||0|0|593138|296887|0|0|
|tag_service|delete from tag_service.label_vip_match_487569764496052224_487577238854832128 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_487569764496052224_487577238854832128 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|8|6||0|0|457510|228762|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_476787156229165056 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|14|12||0|0|1011796|916747|83|83|
|tag_service|delete from tag_service.label_vip_match_471320523331211264_471366425118904320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_471320523331211264_471366425118904320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|4|2||0|0|142805|71405|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816440425157005312 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|3|2||0|0|95258|65316|0|0|
|tag_service|delete from tag_service.label_vip_match_823688108565368832_823695523771879424 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823688108565368832_823695523771879424 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|20|14||0|0|1185013|592511|0|0|
|tag_service|insert into tag_service.label_vip_match_476787156229165056_476788488201703424 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_476787156229165056_476788488201703424 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|6|4||0|0|662725|331588|0|0|
|statistic|select count ( 0 ) from ( select es.id , es.sales_no salesno , es.dept_erp_id shopid , ifnull ( os.shop_name , '未知' ) shopname , es.erp_employee_id employeeuserid , ifnull ( oe.employee_user_name , '未知' ) employeeusername , es.user_name username , es.mobile_no mobileno , es.sales_date salesdate , es.score , es.comment_date commentdate , round ( es.redpack_amount / 100 , 2 ) redpackamount , es.redpack_busi_id busiid , es.content from statistic.erp_sales_822257848045047808 es left join statistic.off_shop os on es.tenant_app_id = os.tenant_app_id and es.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on es.tenant_app_id = oe.tenant_app_id and es.erp_employee_id = oe.employee_erp_id where es.tenant_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and es.tenant_app_id = :4 and os.shop_id = :5 and es.comment_date > :6 ) table_count|2|8|4||0|0|621006|310503|2|1|
|tag_service|delete from tag_service.label_vip_match_486900027235635200_486927024615723008 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_486900027235635200_486927024615723008 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|5|3||0|0|393404|196702|0|0|
|tag_service|insert into tag_service.label_vip_match_885278795660111872_885279553956712448 ( id , tenant_app_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 left join tag_service.label_vip_match_885278795660111872_885279553956712448 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|7|5||0|0|684406|342706|0|0|
|tag_service|delete from tag_service.label_vip_match_834615931371048960_836444994523926528 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_834615931371048960_836444994523926528 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|2|4|3||0|0|234930|117466|0|0|
|platform|select vm.* from vendormember vm join member m on vm.id = m.vendormemberid and vm.vendorid = m.vendorid where m.employeeid = :1 and vm.vendorid = :2 and ( ( birthdaytype = :3 and month ( birthday ) = month ( date_sub ( curdate ( ) , interval :4 day ) ) and day ( birthday ) = day ( date_sub ( curdate ( ) , interval :5 day ) ) ) or ( birthdaytype = :6 and month ( birthday ) = month ( date_sub ( :7 , interval :8 day ) ) and day ( birthday ) = day ( date_sub ( :9 , interval :10 day ) ) ) )|3|8|4||0|0|89036|62552|68|56|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_817517269994225664 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|6|2||0|0|119309|79655|8|8|
|statistic|select el.tenant_wechatapp_id tenant_app_id , el.member_erp_id , ifnull ( sum ( if ( el.integral > 0 , el.integral , 0 ) ) , 0 ) cumulation , ifnull ( sum ( el.integral ) , 0 ) balance , max ( el.update_time ) lastscoretime from base_erp_member em inner join user_service.erp_integral_log el on em.tenant_app_id = el.tenant_wechatapp_id and em.member_erp_id = el.member_erp_id where em.tenant_app_id = :1 group by el.tenant_wechatapp_id , el.member_erp_id limit :2 offset :3|3|4|2||0|0|14804|7729|447|395|
|activity_service|select t3.id , t1.tenant_app_id as tenantappid , t1.user_id as userid , t1.user_name as username , t1.mobile_no as mobileno , t1.user_apply_id as userapplyid , t1.data , t2.id as activityid , t2.activity_name as activityname , t2.activity_type as activitytype , t1.create_time as time , t3.cutdown_amount as cutdownamount , t3.cutdown_num as cutdownnum , t3.order_no as orderno from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.activity_name = :4 and t1.step = :5 order by t1.create_time desc limit :6 , :7|3|4|2||0|0|1873054|624382|56|20|
|activity_service|select t3.id , t1.tenant_app_id as tenantappid , t1.user_id as userid , t1.user_name as username , t1.mobile_no as mobileno , t1.user_apply_id as userapplyid , t1.data , t2.id as activityid , t2.activity_name as activityname , t2.activity_type as activitytype , t1.create_time as time , t3.cutdown_amount as cutdownamount , t3.cutdown_num as cutdownnum , t3.order_no as orderno from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.activity_name = :4 and t1.step = :5 order by t1.create_time desc limit :6|3|5|2||0|0|1871859|624207|60|20|
|gift_mail|select count ( 0 ) from ( select t.* , tt.can_take_date , tt.shop_name , tt.take_shop_name , tt.take_employee_name , ta.recipients , ta.user_tel , concat ( ta.area , ta.address ) address , if ( t.trade_type = 3 , pl.id , it.barcode ) as barcode , if ( t.trade_type = 3 , pl.default_image_url , p.default_image_url ) as defaultimageurl from trade t left outer join trade_take tt on tt.trade_id = t.id left outer join trade_addr ta on ta.trade_id = t.id left outer join product p on p.id = t.product_id left outer join platform_product pl on pl.id = t.product_id left outer join inventory it on it.product_id = t.product_id and it.specification = t.specification where ( t.tenant_wechatapp_id = :1 ) order by create_time desc ) tmp_count|3|6|2||0|0|39591|13216|3|1|
|user_service|select t1.erp_member_id as membererpid , t2.head_img_url as headimgurl , t2.nick_name as nickname , t1.mobile_no as mobileno , date_format ( t1.bind_time , '%y-%m-%d%h:%i:%s' ) as registertime from tenant_user t1 join `user` t2 on t1.user_id = t2.id left join user_employee t3 on t1.user_id = t3.user_id and t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id where t3.id is null and t1.mobile_no is not null and t1.mobile_no != :1 and t1.erp_member_id is not null and t1.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4 -- and t1.bind_time < current_date order by t1.bind_time asc limit :5|3|5|3||0|0|377643|142392|24|8|
|statistic|select count ( 0 ) from ( select id , src_type , business_name , user_name , mobile_no , head_img , push_time , pull_time , if ( pull_status = 1 , '已领完' , '未领取' ) pull_status from statistic.gift_pack where tenant_id = :1 and tenant_app_id = :2 and page_id = :3 and src_type = :4 order by push_time desc ) tmp_count|3|15|5||0|0|1688172|562724|3|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_835720547919761408 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|5|3||0|0|87601|44850|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_817878088380628992 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|11|4||0|0|256133|107727|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and scene = :4 and user_name > :5 and shop_name > :6|3|27|13||0|0|3993072|1331024|3|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_469175049962786816 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|7|4||0|0|84368|34453|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|3|13|9||0|0|7228773|2409591|3|1|
|user_service|select id , plat_unionid , plat_openid , user_name , mobile_no , nick_name , sex , head_img_url , country , province , city , status , create_time , update_time , is_subscribe , subscribe_time from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 ) limit :8|3|6|3||0|0|6655183|2218406|5|2|
|gift_mail|select t.* , tt.can_take_date , tt.shop_name , tt.take_shop_name , tt.take_employee_name , ta.recipients , ta.user_tel , concat ( ta.area , ta.address ) address , if ( t.trade_type = 3 , pl.id , it.barcode ) as barcode , if ( t.trade_type = 3 , pl.default_image_url , p.default_image_url ) as defaultimageurl from trade t left outer join trade_take tt on tt.trade_id = t.id left outer join trade_addr ta on ta.trade_id = t.id left outer join product p on p.id = t.product_id left outer join platform_product pl on pl.id = t.product_id left outer join inventory it on it.product_id = t.product_id and it.specification = t.specification where ( t.tenant_wechatapp_id = :1 ) order by create_time desc limit :2|4|12|4||0|0|55060|14548|160|100|
|user_service|select count ( 0 ) from tenant_user tu join user u on u.id = tu.user_id where tu.tenant_id = :1 and ( tu.user_name like concat ( :2 , :3 , :4 ) or tu.mobile_no = :5 or u.nick_name like concat ( :6 , :7 , :8 ) ) and tenant_app_id = :9|4|25|8||0|0|679776|169944|4|1|
|statistic|select bg.id , bd.content , bd.create_time from employee.backlog bg left join employee.backlog_detail bd on bg.id = bd.backlog_id where bg.tenant_app_id = :1 and bd.create_time >= :2 and bd.create_time <= :3 limit :4 offset :5|4|7|3||0|0|1193560|393294|462|243|
|statistic|select es.tenant_wechatapp_id tenant_app_id , es.member_erp_id , ifnull ( sum ( es.amount ) , 0 ) salesbalance , count ( 1 ) salesamount from base_erp_member bm inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id where bm.tenant_app_id = :1 and es.sales_status = :2 group by es.tenant_wechatapp_id , es.member_erp_id limit :3 offset :4|4|12|7||0|0|25928|9586|1273|395|
|coupon_service|select id as usercouponid , coupon_no as couponno , end_time as endtime , begin_time as begintime , face_value as facevalue , coupon_name as couponname , coupon_type as coupontype , remark , exchange_shop , off_type from coupon_user where owner_id = :1 and coupon_template_id = :2 and coupon_state = :3 and end_time > now ( ) limit :4|4|18|5||0|0|1598993|408612|3|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where user_id != :1 and tenant_app_id = :2|4|13|5||0|0|727058|285209|4|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_907400816212623360_907482231063232512 where vip_id = :1|4|9|3||0|0|487228|121807|2|1|
|statistic|select t.user_id id , t.user_name name , t.amount from ( select user_id , user_name , sum ( amount ) amount from statistic.result_add_shop_user where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 and user_name > :6 group by user_id , user_name ) t order by t.amount desc|5|8|2||0|0|1532150|306466|50|19|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_822257848045047808 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|45|14||0|0|1349669|1006023|2|2|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|5|10|3||0|0|412784|310736|69|41|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|5|6|2||0|0|132800|26560|5|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_821229068421742592_821504909596737536 where vip_id = :1|5|16|4||0|0|984370|196874|3|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_814020764498956288 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|11|3||0|0|196362|74544|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 group by tenant_id|6|14|3||0|0|908790|151465|6|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816450513213112320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|6|8|2||0|0|236744|54320|0|0|
|statistic|select t.shop_id id , t.shop_name name , t.totalamount , t.finishamount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finish_rate from ( select shop_id , shop_name , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and shop_id != :4 and user_id != :5 group by shop_id , shop_name ) ec ) t order by t.finish_rate desc|6|14|3||0|0|254224|56695|108|27|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_487569764496052224_487577238854832128 where vip_id = :1|6|17|6||0|0|686964|114494|3|1|
|statistic|select ec.scene , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finishrate from ( select scene , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and user_id != :4 and shop_name != :5 group by scene ) ec order by ec.scene|6|14|3||0|0|253920|56619|32|6|
|statistic|select t.shop_id id , t.shop_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.shop_id , ec.shop_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.sales_date between :3 and :4 group by ec.shop_id , ec.shop_name ) ec ) t order by t.finish_rate desc|6|14|6||0|0|5565154|927529|79|14|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|7|8|1||0|0|293961|48202|293961|48202|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 group by tenant_id|7|34|6||0|0|3001383|428769|7|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_839295151019966464 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|7|16|4||0|0|398425|110732|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 group by tenant_id|7|37|7||0|0|3612308|516044|7|1|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|8|21|3||0|0|2550168|318771|8|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_823844580729339904_823856782299402240 where vip_id = :1|8|35|5||0|0|2187888|273486|6|1|
|user_service|select count ( * ) from tenant_user where tenant_app_id = :1 and shop_id = :2 and mobile_no is not null and mobile_no != :3|8|31|6||0|0|845172|142571|8|1|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.source_type , t.amount from ( select mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type , count ( * ) amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type|8|13|2||0|0|4445150|678410|654|108|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , sum ( tmp.cancel_amount ) cancel_amount , sum ( tmp.full_amount ) full_amount , sum ( tmp.bind_amount ) bind_amount , sum ( tmp.subscribe_amount ) subscribe_amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.cancel_amount , t.full_amount , t.bind_amount , t.subscribe_amount from ( select mb.tenant_id , mb.tenant_app_id , mt.shop_id , sum ( if ( mb.subscribe_flag = 0 , 1 , 0 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name|8|14|3||0|0|4388945|665601|185|45|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) employee_user_id , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name , t.amount from ( select mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.employee_user_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :2 and mb.create_time <= :3 and mb.register_flag = :4 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.employee_user_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and ( t.employee_user_id = oe.employee_erp_id or t.employee_user_id = oe.employee_user_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name|9|27|5||0|0|14963255|3253798|6601|1321|
|statistic|select count ( 0 ) from ( select tmp.shop_id shopid , tmp.shop_name shopname , tmp.sale_amount saleamount , tmp.war_amount waramount , tmp.warrate from ( select t.shop_id , t.shop_name , t.sale_amount , t.war_amount , if ( sale_amount = 0 , 0 , round ( t.war_amount*100/t.sale_amount , 2 ) ) warrate from ( select ec.shop_id , ec.shop_name , sum ( ifnull ( ec.sale_amount , 0 ) ) sale_amount , sum ( ifnull ( ec.war_amount , 0 ) ) war_amount from statistic.result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.user_name != :3 and ec.tenant_app_id = :4 group by ec.shop_id , ec.shop_name ) t ) tmp order by tmp.shop_name ) tmp_count|9|31|4||0|0|8347503|927524|9|1|
|tenant|select id , sales_no , sales_date , member_erp_id , sales_erp_id , is_sales from erp_sales where sales_no like concat ( :1 , :2 , :3 ) and sales_status = :4 and tenant_id = :5 and tenant_wechatapp_id = :6 order by sales_date desc limit :7|9|12|4||0|0|3207276|419980|0|0|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|11|20|3||0|0|525680|103253|27|4|
|statistic|select es.tenant_wechatapp_id tenant_app_id , es.member_erp_id , group_concat ( distinct sd.category_erp_id ) categoryid , group_concat ( distinct sd.category_name ) categoryname , min ( es.sales_date ) firstsalestime , max ( es.sales_date ) lastsalestime from base_erp_member bm inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where bm.tenant_app_id = :1 and sd.sales_type = :2 and es.sales_status = :3 group by es.tenant_wechatapp_id , es.member_erp_id limit :4 offset :5|11|23|5||0|0|250964|49244|1705|392|
|platform|update vendormember vm inner join ( select sum ( integral ) as integral , sum ( if ( integral > 0 , integral , 0 ) ) as hisintegral from integrallog where vendorid = :1 and memberid = :2 and isdeleted = :3 ) s on :4 = :5 set vm.integral = ifnull ( s.integral , :6 ) , vm.hisintegral = ifnull ( s.hisintegral , :7 ) , vm.updatetime = now ( ) where vendorid = :8 and memberid = :9|11|14|2||0|0|1983|1298|0|0|
|user_service|select count ( 0 ) from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 )|12|42|8||0|0|26620697|2218406|12|1|
|statistic|select t.user_id id , t.user_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.user_id , ec.user_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.user_id , ec.user_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from statistic.result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id = :2 and ec.user_id != :3 and ec.tenant_app_id = :4 and ec.sales_date between :5 and :6 group by ec.user_id , ec.user_name ) ec ) t order by t.finish_rate desc|12|77|11||0|0|11130144|927577|117|26|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|12|37|4||0|0|449930|37620|22|2|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , member_grade , sex , new_or_old , lifecycle , animal_born , constellation , month_birth , age_group , months_initiation , month_lately_consume , frequency_total_consume , amount_total_consume , total_integral , usable_integral , member_identity , member_source , year_initiation , lately_month_birth , subscribe_state , bind_state , perfect_data_state , memorial_day , member_anniversary , member_shop , last_product_category , last_sale_balance , last_stone_weight , last_gold_weight , customer_type , customer_character , shape , skin_color , face_type , affective_state , preference , accepted_info_type , estimated_consumption_capacity , maintain_level , buy_purpose , intent_product , price_area , enter_shop_need from tag_service.label_vip_match_885278795660111872_885279553956712448 where vip_id = :1|12|59|9||0|0|4103376|341948|8|1|
|tenant|select count ( 0 ) from erp_sales where tenant_id = :1 and tenant_wechatapp_id = :2 and sales_date >= :3 and employee_erp_id = :4 and sales_status = :5|12|20|2||0|0|2147401|179141|12|1|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , retries , success_time , send_fail_msg , create_time , update_time , send_data from customer_face_register_message where status in ( :1 , :2 ) and retries < :3 limit :4|13|18|2||0|0|149655|11512|0|0|
|employee|select * from backlog where tenant_app_id = :1 and user_id = :2 and status in ( :3 , :4 ) and scene = :5 and expire_time >= :6 order by create_time desc limit :7|13|30|3||0|0|1032794|79449|27|5|
|erp_sync|select * from erp_sync.retry_data where ( need_erp_member_id = :1 or ( need_erp_member_id = :2 and erp_member_id is not null ) ) and retry_times > :3 order by id asc|14|68|7||0|0|652091|46595|14|1|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|14|20|3||0|0|3350579|239374|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( t.grade_erp_id , -1 ) grade_erp_id , if ( t.grade_erp_id is null , '无' , gd.grade_name ) grade_name , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.amount from ( select mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.grade_erp_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.grade_erp_id ) t left join statistic.grade gd on t.tenant_id = gd.tenant_id and t.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name|15|40|10||0|0|5578065|746495|1029|139|
|user_service|select count ( 0 ) from ( select t1.erp_member_id as membererpid , t2.head_img_url as headimgurl , t2.nick_name as nickname , t1.mobile_no as mobileno , date_format ( t1.bind_time , '%y-%m-%d%h:%i:%s' ) as registertime from tenant_user t1 join `user` t2 on t1.user_id = t2.id left join user_employee t3 on t1.user_id = t3.user_id and t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id where t3.id is null and t1.mobile_no is not null and t1.mobile_no != :1 and t1.erp_member_id is not null and t1.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4 ) table_count|15|50|6||0|0|679587|93251|15|1|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where tasktype = :1 and vendorid = :2 and date_format ( tasktime , :3 ) >= curdate ( ) and ( taskstatus = :4 or taskstatus = :5 )|16|25|3||0|0|9992048|624503|13|12|
|customer|select count ( 0 ) from customer_face_pass t where :1 = :2 and t.is_checkin = :3 and t.shop_id = :4 and t.person_type not in ( :5 )|17|105|12||0|0|1505372|157870|17|1|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , create_time , update_time , receive_data , response_data from customer_face_sync_message where status = :1 and create_time < date_add ( now ( ) , interval :2 minute ) order by id asc limit :3|17|81|7||0|0|787776|49192|17|1|
|statistic|select id , timestampdiff ( year , solar_birthday , '2019-07-0623:59:59.001' ) age from member where tenant_app_id = :1 and birthday_month_day = :2 limit :3 offset :4|19|47|6||0|0|3203014|346509|2925|819|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( * ) total_amount from ( select bg.id , bg.tenant_id , bg.tenant_app_id , bg.shop_id , bg.shop_name , bg.user_id , bg.user_name , bg.status , bg.scene , date_format ( bg.expire_time , '%y-%m-%d' ) expire_date , date_format ( bg.create_time , '%y-%m-%d' ) statistic_date from statistic.backlog bg where bg.tenant_app_id = :1 and bg.shop_id != :2 and bg.user_id != :3 and bg.create_time >= :4 and bg.create_time <= :5 ) t group by t.tenant_id , t.tenant_app_id , t.shop_id , t.shop_name , t.user_id , t.user_name , t.scene , t.expire_date , t.statistic_date limit :6 offset :7|20|37|13||0|0|26527332|1329190|333|110|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|23|37|3||0|0|639306|36551|23|1|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 group by tenant_id|23|116|13||0|0|55420593|2409591|23|1|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( 1 ) finish_amount from ( select bg.id , bg.tenant_id , bg.tenant_app_id , bg.shop_id , bg.shop_name , bg.user_id , bg.user_name , bg.status , bg.scene , date_format ( bg.expire_time , '%y-%m-%d' ) expire_date , date_format ( bg.update_time , '%y-%m-%d' ) statistic_date from statistic.backlog bg where bg.tenant_app_id = :1 and bg.status = :2 and bg.shop_id != :3 and bg.user_id != :4 and bg.update_time >= :5 and bg.update_time <= :6 ) t group by t.tenant_id , t.tenant_app_id , t.shop_id , t.shop_name , t.user_id , t.user_name , t.scene , t.expire_date , t.statistic_date limit :7 offset :8|26|32|2||0|0|34503618|1330413|120|92|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|32|88|7||0|0|16513408|516044|32|1|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|36|86|6||0|0|15435684|428769|36|1|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|36|108|4||0|0|345200|9643|345200|9643|
|statistic|select mt.id , es.sales_erp_id lastsaleerpid , sd.category_erp_id lastcategoryid , sd.category_name lastcategoryname , sd.stone_weight laststoneweight , sd.gold_weight lastgoldweight , round ( sd.amount_pay/if ( sd.quantity = 0 , 1 , sd.quantity ) , 2 ) price , es.amount salesbalance from statistic.member_extra mt inner join tenant.erp_sales es on mt.tenant_app_id = es.tenant_wechatapp_id and mt.member_erp_id = es.member_erp_id and mt.last_sales_time = es.sales_date inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where mt.tenant_app_id = :1 and mt.create_time <= :2 and sd.sales_type = :3 and mt.create_time >= :4 order by mt.id , es.sales_erp_id desc , price desc limit :5 offset :6|40|141|21||0|0|7481413|989808|3946|355|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|44|92|4||0|0|2643632|103272|44|1|
|statistic|select sum ( amount ) amount from result_shop_user where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date = ( select max ( statistic_date ) from result_shop_user where tenant_id = :4 and tenant_app_id = :5 and shop_id = :6 and user_name > :7 group by shop_id )|64|243|16||0|0|154216062|2409782|64|1|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|68|311|6||0|0|650039|9642|650039|9642|
|authorization_service|update user_login_token set status = :1 where user_id = :2 and tenant_id = :3 and tenant_wx_app_id = :4 and login_way = :5|73|173|7||0|0|15293|1041|0|0|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|89|375|6||0|0|815659|9640|815659|9640|
