|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|value_added|select id , tenant_wechatapp_id as tenantwechatappid , user_id as userid , template_id as templateid , sales_erp_id as saleserpid , product_name as productname , shop_name as shopname , product_barcode as productbarcode , amount_total as amounttotal , amount_pay as amountpay , amount_added as amountadded , state as state , add_days as adddays , added_percent_per_day as addedpercentperday , devalue_percent_per_day as devaluepercentperday , keeping_days as keepingdays , exchange_days as exchangedays , coupon_user_id as couponuserid , sales_index as salesindex , create_time as createtime from value_added_user where sales_erp_id = :1 and sales_index = :2 and tenant_wechatapp_id = :3 and state != :4|1|2|2||0|0|35822|35822|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|127746|127746|26|26|
|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_818623050667823104 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|32951|32951|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_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|1|1||0|0|520567|520567|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836408967545536512 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|173949|173949|3000|3000|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_827516559562940416' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|14|14||0|0|442278|442278|29|29|
|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_822257848045047808 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_822257848045047808 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|14|14||0|0|28744|28744|0|0|
|tag_service|insert into tag_service.member_statistic_c07db608e47ddf406d225e7fae1fe803 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|3|3||0|0|3|3|0|0|
|payment|select id , tenant_id , tenant_app_id , goods_order_source , goods_order_no , goods_name , goods_amount , fee_type , request_ip , user_id , user_identify , user_sub_identify , pay_way , trade_type , order_start_time , order_expire_time , prepay_id , transaction_id , pay_amount , pay_finish_time , pay_status , pay_status_desc , error_msg , wxappid , sub_wxappid , mch_id , sub_mch_id , callback_tag , callback_result , create_time , update_time from pay_order where callback_result in ( :1 , :2 ) and pay_status in ( :3 , :4 ) order by id asc limit :5|1|2|2||0|0|39540|39540|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|32|32||0|0|2665537|2665537|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_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|33085|33085|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|1|3|3||0|0|4720|4720|10|10|
|account|/* applicationname = datagrip 2018.2.2 */ select * from statistic.member where mobile_no = :1|1|22|22||0|0|5038490|5038490|1|1|
|activity_service|select atu.user_id as userid , if ( atu.finished_task_num > ata.task_total_num , ata.task_total_num , atu.finished_task_num ) as lightupnum , date_format ( atu.update_time , '%y-%m-%d%h:%i:%s' ) as datetime from assist_task_user atu join assist_task_activity ata on ata.id = atu.assist_task_activity_id where atu.assist_task_activity_id = :1 and atu.partake_type = :2 order by lightupnum desc , atu.update_time desc|1|1|1||0|0|85076|85076|5618|5618|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.id = :4 and t1.step = :5|1|3|3||0|0|529183|529183|1|1|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|1|1|1||0|0|43244|43244|10|10|
|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|5|5||0|0|43502|43502|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_814640285408600064' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|9|9||0|0|9559|9559|13|13|
|tag_service|insert into tag_service.label_vip_match_818707624273952768 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_818707624273952768 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|1822597|1822597|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_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|3|3||0|0|1368055|1368055|3|3|
|tag_service|select bg.id , substr ( data , 9 , 18 ) follow_id from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620137|620137|36|36|
|tag_service|delete from tag_service.label_vip_match_821174502091165696 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821174502091165696 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|2|2||0|0|54556|54556|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|521001|521001|62|62|
|tag_service|insert into tag_service.label_vip_match_828766757295529984 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_828766757295529984 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|863849|863849|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_823688108565368832 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_823688108565368832 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|6|6||0|0|477892|477892|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_818707624273952768' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|9|9||0|0|14765|14765|32|32|
|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|7|7||0|0|477828|477828|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_819000302970638336 where tenant_app_id = :1 and vip_id = :2|1|1|1||0|0|36308|36308|1|1|
|tag_service|delete from tag_service.label_vip_match_836408967545536512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836408967545536512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|28170|28170|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|3|3||0|0|66068|66068|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_469175049962786816' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|3567|3567|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_816450513213112320 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|20492|20492|4|4|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_821229068421742592' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|1|1||0|0|166446|166446|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|408800|408800|69|69|
|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-06-0323: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|5|5||0|0|33917|33917|422|422|
|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-06-0323: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.update_time >= :2 and od.create_time <= :3 and od.update_time <= :4 limit :5 offset :6|1|2|2||0|0|35509|35509|109|109|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|1|1|1||0|0|4864|4864|10|10|
|tag_service|delete from member_grouping_statistic where group_id = :1 and group_type = :2|1|2|2||0|0|178611|178611|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_885278795660111872' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|1|1||0|0|698637|698637|4|4|
|tag_service|insert into tag_service.member_statistic_9974257d528ad1c5c1e10800af94d7b8 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|3|3||0|0|3|3|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_835720547919761408 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|9529|9529|8|8|
|statistic|select mb.tenant_app_id , mb.member_user_id , mb.user_id , mb.user_name , mb.mobile_no , '_885278795660111872' tableindex from statistic.base_erp_member be inner join statistic.member mb on be.tenant_app_id = mb.tenant_app_id and be.member_erp_id = mb.member_user_id where be.tenant_app_id = :1 limit :2 offset :3|1|1|1||0|0|30000|30000|5000|5000|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_821229068421742592' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|3319|3319|31|31|
|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|4|4||0|0|149220|149220|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_836363095600320512 where tenant_app_id = :1 and vip_id = :2|1|3|3||0|0|56596|56596|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_469175049962786816 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|9358|9358|4|4|
|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|1|10|10||0|0|1105860|1105860|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_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|521120|521120|79|79|
|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|27|27||0|0|1037093|1037093|0|0|
|tag_service|delete from tag_service.label_vip_match_828778547559579648 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_828778547559579648 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|38780|38780|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885418658174709760 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|88040|88040|2804|2804|
|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|90172|90172|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|113652|113652|0|0|
|statistic|delete from result_employee_value where tenant_app_id = :1|1|1|1||0|0|279371|279371|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_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.create_time <= :2 and ( sd.value_add_date <= date_format ( :3 , :4 ) and sd.value_add_date is not null ) and os.shop_id != :5 and oe.employee_user_id != :6 limit :7 offset :8|1|2|2||0|0|210407|210407|2689|2689|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_873815834940772352 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|1|1||0|0|1959|1959|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_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|904190|904190|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|2|2||0|0|477828|477828|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_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|122134|122134|49|49|
|tag_service|delete from tag_service.label_vip_match_816099123538214912 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816099123538214912 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|29806|29806|0|0|
|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|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_488003299602206720' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|2|2||0|0|127538|127538|65|65|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|1|1|1||0|0|34170|34170|10|10|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_487569764496052224 where tenant_app_id = :1 and vip_id = :2|1|4|4||0|0|112036|112036|1|1|
|statistic|select tu.tenant_id , tu.tenant_wechatapp_id , tt.activity_name , tu.activity_id , tu.user_id , date_format ( tu.create_time , '%y-%m-%d' ) statistic_date from activity_service.assist_task_user tu inner join activity_service.activity tt on tu.activity_id = tt.id where tu.tenant_wechatapp_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 limit :4 offset :5|1|1|1||0|0|338533|338533|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|19081|19081|5000|5000|
|tag_service|insert into tag_service.member_statistic_53e503dd6739ffa4669b4a35b94af2c2 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|2|2||0|0|103837|103837|0|0|
|tag_service|insert into tag_service.member_statistic_3f1a890a58fe8011b6ae32657b8a8241 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|11|11||0|0|175869|175869|0|0|
|platform|select getuid , count ( id ) as qty from ( select * from coupondetail where couponstate = :1 and vendorid = :2 and month ( expirytime ) = month ( date_sub ( curdate ( ) , interval :3 day ) ) and day ( expirytime ) = day ( date_sub ( curdate ( ) , interval :4 day ) ) ) as t group by getuid|1|2|2||0|0|318761|318761|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_476787156229165056' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|13|13||0|0|442278|442278|81|81|
|tag_service|select concat ( 'select*fromcustomer.customer_maintain_followwhereid=' , substr ( data , 9 , 18 ) , 'andremind_task_id=null;' ) from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620139|620139|36|36|
|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|2|2||0|0|163743|163743|0|0|
|statistic|select tu.id , tu.tenant_id tenantid , tu.tenant_wechatapp_id tenantappid , tu.member_erp_id memberuserid , tu.user_name username , tu.mobile_no mobileno , tu.create_time tempcreatetime , '2019-06-0323:59:59.0' updatetime , tu.dept_erp_id shopid , ifnull ( tu.consumption_integral , 0 ) consumptionintegral , tu.grade_erp_id gradeerpid , tu.employee_erp_id employeeuserid , 'unknow' sourcetype from user_service.erp_member tu left join user_service.tenant_user us on tu.tenant_wechatapp_id = us.tenant_app_id and tu.member_erp_id = us.erp_member_id where tu.tenant_wechatapp_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 and us.id is null limit :4 offset :5|1|1|1||0|0|3763|3763|0|0|
|tag_service|insert into tag_service.member_statistic_e0c9e3d9f9ec080836c8d7e0a4f08023 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|4|4||0|0|3|3|0|0|
|tag_service|select substr ( data , 9 , 18 ) from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620139|620139|36|36|
|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|791962|791962|144|144|
|account|/* applicationname = datagrip 2018.2.2 */ select bg.id , substr ( data , 8 , 18 ) follow_id from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620135|620135|36|36|
|payment|insert into `job_execution_log` ( `id` , `job_name` , `task_id` , `hostname` , `ip` , `sharding_item` , `execution_source` , `is_success` , `start_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 )|1|2|2||0|0|0|0|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_477416547359526912' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|1804|1804|5|5|
|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|3|3||0|0|151492|151492|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_830220893509701632' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|8714|8714|54|54|
|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_488003299602206720 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_488003299602206720 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|127712|127712|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_885418658174709760 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|56217|56217|3|3|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_480726380749918208' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|9|9||0|0|130692|130692|81|81|
|statistic|select tenant_wechatapp_id , sales_erp_id , product_barcode , id , amount_added , date_format ( create_time , '%y-%m-%d' ) value_add_date , coupon_user_id , state , '_818691468687347712' tableindex from value_added.value_added_user where tenant_wechatapp_id = :1 and update_time >= :2 and update_time <= date_add ( :3 , interval :4 hour ) order by id limit :5 offset :6|1|2|2||0|0|3398|3398|930|930|
|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|2|2||0|0|167492|167492|148|148|
|tag_service|insert into tag_service.member_statistic_588eec4837028d39d7bbb4bcc26eee56 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|3|3||0|0|3|3|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_835720547919761408 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|20997|20997|3000|3000|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_841816981308002304 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|6425|6425|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_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|40|40||0|0|2665537|2665537|0|0|
|tag_service|delete from tag_service.label_vip_match_818984074398965760 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818984074398965760 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|26190|26190|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 and ( tu.user_name like concat ( concat ( :6 , :7 , :8 ) ) or tu.mobile_no = :9 )|1|1|1||0|0|966|966|1|1|
|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|1|10|10||0|0|188388|188388|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_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|2|2||0|0|477043|477043|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|1|1||0|0|620849|620849|0|0|
|tag_service|insert into tag_service.label_vip_match_477416547359526912 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_477416547359526912 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|4|4||0|0|354478|354478|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|6|6||0|0|655356|655356|19|19|
|tag_service|delete from tag_service.label_vip_match_816869802005020672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816869802005020672 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|2|2||0|0|47467|47467|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 tenant_app_id = :2 and expire_date between :3 and :4 and shop_id != :5 and user_id != :6 group by shop_id , shop_name ) ec ) t order by t.finish_rate desc|1|3|3||0|0|43094|43094|20|20|
|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|292443|292443|26|26|
|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|4|4||0|0|281433|281433|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_867265598260879360' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|2|2||0|0|62625|62625|21|21|
|tag_service|delete from tag_service.label_vip_match_818691468687347712 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818691468687347712 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|33850|33850|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_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|4|4||0|0|344596|344596|0|0|
|tag_service|insert into tag_service.label_vip_match_876595466006016000 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_876595466006016000 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|117487|117487|0|0|
|tag_service|insert into tag_service.member_statistic_1bb99cffe711db200cbba3cedc0c50c8 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|15|15||0|0|175869|175869|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|3|3||0|0|1368034|1368034|0|0|
|account|select id , tenant_id , tenant_app_id , account_type , owner_type , owner_id , balance , cumulation , status from account where owner_type = :1 and balance < :2 and account_type = :3|1|15|15||0|0|4554103|4554103|43|43|
|tag_service|delete from tag_service.label_vip_match_826961354203107328 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826961354203107328 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|42082|42082|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|4313|4313|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_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|520574|520574|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_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|2|2||0|0|477038|477038|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_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|2|2||0|0|130999|130999|41|41|
|tag_service|delete from tag_service.label_vip_match_477416547359526912 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_477416547359526912 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|3|3||0|0|34562|34562|0|0|
|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|698639|698639|248|248|
|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|11|11||0|0|318761|318761|1|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_886136151126163456 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|24000|24000|3000|3000|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_885418658174709760' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|1|1||0|0|56166|56166|71|71|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and expire_time between :3 and :4 and scene = :5 and user_name > :6 and shop_name > :7|1|10|10||0|0|1105860|1105860|1|1|
|tag_service|insert into tag_service.label_vip_match_816869802005020672 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_816869802005020672 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|855694|855694|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_471320523331211264 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|12859|12859|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_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|2|2||0|0|162177|162177|148|148|
|tag_service|insert into tag_service.member_statistic_efb8ea8a0e945a93b80d884f837ffdd5 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|4|4||0|0|3|3|0|0|
|tag_service|delete from mark_vip_label_task where create_time <= :1|1|15|15||0|0|0|0|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_816440425157005312 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|17582|17582|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 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|3|3||0|0|1368692|1368692|87|87|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|2|2||0|0|620134|620134|36|36|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_818691468687347712' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|3|3||0|0|2067|2067|3|3|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|1|1|1||0|0|6744|6744|10|10|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_836408967545536512' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|1239|1239|14|14|
|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_817878088380628992 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_817878088380628992 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|48828|48828|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_814020764498956288' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|10432|10432|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 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_818707624273952768 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|35718|35718|32|32|
|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 tenant_app_id = :2 and expire_date between :3 and :4 and user_id != :5 and shop_name != :6 group by scene ) ec order by ec.scene|1|3|3||0|0|43050|43050|9|9|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817178025371156480 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|35998|35998|3000|3000|
|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|31163|31163|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_818623050667823104 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|69262|69262|0|0|
|tag_service|select * from tag_service.member_grouping_statistic order by create_time desc limit :1|1|1|1||0|0|178869|178869|100|100|
|tag_service|insert into tag_service.member_statistic_e3bdea528a3b278382dc7ff86a055d3f 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 and t1.mobile_no = :6|1|3|3||0|0|3|3|0|0|
|statistic|delete from statistic.batch_step_execution where step_execution_id <= :1|1|1|1||0|0|22438|22438|0|0|
|tag_service|delete from tag_service.label_vip_match_818632945152598016 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818632945152598016 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|2|2||0|0|38080|38080|0|0|
|tag_service|select bg.* from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|2|2||0|0|620143|620143|36|36|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_821174502091165696' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|2677|2677|10|10|
|account|/* applicationname = datagrip 2018.2.2 */ select bg.id , substr ( data , 7 , 25 ) follow_id from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620135|620135|36|36|
|statistic|select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , 'unknow' sourcetype , tu.create_time createtime , '2019-06-0323:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , '粉丝' , '游客' ) identity from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 order by tu.id limit :4 offset :5|1|1|1||0|0|1846|1846|3|3|
|account|/* applicationname = datagrip 2018.2.2 */ select bg.id , substr ( data , 9 , 19 ) follow_id from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620135|620135|36|36|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_821229068421742592' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|1|1||0|0|166446|166446|365|365|
|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|1|10|10||0|0|1105860|1105860|1|1|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_830220893509701632' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|2|2||0|0|80025|80025|75|75|
|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|11|11||0|0|1105860|1105860|1|1|
|tag_service|insert into tag_service.label_vip_match_482207042405273600 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_482207042405273600 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|1033030|1033030|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|2|2||0|0|65528|65528|0|0|
|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|1|2|2||0|0|166511|166511|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_819000302970638336' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|5557|5557|55|55|
|account|/* applicationname = datagrip 2018.2.2 */ select bg.* from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|2|2||0|0|620134|620134|36|36|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_836363095600320512' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|8677|8677|64|64|
|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|7|7||0|0|120774|120774|0|0|
|tag_service|select concat ( 'updatecustomer.customer_maintain_followsetremind_task_id=' , bg.id , 'whereid=' , substr ( data , 9 , 18 ) , ';' ) from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|2|2||0|0|620139|620139|36|36|
|employee|update backlog set employee_id = :1 , user_id = :2 where ( employee_id = :3 and tenant_app_id = :4 and status in ( :5 , :6 ) )|1|1|1||0|0|37342|37342|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_827516559562940416' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|1|1||0|0|408297|408297|151|151|
|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|16|16||0|0|1368692|1368692|87|87|
|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|1|1||0|0|84944|84944|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_471320523331211264' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|4631|4631|24|24|
|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_814640285408600064 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|48516|48516|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_822257848045047808' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|2|2||0|0|304603|304603|171|171|
|tag_service|insert into tag_service.label_vip_match_816440425157005312 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_816440425157005312 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|316991|316991|0|0|
|tag_service|insert into tag_service.label_vip_match_491650258254827520 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_491650258254827520 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|340335|340335|0|0|
|platform|select `no` , `salesid` , `noteno` , `barcode` , `productname` , `customername` , `customertel` , `quantity` , `amount` , `productdesc` , `remark` , `salername` , `productimageid` , `productimageurl` , `shopid` , `vendorid` , `vendormemberid` , `salesdetailid` , `createtime` , `certimageurl` , `certimageid` , `aftersalesremark` , `eid` , `id` from `productcerts` where `vendormemberid` = :1 and `vendorid` = :2|1|1|1||0|0|5527|5527|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_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|477038|477038|0|0|
|tag_service|select concat ( 'deletefromemployee.backlogwhereid=' , bg.id , ';' ) from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|1|1|1||0|0|620143|620143|36|36|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_823844580729339904' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|5|5||0|0|22806|22806|99|99|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826961354203107328 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|44941|44941|3000|3000|
|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_816440425157005312 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_816440425157005312 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|17605|17605|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|8315|8315|0|0|
|tag_service|delete from tag_service.label_vip_match_491650258254827520 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_491650258254827520 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|2|2||0|0|31274|31274|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog where scene in ( :1 , :2 )|1|15|15||0|0|606547|606547|502|502|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_823688108565368832' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|4|4||0|0|477038|477038|363|363|
|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|2|2||0|0|89586|89586|13|13|
|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|575228|575228|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|1368069|1368069|5|5|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_885278795660111872' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|4|4||0|0|698637|698637|179|179|
|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|2|2||0|0|28984|28984|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and expire_time between :3 and :4 and shop_id = :5 and user_name > :6 and shop_name > :7|1|10|10||0|0|1105860|1105860|1|1|
|tag_service|select t.vip_id as vipid , t.vip_source as vipsource , t.shop_id as shopid , t.tenant_app_id as tenantappid , m.mobile_no as mobileno from tag_service.label_vip_match_821174502091165696 t join statistic.member m on t.id = m.id where t.tenant_app_id = :1 and match ( `vip_label` ) against ( :2 in boolean mode ) limit :3 , :4|1|2|2||0|0|56|56|28|28|
|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|1|1||0|0|3312|3312|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|1|1||0|0|99974|99974|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826254702915141632 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|1|1||0|0|1334|1334|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_839295151019966464 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|13331|13331|5|5|
|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|1|1||0|0|80234|80234|27|27|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_832396582723833856 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|38991|38991|3000|3000|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_826254702915141632 where tenant_app_id = :1 and vip_id = :2|1|2|2||0|0|29424|29424|1|1|
|tag_service|insert into tag_service.label_vip_match_882402759662481408 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_882402759662481408 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|651110|651110|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_477416547359526912 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|2|2||0|0|67784|67784|39|39|
|tag_service|delete from tag_service.batch_step_execution_context where step_execution_id <= :1|1|15|15||0|0|0|0|0|0|
|tag_service|delete from tag_service.label_vip_match_818707624273952768 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818707624273952768 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|46055|46055|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818707624273952768 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|1|1||0|0|1264107|1264107|289|289|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_480726380749918208' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|14123|14123|20|20|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_818707624273952768' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|3|3||0|0|35493|35493|60|60|
|statistic|select cu.id , cu.tenant_id , cu.tenant_wechatapp_id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.create_channel , cu.coupon_state , cu.user_name , cu.creator_name , cu.face_value , cu.begin_time , cu.end_time , cu.remark , cu.create_time , cu.update_time , cu.mobile_no , cu.creator_mobile_no , if ( cu.coupon_type = 4 , vu.template_id , cu.coupon_template_id ) coupon_template_id from coupon_service.coupon_user cu left join value_added.value_added_user vu on cu.tenant_wechatapp_id = vu.tenant_wechatapp_id and cu.id = vu.coupon_user_id where cu.tenant_wechatapp_id = :1 and cu.update_time >= :2 and cu.update_time <= :3 limit :4 offset :5|1|8|8||0|0|7625|7625|15|15|
|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|4|4||0|0|341729|341729|0|0|
|tag_service|delete from tag_service.label_vip_match_482207042405273600 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_482207042405273600 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|2|2||0|0|52104|52104|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog where scene = :1 and create_time between :2 and :3|1|17|17||0|0|607823|607823|35|35|
|tag_service|delete from tag_service.label_vip_match_818623050667823104 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818623050667823104 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|7||0|0|323331|161675|0|0|
|tag_service|delete from tag_service.label_vip_match_830220893509701632 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_830220893509701632 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|13|8||0|0|565666|282834|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_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|2|5|3||0|0|109763|95594|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|2|2|1||0|0|3206|1603|4|2|
|tag_service|delete from tag_service.label_vip_match_891434732540272640 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_891434732540272640 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|269107|134559|0|0|
|tag_service|insert into tag_service.label_vip_match_821229068421742592 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|41|25||0|0|85858950|42950787|0|0|
|tag_service|insert into tag_service.label_vip_match_490810080325931008 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_490810080325931008 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|13|9||0|0|15559252|7780562|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|2|3|2||0|0|67456|33728|26|13|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814020764498956288 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|3|2||0|0|433859|288804|108|69|
|tag_service|insert into tag_service.member_statistic_2dfe96151ae52adca41b22438119fbed 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|2|8|4||0|0|351738|175869|0|0|
|tag_service|select group_concat ( substr ( data , 9 , 18 ) ) from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|2|3|2||0|0|1240279|620140|2|1|
|tag_service|delete from tag_service.label_vip_match_834615931371048960 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_834615931371048960 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|5|3||0|0|252766|126384|0|0|
|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|2|3|2||0|0|12034|6023|2|1|
|tag_service|delete from tag_service.label_vip_match_885278795660111872 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_885278795660111872 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|29|16||0|0|1184517|592363|0|0|
|tag_service|insert into tag_service.label_vip_match_823844580729339904 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_823844580729339904 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|46|27||0|0|106145138|53079353|0|0|
|tag_service|delete from tag_service.label_vip_match_827516559562940416 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_827516559562940416 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|19|10||0|0|976269|488179|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_471320523331211264 where tenant_app_id = :1 and vip_id = :2|2|2|1||0|0|69216|34608|2|1|
|payment|insert into `job_status_trace_log` ( `id` , `job_name` , `original_task_id` , `task_id` , `slave_id` , `source` , `execution_type` , `sharding_item` , `state` , `message` , `creation_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 )|2|3|1||0|0|0|0|0|0|
|tag_service|insert into tag_service.label_vip_match_816096827580399616 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_816096827580399616 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|6383873|3192144|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|3|2||0|0|2719973|1686747|588|318|
|tag_service|delete from tag_service.label_vip_match_876595466006016000 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_876595466006016000 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|5|3||0|0|156079|78043|0|0|
|tag_service|delete from tag_service.label_vip_match_836363095600320512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836363095600320512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|226003|113003|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|2|2|1||0|0|61188|56856|12|10|
|tag_service|insert into tag_service.label_vip_match_480726380749918208 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_480726380749918208 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|38|29||0|0|44574337|22290102|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0323:59:59.0' collect_time , es.sales_status , '_476787156229165056' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|2|5|4||0|0|522177|461762|142|132|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|2|2|1||0|0|42576|21288|20|10|
|tag_service|delete from tag_service.label_vip_match_839295151019966464 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_839295151019966464 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|12|7||0|0|435828|217914|0|0|
|tag_service|delete from tag_service.label_vip_match_490810080325931008 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490810080325931008 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|20|15||0|0|562044|281024|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_814020764498956288 where tenant_app_id = :1 and vip_id = :2|2|4|2||0|0|104096|52048|2|1|
|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|2|3|2||0|0|30419|15211|6|4|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|2|2|1||0|0|9120|7328|20|10|
|tag_service|delete from tag_service.label_vip_match_826954007829331968 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826954007829331968 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|29|18||0|0|1071940|535970|0|0|
|tag_service|delete from tag_service.label_vip_match_835720547919761408 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_835720547919761408 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|5|3||0|0|163852|81926|0|0|
|tag_service|insert into tag_service.member_statistic_191851d4e5ad208fcefeb034a44f3417 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|2|8|4||0|0|351738|175869|0|0|
|statistic|select id , tenant_id tenantid , tenant_wechatapp_id tenantappid , user_id userid , busi_url busiurl , date_format ( create_time , '%y-%m-%d' ) statisticdate from user_service.user_source where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 and busi_url like :4 limit :5 offset :6|2|3|2||0|0|42580|27405|24|24|
|statistic|select bl.id , bl.tenant_id , bl.tenant_app_id , bl.data , bl.status , bl.update_time from employee.backlog bl where bl.tenant_app_id = :1 and bl.update_time >= :2 and bl.update_time <= :3 order by bl.id limit :4 offset :5|2|74|38||0|0|1215544|607772|948|512|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_835720547919761408 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|76100|58045|27|19|
|tag_service|delete from tag_service.label_vip_match_814640285408600064 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814640285408600064 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|7|5||0|0|225580|112790|0|0|
|tag_service|delete from tag_service.label_vip_match_480726380749918208 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_480726380749918208 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|26|20||0|0|727978|363998|0|0|
|tag_service|delete from tag_service.label_vip_match_817878088380628992 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|17|12||0|0|546149|273075|0|0|
|tag_service|delete from tag_service.label_vip_match_828766757295529984 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_828766757295529984 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|4||0|0|215574|107792|0|0|
|tag_service|insert into tag_service.label_vip_match_490540971604447232 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_490540971604447232 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|472572|393233|0|0|
|tag_service|insert into tag_service.label_vip_match_826954007829331968 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|14|9||0|0|6967837|3483949|0|0|
|tag_service|delete from tag_service.label_vip_match_819000302970638336 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_819000302970638336 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|3|2||0|0|143104|71552|0|0|
|tag_service|insert into tag_service.label_vip_match_885278795660111872 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_885278795660111872 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|19|12||0|0|18432273|9245898|0|0|
|tag_service|delete from tag_service.label_vip_match_814020764498956288 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814020764498956288 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|207988|103994|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|3|2||0|0|97386|48872|31|18|
|user_service|update tenant_user set is_subscribe = :1 , subscribe_time = :2 , create_time = create_time where id = :3|2|30|15||0|0|0|0|0|0|
|tag_service|insert into tag_service.label_vip_match_821174502091165696 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_821174502091165696 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|4373268|2190006|0|0|
|tag_service|insert into tag_service.label_vip_match_834615931371048960 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|5|3||0|0|6477197|3239209|0|0|
|tag_service|delete from tag_service.label_vip_match_816440425157005312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816440425157005312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|3||0|0|146892|73446|0|0|
|tag_service|delete from tag_service.label_vip_match_826254702915141632 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826254702915141632 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|3|2||0|0|117627|58815|0|0|
|tag_service|insert into tag_service.label_vip_match_830220893509701632 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|9|5||0|0|17459548|8730406|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|2|8|6||0|0|581720|521120|87|79|
|tag_service|delete from tag_service.label_vip_match_487569764496052224 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_487569764496052224 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|12|8||0|0|447993|223999|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_814020764498956288 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|3|2||0|0|12233|6623|11|7|
|tag_service|delete from tag_service.label_vip_match_821229068421742592 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821229068421742592 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|16|9||0|0|678205|339109|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|2|2|1||0|0|76148|38074|20|10|
|tag_service|insert into tag_service.label_vip_match_488003299602206720 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_488003299602206720 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|8|5||0|0|9641401|4821163|0|0|
|tag_service|insert into tag_service.label_vip_match_818623050667823104 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|8|6||0|0|3396084|1698435|0|0|
|tag_service|delete from tag_service.label_vip_match_471320523331211264 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_471320523331211264 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|3|2||0|0|138348|69176|0|0|
|tag_service|insert into tag_service.member_statistic_06e552038441c1834c161bc96bb192f0 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|2|3|2||0|0|12196|6098|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836408967545536512 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|2|9|6||0|0|35775|19976|2|1|
|tag_service|delete from tag_service.label_vip_match_823688108565368832 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823688108565368832 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|36|18||0|0|1161332|580668|0|0|
|tag_service|insert into tag_service.label_vip_match_839295151019966464 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_839295151019966464 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|312171|171373|0|0|
|tag_service|delete from tag_service.label_vip_match_889699715132813312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_889699715132813312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|171885|85947|0|0|
|wx_gateway|insert into wx_user ( id , tenant_id , tenant_app_id , union_id , open_id , wx_app_id , cm_union_id , cm_open_id , user_id , status ) values ( :1 , :2 , :3 , null , :4 , :5 , :6 , :7 , :8 , :9 ) on duplicate key update wx_app_id = :10 , open_id = :11 , cm_union_id = :12 , cm_open_id = :13 , status = :14 , create_time = create_time|2|30|15||0|0|0|0|0|0|
|platform|select * from ( select * from coupondetail where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and expirytime >= now ( ) ) as tv limit :4 , :5|2|3|2||0|0|637522|318761|0|0|
|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|2|3|2||0|0|67392|33696|10|5|
|wx_gateway|select count ( 0 ) from wx_template_msg where title = :1|2|30|15||0|0|1230290|819535|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816440425157005312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|3|1||0|0|366959|359895|274|238|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_830220893509701632 where tenant_app_id = :1 and vip_id = :2|2|9|5||0|0|282872|141436|2|1|
|tag_service|insert into tag_service.label_vip_match_836363095600320512 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_836363095600320512 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|5826038|2915568|0|0|
|tag_service|delete from tag_service.label_vip_match_882402759662481408 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_882402759662481408 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|7|5||0|0|235168|117584|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|2|1||0|0|89982|61729|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821174502091165696 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|4|2||0|0|3110618|1940171|339|185|
|tag_service|insert into tag_service.label_vip_match_471320523331211264 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_471320523331211264 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|851609|425963|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|3|2||0|0|141038|121713|0|0|
|tag_service|delete from tag_service.label_vip_match_490540971604447232 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490540971604447232 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|5|4||0|0|114944|57472|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|2|2|1||0|0|81766|60556|4927|3000|
|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.tenant_app_id = :4 and sd.sales_date between :5 and :6 group by sd.shop_id , os.shop_name ) t ) tmp order by tmp.addrate desc|2|4|2||0|0|684862|639511|39|20|
|tag_service|delete from tag_service.label_vip_match_816450513213112320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816450513213112320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|8|5||0|0|262968|131484|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_839295151019966464 where tenant_app_id = :1 and vip_id = :2|2|9|5||0|0|221238|110619|1|1|
|tag_service|insert into tag_service.label_vip_match_827516559562940416 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|54|33||0|0|115682179|58283055|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|2|18|15||0|0|452826|231839|1|1|
|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|9|4||0|0|613100|306550|2|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_829922417672491008 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|2|2|1||0|0|113566|99425|4990|3000|
|tag_service|insert into tag_service.label_vip_match_823688108565368832 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|29|20||0|0|35434202|17720761|0|0|
|tag_service|insert into tag_service.label_vip_match_487569764496052224 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|15|10||0|0|23649828|11827007|0|0|
|tag_service|delete from tag_service.label_vip_match_816096827580399616 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816096827580399616 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|4||0|0|223933|111967|0|0|
|wx_gateway|insert into wx_template_msg ( id , tenant_id , tenant_app_id , user_id , tenant_user_open_id , template_id , template_no , url , data , msg_id , status , err_msg , title , content , create_time , update_time , tenant_short_name , tenant_app_name , user_mobile_no , user_name , user_head_img_url ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , ... 00:11:43","color":"#000066"},"keyword3":{"value":"萌猪吊坠送吉祥 , xda0003","color":"#000066"},"keyword4":{"value":"1","color":"#000066"},"keyword1":{"value":"900006637916438528","color":"#000066"},"keyword2":{"value":"商城订单","color":"#000066"},"remark":{"value":"请尽快完成备货，顾客张明月（13664976664）将于2019年06月07日前来采购，点击查看订单详情","color":"#ff3399"},"first":{"value":"您所在的新华北旗舰店有新的订单需要备货","color":"#000000"}}' , :9 , null , null , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 )|2|30|15||0|0|0|0|0|0|
|tag_service|delete from tag_service.label_vip_match_823709122435256320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823709122435256320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|197872|98936|0|0|
|tag_service|insert into tag_service.label_vip_match_814640285408600064 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|5|3||0|0|6596607|3298965|0|0|
|tag_service|delete from tag_service.label_vip_match_841816981308002304 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_841816981308002304 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|132889|66445|0|0|
|tag_service|delete from tag_service.label_vip_match_488003299602206720 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_488003299602206720 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|5||0|0|508646|254326|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|2|2|1||0|0|220458|110229|8|4|
|tag_service|insert into tag_service.label_vip_match_814019237554196480 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_814019237554196480 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|7187670|3594186|0|0|
|tag_service|delete from tag_service.label_vip_match_814019237554196480 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814019237554196480 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|4||0|0|189116|94558|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|25|22||0|0|998086|904246|31|28|
|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|3|11|7||0|0|65173|29136|98|47|
|tag_service|insert into tag_service.member_statistic_af8cf9beb339116312936f36f73a5934 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|3|26|15||0|0|466986|175869|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|3|5|2||0|0|83134|50183|21|10|
|statistic|select tu.id , ifnull ( ey.user_id , em.employee_erp_id ) employee_user_id , '2019-06-0323:59:59.0' update_time from user_service.user_employee eu inner join statistic.member tu on eu.tenant_wechatapp_id = tu.tenant_app_id and eu.user_id = tu.user_id left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.member_user_id = em.member_erp_id left join tenant.employee_user ey on eu.employee_user_id = ey.id where eu.tenant_wechatapp_id = :1 and eu.create_time >= :2 and eu.create_time <= :3 order by tu.id limit :4 offset :5|3|4|1||0|0|91864|52244|763|439|
|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_817517269994225664 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|3|4|2||0|0|54533|36625|41|24|
|statistic|select tenant_wechatapp_id , user_id , source_type , create_time , '2019-06-0323:59:59.0' update_time from user_service.user_source where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 limit :4 offset :5|3|8|6||0|0|109055|48271|263|166|
|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|6|2||0|0|87849|62535|48|39|
|tag_service|delete from tag_service.label_vip_match_486900027235635200 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_486900027235635200 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|3|16|11||0|0|664008|221336|0|0|
|tag_service|insert into tag_service.member_statistic_b0a8ff8b46cb387c29b7cc4becbeb561 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_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|3|20|10||0|0|527607|175869|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|3|6|2||0|0|301869|100631|3|3|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 group by tenant_id|3|12|4||0|0|1037070|345690|3|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|3|24|14||0|0|1100160|367139|0|0|
|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|3|4|1||0|0|3306007|1102017|11|11|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|3|5|2||0|0|372266|124347|3|1|
|user_service|select * from user_service.user where plat_unionid = :1|3|13|10||0|0|5792277|1930766|1|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_876595466006016000 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|3|4|2||0|0|309754|149818|49|24|
|tag_service|delete from tag_service.label_vip_match_817517269994225664 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817517269994225664 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|3|12|8||0|0|470917|156973|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828778547559579648 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|3|4|1||0|0|632648|466213|4998|3000|
|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 tenant.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.source_type = :4 and mb.create_time >= :5 and mb.create_time <= :6 and mb.register_flag = :7 ) tmp_count|3|5|2||0|0|117412|61014|3|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_823709122435256320 where tenant_app_id = :1 and vip_id = :2|3|6|2||0|0|148498|49515|2|1|
|account|/* applicationname = datagrip 2018.2.2 */ select bg.id , substr ( data , 9 , 18 ) follow_id from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|3|4|1||0|0|1860407|620137|108|36|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_822257848045047808' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|3|22|17||0|0|453095|442278|151|110|
|tag_service|insert into tag_service.label_vip_match_476787156229165056 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|3|79|50||0|0|132471745|65734449|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 group by tenant_id|3|12|4||0|0|1258356|419452|3|1|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 group by tenant_id|3|5|2||0|0|373041|124347|3|1|
|statistic|select id , tenant_id , tenant_wechatapp_id tenant_app_id , src_type , page_id , tenant_app_open_id , user_id , user_name , mobile_no , head_img , create_time push_time , 0 pull_status from customize_page.award_qualified where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 limit :4 offset :5|3|16|12||0|0|1102467|367489|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826254702915141632 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|3|4|1||0|0|407996|183018|7320|3000|
|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|3|5|2||0|0|91454|30518|11|6|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|3|26|12||0|0|539376|483244|3|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|3|4|2||0|0|252832|151480|81|55|
|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|5||0|0|245526|104380|0|0|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|3|8|3||0|0|30915|10305|30915|10305|
|tag_service|insert into tag_service.label_vip_match_817517269994225664 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_817517269994225664 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|3|7|5||0|0|6024090|2923047|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_889699715132813312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|3|4|2||0|0|950860|463341|76|37|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|3|11|9||0|0|278988|92996|3|1|
|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|3|12|10||0|0|2559141|853071|42|20|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_480726380749918208 where tenant_app_id = :1 and vip_id = :2|3|15|6||0|0|546111|182037|3|1|
|tag_service|insert into tag_service.label_vip_match_486900027235635200 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|3|10|7||0|0|7324258|3611946|0|0|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2 and date_format ( update_time , :3 ) = date_format ( now ( ) , :4 )|3|5|2||0|0|1756328|586232|236|157|
|tag_service|delete from tag_service.label_vip_match_823844580729339904 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823844580729339904 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|4|26|13||0|0|2205565|551421|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_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|4|9|3||0|0|151004|72901|5|3|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|9|3||0|0|59362|22442|4|1|
|tag_service|delete from tag_service.label_vip_match_476787156229165056 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_476787156229165056 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|4|41|24||0|0|2938859|734743|0|0|
|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|4|14|4||0|0|3412099|853057|4|1|
|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|4|18|7||0|0|3412180|853051|54|15|
|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|4|73|29||0|0|4405157|1102021|22|13|
|tag_service|insert into tag_service.label_vip_match_817878088380628992 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_817878088380628992 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|4|9|3||0|0|4488557|1776293|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_891434732540272640 where tenant_app_id = :1 and vip_id = :2|4|9|3||0|0|269216|67304|4|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_817517269994225664' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|4|11|4||0|0|47547|21718|164|75|
|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|22|14||0|0|322424|158456|10372|5000|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_476787156229165056 where tenant_app_id = :1 and vip_id = :2|4|44|13||0|0|1469864|367466|4|1|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|4|35|12||0|0|7681872|1920468|4|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|4|8|2||0|0|999760|249991|73|31|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|15|11||0|0|253834|68086|4|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|4|7|2||0|0|311255|107611|10657|3000|
|tag_service|select substr ( data , 9 , 18 ) , bg.data from employee.backlog bg left join customer.customer_maintain_follow cm on bg.id = cm.remind_task_id where bg.scene = :1 and bg.status = :2 and cm.id is null|4|8|4||0|0|2480565|620143|144|36|
|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|4|13|8||0|0|87522|32116|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|9|3||0|0|38137|33328|4|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814019237554196480 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|4|10|3||0|0|13262504|3594891|1127|418|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_830220893509701632 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|9|3||0|0|71907|40570|4|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836363095600320512 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|4|11|6||0|0|6536338|2931146|1174|340|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828766757295529984 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|8|2||0|0|2891335|868309|693|187|
|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|55|17||0|0|1314495|985903|17|17|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_822257848045047808 where tenant_app_id = :1 and vip_id = :2|5|75|15||0|0|2131603|457514|3|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816869802005020672 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|5|7|2||0|0|2081674|638800|14216|3000|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|5|7|1||0|0|59058|16992|49|10|
|tag_service|insert into tag_service.label_vip_match_822257848045047808 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|5|106|69||0|0|184127755|90056250|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_882402759662481408 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|7|2||0|0|2582966|652334|301|85|
|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|17|6||0|0|403603|305059|97|65|
|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|5|9|2||0|0|216389|53123|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_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|5|7|2||0|0|113574|42998|0|0|
|tag_service|delete from tag_service.label_vip_match_469175049962786816 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_469175049962786816 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|5|16|8||0|0|692698|138541|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_491650258254827520 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|5|7|2||0|0|1217923|308809|10651|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_891434732540272640 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|7|2||0|0|2408453|605295|337|153|
|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|5|16|6||0|0|124070|53572|5|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814020764498956288 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|6|10|3||0|0|464164|119985|17280|3000|
|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|6|24|9||0|0|334029|94933|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_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|6|19|7||0|0|192466|70058|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|12|5||0|0|6806949|2324635|3409|990|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_876595466006016000 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|6|7|1||0|0|761824|149824|16456|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|10|4||0|0|1139738|505204|408|116|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|15|4||0|0|18051298|4751715|1654|396|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816096827580399616 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|11|3||0|0|10556128|3191334|441|145|
|tag_service|select count ( * ) from tag_service.label_vip_match_885278795660111872 t where tenant_app_id = :1 and match ( `vip_label` ) against ( :2 in boolean mode )|6|14|4||0|0|0|0|6|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|6|10|3||0|0|999381|166713|6|1|
|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|6|11|3||0|0|1377|1308|0|0|
|statistic|select ut.tenant_id , ut.tenant_app_id , tt.activity_name , ut.activity_id , ut.user_id , date_format ( ut.create_time , '%y-%m-%d' ) statistic_date from activity_service.user_trace ut inner join activity_service.activity tt on ut.activity_id = tt.id where ut.tenant_app_id = :1 and ut.activity_type = :2 and ut.step = :3 and ut.create_time >= :4 and ut.create_time <= :5 limit :6 offset :7|6|15|6||0|0|269583|146851|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|7|12|2||0|0|12259420|3236535|500|178|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828766757295529984 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|7|12|3||0|0|3549663|693711|19101|3000|
|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|15|3||0|0|371740|110325|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|7|18|6||0|0|106794|16992|7|1|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|7|14|3||0|0|189674|99045|11|2|
|tag_service|insert into tag_service.label_vip_match_469175049962786816 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|7|19|6||0|0|2880052|730276|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|7|23|4||0|0|466471|132637|49|10|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818707624273952768 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|7|9|2||0|0|3668511|745776|11901|3000|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|7|21|4||0|0|2231327|318761|7|1|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|8|27|7||0|0|1104549|478952|27|10|
|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 ) )|8|35|15||0|0|562523|214755|506|500|
|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|12|2||0|0|4191762|657721|163|44|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816450513213112320 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|8|14|3||0|0|893420|215991|17539|3000|
|user_service|update tenant_user set tenant_union_id = :1 , create_time = create_time where id = :2|8|120|15||0|0|0|0|0|0|
|statistic|select cu.id , cu.tenant_id , cu.tenant_wechatapp_id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.create_channel , cu.coupon_state , cu.user_name , cu.creator_name , cu.face_value , cu.begin_time , cu.end_time , cu.remark , cu.create_time , cu.update_time , cu.mobile_no , cu.creator_mobile_no , if ( cu.coupon_type = 4 , vu.template_id , cu.coupon_template_id ) coupon_template_id from coupon_service.coupon_user cu left join value_added.value_added_user vu on cu.tenant_wechatapp_id = vu.tenant_wechatapp_id and cu.id = vu.coupon_user_id where cu.tenant_wechatapp_id = :1 and cu.create_time >= :2 and cu.create_time <= :3 limit :4 offset :5|9|28|6||0|0|238077|72218|989|496|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|9|22|5||0|0|366683|108959|9|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|9|15|3||0|0|1398425|266770|1657|368|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821174502091165696 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|9|19|4||0|0|7898691|1186259|25383|3000|
|tag_service|delete from tag_service.label_vip_match_822257848045047808 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|10|97|64||0|0|9146077|914623|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_823844580729339904 where tenant_app_id = :1 and vip_id = :2|10|82|11||0|0|2757730|275773|10|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|10|15|2||0|0|4798804|669998|686|108|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|10|16|2||0|0|228220|22822|10|1|
|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 )|10|30|6||0|0|776299|208497|10|1|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2|10|15|4||0|0|5853374|586072|1108|354|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|10|17|4||0|0|2360995|236115|0|0|
|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|10|43|14||0|0|3002306|759135|15918|5000|
|statistic|select bl.id , bl.tenant_id , bl.tenant_app_id , bl.user_id , ee.employee_name user_name , ee.mobile_no , bl.status , bl.scene , bl.data , bl.begin_time , bl.expire_time , bl.create_time , bl.update_time , ifnull ( ws.id , -1 ) shop_id , ws.shop_name from employee.backlog bl left join tenant.employee_user eu on bl.tenant_app_id = eu.tenant_wechatapp_id and bl.user_id = eu.user_id left join tenant.erp_employee ee on eu.tenant_id = ee.tenant_id and eu.employee_erp_id = ee.employee_erp_id left join tenant.tenant_wechatapp_shop ws on eu.shop_id = ws.id and ws.status = :1 where bl.tenant_app_id = :2 and bl.create_time >= :3 and bl.create_time <= :4 order by bl.id limit :5 offset :6|10|155|36||0|0|3692526|610349|2846|859|
|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|11|29|6||0|0|15532084|3154204|6945|1322|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|11|41|8||0|0|47940886|11844215|2778|495|
|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|11|78|10||0|0|9383161|853039|65|12|
|coupon_service|select id , tenant_id , tenant_wechatapp_id , coupon_template_id , coupon_no , coupon_state , owner_id , creator_id , creator_mobile_no , creator_name , user_name , mobile_no , create_channel , coupon_name , face_value , coupon_type , use_threshold , begin_time , end_time , remark , create_time , update_time , product_name , exchange_shop , channel_id , writeoff_user_id , off_type from coupon_user where coupon_template_id = :1 and owner_id = :2|11|59|12||0|0|3781873|343853|8|3|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_841816981308002304 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|11|19|2||0|0|5195864|621736|31542|3000|
|tag_service|select count ( * ) from tag_service.label_vip_match_817878088380628992 t where tenant_app_id = :1 and match ( `vip_label` ) against ( :2 in boolean mode )|12|67|10||0|0|762936|89852|12|1|
|user_service|insert into user ( id , plat_unionid , plat_openid , user_name , mobile_no , nick_name , sex , head_img_url , country , province , city , status , is_subscribe , subscribe_time ) values ( :1 , null , :2 , null , null , null , :3 , null , null , null , null , null , null , null ) on duplicate key update sex = :4 , plat_openid = :5|12|180|15||0|0|0|0|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 group by tenant_id|13|48|13||0|0|24966084|1920468|13|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|13|18|2||0|0|455114|68991|13|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|13|28|5||0|0|12772395|3296485|1401|216|
|wx_gateway|insert into wx_user ( id , tenant_id , tenant_app_id , union_id , open_id , wx_app_id , cm_union_id , cm_open_id , user_id , status ) values ( :1 , :2 , :3 , null , :4 , :5 , null , :6 , :7 , :8 ) on duplicate key update wx_app_id = :9 , open_id = :10 , cm_open_id = :11 , status = :12 , create_time = create_time|14|210|15||0|0|0|0|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_891434732540272640 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|14|18|2||0|0|5858934|566995|42000|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|14|25|6||0|0|1823796|226556|36239|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|14|29|4||0|0|15219988|1779523|1486|165|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|14|81|15||0|0|1538869|478952|12|1|
|tag_service|select distinct date_format ( create_time , '%y' ) from statistic.member where tenant_id = :1 and tenant_app_id = :2|15|28|4||0|0|2328251|342083|29|2|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814019237554196480 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|15|59|9||0|0|27467933|3295262|41722|3000|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_885278795660111872 where tenant_app_id = :1 and vip_id = :2|15|150|12||0|0|4467390|297826|9|1|
|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|15|46|10||0|0|5145962|343815|11|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816450513213112320 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|15|19|2||0|0|3508006|476865|332|64|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816096827580399616 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|15|36|4||0|0|19510620|2397534|42374|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_482207042405273600 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|16|30|4||0|0|7630490|732318|46622|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_488003299602206720 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|16|35|6||0|0|18887569|3995856|1931|373|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|16|30|3||0|0|13864340|3143208|218|65|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|17|111|20||0|0|191416119|45402584|9223|1511|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_819000302970638336 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|17|33|3||0|0|10157398|870405|48096|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|17|39|4||0|0|28729044|2988034|49212|3000|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|18|30|4||0|0|443997|35422|18|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|19|68|11||0|0|15355014|3748136|215|28|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817517269994225664 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|19|35|3||0|0|18708030|1529422|56491|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|20|65|5||0|0|21567428|1699062|59119|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|108|16||0|0|41523950|8594442|5879|1099|
|tag_service|commit|20|25|2||0|0|0|0|0|0|
|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 )|20|31|3||0|0|12419540|620977|9|6|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|94|12||0|0|70388200|17442711|11444|1724|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|21|104|17||0|0|158563948|38045946|11465|1665|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_889699715132813312 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|21|40|3||0|0|6701651|463386|57252|3000|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|22|54|5||0|0|7600474|345690|22|1|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|22|61|6||0|0|9222476|419452|22|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817517269994225664 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|23|33|3||0|0|15177585|3031655|3338|372|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|23|69|4||0|0|1006240|256711|179|10|
|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 )|24|151|15||0|0|46092547|1920657|24|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|24|35|2||0|0|228409|9518|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836363095600320512 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|24|48|3||0|0|39389712|2434656|68320|3000|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|25|54|3||0|0|774351|30979|26|2|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_882402759662481408 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|25|41|3||0|0|11131804|651960|69660|3000|
|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|25|116|17||0|0|5902736|737280|1092|134|
|customer|select count ( * ) as entershopcount , max ( t.enter_shop_time ) as lastentershoptime from customer_face_pass t where t.shop_id = :1 and t.mobile_no = :2 and t.is_checkin = :3|25|118|11||0|0|2417793|208519|25|1|
|statistic|select tu.id , tu.tenant_id tenantid , tu.tenant_wechatapp_id tenantappid , tu.member_erp_id memberuserid , tu.user_name username , tu.mobile_no mobileno , tu.create_time tempcreatetime , '2019-06-0323:59:59.0' updatetime , tu.dept_erp_id shopid , ifnull ( tu.consumption_integral , 0 ) consumptionintegral , tu.grade_erp_id gradeerpid , tu.employee_erp_id employeeuserid from user_service.erp_member tu where tu.tenant_wechatapp_id = :1 and tu.update_time >= :2 and tu.create_time <= :3 and tu.update_time <= :4 limit :5 offset :6|26|63|11||0|0|2515512|291805|1599|401|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|27|65|8||0|0|1500614|99052|27|1|
|statistic|select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , tu.create_time createtime , '2019-06-0323:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :1 and tu.update_time >= :2 and tu.create_time <= :3 and tu.update_time <= :4 union all select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , tu.create_time createtime , '2019-06-0323:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :5 and em.update_time >= :6 and tu.create_time <= :7 and em.update_time <= :8 limit :9 offset :10|27|86|18||0|0|1986621|364814|2364|981|
|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|29|56|4||0|0|5895|949|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|29|52|5||0|0|15012898|1826837|4389|375|
|statistic|select id , timestampdiff ( year , solar_birthday , '2019-06-0223:59:59.001' ) age from member where tenant_app_id = :1 and birthday_month_day = :2 limit :3 offset :4|29|70|7||0|0|3383783|342224|2432|605|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|32|129|11||0|0|44346924|3025692|91888|3000|
|statistic|select u.tenant_wechatapp_id tenantappid , u.erp_member_id memberuserid , if ( '男' = u.sex , 1 , if ( '女' = u.sex , 2 , 0 ) ) sex , u.birthday tempbirthday , u.birthday_is_lunar birthdayislunar , u.memorialday_name memorialname , u.memorialday tempmemorialday , u.memorialday_is_lunar memorialdayislunar from user_service.erp_member_info u where u.tenant_wechatapp_id = :1 and u.update_time >= :2 and u.update_time <= :3 limit :4 offset :5|33|84|8||0|0|2527273|291797|2979|500|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|33|126|10||0|0|85294019|5012335|96809|3000|
|customize_page|select q.page_id as id , page.title , page.valid_days , q.create_time , q.id as qualifiedid from customize_page.award_qualified q inner join customize_page.customize_page page on q.page_id = page.id inner join ( select aq.page_id from customize_page.award_qualified aq inner join customize_page.award_detail ad on aq.page_id = ad.page_id left join customize_page.award_receive_detail ard on aq.id = ard.qualified_id and ad.id = ard.award_id and aq.user_id = ard.user_id where ( aq.user_id = :1 or aq.tenant_app_open_id = :2 ) and ard.id is null and ( ( ad.put_quantity >= ad.get_quantity and ad.type = :3 ) or ad.type not in ( :4 ) ) group by aq.page_id ) as d on d.page_id = q.page_id where q.tenant_wechatapp_id = :5 and ( user_id = :6 or tenant_app_open_id = :7 ) and if ( page.valid_days = :8 , true , to_days ( now ( ) ) < ( to_days ( q.create_time ) :9 page.valid_days ) ) order by q.create_time desc|33|59|6||0|0|22455474|750022|0|0|
|statistic|select em.id from user_service.tenant_user ut left join user_service.erp_member em on ut.tenant_app_id = em.tenant_wechatapp_id and ut.erp_member_id = em.member_erp_id where ut.tenant_app_id = :1 and ut.bind_time >= :2 and ut.bind_time <= :3 and em.id > :4 limit :5 offset :6|34|111|10||0|0|1310716|138498|2272|551|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|34|73|5||0|0|42539956|2094250|92788|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817878088380628992 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|35|57|3||0|0|19625122|1226215|93050|3000|
|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|35|140|7||0|0|1407003|40229|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|36|146|15||0|0|3043097|256711|35|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|39|141|6||0|0|1648800|43484|39|1|
|activity_service|select id , tenant_id , tenant_wechatapp_id , activity_id , lottery_activity_id , user_id , head_img_url , user_name , mobile_no , prize_type , prize_name , prize_image_url , status , create_time , update_time , prize_data , winning_prize from lottery_winner where status = :1 and create_time < date_add ( now ( ) , interval :2 minute )|39|293|15||0|0|2298473|59269|1|1|
|statistic|select tenant_wechatapp_id tenant_app_id , member_erp_id from user_service.erp_integral_log where tenant_wechatapp_id = :1 and update_time between :2 and :3 group by tenant_wechatapp_id , member_erp_id limit :4 offset :5|42|99|7||0|0|4641982|740176|16589|5000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|42|220|28||0|0|307529763|66145172|17126|2208|
|order|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|46|67|2||0|0|92363|2148|92363|2148|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|46|61|2||0|0|94981|2151|94981|2151|
|statistic|select ut.tenant_wx_app_id tenant_app_id , ut.user_id , max ( ut.login_time ) lastlogintime from authorization_service.user_login_token ut where ut.tenant_wx_app_id = :1 and ut.login_time >= :2 and ut.login_time <= :3 group by ut.tenant_wx_app_id , ut.user_id limit :4 offset :5|47|158|14||0|0|1701080|221492|11250|3623|
|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|47|166|21||0|0|7151060|954821|2324|429|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_488003299602206720 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|50|141|8||0|0|78548748|4511535|136124|3000|
|statistic|select ac.tenant_app_id , ac.owner_id user_id from account.account ac where ac.tenant_app_id = :1 and ac.owner_type = :2 and ac.account_type = :3 and ac.update_time >= :4 and ac.update_time <= :5 limit :6 offset :7|56|185|12||0|0|1701396|138385|9344|3928|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|60|189|20||0|0|153813900|38339281|5625|999|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|68|111|3||0|0|15417414|427617|542|22|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|71|1053|41||0|0|756129351|28557056|205780|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|73|471|14||0|0|288432601|7175476|210352|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|85|512|13||0|0|167700084|3732588|254607|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|85|548|15||0|0|313768270|7449150|249920|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|88|1161|27||0|0|1178527798|35828026|257194|3000|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|96|177|2||0|0|198060|2151|198060|2151|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|103|637|15||0|0|455451540|11623338|300515|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|116|1020|23||0|0|683989295|11348972|339264|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|117|656|39||0|0|776051555|90549648|27014|2009|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|119|197|2||0|0|242657|2121|242657|2121|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|127|1824|28||0|0|1597459013|29520683|373922|3000|
|tag_service|select count ( * ) from tag_service.label_vip_match_817878088380628992 t where match ( `vip_label` ) against ( :1 in boolean mode ) and tenant_app_id = :2|144|368|6||0|0|1963237|74465|144|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|158|2624|44||0|0|2401206138|49513977|461323|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|179|621|11||0|0|788289034|8600192|530480|3000|
|wx_gateway|update wx_template_msg set status = :1 , err_msg = :2 where msg_id = :3|190|2854|15||0|0|0|0|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , 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.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|228|3796|58||0|0|2954133784|53152564|651043|3000|
