|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|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_816869802005020672 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|62102|62102|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.activity_name = :4 and t1.step = :5|1|3|3||0|0|539160|539160|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|1|1||0|0|479070|479070|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.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|18|18||0|0|206686|206686|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|3|3||0|0|35223|35223|15|15|
|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|12|12||0|0|169665|169665|165|165|
|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|
|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|1036694|1036694|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_817878088380628992 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|10683|10683|1|1|
|statistic|select count ( 0 ) from ( select tmp.shop_id shopid , tmp.shop_name shopname , tmp.user_id userid , tmp.user_name username , tmp.sale_amount saleamount , tmp.war_amount waramount , tmp.warrate from ( select t.shop_id , t.shop_name , t.user_id , t.user_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 , ec.user_id , ec.user_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 and ec.sales_date between :5 and :6 group by ec.shop_id , ec.shop_name , ec.user_id , ec.user_name ) t ) tmp order by tmp.warrate desc ) tmp_count|1|1|1||0|0|864341|864341|1|1|
|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|38731|38731|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-0823: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|5|5||0|0|131206|131206|107|107|
|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|352441|352441|0|0|
|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|23657|23657|217|217|
|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|5|5||0|0|451417|451417|188|188|
|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|1|3|3||0|0|3862|3862|10|10|
|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_832396582723833856 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|15353|15353|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-0823:59:59.0' collect_time , es.sales_status , '_823844580729339904' 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|83545|83545|247|247|
|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|44883|44883|7|7|
|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|522304|522304|106|106|
|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_828778547559579648 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|6733|6733|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-0823:59:59.0' collect_time , es.sales_status , '_480726380749918208' 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|3|3||0|0|131206|131206|14|14|
|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_821174502091165696 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|37707|37707|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_826254702915141632 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_826254702915141632 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|25424|25424|4|4|
|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_827743370569891840 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|6637|6637|0|0|
|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|2|2||0|0|2095|2095|4|4|
|statistic|update erp_sales_823688108565368832 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|2|2||0|0|3334|3334|0|0|
|tag_service|delete from tag_service.batch_job_execution_params where job_execution_id <= :1|1|2|2||0|0|258594|258594|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_822257848045047808 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|16|16||0|0|205543|205543|158|158|
|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|480090|480090|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_827516559562940416 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|410880|410880|34|34|
|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_490540971604447232 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|427306|427306|1966|1966|
|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_471320523331211264 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|205620|205620|3000|3000|
|activity_service|select count ( 0 ) from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.activity_id = :2|1|1|1||0|0|538848|538848|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_829220053370064896' 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|921|921|6|6|
|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|2|2||0|0|10487|10487|17|17|
|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|1369480|1369480|19|19|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|38|38||0|0|522304|522304|106|106|
|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|2|2||0|0|38852|38852|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_816869802005020672 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|26301|26301|108|108|
|sms|select count ( 0 ) from ( select a.phone_numbers as phoneno , concat ( '【' , a.sign_name , '】' , case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end ) as content , a.template_code , a.out_id as outid , a.template_param , a.create_time as sendtime , a.create_time as recevietime , a.code as state , a.send_count , a.message from sms_send a left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = :1 where a.tenant_app_id = :2 ) table_count|1|3|3||0|0|50059|50059|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_490810080325931008' 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|7|7||0|0|4217|4217|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_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|1|3|3||0|0|99425|99425|3000|3000|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 ) and ( user.nick_name like concat ( :345 , :346 , :347 ) or user.mobile_no = :348 ) )|1|12|12||0|0|114925|114925|1|1|
|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_832396582723833856 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|17681|17681|1|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 ) and ( user.nick_name like concat ( :91 , :92 , :93 ) or user.mobile_no = :94 ) )|1|10|10||0|0|259753|259753|1|1|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 ) and ( user.nick_name like concat ( :91 , :92 , :93 ) or user.mobile_no = :94 ) ) order by tenantuser.create_time desc limit :95|1|4|4||0|0|1037746|1037746|6|6|
|statistic|select bb.id , bb.user_id , mb.user_name , mb.mobile_no from statistic.base_backlog_member bb left join statistic.member mb on bb.tenant_app_id = mb.tenant_app_id and bb.user_id = mb.user_id where bb.tenant_app_id = :1 and bb.user_id > :2 order by bb.id limit :3 offset :4|1|1|1||0|0|11536|11536|613|613|
|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 , '_476787156229165056' 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|1|1||0|0|27450|27450|5000|5000|
|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_821174502091165696 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_821174502091165696 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|17911|17911|0|0|
|statistic|select bm.id , ifnull ( sum ( es.amount ) , 0 ) salesbalance , count ( 1 ) salesamount 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 where bu.tenant_app_id = :1 and es.sales_status = :2 group by bm.id order by bm.id limit :3 offset :4|1|5|5||0|0|15096|15096|87|87|
|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-0823:59:59.0' collect_time , es.sales_status , '_490810080325931008' 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|7|7||0|0|72475|72475|35|35|
|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|2|2||0|0|11383|11383|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_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|1|1|1||0|0|15860|15860|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|112389|112389|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_488003299602206720 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|8|8||0|0|576727|576727|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_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|479050|479050|0|0|
|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 , mb.shop_id , mb.source_type , count ( 1 ) amount from statistic.member mb where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id , 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|1|1|1||0|0|268047|268047|2|2|
|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_469175049962786816 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_469175049962786816 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|4234|4234|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_885418658174709760 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_885418658174709760 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|7|7||0|0|56792|56792|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , sum ( tmp.cancel_amount ) cancel_amount , sum ( tmp.full_amount ) full_amount , sum ( tmp.bind_amount ) bind_amount , sum ( tmp.subscribe_amount ) subscribe_amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.cancel_amount , t.full_amount , t.bind_amount , t.subscribe_amount from ( select mb.tenant_id , mb.tenant_app_id , mb.shop_id , sum ( if ( mb.subscribe_flag = 0 , 1 , 0 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from statistic.member mb where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name|1|1|1||0|0|268045|268045|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_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|12|12||0|0|123324|123324|52|52|
|bespoke|select trade.id , trade.status , tpl.display_name , tpl.image_url , trade.trade_no from bespoke.bespoke_trade trade join bespoke.bespoke_template tpl on trade.template_id = tpl.id where trade.user_id = :1 and trade.tenant_app_id = :2 order by trade.create_time desc limit :3|1|1|1||0|0|23462|23462|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_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|5|5||0|0|56805|56805|3|3|
|tag_service|insert into tag_service.label_vip_match_819000302970638336 ( 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_819000302970638336 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|958968|958968|0|0|
|statistic|select primary_key_id id , score , date_format ( create_time , '%y-%m-%d' ) comment_date , content , '_826961354203107328' tableindex from comment_service.comment where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by primary_key_id limit :4 offset :5|1|2|2||0|0|53075|53075|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_819000302970638336 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|7795|7795|1|1|
|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|621392|621392|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_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|2|2||0|0|38991|38991|3000|3000|
|platform|select s.* , ifnull ( pc.certsquantity , 0 ) as certsquantity , ifnull ( va.addvaluequantity , 0 ) as addvaluequantity from ( /*昨天的销售记录*/ select eid , vendorid , sid , count ( 1 ) as salesquantity from saleslog sl where vendorid = :1 and to_days ( :2 ) :3 to_days ( salesdate ) = :4 group by eid , vendorid , sid ) s left join ( /*昨天质保单*/ select eid , count ( 1 ) as certsquantity from productcerts where vendorid = :5 and to_days ( :6 ) :7 to_days ( createtime ) = :8 group by eid ) pc on s.eid = pc.eid left join ( /*昨天的增值计划*/ select empid , count ( 1 ) as addvaluequantity from valueaddedlog where vendorid = :9 and to_days ( :10 ) :11 to_days ( createtime ) = :12 group by empid ) va on va.empid = s.eid|1|2|2||0|0|43772|43772|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|1696711|1696711|311|311|
|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|27|27||0|0|349008|349008|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|1|1|1||0|0|34776|34776|1|1|
|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|3|3||0|0|9729|9729|41|41|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_834615931371048960' 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|4|4||0|0|2490|2490|16|16|
|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|4804|4804|43|43|
|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|1|1||0|0|47618|47618|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_849916675989012480 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|20999|20999|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_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|1|2|2||0|0|16219|16219|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_486900027235635200 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_486900027235635200 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|63016|63016|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|44935|44935|20|20|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_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|6|6||0|0|164690|164690|321|321|
|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_491541513076084736 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|35289|35289|2734|2734|
|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|1|9|9||0|0|864137|864137|6|6|
|statistic|delete from statistic.batch_step_execution where step_execution_id <= :1|1|1|1||0|0|27095|27095|0|0|
|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|1|1||0|0|1840531|1840531|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|1|1|1||0|0|225085|225085|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|1369389|1369389|6|6|
|tag_service|delete from tag_service.label_vip_match_489024659472388096 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_489024659472388096 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|34564|34564|0|0|
|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 , '_823844580729339904' 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|1|1||0|0|41859|41859|5000|5000|
|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|1369347|1369347|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_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|34|34||0|0|2668464|2668464|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|2821162|2821162|31|31|
|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|2|2||0|0|24000|24000|3000|3000|
|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|5|5||0|0|19105|19105|5000|5000|
|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|52|52||0|0|658966|658966|59|59|
|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|6|6||0|0|120774|120774|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_821229068421742592 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_821229068421742592 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|14|14||0|0|169598|169598|2|2|
|statistic|select count ( 0 ) from ( select tmp.shop_id shopid , tmp.shop_name shopname , tmp.user_id userid , tmp.user_name username , tmp.sale_amount saleamount , tmp.war_amount waramount , tmp.warrate from ( select t.shop_id , t.shop_name , t.user_id , t.user_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 , ec.user_id , ec.user_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 and ec.sales_date between :5 and :6 group by ec.shop_id , ec.shop_name , ec.user_id , ec.user_name ) t ) tmp order by tmp.warrate asc ) tmp_count|1|1|1||0|0|864341|864341|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|1|1||0|0|653720|653720|0|0|
|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|858758|858758|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|7|7||0|0|69644|69644|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|28629|28629|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816096827580399616 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|13|13||0|0|164359|164359|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_488003299602206720' 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|2534|2534|18|18|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_849916675989012480' 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|1686|1686|24|24|
|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|521557|521557|0|0|
|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|3|3||0|0|42737|42737|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|9223|9223|120|120|
|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|1|3|3||0|0|51291|51291|20|20|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_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|6|6||0|0|149638|149638|1|1|
|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|14|14||0|0|14331|14331|29|29|
|statistic|select primary_key_id id , score , date_format ( create_time , '%y-%m-%d' ) comment_date , content , '_827516559562940416' tableindex from comment_service.comment where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by primary_key_id limit :4 offset :5|1|1|1||0|0|53075|53075|72|72|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_885278795660111872 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_885278795660111872 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|5|5||0|0|2668464|2668464|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_836363095600320512 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|87753|87753|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_848021854814834688 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|111326|111326|3000|3000|
|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|10|10||0|0|4328|4328|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-0823: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|4|4||0|0|56754|56754|26|26|
|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|1|1||0|0|3409|3409|898|898|
|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_818984074398965760 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_818984074398965760 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|12725|12725|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-0823:59:59.0' collect_time , es.sales_status , '_828766757295529984' 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|122960|122960|302|302|
|tag_service|insert into tag_service.label_vip_match_891434732540272640 ( 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_891434732540272640 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|3|3||0|0|540715|540715|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_490810080325931008 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|72578|72578|14|14|
|statistic|update erp_sales_469175049962786816 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|2|2||0|0|1911|1911|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823688108565368832 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|14|14||0|0|1042252|1042252|0|0|
|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|5|5||0|0|870971|870971|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_830220893509701632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|152997|152997|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|52298|52298|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-0823: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|1|1||0|0|62752|62752|27|27|
|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_828766757295529984 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_828766757295529984 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|3|3||0|0|123482|123482|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|318763|318763|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|38643|38643|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_834615931371048960 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|66419|66419|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 group by tenant_id|1|5|5||0|0|357507|357507|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_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|1|1||0|0|49234|49234|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 , :345 ) and ( user.nick_name like concat ( :346 , :347 , :348 ) or user.mobile_no = :349 ) ) order by tenantuser.create_time desc limit :350|1|3|3||0|0|2066828|2066828|1|1|
|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|3|3||0|0|2727|2727|10|10|
|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|5|5||0|0|3477|3477|41|41|
|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|101994|101994|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-0823:59:59.0' collect_time , es.sales_status , '_486900027235635200' 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|67114|67114|0|0|
|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|5|5||0|0|3603|3603|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_885278795660111872 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|1370111|1370111|98|98|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.register_flag = :4 ) tmp_count|1|5|5||0|0|1786305|1786305|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-0823: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|25|25||0|0|410642|410642|581|581|
|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|2|2||0|0|128516|128516|51|51|
|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|10|10||0|0|131564|131564|49|49|
|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_816869802005020672 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|21554|21554|22|22|
|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|2|2||0|0|18397|18397|8|8|
|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_819000302970638336 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|163716|163716|133|133|
|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_849916675989012480 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|13804|13804|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 ) and ( user.nick_name like concat ( :103 , :104 , :105 ) or user.mobile_no = :106 ) )|1|5|5||0|0|33013|33013|1|1|
|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|5|5||0|0|116147|116147|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-0823: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|699950|699950|1|1|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 group by tenant_id|1|5|5||0|0|433156|433156|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-0823:59:59.0' collect_time , es.sales_status , '_486900027235635200' 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|67114|67114|0|0|
|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|7|7||0|0|9341|9341|184|184|
|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|1|3|3||0|0|37126|37126|30|30|
|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|12|12||0|0|480090|480090|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_818623050667823104' 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|1208|1208|2|2|
|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_816869802005020672 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|864|864|1|1|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and status = :2 and date_sub ( curdate ( ) , interval :3 day ) = date_format ( salesdate , :4 )|1|4|4||0|0|120774|120774|0|0|
|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|17|17||0|0|1370111|1370111|98|98|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_818632945152598016 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|21777|21777|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|3|3||0|0|6033|6033|88|88|
|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_817161814168092672 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|167990|167990|3000|3000|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_817878088380628992 where tenant_app_id = :1 and vip_id = :2|1|5|5||0|0|137155|137155|1|1|
|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|354778|354778|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_490810080325931008 where tenant_app_id = :1 and vip_id = :2|1|5|5||0|0|141248|141248|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_480726380749918208 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|35|35||0|0|282334|282334|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|522213|522213|93|93|
|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-0823: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|699950|699950|338|338|
|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|3|3||0|0|33351|33351|25|25|
|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|1|2|2||0|0|67549|67549|1|1|
|platform|select ifnull ( eid , 0 ) as eid , ifnull ( shopid , 0 ) as sid , vendorid , count ( 1 ) as quantity from productcerts where vendorid = :1 and to_days ( :2 ) :3 to_days ( createtime ) = :4 group by eid , shopid , vendorid|1|1|1||0|0|28984|28984|0|0|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.source_type = :4 and mb.create_time >= :5 and mb.create_time <= :6 and mb.register_flag = :7 ) tmp_count|1|1|1||0|0|19923|19923|1|1|
|statistic|select id , biz_id , date_format ( ifnull ( receive_time , create_time ) , '%y-%m-%d' ) redpack_date , total_amount , '_826961354203107328' tableindex from account.wx_redpacket_send_order where tenant_wechatapp_id = :1 and biz_type = :2 and order_status = :3 and update_time >= :4 and update_time <= :5 order by id limit :6 offset :7|1|1|1||0|0|15558|15558|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_882402759662481408 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|2920|2920|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_850148538133352448' 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|521|521|4|4|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 group by tenant_id|1|2|2||0|0|128223|128223|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_818984074398965760 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|20538|20538|0|0|
|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|3|3||0|0|55163|55163|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-0823:59:59.0' collect_time , es.sales_status , '_827516559562940416' 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|2|2||0|0|410642|410642|3|3|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_490540971604447232 where tenant_app_id = :1 and vip_id = :2|1|1|1||0|0|28810|28810|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_827516559562940416 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_827516559562940416 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|41|41||0|0|658848|658848|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|1|1||0|0|117594|117594|0|0|
|activity_service|select t3.id , t1.tenant_app_id as tenantappid , t1.user_id as userid , t1.user_name as username , t1.mobile_no as mobileno , t1.user_apply_id as userapplyid , t1.data , t2.id as activityid , t2.activity_name as activityname , t2.activity_type as activitytype , t1.create_time as time , t3.cutdown_amount as cutdownamount , t3.cutdown_num as cutdownnum , t3.order_no as orderno from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.activity_name = :4 and t1.step = :5 order by t1.create_time desc limit :6|1|2|2||0|0|507338|507338|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-0823: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|479050|479050|495|495|
|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|5|5||0|0|89908|89908|18|18|
|tag_service|insert into tag_service.label_vip_match_814020764498956288 ( 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_814020764498956288 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|307095|307095|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_821229068421742592 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|3|3||0|0|14034|14034|1|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|1|2|2||0|0|15556|15556|9|9|
|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 t1.step = :4|1|6|6||0|0|542053|542053|1|1|
|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|24|24||0|0|451417|451417|93|93|
|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|2|2||0|0|57326|57326|1|1|
|platform|select `empcode` , `empname` , `empdesc` , `picpath` , `fileresid` , `sex` , `age` , `workhours` , `duty` , `status` , `createtime` , `updatetime` , `updateuser` , `mobileno` , `vendorid` , `vendorshopid` , `accountid` , `account` , `vendorempid` , `uid` , `id` from `employee` where `vendorid` = :1 and `mobileno` = :2|1|1|1||0|0|9291|9291|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_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|103461|103461|10|10|
|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|699951|699951|137|137|
|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|521564|521564|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|10|10||0|0|411493|411493|118|118|
|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|3|3||0|0|15133|15133|81|81|
|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|3|3||0|0|9500|9500|11|11|
|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_839295151019966464 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 ) and t.shop_id in ( :3 ) limit :4 , :5|1|7|7||0|0|112829|112829|1629|1629|
|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|1829|1829|9|9|
|tag_service|delete from tag_service.label_vip_match_829922417672491008 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_829922417672491008 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|47792|47792|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_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|1|2|2||0|0|50485|50485|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-0823: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|4|4||0|0|168490|168490|478|478|
|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|479050|479050|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_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|19982|19982|10|10|
|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|4|4||0|0|34593|34593|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_827516559562940416 where tenant_app_id = :1 and vip_id = :2|1|5|5||0|0|254215|254215|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_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|33857|33857|2585|2585|
|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|1|1|1||0|0|309757|309757|1386|1386|
|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|2|14|8||0|0|751840|375920|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) employee_user_id , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name , t.amount from ( select tenant_id , tenant_app_id , shop_id , employee_user_id , count ( * ) amount from statistic.member where tenant_app_id = :2 and create_time between :3 and :4 and register_flag = :5 group by tenant_id , tenant_app_id , shop_id , employee_user_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and ( t.employee_user_id = oe.employee_erp_id or t.employee_user_id = oe.employee_user_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name|2|2|1||0|0|700850|432674|76|72|
|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|2|77|41||0|0|180527879|90294046|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|159|148||0|0|1000318|906287|98|94|
|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|12|7||0|0|563098|281558|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|136812|68406|0|0|
|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|855391|428036|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|128901|114960|3847|2606|
|platform|select count ( 1 ) from `taskassignment` ta where ta.tasktype = :1 and ( ta.taskstatus = :2 or ta.taskstatus = :3 ) and vendorid = :4 and uid = :5|2|2|1||0|0|1243008|621504|2|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_823709122435256320' 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|2|3|2||0|0|2970|2417|29|27|
|statistic|select tu.id , ifnull ( sum ( if ( cm.id is null , 0 , 1 ) ) , 0 ) serviceamount , min ( cs.enter_shop_time ) firstshoptime , max ( cs.enter_shop_time ) lastshoptime , max ( cm.create_time ) lastservicetime from statistic.member tu inner join customer.customer_info cc on tu.tenant_app_id = cc.tenant_wechatapp_id and tu.mobile_no = cc.mobile_no inner join customer.customer_entry_shop cs on cc.id = cs.customer_info_id inner join customer.customer_maintain_log cm on cs.id = cm.customer_entry_shop_id where tu.tenant_app_id = :1 and tu.update_time >= :2 and tu.update_time <= :3 group by tu.id order by tu.id limit :4 offset :5|2|3|2||0|0|2557|2150|32|32|
|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|4|3||0|0|153596|76798|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|5|4||0|0|4420315|2212702|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|2|2|1||0|0|26163|18571|7|7|
|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|39|26||0|0|1213322|606756|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|5|3||0|0|90929|62450|0|0|
|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|8|5||0|0|269901|134963|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_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|76719|59839|28|19|
|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 )|2|7|4||0|0|315493|157747|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|4|3||0|0|118261|59131|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|17|12||0|0|23722442|11864121|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|25|18||0|0|18859819|9444478|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|28|22||0|0|732054|366036|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_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 )|2|2|1||0|0|116546|83293|44|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_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|12|9||0|0|111503|96323|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|2196072|1701613|569|317|
|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|40|21||0|0|106373195|53198469|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_821229068421742592 where tenant_app_id = :1 and vip_id = :2|2|12|6||0|0|341364|170682|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|5|4||0|0|5898137|2952951|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|13|8||0|0|548053|274027|0|0|
|employee|update backlog set employee_id = :1 , user_id = :2 where ( employee_id = :3 and tenant_app_id = :4 and status in ( :5 , :6 ) )|2|9|7||0|0|71398|35699|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_469175049962786816 where tenant_app_id = :1 and vip_id = :2|2|3|2||0|0|141464|70732|2|1|
|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|5|3||0|0|228732|114372|0|0|
|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|7|5||0|0|253492|126746|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_839295151019966464 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_839295151019966464 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|2|3|2||0|0|32546|20131|0|0|
|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|2|3|2||0|0|5863576|2933104|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|2|3|2||0|0|462237|341809|6000|3000|
|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|15|10||0|0|522171|261089|0|0|
|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|4|2||0|0|156208|78106|0|0|
|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|17|10||0|0|681789|340905|0|0|
|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|2|5|4||0|0|366214|183107|2|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|46|24||0|0|119572685|59797988|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|20|10||0|0|1016482|508248|0|0|
|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|28||0|0|44828955|22420564|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_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|2|4|2||0|0|40458|20553|7|4|
|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|5|3||0|0|227127|113565|0|0|
|statistic|select count ( 0 ) from ( select sd.id , sd.sales_no salesno , os.shop_id shopid , ifnull ( os.shop_name , '未知' ) shopname , oe.employee_user_id userid , ifnull ( oe.employee_user_name , '未知' ) username , sd.product_name productname , sd.amount_pay amountpay , sd.value_add_no valueaddno , sd.value_add_amount valueaddamount , sd.value_add_state valueaddstate , sd.value_add_date valueadddate , if ( length ( sd.value_add_coupon ) = 18 , sd.value_add_coupon , null ) valueaddcoupon , sd.user_name memberusername , sd.mobile_no 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_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and sd.value_add_no is not null and sd.tenant_app_id = :4 and os.shop_id = :5 order by sd.sales_date desc , sd.sales_erp_id desc ) tmp_count|2|33|22||0|0|1816126|908063|2|1|
|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|217260|108632|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_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|2|4|3||0|0|24654|20752|20|10|
|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|3401060|1700685|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|7|4||0|0|208988|104494|0|0|
|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|444320|222160|0|0|
|bespoke|select count ( 0 ) from bespoke.bespoke_trade trade join bespoke.bespoke_template tpl on trade.template_id = tpl.id where trade.user_id = :1 and trade.tenant_app_id = :2|2|3|2||0|0|46922|23461|2|1|
|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|20|13||0|0|6968479|3484292|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|2|1||0|0|2707451|1960421|328|185|
|statistic|select sd.id , sd.sales_no salesno , os.shop_id shopid , ifnull ( os.shop_name , '未知' ) shopname , oe.employee_user_id userid , ifnull ( oe.employee_user_name , '未知' ) username , sd.product_name productname , sd.amount_pay amountpay , sd.value_add_no valueaddno , sd.value_add_amount valueaddamount , sd.value_add_state valueaddstate , sd.value_add_date valueadddate , if ( length ( sd.value_add_coupon ) = 18 , sd.value_add_coupon , null ) valueaddcoupon , sd.user_name memberusername , sd.mobile_no 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_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and sd.value_add_no is not null and sd.tenant_app_id = :4 and os.shop_id = :5 order by sd.sales_date desc , sd.sales_erp_id desc limit :6|2|5|3||0|0|1812506|906253|40|20|
|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|138917|69461|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|13|12||0|0|141038|121713|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_476787156229165056 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_476787156229165056 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|2|4|2||0|0|966807|906109|18|18|
|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|2|4|3||0|0|1728289|864161|2|1|
|coupon_service|select * from coupon_user where create_channel = :1 and tenant_wechatapp_id = :2 and channel_id = :3 limit :4|2|5|3||0|0|75037|55388|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_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|2|2|1||0|0|359448|191458|4497|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_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|2|3|2||0|0|77826|59994|4486|3000|
|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|30|19||0|0|1072032|536016|0|0|
|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|12|9||0|0|9656623|4829519|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 ) and ( user.nick_name like concat ( :103 , :104 , :105 ) or user.mobile_no = :106 ) ) order by tenantuser.create_time desc limit :107|2|15|12||0|0|2877994|2028473|7|6|
|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|11|6||0|0|566264|283134|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|4|2||0|0|6492134|3246972|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|5|3||0|0|224066|112034|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|5|3||0|0|6387700|3194088|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_489024659472388096 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|4|3||0|0|12273|6748|0|0|
|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|6|3||0|0|264220|132110|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|3|2||0|0|115184|57592|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|7|5||0|0|165025|82513|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|5|3||0|0|235953|117977|0|0|
|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|16|12||0|0|449350|224680|0|0|
|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|40|23||0|0|1164099|582057|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-0823: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|2|8|6||0|0|335001|306172|400|376|
|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|17478792|8740626|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_486900027235635200 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|2|3|2||0|0|72650|63016|0|0|
|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|323826|161916|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|3||0|0|189270|94636|0|0|
|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|2|4|3||0|0|65039|33031|338|336|
|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|7|4||0|0|7193686|3597313|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|199559|99781|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823844580729339904 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|2|3|2||0|0|86039|84315|116|110|
|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|2|5|3||0|0|111147|99472|11|10|
|platform|update valueaddedlog val inner join ( select l.id , typeid , salesamount , if ( datediff ( now ( ) , valueadddate ) <= t.upday , datediff ( now ( ) , valueadddate ) , t.upday ) as upday , if ( datediff ( now ( ) , valueadddate ) > t.upday + t.unchangeday , datediff ( now ( ) , valueadddate ) - t.upday - t.unchangeday , 0 ) as downday , t.uprate , t.downrate from valueaddedlog l join valueaddedtype t on l.typeid = t.id where l.uid = :1 ) as d on val.id = d.id inner join valueaddedtype vat on val.typeid = vat.id set val.valueaddedamount = if ( d.uprate*d.upday*d.salesamount-d.downrate*d.downday*d.salesamount > :2 , d.uprate*d.upday*d.salesamount-d.downrate*d.downday*d.salesamount , :3 ) , val.updatetime = now ( ) , val.`status` = if ( d.upday > vat.minexchangeday and val.`status` = :4 , :5 , val.`status` ) where val.uid = :6 and val.updatetime < :7|2|5|2||0|0|63548|31774|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 ) and ( user.nick_name like concat ( :345 , :346 , :347 ) or user.mobile_no = :348 ) ) order by tenantuser.create_time desc limit :349|2|13|9||0|0|4133589|2066795|2|1|
|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|2|13|11||0|0|874999|793760|297|270|
|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|86330033|43195639|0|0|
|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 )|2|23|12||0|0|1105191|552613|0|0|
|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|2|4|2||0|0|99954|49977|2|1|
|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|147612|73806|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 group by tenant_id|2|13|12||0|0|3979180|1989590|2|1|
|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|6647372|3327080|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|11|7||0|0|15607307|7806541|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_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|2|5|3||0|0|38788|24245|1|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where user_id != :1 and tenant_app_id = :2|2|25|15||0|0|501454|259887|2|1|
|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|2|5|3||0|0|26636|15069|2|1|
|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|172466|86240|0|0|
|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|24|14||0|0|35523824|17768327|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-0823: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|17|9||0|0|523283|462752|281|254|
|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|2|25|16||0|0|336556|307644|7|7|
|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_818632945152598016 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|3|2||0|0|44378|24061|2|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_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|12|5||0|0|247451|105008|0|0|
|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|82|53||0|0|132635738|65815724|0|0|
|payment|select t.id , t.goods_order_source as goodsordersource , t.goods_order_no as goodsorderno , t.order_start_time as orderstarttime from pay_order t where t.pay_status = :1 order by id asc limit :2|3|13|5||0|0|122076|40692|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_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|3|19|10||0|0|136266|99472|3|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_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|3|3|1||0|0|119340|49254|53|21|
|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|309866|149718|49|24|
|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|3|14|7||0|0|271669|120437|3|1|
|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|4|2||0|0|1798211|600550|32|30|
|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|3|4|2||0|0|1376225|736250|8722|3000|
|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|21|11||0|0|2592511|864193|43|20|
|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|3|5|2||0|0|4306051|1782390|0|0|
|platform|select vm.* from vendormember vm join member m on vm.id = m.vendormemberid and vm.vendorid = m.vendorid where m.employeeid = :1 and vm.vendorid = :2 and ( ( birthdaytype = :3 and month ( birthday ) = month ( date_sub ( curdate ( ) , interval :4 day ) ) and day ( birthday ) = day ( date_sub ( curdate ( ) , interval :5 day ) ) ) or ( birthdaytype = :6 and month ( birthday ) = month ( date_sub ( :7 , interval :8 day ) ) and day ( birthday ) = day ( date_sub ( :9 , interval :10 day ) ) ) )|3|6|2||0|0|88053|62536|51|41|
|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|3|5|3||0|0|18388|12662|26|10|
|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|10|6||0|0|43149|29458|99|86|
|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 )|3|5|2||0|0|4368699|2965039|815|315|
|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|3|4|2||0|0|966022|353477|97|41|
|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|3|6|2||0|0|156945|52315|2|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_818691468687347712 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|4|2||0|0|12734|5763|9|9|
|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|950005|462784|83|42|
|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|3|14|6||0|0|43404|22112|153|75|
|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|3|3|1||0|0|42841|20997|6349|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 )|3|4|1||0|0|881496|509602|248|117|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_835720547919761408 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|7|4||0|0|70880|43557|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-0823: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|3|6|2||0|0|8335|3056|9|9|
|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|14|9||0|0|665280|221760|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 )|3|4|1||0|0|981925|361986|597|240|
|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|2||0|0|596960|371981|9000|3000|
|statistic|select el.tenant_wechatapp_id tenant_app_id , el.member_erp_id , ifnull ( sum ( if ( el.integral > 0 , el.integral , 0 ) ) , 0 ) cumulation , ifnull ( sum ( el.integral ) , 0 ) balance , max ( el.update_time ) lastscoretime from base_erp_member em inner join user_service.erp_integral_log el on em.tenant_app_id = el.tenant_wechatapp_id and em.member_erp_id = el.member_erp_id where em.tenant_app_id = :1 group by el.tenant_wechatapp_id , el.member_erp_id limit :2 offset :3|3|6|3||0|0|10668|4807|484|248|
|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-0823: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|3|9|7||0|0|106894|36445|367|351|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_826954007829331968 where tenant_app_id = :1 and vip_id = :2|3|27|9||0|0|804045|268015|2|1|
|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_469175049962786816 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|13|5||0|0|42779|17000|4|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823709122435256320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|4|8|3||0|0|52672|34447|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_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|4|6|2||0|0|1970399|638492|11206|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_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|8|3||0|0|950820|652366|10775|3000|
|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|39|24||0|0|2942465|735654|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|4|15|9||0|0|114728|37457|4|1|
|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|4|135|83||0|0|1954468|645576|2149|889|
|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|4|10|4||0|0|165492|70885|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|4|6|2||0|0|114728|37457|23|7|
|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|4|39|21||0|0|395051|306816|123|89|
|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|9|2||0|0|13265059|3596587|1134|419|
|user_service|select count ( 0 ) from tenant_user tu join user u on u.id = tu.user_id where tu.tenant_id = :1 and ( tu.user_name like concat ( :2 , :3 , :4 ) or tu.mobile_no = :5 or u.nick_name like concat ( :6 , :7 , :8 ) ) and tenant_app_id = :9|4|11|5||0|0|71480|17870|4|1|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( 1 ) finish_amount from ( select bg.id , bg.tenant_id , bg.tenant_app_id , bg.shop_id , bg.shop_name , bg.user_id , bg.user_name , bg.status , bg.scene , date_format ( bg.expire_time , '%y-%m-%d' ) expire_date , date_format ( bg.update_time , '%y-%m-%d' ) statistic_date from statistic.backlog bg where bg.tenant_app_id = :1 and bg.status = :2 and bg.shop_id != :3 and bg.user_id != :4 and bg.update_time >= :5 and bg.update_time <= :6 ) t group by t.tenant_id , t.tenant_app_id , t.shop_id , t.shop_name , t.user_id , t.user_name , t.scene , t.expire_date , t.statistic_date limit :7 offset :8|4|4|1||0|0|4553494|1140565|36|23|
|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|4|10|4||0|0|1363445|410862|0|0|
|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|4|11|4||0|0|194399|129938|4|1|
|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|4|28|21||0|0|467805|451417|286|210|
|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|15|10||0|0|75573|32463|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_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|4|5|2||0|0|672765|215991|10642|3000|
|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|4|11|5||0|0|7438862|3618603|0|0|
|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|51|14||0|0|1471700|367925|4|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_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|11|7||0|0|153021|73865|5|3|
|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|17|10||0|0|706437|141289|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|2590544|654930|316|90|
|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|5|12|4||0|0|1727630|345526|0|0|
|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|5|12|5||0|0|28645|8942|1657|487|
|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|7|2||0|0|2907451|873348|744|199|
|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|2408854|607250|353|163|
|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|5|15|7||0|0|2666207|740674|0|0|
|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|5|8|2||0|0|488204|97653|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_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 )|5|6|2||0|0|625541|339150|187|72|
|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_816440425157005312 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|6|2||0|0|682767|290769|13713|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_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|186|70||0|0|1323184|991850|39|39|
|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|5|33|11||0|0|1876473|375348|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_834615931371048960 where tenant_app_id = :1 and vip_id = :2|5|11|2||0|0|317085|63417|5|1|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|5|10|3||0|0|641115|128223|5|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_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 )|5|9|2||0|0|9693814|3193134|311|146|
|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|5|6|2||0|0|199312|68991|5|1|
|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|5|13|5||0|0|84930|29255|5|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816450513213112320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|6|8|2||0|0|227222|53318|0|0|
|user_service|select id , tenant_id , tenant_app_id , shop_id , mobile_no , weinxin , user_name , sex , age , create_time , update_time from customer_user where tenant_app_id = :1 and mobile_no = :2 limit :3|6|8|2||0|0|125094|20894|1|1|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( * ) 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|6|91|46||0|0|6818445|1138889|87|53|
|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|6|10|2||0|0|3125964|642037|15350|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_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|8|2||0|0|689712|149712|16428|3000|
|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|8|2||0|0|63|33|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_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|6|11|2||0|0|5036385|1210104|17101|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_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|6|38|15||0|0|646163|250817|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_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|11|2||0|0|3592705|745776|14193|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_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 )|7|15|3||0|0|18721284|4960133|1952|407|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|7|58|14||0|0|13927130|1989590|7|1|
|customize_page|select id , tenant_id , tenant_wechatapp_id , page_id , user_id , tenant_app_open_id , create_time , update_time , business_id , src_type , user_name , mobile_no , head_img from award_qualified where page_id = :1 and ( user_id = :2 or tenant_app_open_id = :3 )|8|12|3||0|0|3007889|376001|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 )|8|15|6||0|0|7888372|2333793|4688|1012|
|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|39|9||0|0|382340|88776|176|161|
|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|8|27|8||0|0|396888|110620|0|0|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|8|16|4||0|0|630095|99816|21|7|
|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 )|8|13|2||0|0|12515631|3241995|537|179|
|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|9|55|7||0|0|7774783|864221|68|27|
|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|9|14|3||0|0|4613851|671687|667|108|
|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|9|15|3||0|0|1518087|168904|9|1|
|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|9|28|10||0|0|395181|52371|9|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_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|9|22|6||0|0|4137200|693659|23619|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_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|9|16|3||0|0|2738942|461993|27000|3000|
|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|9|14|2||0|0|4556865|659410|187|44|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|9|15|3||0|0|1987415|236785|1|1|
|statistic|select ue.tenant_wechatapp_id , ue.user_id , ifnull ( eu.user_id , ue.employee_erp_id ) employee_user_id , '2019-06-0823:59:59.0' update_time from user_service.user_employee ue left join tenant.employee_user eu on ue.tenant_wechatapp_id = eu.tenant_wechatapp_id and ue.employee_user_id = eu.id where ue.tenant_wechatapp_id = :1 and ue.update_time >= :2 and ue.update_time <= :3 limit :4 offset :5|9|16|3||0|0|206271|73765|469|130|
|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|9|40|5||0|0|1000800|111200|1|1|
|tag_service|select distinct date_format ( create_time , '%y' ) from statistic.member where tenant_id = :1 and tenant_app_id = :2|10|18|3||0|0|2253203|342902|19|2|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2|10|13|2||0|0|5993404|600897|1572|420|
|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|10|21|4||0|0|6327325|938029|27108|3000|
|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|10|45|19||0|0|15249213|3164803|6827|1334|
|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|10|29|5||0|0|230812|89507|10|1|
|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|62|32||0|0|9171249|917160|0|0|
|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 )|11|102|18||0|0|21885926|1989779|11|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_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|11|19|4||0|0|1216523|226556|29752|3000|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|11|19|2||0|0|253243|35632|11|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_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|12|43|6||0|0|26163150|3294451|33777|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_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|12|29|5||0|0|17944232|2397268|33369|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 )|12|26|4||0|0|15073310|1781951|1472|168|
|statistic|select tu.id , ifnull ( ey.user_id , em.employee_erp_id ) employee_user_id , '2019-06-0823: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|12|24|4||0|0|228016|74285|813|231|
|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|12|39|9||0|0|117470|20726|97|10|
|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|12|33|7||0|0|427972|97841|205|199|
|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|26|5||0|0|12759015|3299235|1511|216|
|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|13|112|10||0|0|3593447|276419|9|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_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 )|13|48|8||0|0|48981255|11904243|3229|498|
|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|13|28|3||0|0|10299338|1471280|33861|3000|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|14|24|3||0|0|328392|23460|14|1|
|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|14|28|4||0|0|569688|40692|0|0|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|15|50|8||0|0|4781448|318766|15|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_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|15|20|2||0|0|6078006|597069|42341|3000|
|statistic|select tenant_wechatapp_id , user_id , source_type , create_time , '2019-06-0823: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|15|39|5||0|0|429600|97841|1381|257|
|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|15|67|15||0|0|263538|45876|2196|487|
|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|15|41|6||0|0|360982|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_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 )|15|35|6||0|0|18827082|4006749|1941|370|
|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 )|16|21|2||0|0|3681480|477931|383|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_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|16|31|3||0|0|6414100|654180|45515|3000|
|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|16|167|15||0|0|6886672|458937|12|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_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|16|46|7||0|0|21623228|2459860|46709|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_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|17|47|6||0|0|16432516|2117463|47656|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_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 )|18|36|4||0|0|14517317|3150716|278|65|
|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|18|42|7||0|0|1619332|289731|2394|596|
|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|18|54|8||0|0|29070790|2987816|52204|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_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 )|18|94|16||0|0|159316046|38374416|11975|1689|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|19|63|8||0|0|8229964|433156|19|1|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|19|60|7||0|0|6792633|357507|19|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|65|11||0|0|15356020|3748444|221|28|
|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|105|16||0|0|41662074|8564398|6093|1122|
|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|96|13||0|0|70518612|17492023|11519|1735|
|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 )|20|113|20||0|0|192195264|45450498|9750|1514|
|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|20|103|27||0|0|267225|77144|1136|271|
|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|20|32|2||0|0|199611|9981|0|0|
|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|21|181|11||0|0|6386940|304140|13|1|
|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|21|253|69||0|0|1520551|277625|16|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|21|104|13||0|0|102638258|10791364|57908|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|21|67|7||0|0|21833299|1697538|60299|3000|
|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|22|246|63||0|0|4006869|647772|3978|732|
|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 )|22|35|4||0|0|15322929|3042312|3475|373|
|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|23|78|7||0|0|40887134|3026116|66724|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|24|40|3||0|0|12127115|1225905|63219|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|24|126|11||0|0|983425|40979|0|0|
|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 )|25|229|15||0|0|1486270|62847|0|0|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|25|59|4||0|0|802251|32091|0|0|
|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|25|137|13||0|0|1289665|52578|25|1|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|30|57|5||0|0|1392944|99815|30|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 )|31|172|15||0|0|3085142|215471|30|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_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|33|156|11||0|0|74838716|4504173|96411|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|33|178|15||0|0|115916092|7195626|94601|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_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 )|34|69|6||0|0|19533147|1922630|5546|375|
|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|35|66|5||0|0|8515|957|0|0|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|38|55|2||0|0|89397|2438|89397|2438|
|order|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|38|65|2||0|0|89396|2438|89396|2438|
|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|38|163|12||0|0|89083746|5012289|111287|3000|
|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-0823: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|40|180|22||0|0|2824485|292590|2028|435|
|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|232|28||0|0|307808032|66226971|17643|2223|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|43|92|6||0|0|508423|12133|508423|12133|
|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|43|250|13||0|0|157287761|7459069|125954|3000|
|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-0823: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-0823: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|44|238|33||0|0|2893346|367141|2336|536|
|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|46|342|33||0|0|7004040|738969|1433|134|
|statistic|select id , timestampdiff ( year , solar_birthday , '2019-06-0723:59:59.001' ) age from member where tenant_app_id = :1 and birthday_month_day = :2 limit :3 offset :4|49|227|18||0|0|3780763|343127|2941|700|
|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|51|384|19||0|0|308652092|11503593|149956|3000|
|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|52|271|29||0|0|1601859|139438|2927|554|
|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|54|228|17||0|0|2907058|292582|4962|585|
|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|57|809|34||0|0|665905035|28537250|166632|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_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|180|18||0|0|154119096|38790671|5710|1011|
|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|62|306|25||0|0|3345874|711923|3819|487|
|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|67|392|38||0|0|1930860|222754|7981|1354|
|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 )|70|115|4||0|0|15606478|428779|564|22|
|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|70|405|34||0|0|1818571|139226|6006|1127|
|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|71|116|9||0|0|25192268|355349|69|1|
|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|74|528|55||0|0|7610368|959582|4685|537|
|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|78|85|1||0|0|2875392|36864|0|0|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|81|166|3||0|0|189828|2438|189828|2438|
|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|85|1054|24||0|0|1181165670|35780562|251117|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|524|13||0|0|167784070|3732574|254606|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_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|92|1378|30||0|0|1181373667|29495537|272448|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|92|216|9||0|0|44762465|768454|13|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_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|96|544|13||0|0|445102134|11621360|282191|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|98|412|8||0|0|399727488|8569600|291283|3000|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|113|206|3||0|0|265512|2438|265512|2438|
|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 )|119|676|38||0|0|778319036|90787355|27853|2014|
|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|150|2012|33||0|0|2358697729|53136334|430137|3000|
|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|189|381|7||0|0|67128569|358720|23|4|
|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 )|626|2668|14||0|0|389061507|621505|101|15|
