|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|statistic|select mt.tenant_id , mt.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.grade_erp_id , -1 ) grade_erp_id , count ( * ) amount from member mb inner join 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|39|6253|605||0|0|28683452|983252|9204|399|
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mb.source_type , 'unknow' ) source_type , count ( * ) amount from member mb inner join 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|32|4301|485||0|0|21471098|982912|4945|276|
|statistic|select mt.tenant_id , mt.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.employee_user_id , -1 ) employee_user_id , count ( * ) amount from member mb inner join 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.employee_user_id|31|4537|469||0|0|23194510|982958|14762|1581|
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , sum ( if ( mb.subscribe_flag = 1 , 0 , 1 ) ) 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 member mb inner join 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|24|2877|152||0|0|16565668|982534|1081|87|
|statistic|select mb.tenant_id , mb.tenant_app_id , ifnull ( mt.shop_id , -1 ) shop_id , ifnull ( mt.employee_user_id , -1 ) user_id , count ( * ) service_amount , sum ( if ( mb.external_user_id is not null , 1 , 0 ) ) corp_amount , sum ( ifnull ( mt.member_image_flag , 0 ) ) image_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 , mt.employee_user_id|17|2085|175||0|0|10931168|982864|8858|1581|
|tag_service|select t1.user_id , t1.user_name , t1.sex , t1.mobile_no , t1.age , t1.source_type as membersource , t1.subscribe_flag as subscribestatus , t1.full_flag as fullstatus , t2.grade_erp_id as gradeerp , t2.sales_balance as totalconsumemoney , t2.consumption_integral as totalconsumepoint , t2.cumulation as totalpoint , t2.balance as pointbalance , t2.sales_amount as consumenum , t2.follow_time as subscribetime , t2.cancel_follow_time as cancelsubscribetime , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , ifnull ( t1.memorial_day_is_lunar , 0 ) as memorialdayislunar , ifnull ( t1.memorial_name , '' ) as memorialname , t2.first_shop_time as firstentershoptime , t2.last_shop_time as lastentershoptime , t2.first_sales_time as firstconsumetime , t2.last_sales_time as latestconsumetime , t2.last_login_time as lastaccesstime , t2.last_service_time as lastservicetime , t2.last_score_time as lastscoretime , t2.registe_time as registertime , t2.category_name as categoryname , ( case when ifnull ( t1.partner_id , 0 ) > 0 then '联盟商家' when ifnull ( t1.agency_id , 0 ) > 0 then '钻石大使' else '会员' end ) as `identity` , ( case when t1.external_user_id is not null and t1.register_flag = :1 then :2 when t1.subscribe_flag = :3 and t1.register_flag = :4 then :5 else :6 end ) as `memberstate` , ifnull ( emp.employee_name , :7 ) as employeename , ifnull ( dept.shop_name , :8 ) as shopname , t1.tenant_app_open_id , t2.service_amount , ifnull ( t3.match_label , :9 ) as labelmatch from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.meta_erp_employee emp on t2.tenant_app_id = emp.tenant_app_id and t2.shop_id = emp.dept_erp_id and t2.employee_user_id = emp.employee_erp_id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.dept_erp_id left join tag_service.member_label_match t3 on t3.tenant_id = :10 and t1.tenant_app_id = t3.tenant_app_id and t1.user_id = t3.user_id where t1.tenant_app_id = :11 and t2.tenant_app_id = :12 order by t1.id asc limit :13|8|902|125||0|0|59412834|8320194|160|20|
|statistic|select tenant_id , tenant_app_id , ifnull ( shop_id , -1 ) shop_id , sum ( if ( tenant_app_open_id is null and external_user_id is null , :1 , :2 ) ) normal_amount , sum ( if ( tenant_app_open_id is not null and external_user_id is null , :3 , :4 ) ) app_amount , sum ( if ( external_user_id is not null , :5 , :6 ) ) corp_amount from member where tenant_app_id = :7 and create_time <= :8 and register_flag = :9 group by tenant_id , tenant_app_id , shop_id|3|326|118||0|0|1473817|491282|261|87|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_state in ( :5 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|526|333||0|0|1612400|923998|796|503|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|394|217||0|0|1598658|803690|324|165|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823856782299402240 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_state in ( :5 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|275|142||0|0|1550820|861350|2060|1466|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|214|214||0|0|793672|793672|150|150|
|tag_service|insert into tag_service.label_vip_match_940405107533606912_940487380991799296 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , 0 as shopid , t1.user_id as vipid , 'user' as vipsource from statistic.member t1 left join tag_service.label_vip_match_940405107533606912_940487380991799296 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|251|251||0|0|491059|491059|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_827519836937560064 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 ) and lvm.member_source in ( :26 , :27 , :28 , :29 , :30 , :31 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|176|176||0|0|902926|902926|567|567|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_821504909596737536 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.sex in ( :5 , :6 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|121|121||0|0|1052040|1052040|662|662|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823856782299402240 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|126|126||0|0|966294|966294|1399|1399|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_source in ( :5 , :6 , :7 , :8 , :9 , :10 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|331|331||0|0|944362|944362|515|515|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_885279553956712448 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|143|143||0|0|1391556|1391556|530|530|
|statistic|delete from statistic.batch_job_execution_params where job_execution_id <= :1|1|217|217||0|0|4291336|4291336|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|126|126||0|0|742816|742816|224|224|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823856782299402240 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|114|114||0|0|1023556|1023556|1562|1562|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.lifecycle in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|110|110||0|0|723221|723221|246|246|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|152|152||0|0|1418824|1418824|549|549|
|tag_service|delete from tag_service.label_vip_match_885278795660111872_885279553956712448 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_885278795660111872_885279553956712448 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|115|115||0|0|699592|699592|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_885279553956712448 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_anniversary in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|111|111||0|0|815180|815180|394|394|
|tag_service|delete from tag_service.label_vip_match_940405107533606912_940487380991799296 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_940405107533606912_940487380991799296 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|180|180||0|0|982118|982118|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_827519836937560064 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|121|121||0|0|899497|899497|568|568|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_821504909596737536 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.age_group in ( :5 , :6 , :7 , :8 , :9 , :10 ) and lvm.new_or_old in ( :11 , :12 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|142|142||0|0|961886|961886|648|648|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|179|179||0|0|823032|823032|168|168|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.lifecycle in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|109|109||0|0|501129|501129|484|484|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823695523771879424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|169|169||0|0|1309076|1309076|430|430|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|188|188||0|0|818946|818946|185|185|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_885279553956712448 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|130|130||0|0|1249196|1249196|488|488|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|234|234||0|0|803690|803690|165|165|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|219|219||0|0|818946|818946|185|185|
|tag_service|delete from tag_service.label_vip_match_821229068421742592_821504909596737536 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821229068421742592_821504909596737536 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|103|103||0|0|536950|536950|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_821504909596737536 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|141|141||0|0|727140|727140|221|221|
|tag_service|delete from tag_service.label_vip_match_836363095600320512_836442940199964672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836363095600320512_836442940199964672 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and t1.id is null ) a )|1|128|128||0|0|709148|709148|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 ) and lvm.month_lately_consume in ( :17 , :18 , :19 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|160|160||0|0|638702|638702|160|160|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_state in ( :5 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|128|128||0|0|1107622|1107622|499|499|
|tag_service|insert into tag_service.label_vip_match_836363095600320512_836442940199964672 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , 0 as shopid , t1.user_id as vipid , 'user' as vipsource from statistic.member t1 left join tag_service.label_vip_match_836363095600320512_836442940199964672 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|104|104||0|0|354574|354574|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_821504909596737536 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|152|152||0|0|1053226|1053226|655|655|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :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 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|107|107||0|0|1369902|1369902|347|347|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_821504909596737536 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|164|164||0|0|985622|985622|639|639|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|101|101||0|0|1031340|1031340|518|518|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823695523771879424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|145|145||0|0|1323843|1323843|434|434|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.new_or_old in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|117|117||0|0|1061524|1061524|545|545|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|138|138||0|0|1180680|1180680|161|161|
|tag_service|insert into tag_service.label_vip_match_822257848045047808_822262919524818944 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , 0 as shopid , t1.user_id as vipid , 'user' as vipsource from statistic.member t1 left join tag_service.label_vip_match_822257848045047808_822262919524818944 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|107|107||0|0|211392|211392|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_827519836937560064 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|141|141||0|0|888810|888810|565|565|
|tag_service|insert into tag_service.label_vip_match_821229068421742592_821504909596737536 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , 0 as shopid , t1.user_id as vipid , 'user' as vipsource from statistic.member t1 left join tag_service.label_vip_match_821229068421742592_821504909596737536 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|158|158||0|0|268475|268475|0|0|
|tag_service|update member_label_match set match_label = :1 where id = :2|1|112|112||0|0|7142579|7142579|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823695523771879424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.lifecycle in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|114|114||0|0|700831|700831|256|256|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.perfect_data_state in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|178|178||0|0|1271934|1271934|539|539|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_anniversary in ( :5 ) and lvm.member_identity in ( :6 , :7 , :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|127|127||0|0|999230|999230|385|385|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_885279553956712448 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_identity in ( :5 , :6 , :7 ) and lvm.lifecycle in ( :8 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|143|143||0|0|918315|918315|297|297|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_822262919524818944 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|146|146||0|0|663068|663068|56|56|
|tag_service|insert into tag_service.label_vip_match_823688108565368832_823695523771879424 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , 0 as shopid , t1.user_id as vipid , 'user' as vipsource from statistic.member t1 left join tag_service.label_vip_match_823688108565368832_823695523771879424 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|106|106||0|0|334747|334747|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_476788488201703424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.frequency_total_consume in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 ) and lvm.member_identity in ( :12 , :13 , :14 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|301|301||0|0|756824|756824|522|522|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_823695523771879424 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.frequency_total_consume in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 ) and lvm.member_identity in ( :12 , :13 , :14 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|120|120||0|0|782090|782090|420|420|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_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_836442940199964672 lvm on t1.id = lvm.id left join statistic.meta_erp_dept dept on t2.tenant_app_id = dept.tenant_app_id and t2.shop_id = dept.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 lvm.member_shop in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 ) group by t1.tenant_id , t1.tenant_app_id , ifnull ( dept.shop_id , ifnull ( dept.dept_erp_id , 0 ) ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|198|198||0|0|957594|957594|185|185|
