|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|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_817517269994225664 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_817517269994225664 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|37192|37192|0|0|
|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|47700|47700|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_816099123538214912' 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|3545|3545|4|4|
|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|15|15||0|0|113056|113056|1638|1638|
|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|21|21||0|0|455270|455270|99|99|
|tenant|insert into erp_sales ( id , tenant_id , tenant_wechatapp_id , sales_erp_id , sales_no , sales_date , member_erp_id , employee_erp_id , employee_name , dept_erp_id , amount , sales_remark , receipts , sales_status , is_sales , busi_date ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , 18020.00 , :10 , :11 , :12 , :13 , :14 ) on duplicate key update sales_date = :15 , member_erp_id = :16 , employee_erp_id = :17 , employee_name = :18 , dept_erp_id = :19 , amount = 18020.00 , sales_remark = :20 , receipts = :21 , sales_status = :22 , is_sales = :23 , busi_date = :24|1|14|14||0|0|0|0|0|0|
||load data local infile 'import_data/839295151019966464_20190611102746_1_member.csv' replace into table user_service.erp_member_info character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , erp_member_id , @employee_erp_id , @grade_erp_id , @card_no , @dept_erp_id , mobile_no , @consumption_integral , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , erp_create_time , @status ) set update_time = now ( )|1|5|5||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_827516559562940416 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|7|7||0|0|660062|660062|108|108|
|timer|insert into task_execute_log ( id , task_id , task_name , task_params , success , error_msg , create_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 )|1|7|7||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_476787156229165056 sd on vc.tenant_wechatapp_id = sd.tenant_app_id and vc.erp_product_category_id = sd.category_erp_id left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where vt.tenant_wechatapp_id = :2 and sd.sales_status = :3 and sd.sales_type = :4 and sd.create_time >= :5 and sd.create_time <= :6 and sd.value_add_no is null and os.shop_id != :7 and oe.employee_user_id != :8 limit :9 offset :10|1|4|4||0|0|794099|794099|157|157|
|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|45532|45532|7|7|
|account|/* applicationname = datagrip 2018.2.2 */ select tu.tenant_app_id , tu.user_id , tu.member_erp_id , tu.customer_user_id from user_service.user_relation tu|1|1|1||0|0|21088|21088|21088|21088|
|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|2|2||0|0|239574|239574|2254|2254|
|warranty_service|insert into warranty ( id , tenant_wechatapp_id , user_id , erp_sales_id , update_user_id , warranty_no , is_disable , warranty_data ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , ... 现金：17931.00","userid":"902776856833474560","amount":17931,"detail":[{"id":"477929656571514618","saleserpid":"2512131","salestype":"销售","productbarcode":"04360101932268","productname":"足金耳钉","certno":"","categoryname":"黄金","totalweight":"0.00g","stoneweight":"0.000ct","goldweight":"2.21g","remark":"","quantity":1,"amounttotal":857,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_08tvxt6y5xl82efsvzqllpyjojygliaxhr58aim4dkttmfkcdn4s_2wh0ilypmbzyklnp6jeiojuolbbpt4tg0oxrsjdfbdwmxfpviindhrxgy19z0kvozta4eddrsuhgxtfzronp7t2q2edwauiamdrvp&media_id = q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"],"serverids":["q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"]},{"id":"477929656571514619","saleserpid":"2512131","salestype":"销售","productbarcode":"09570101921127","productname":"足金项链","certno":"","categoryname":"黄金","totalweight":"10.59g","stoneweight":"0.000ct","goldweight":"10.59g","remark":"","quantity":1,"amounttotal":4056,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_08tvxt6y5xl82efsvzqllpyjojygliaxhr58aim4dkttmfkcdn4s_2wh0ilypmbzyklnp6jeiojuolbbpt4tg0oxrsjdfbdwmxfpviindhrxgy19z0kvozta4eddrsuhgxtfzronp7t2q2edwauiamdrvp&media_id = q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"],"serverids":["q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"]},{"id":"477929656571514620","saleserpid":"2512131","salestype":"销售","productbarcode":"21320101926049","productname":"足金手镯","certno":"","categoryname":"黄金","totalweight":"0.00g","stoneweight":"0.000ct","goldweight":"32.96g","remark":"","quantity":1,"amounttotal":12954,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_08tvxt6y5xl82efsvzqllpyjojygliaxhr58aim4dkttmfkcdn4s_2wh0ilypmbzyklnp6jeiojuolbbpt4tg0oxrsjdfbdwmxfpviindhrxgy19z0kvozta4eddrsuhgxtfzronp7t2q2edwauiamdrvp&media_id = q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"],"serverids":["q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"]},{"id":"477929656571514621","saleserpid":"2512131","salestype":"销售","productbarcode":"945210509167","productname":"足银腕饰","certno":"","categoryname":"银饰","totalweight":"0.00g","stoneweight":"0.000ct","goldweight":"0.00g","remark":"","quantity":1,"amounttotal":64,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_08tvxt6y5xl82efsvzqllpyjojygliaxhr58aim4dkttmfkcdn4s_2wh0ilypmbzyklnp6jeiojuolbbpt4tg0oxrsjdfbdwmxfpviindhrxgy19z0kvozta4eddrsuhgxtfzronp7t2q2edwauiamdrvp&media_id = q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"],"serverids":["q8va1ewhpl6lmciwccletf-xwp602cj1cbqjju9umj1xcboqezamk-2m8odbm0l1"]}]}' )|1|22|22||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_816096827580399616 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|90002|90002|18|18|
|platform|update `component` set `verifyticket` = :1 , `ticketovertime` = :2 , `token` = :3 , `tokenovertime` = :4 , `preauthcode` = :5 , `preauthcodeovertime` = :6 , `updatetime` = :7 , `createtime` = :8 where `id` = :9|1|7|7||0|0|1|1|0|0|
|platform|select count ( 1 ) from `smssent` where vendorid = :1 and success = true and date_sub ( date ( :2 ) , interval :3 day ) = date_format ( senttime , :4 )|1|3|3||0|0|66068|66068|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_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|3|3||0|0|9446|9446|65|65|
|tag_service|delete from tag_service.label_vip_match_828778547559579648 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_828778547559579648 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|38900|38900|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_817178025371156480 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|41998|41998|3000|3000|
|tenant|/* applicationname = datagrip 2018.2.2 */ select tenant_app_id , count ( * ) amount from statistic.member group by tenant_app_id|1|6|6||0|0|5103998|5103998|187|187|
||load data local infile 'import_data/839295151019966464_20190611102809_1_sales.csv' replace into table tenant.erp_sales character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , sales_erp_id , sales_no , sales_date , member_erp_id , employee_erp_id , employee_name , amount , dept_erp_id , sales_remark , receipts , sales_status , busi_date , @sales_index , @sales_type , @product_barcode , @product_name , @cert_no , @hand_size , @category_erp_id , @category_name , @stone_weight , @gold_weight , @total_weight , @quantity , @amount_total , @amount_pay , @integral , @remark , erp_create_time ) set update_time = now ( )|1|6|6||0|0|0|0|0|0|
|tenant|select esd.id , esd.sales_erp_id , es.employee_name , esd.product_barcode , es.sales_no , es.member_erp_id , esd.category_name , es.sales_date , esd.category_erp_id , esd.product_name , esd.cert_no , esd.amount_pay , esd.sales_index from erp_sales_detail esd join erp_sales es on es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id where es.sales_status = :1 and es.tenant_wechatapp_id = :2 and esd.product_barcode = :3 order by es.sales_date desc|1|1|1||0|0|5317|5317|1302|1302|
|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 )|1|1|1||0|0|16862|16862|19|19|
||load data local infile 'import_data/839295151019966464_20190611102746_1_member.csv' replace into table user_service.erp_member character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , member_erp_id , employee_erp_id , grade_erp_id , card_no , dept_erp_id , mobile_no , consumption_integral , user_name , @sex , @birthday , @birthday_is_lunar , @home_address , @memorialday , @memorialday_name , @memorialday_is_lunar , @interested , @amount , erp_create_time , status ) set update_time = now ( )|1|2|2||0|0|0|0|0|0|
||select count ( * ) from message_push.message_log|1|35|35||0|0|1906524|1906524|1|1|
|user_service|select t.id , t.tenant_app_id , t.user_id , t.erp_member_id from tenant_user t where t.tenant_app_id = :1 and t.shop_id = :2 and t.mobile_no is not null and t.mobile_no != :3 order by id asc limit :4 , :5|1|8|8||0|0|1698354|1698354|641|641|
|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|512906|512906|20|20|
|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|7|7||0|0|14450|14450|46|46|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823844580729339904 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|84505|84505|78|78|
|mysql|update account.account set balance = balance+9237.00 where owner_id = :1 and account_type = :2|1|6|6||0|0|4734525|4734525|0|0|
|mysql|update account.account set balance = balance-9805.00 where owner_id = :1 and account_type = :2|1|4|4||0|0|4734534|4734534|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_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|6662|6662|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_487569764496052224 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_487569764496052224 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|40398|40398|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_814020764498956288 where tenant_app_id = :1 and vip_id = :2|1|2|2||0|0|52432|52432|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-1023: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|9|9||0|0|411162|411162|230|230|
|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|20144|20144|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|207353|207353|0|0|
|user_service|insert into erp_member ( id , tenant_id , tenant_wechatapp_id , member_erp_id , employee_erp_id , grade_erp_id , card_no , dept_erp_id , mobile_no , consumption_integral , user_name , status ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , 1.00 , :9 , null ) on duplicate key update member_erp_id = :10 , employee_erp_id = :11 , grade_erp_id = :12 , card_no = :13 , dept_erp_id = :14 , mobile_no = :15 , consumption_integral = 1.00 , user_name = :16 , create_time = create_time|1|26|26||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :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 ) and ( user.nick_name like concat ( :273 , :274 , :275 ) or user.mobile_no = :276 ) )|1|10|10||0|0|96197|96197|1|1|
|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|1|2|2||0|0|63492|63492|1|1|
|account|/* applicationname = datagrip 2018.2.2 */ select count ( * ) from user_service.erp_integral_log|1|6|6||0|0|3983569|3983569|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 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 ) and ( user.nick_name like concat ( :104 , :105 , :106 ) or user.mobile_no = :107 ) ) order by tenantuser.create_time desc limit :108|1|10|10||0|0|2044668|2044668|1|1|
|user_service|insert into erp_member ( id , tenant_id , tenant_wechatapp_id , member_erp_id , employee_erp_id , grade_erp_id , card_no , dept_erp_id , mobile_no , consumption_integral , user_name , status ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , 17492.00 , :9 , null ) on duplicate key update member_erp_id = :10 , employee_erp_id = :11 , grade_erp_id = :12 , card_no = :13 , dept_erp_id = :14 , mobile_no = :15 , consumption_integral = 17492.00 , user_name = :16 , create_time = create_time|1|13|13||0|0|0|0|0|0|
|mysql|update account.account set balance = balance-9237.00 where owner_id = :1 and account_type = :2|1|4|4||0|0|4734525|4734525|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_817517269994225664 where tenant_app_id = :1 and vip_id = :2|1|3|3||0|0|79106|79106|1|1|
|platform|select count ( 1 ) from coupondetail where vendorid = :1 and coupontype = :2 and couponstate = :3 and to_days ( :4 ) :5 to_days ( createtime ) = :6|1|9|9||0|0|318766|318766|1|1|
|platform|select count ( 1 ) from `taskassignment` ta where ta.tasktype = :1 and ( ta.taskstatus = :2 or ta.taskstatus = :3 ) and vendorid = :4 and uid = :5|1|1|1||0|0|621782|621782|1|1|
|statistic|select count ( 0 ) from ( select es.id , es.sales_no salesno , es.dept_erp_id shopid , ifnull ( os.shop_name , '未知' ) shopname , es.erp_employee_id employeeuserid , ifnull ( oe.employee_user_name , '未知' ) employeeusername , es.user_name username , es.mobile_no mobileno , es.sales_date salesdate , es.warranty_date warrantydate , es.warranty_id warrantyid from statistic.erp_sales_822257848045047808 es left join statistic.off_shop os on es.tenant_app_id = os.tenant_app_id and es.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on es.tenant_app_id = oe.tenant_app_id and es.erp_employee_id = oe.employee_erp_id where es.tenant_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and es.tenant_app_id = :4 and os.shop_id = :5 and es.warranty_date > :6 ) table_count|1|5|5||0|0|367672|367672|1|1|
|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|1|4|4||0|0|111418|111418|0|0|
|tag_service|insert into tag_service.label_vip_match_882402759662481408 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_882402759662481408 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|2|2||0|0|690937|690937|0|0|
|tenant|update tenant.erp_sales es join tenant.erp_sales_detail esd on es.tenant_id = esd.tenant_id and es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id set is_sales = true where esd.sales_type = :1 and esd.tenant_id = :2 and es.is_sales = false|1|7|7||0|0|557223|557223|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_486900027235635200 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|63016|63016|0|0|
||select count ( * ) from message_push.message_log t|1|57|57||0|0|1906462|1906462|1|1|
|account|/* applicationname = datagrip 2018.2.2 */ select * from user_service.erp_integral_log where is_disable = :1|1|17|17||0|0|3983582|3983582|11|11|
|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|1|1||0|0|6137|6137|67|67|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_821229068421742592 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|170252|170252|150|150|
|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|522453|522453|75|75|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_814020764498956288 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|5644|5644|2|2|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_836408967545536512' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|2020|2020|32|32|
|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|165939|165939|132|132|
|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|3|3||0|0|9634|9634|0|0|
|statistic|select eu.tenant_id , eu.tenant_wechatapp_id , eu.employee_erp_id , eu.user_id , ifnull ( ee.employee_name , tu.user_name ) user_name from tenant.employee_user eu left join tenant.erp_employee ee on eu.tenant_id = ee.tenant_id and eu.employee_erp_id = ee.employee_erp_id left join user_service.tenant_user tu on eu.tenant_wechatapp_id = tu.tenant_app_id and eu.user_id = tu.user_id limit :1 offset :2|1|5|5||0|0|19129|19129|5000|5000|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 50.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 50.00 , update_time = :27|1|9|9||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select em.tenant_wechatapp_id , em.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 user_service.erp_member em left join user_service.erp_integral_log el on em.tenant_wechatapp_id = el.tenant_wechatapp_id and em.member_erp_id = el.member_erp_id where em.tenant_wechatapp_id = :1 and em.create_time between :2 and :3 and el.is_disable = :4 group by em.tenant_wechatapp_id , em.member_erp_id|1|9|9||0|0|551392|551392|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 ) and ( user.nick_name like concat ( :17 , :18 , :19 ) or user.mobile_no = :20 ) )|1|3|3||0|0|23920|23920|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 ) and ( user.nick_name like concat ( :17 , :18 , :19 ) or user.mobile_no = :20 ) ) order by tenantuser.create_time desc limit :21|1|12|12||0|0|2044806|2044806|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-1023:59:59.0' collect_time , es.sales_status , '_839295151019966464' 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|24252|24252|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|479878|479878|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_482207042405273600 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|287630|287630|95|95|
|tag_service|select count ( * ) from tag_service.label_vip_match_839295151019966464 t where match ( `vip_label` ) against ( :1 in boolean mode ) and tenant_app_id = :2|1|2|2||0|0|3295|3295|1|1|
|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|308567|308567|21|21|
|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|700518|700518|293|293|
|account|/* applicationname = intellij idea 2019.1 */ select count ( * ) from activity_service.vote_log|1|2|2||0|0|1527526|1527526|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 0.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|25|25||0|0|0|0|0|0|
|mysql|update account.account set balance = balance+9805.00 where owner_id = :1 and account_type = :2|1|4|4||0|0|4734528|4734528|0|0|
|tag_service|insert into tag_service.member_statistic_6c2a42bcd4fe38d3593201131ec8bc12 select t1.id , t1.tenant_id , t1.tenant_app_id , t2.shop_id , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employee_user_id , t2.grade_erp_id , t1.user_id as userid , t1.member_user_id as memberuserid , '' as shopname , '' as employeeusername , t1.user_name as username , t1.mobile_no as mobileno , t1.age , t1.sex , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , t1.birthday_is_lunar as birthdayislunar , t1.memorial_name as memorialname , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t1.source_type as sourcetype , t1.identity , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.cancel_flag as cancelflag , '' as gradename , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , t2.last_service_time as lastservicetime , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.category_name as categoryname from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_889699715132813312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|1|1||0|0|6729|6729|0|0|
|platform|select `no` , `salesid` , `noteno` , `barcode` , `productname` , `customername` , `customertel` , `quantity` , `amount` , `productdesc` , `remark` , `salername` , `productimageid` , `productimageurl` , `shopid` , `vendorid` , `vendormemberid` , `salesdetailid` , `createtime` , `certimageurl` , `certimageid` , `aftersalesremark` , `eid` , `id` from `productcerts` where `vendormemberid` = :1 and `vendorid` = :2|1|1|1||0|0|586|586|0|0|
|sjfxjira|insert into rundetails ( id , job_id , start_time , run_duration , run_outcome , info_message ) values ( :1 , :2 , :3 , :4 , :5 , :6 )|1|7|7||0|0|0|0|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-1023: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|1|5|5||0|0|463123|463123|133|133|
|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|2|2||0|0|968215|968215|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_480726380749918208 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|131679|131679|40|40|
|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|57627|57627|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_830220893509701632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|153571|153571|0|0|
|statistic|select sd.id , sd.tenant_id , sd.tenant_wechatapp_id tenant_app_id , es.member_erp_id , sd.sales_erp_id , sd.sales_type , sd.product_barcode , sd.product_name , sd.category_name , sd.quantity , sd.amount_total/if ( sd.quantity = 0 , 1 , sd.quantity ) price , sd.amount_pay , sd.integral , sd.create_time , sd.update_time , sd.stone_weight , sd.gold_weight , es.sales_no , es.sales_date , es.dept_erp_id , es.erp_employee_id , sd.category_erp_id , es.sales_status , es.user_id , es.user_name , es.mobile_no , '_885278795660111872' tableindex from statistic.base_erp_sales be inner join tenant.erp_sales_detail sd on be.tenant_app_id = sd.tenant_wechatapp_id and be.sales_erp_id = sd.sales_erp_id inner join statistic.erp_sales_885278795660111872 es on be.tenant_app_id = es.tenant_app_id and be.sales_erp_id = es.sales_erp_id where be.tenant_app_id = :1 order by sd.id limit :2 offset :3|1|1|1||0|0|3552|3552|940|940|
|account|/* applicationname = datagrip 2018.2.2 */ select * from user_service.erp_integral_log where create_time != update_time|1|45|45||0|0|3983584|3983584|2132669|2132669|
|tag_service|delete from tag_service.batch_job_execution_params where job_execution_id <= :1|1|2|2||0|0|262755|262755|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|3|3||0|0|873164|873164|0|0|
|platform|select ifnull ( eid , 0 ) as eid , ifnull ( shopid , 0 ) as sid , vendorid , count ( 1 ) as quantity from productcerts where vendorid = :1 and to_days ( :2 ) :3 to_days ( createtime ) = :4 group by eid , shopid , vendorid|1|2|2||0|0|28984|28984|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_821229068421742592 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|4|4||0|0|350559|350559|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1369913|1369913|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_471320523331211264' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|4981|4981|74|74|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|480658|480658|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_828766757295529984 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|13|13||0|0|123685|123685|48|48|
|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|4|4||0|0|62316|62316|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_817517269994225664 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|9|9||0|0|60740|60740|1|1|
|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|1|1||0|0|1736|1736|19|19|
|account|/* applicationname = intellij idea 2019.1 */ update account.account set balance = balance+38 , cumulation = cumulation-38 where account_type = :1 and owner_id = :2|1|17|17||0|0|4758927|4758927|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :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 ) and ( user.nick_name like concat ( :249 , :250 , :251 ) or user.mobile_no = :252 ) )|1|8|8||0|0|279093|279093|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 , :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 ) and ( user.nick_name like concat ( :249 , :250 , :251 ) or user.mobile_no = :252 ) ) order by tenantuser.create_time desc limit :253|1|7|7||0|0|2167172|2167172|1|1|
|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|2|2||0|0|34612|34612|0|0|
|tag_service|select * from sms.sms_send t where t.tenant_id = :1|1|8|8||0|0|862868|862868|0|0|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 5056.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 5056.00 , update_time = :27|1|3|3||0|0|0|0|0|0|
|employee|commit|1|11|11||0|0|0|0|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|1|5|5||0|0|40735|40735|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|318766|318766|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and scene = :4 and user_name > :5 and shop_name > :6|1|11|11||0|0|1158784|1158784|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_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|21883|21883|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_817161814168092672 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|25046|25046|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885418658174709760 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|56846|56846|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_816096827580399616 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|164586|164586|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 , '_816099123538214912' 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|6058|6058|1064|1064|
|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 ) and ( user.nick_name like concat ( :122 , :123 , :124 ) or user.mobile_no = :125 ) )|1|5|5||0|0|144062|144062|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_488003299602206720 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|128709|128709|46|46|
|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-1023:59:59.0' collect_time , es.sales_status , '_839295151019966464' 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|20141|20141|13|13|
|statistic|update erp_sales_476787156229165056 set user_id = :1 , user_name = :2 , mobile_no = :3 where tenant_app_id = :4 and member_erp_id = :5 and user_name is null|1|1|1||0|0|4335|4335|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-1023: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|3|3||0|0|56816|56816|33|33|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_821174502091165696 where tenant_app_id = :1 and vip_id = :2|1|1|1||0|0|27748|27748|1|1|
|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.subscribe_flag = :5 and mb.bind_flag = :6 and mb.full_flag = :7 and mb.register_flag = :8 ) tmp_count|1|4|4||0|0|1048420|1048420|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|5|5||0|0|9833|9833|41|41|
|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|20|20||0|0|205692|205692|79|79|
|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_487569764496052224 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|6|6||0|0|40487|40487|40|40|
|tag_service|insert into tag_service.member_statistic_cad2bdb5605d3577673e20d097bcf1fc select t1.id , t1.tenant_id , t1.tenant_app_id , t2.shop_id , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employee_user_id , t2.grade_erp_id , t1.user_id as userid , t1.member_user_id as memberuserid , '' as shopname , '' as employeeusername , t1.user_name as username , t1.mobile_no as mobileno , t1.age , t1.sex , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , t1.birthday_is_lunar as birthdayislunar , t1.memorial_name as memorialname , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t1.source_type as sourcetype , t1.identity , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.cancel_flag as cancelflag , '' as gradename , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , t2.last_service_time as lastservicetime , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.category_name as categoryname from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|3|3||0|0|29943|29943|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|15|15||0|0|455270|455270|134|134|
|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 )|1|1|1||0|0|1972328|1972328|185|185|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_827516559562940416 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|411351|411351|27|27|
|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|10|10||0|0|102501|102501|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|4|4||0|0|9375|9375|88|88|
|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|1|1||0|0|7176|7176|18|18|
|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|1|1||0|0|34660|34660|0|0|
|activity_service|select assist_task_activity_id as id , count ( distinct user_id ) as partakenum , sum ( if ( partake_type = 'appoint' and status = :1 , :2 , :3 ) ) as appointnum , sum ( if ( partake_type = :4 , :5 , :6 ) ) as applynum , sum ( if ( partake_type = :7 and status >= :8 , :9 , :10 ) ) as finishnum from assist_task_user where assist_task_activity_id in ( :11 , :12 , :13 ) group by assist_task_activity_id|1|5|5||0|0|346087|346087|3|3|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t2.id = :4 and t1.step = :5|1|3|3||0|0|544389|544389|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|4|4||0|0|282682|282682|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_830220893509701632 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|81260|81260|31|31|
|tag_service|delete from tag_service.label_vip_match_817161814168092672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817161814168092672 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|44926|44926|0|0|
|statistic|select coupon_user_id , ifnull ( writeoff_shop_id , dept_erp_id ) shop_id , ifnull ( writeoff_user_id , employee_erp_id ) user_id , create_time from coupon_service.write_off_log where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 order by create_time limit :4 offset :5|1|1|1||0|0|33852|33852|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|268|268||0|0|2669652|2669652|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_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|11|11||0|0|123692|123692|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.create_time <= :2 and ( sd.value_add_date <= date_format ( :3 , :4 ) and sd.value_add_date is not null ) and os.shop_id != :5 and oe.employee_user_id != :6 limit :7 offset :8|1|1|1||0|0|66721|66721|0|0|
||load data local infile 'import_data/839295151019966464_20190611102809_1_sales.csv' replace into table tenant.erp_sales_detail character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , sales_erp_id , @sales_no , @sales_date , @member_erp_id , @employee_erp_id , @employee_name , @amount , @dept_erp_id , @sales_remark , @receipts , @sales_status , @busi_date , sales_index , sales_type , product_barcode , product_name , cert_no , hand_size , category_erp_id , category_name , stone_weight , gold_weight , total_weight , quantity , amount_total , amount_pay , integral , remark , erp_create_time ) set update_time = now ( )|1|3|3||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_489024659472388096 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|2598|2598|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|1|1||0|0|88841|88841|0|0|
|value_added|-- 根据添加时间得出当前增值金额 update value_added_user set amount_added = if ( :1 > ( ( ( added_percent_per_day / :2 ) * if ( :3 >= timestampdiff ( day , date_format ( create_time , :4 ) , now ( ) ) :5 :6 :7 add_days , timestampdiff ( day , date_format ( create_time , :8 ) , now ( ) ) :9 :10 , add_days ) ) :11 ( ( devalue_percent_per_day / :12 ) * if ( :13 >= timestampdiff ( day , date_format ( create_time , :14 ) , now ( ) ) :15 :16 :17 add_days :18 keeping_days , :19 , timestampdiff ( day , date_format ( create_time , :20 ) , now ( ) ) :21 :22 :23 add_days :24 keeping_days ) ) ) * amount_pay , :25 , ( ( ( added_percent_per_day / :26 ) * if ( :27 >= timestampdiff ( day , date_format ( create_time , :28 ) , now ( ) ) :29 :30 :31 add_days , timestampdiff ( day , date_format ( create_time , :32 ) , now ( ) ) :33 :34 , add_days ) ) :35 ( ( devalue_percent_per_day / :36 ) * if ( :37 >= timestampdiff ( day , date_format ( create_time , :38 ) , now ( ) ) :39 :40 :41 add_days :42 keeping_days , :43 , timestampdiff ( day , date_format ( create_time , :44 ) , now ( ) ) :45 :46 :47 add_days :48 keeping_days ) ) ) * amount_pay ) , update_time = now ( ) where state = :49 and update_time <= curdate ( ) and ( create_time >= date_add ( curdate ( ) , interval :50 ( add_days :51 keeping_days :52 :53 ) day ) or ( amount_added > :54 and create_time < date_add ( curdate ( ) , interval :55 ( add_days :56 keeping_days :57 :58 ) day ) ) ) -- 判断条件 在增值时间内 增值金大于0 状态正常|1|3|3||0|0|117375|117375|0|0|
|sjfxjira|update cwd_user_attributes set user_id = :1 , directory_id = :2 , attribute_name = :3 , attribute_value = :4 , lower_attribute_value = :5 where id = :6|1|3|3||0|0|1|1|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_818632945152598016 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|11438|11438|7|7|
|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-1023:59:59.0' collect_time , dt.quantity from `order`.order_info od left join order.order_detail dt on od.id = dt.order_id left join deliver.trade_deliver td on od.id = td.trade_id left join goods.goods_sku gs on dt.sku_id = gs.id where od.tenant_wechatapp_id = :1 and od.update_time >= :2 and od.create_time <= :3 and od.update_time <= :4 limit :5 offset :6|1|3|3||0|0|35486|35486|148|148|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) employee_user_id , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name , t.amount from ( select tenant_id , tenant_app_id , shop_id , employee_user_id , count ( * ) amount from statistic.member where tenant_app_id = :2 and create_time between :3 and :4 and register_flag = :5 group by tenant_id , tenant_app_id , shop_id , employee_user_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and ( t.employee_user_id = oe.employee_erp_id or t.employee_user_id = oe.employee_user_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name|1|1|1||0|0|335827|335827|117|117|
|account|/* applicationname = datagrip 2018.2.2 */ select * from user_service.erp_member where tenant_wechatapp_id = :1 order by create_time|1|18|18||0|0|3293182|3293182|502|502|
|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|1|2|2||0|0|23806|23806|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 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|
|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|3|3||0|0|43854|43854|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_885418658174709760 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|96433|96433|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|3|3||0|0|13228|13228|1|1|
|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|2|2||0|0|42912|42912|0|0|
|statistic|delete from statistic.batch_step_execution where step_execution_id <= :1|1|1|1||0|0|28062|28062|0|0|
|statistic|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 limit :7|1|1|1||0|0|868842|868842|20|20|
|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 ) and ( user.nick_name like concat ( :104 , :105 , :106 ) or user.mobile_no = :107 ) )|1|2|2||0|0|33148|33148|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 4.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|25|25||0|0|0|0|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_885278795660111872 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_885278795660111872 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|23|23||0|0|2669652|2669652|0|0|
|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|1037563|1037563|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|9|9||0|0|577292|577292|0|0|
|statistic|select tu.tenant_id , tu.tenant_wechatapp_id , tt.activity_name , tu.activity_id , tu.user_id , tu.create_time , tu.update_time , date_format ( tu.create_time , '%y-%m-%d' ) statistic_date from activity_service.lottery_user tu inner join activity_service.activity tt on tu.activity_id = tt.id where tu.tenant_wechatapp_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 limit :4 offset :5|1|1|1||0|0|90035|90035|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_836408967545536512 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|47031|47031|146|146|
|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|45584|45584|20|20|
|tag_service|delete from tag_service.label_vip_match_818691468687347712 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818691468687347712 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|34392|34392|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1370500|1370500|77|77|
|activity_service|select count ( 0 ) from ( select t2.user_name as username , t2.data as userheadimg , ifnull ( t1.finished_time , t1.update_time ) as time , t1.cutdown_amount as cutdownamount , t2.partake_data as partakedata from activity_service.cutdown_price_activity_apply t1 join activity_service.user_trace t2 on t1.id = t2.user_apply_id and t2.step = :1 where t1.activity_id = :2 ) table_count|1|1|1||0|0|17037|17037|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_818984074398965760 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|21217|21217|2080|2080|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 12469.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 12469.00 , update_time = :27|1|1|1||0|0|0|0|0|0|
|message_push|insert into message_log ( id , tenant_id , tenant_app_id , user_id , scene_type , post_data , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , ... , \\"tenant_wechatapp_id\\":\\"826963436981231616\\"}"}' , :6 , :7 )|1|16|16||0|0|0|0|0|0|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where `bid` = :1 and `tasktype` = :2 and `tasktime` = :3 and `vendorid` = :4 and `uid` = :5|1|1|1||0|0|621648|621648|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_827516559562940416 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_827516559562940416 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|6|6||0|0|659846|659846|0|0|
|statistic|select count ( 0 ) from ( select ec.scene , ec.shop_id , ec.shop_name , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finishrate from ( select scene , 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 user_name > :3 and shop_name > :4 group by scene , shop_id , shop_name ) ec order by ec.scene , convert ( ec.shop_name using gbk ) ) tmp_count|1|2|2||0|0|11501|11501|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|2|2||0|0|4222|4222|3|3|
|timer|update task_info set next_time = :1 where id = :2|1|7|7||0|0|1|1|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_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|1|1||0|0|21578|21578|16|16|
|user_service|select * from erp_integral_log where tenant_id = :1 and update_time >= :2 and update_time <= :3 order by tenant_wechatapp_id , member_erp_id|1|3|3||0|0|95114|95114|11411|11411|
|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|20|20||0|0|522453|522453|75|75|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|26|26||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , 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|521935|521935|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_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|4|4||0|0|17444|17444|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_814640285408600064 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|49532|49532|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_817878088380628992' 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|2317|2317|16|16|
|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-1023: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|3|3||0|0|62845|62845|36|36|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_835720547919761408 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|18588|18588|0|0|
|warranty_service|insert into warranty ( id , tenant_wechatapp_id , user_id , erp_sales_id , update_user_id , warranty_no , is_disable , warranty_data ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , ... 支付宝：256.00","userid":"902778260138545152","amount":256,"detail":[{"id":"477929656571514710","saleserpid":"91506","salestype":"销售","productbarcode":"18053428","productname":"金750项链","certno":"","categoryname":"k金","totalweight":"0.00g","stoneweight":"0.000","goldweight":"0.00g","remark":"","quantity":1,"amounttotal":190,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_f8crbms77gsazcsza-ga1_z1r0bmxqhv4etasz8hjcidjaairb0orlrj1_an_6emtuatj6wpr8sq3wxnx4wp0nghhxrq2589jxpsgtd7zmdt4pkcyl3emrk__xoi0u7j5jpzrq2ncij0zbgyombaaddtrg&media_id = x8ixugmonx_sjx5h4dnm1fwmfgyfskmlnxmhvamsfvg8kj_b1myax7k3a48owqtv"],"serverids":["x8ixugmonx_sjx5h4dnm1fwmfgyfskmlnxmhvamsfvg8kj_b1myax7k3a48owqtv"]},{"id":"477929656571514711","saleserpid":"91506","salestype":"销售","productbarcode":"18053427","productname":"足金3d硬金挂坠","certno":"ggc201906060001","categoryname":"黄金3d","totalweight":"0.00g","stoneweight":"0.000ct","goldweight":"0.00g","remark":"","quantity":1,"amounttotal":66,"imgurls":["https://api.weixin.qq.com/cgi-bin/media/get?access_token = 22_f8crbms77gsazcsza-ga1_z1r0bmxqhv4etasz8hjcidjaairb0orlrj1_an_6emtuatj6wpr8sq3wxnx4wp0nghhxrq2589jxpsgtd7zmdt4pkcyl3emrk__xoi0u7j5jpzrq2ncij0zbgyombaaddtrg&media_id = bipij4uzy2ztaqmvzya66lechv3qy7dz-gp3hdazqgbpc6uhz7exolhdyivp8qre"],"serverids":["bipij4uzy2ztaqmvzya66lechv3qy7dz-gp3hdazqgbpc6uhz7exolhdyivp8qre"]}]}' )|1|14|14||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_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|479878|479878|0|0|
|platform|select * from ( select * from coupondetail where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and expirytime >= now ( ) ) as tv limit :4 , :5|1|2|2||0|0|318766|318766|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_818707624273952768 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|36460|36460|36|36|
|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|1|2|2||0|0|21736|21736|0|0|
|tenant|insert into erp_sales ( id , tenant_id , tenant_wechatapp_id , sales_erp_id , sales_no , sales_date , member_erp_id , employee_erp_id , employee_name , dept_erp_id , amount , sales_remark , receipts , sales_status , is_sales , busi_date ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , 122.00 , :10 , :11 , :12 , :13 , :14 ) on duplicate key update sales_date = :15 , member_erp_id = :16 , employee_erp_id = :17 , employee_name = :18 , dept_erp_id = :19 , amount = 122.00 , sales_remark = :20 , receipts = :21 , sales_status = :22 , is_sales = :23 , busi_date = :24|1|27|27||0|0|0|0|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|2|2||0|0|2545|2545|8|8|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 94.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|9|9||0|0|0|0|0|0|
|tag_service|select count ( * ) from tag_service.label_vip_match_823709122435256320 t where match ( `vip_label` ) against ( :1 in boolean mode ) and tenant_app_id = :2|1|1|1||0|0|19258|19258|1|1|
|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|2|2||0|0|44890|44890|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|1|1||0|0|149834|149834|2|2|
|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_818707624273952768 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|5|5||0|0|62295|62295|0|0|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 14361.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 14361.00 , update_time = :27|1|5|5||0|0|0|0|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|36|36||0|0|1044198|1044198|0|0|
|statistic|update erp_sales_823688108565368832 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|2|2||0|0|3345|3345|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_825209174345420800 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|211|211|8|8|
|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_834615931371048960 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|1526|1526|10|10|
|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-1023: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|2|2||0|0|479878|479878|353|353|
|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|479893|479893|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|1606270|1606270|28|28|
|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-1023:59:59.0' collect_time , es.sales_status , '_817517269994225664' 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|20733|20733|54|54|
|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 primary_key_id id , score , date_format ( create_time , '%y-%m-%d' ) comment_date , content , '_489024659472388096' 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|53389|53389|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_823709122435256320 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_823709122435256320 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|668|668|0|0|
|statistic|update erp_sales_469175049962786816 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|1|1||0|0|2332|2332|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|1|2|2||0|0|4380|4380|10|10|
|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 ) and ( user.nick_name like concat ( :122 , :123 , :124 ) or user.mobile_no = :125 ) ) order by tenantuser.create_time desc limit :126|1|10|10||0|0|2102636|2102636|1|1|
|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|16|16||0|0|15187|15187|42|42|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|15|15||0|0|68318|68318|0|0|
|statistic|update erp_sales_814020764498956288 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|1|1||0|0|4133|4133|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|15|15||0|0|480658|480658|0|0|
|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|1|1||0|0|47866|47866|0|0|
|tag_service|insert into tag_service.label_vip_match_816440425157005312 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_816440425157005312 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|1|1|1||0|0|319290|319290|0|0|
|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|868822|868822|1|1|
|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|2|2||0|0|3508|3508|20|20|
|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 ) and ( user.nick_name like concat ( :79 , :80 , :81 ) or user.mobile_no = :82 ) )|1|6|6||0|0|31603|31603|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-1023: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|29|29||0|0|700516|700516|191|191|
|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-1023:59:59.0' collect_time , es.sales_status , '_487569764496052224' 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|40192|40192|88|88|
|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_829922417672491008 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|7767|7767|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|8|8||0|0|254360|254360|1|1|
|user_service|insert into wx_member_card_redirect ( id , tenant_id , tenant_app_id , user_id , url , user_source_type , from_id , scene_type , scene_id ) values ( :1 , :2 , :3 , :4 , :5 , null , null , null , null ) on duplicate key update url = :6 , user_source_type = null , from_id = null , scene_type = null , scene_id = null|1|26|26||0|0|0|0|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|2|2||0|0|167990|167990|3000|3000|
|user_service|select count ( 0 ) from user_employee ue join tenant_user tu on ue.user_id = tu.user_id and tu.tenant_id = :1 and tu.tenant_app_id = :2 join user u on tu.user_id = u.id where ue.employee_user_id = :3 and ue.tenant_id = :4 and tenant_app_id = :5 and ( tu.user_name like concat ( concat ( :6 , :7 , :8 ) ) or tu.mobile_no = :9 )|1|2|2||0|0|10491|10491|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_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|1|1||0|0|69864|69864|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_816450513213112320 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_816450513213112320 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|19308|19308|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|1369927|1369927|2|2|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_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|4|4||0|0|1370088|1370088|25|25|
|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|7|7||0|0|112491|112491|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_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|307218|307218|55|55|
|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|1|1|1||0|0|155982|155982|3000|3000|
|tag_service|select * from account.account t where t.owner_id = :1|1|2|2||0|0|4733433|4733433|4|4|
|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|522369|522369|63|63|
|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-1023: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|4|4||0|0|131384|131384|92|92|
|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|65|65||0|0|1370500|1370500|77|77|
|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|3|3||0|0|7595|7595|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_885418658174709760 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|1|1|1||0|0|88250|88250|2825|2825|
||/* applicationname = intellij idea 2019.1 */ select * from erp_to_platform.sync_log where tenant_id = :1 and create_time < :2 and create_time > :3|1|15|15||0|0|12945|12945|5|5|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_832396582723833856 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|8107|8107|4|4|
|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|521928|521928|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 ) and ( user.nick_name like concat ( :123 , :124 , :125 ) or user.mobile_no = :126 ) ) order by tenantuser.create_time desc limit :127|1|4|4||0|0|2102646|2102646|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_885278795660111872' 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|1275|1275|49|49|
|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-1023:59:59.0' collect_time , es.sales_status , '_817878088380628992' 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|48791|48791|31|31|
|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|47|47||0|0|455270|455270|114|114|
|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 , '_827516559562940416' 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|4|4||0|0|21867|21867|5000|5000|
|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|1|1||0|0|3941|3941|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|1|1||0|0|2759|2759|11|11|
|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-1023: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|36|36||0|0|700516|700516|118|118|
|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|1|1||0|0|806|806|0|0|
|tag_service|delete from tag_service.label_vip_match_816099123538214912 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816099123538214912 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|29867|29867|0|0|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.create_time >= :4 and mb.create_time <= :5 and mb.register_flag = :6 ) tmp_count|1|1|1||0|0|1952323|1952323|1|1|
|user_service|select employee_erp_id as employeeerpid , count ( * ) as membernum from erp_member t where t.tenant_id = :1 and t.tenant_wechatapp_id = :2 and t.employee_erp_id in ( :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 ) group by employee_erp_id|1|3|3||0|0|47315|47315|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-1023:59:59.0' collect_time , es.sales_status , '_816869802005020672' 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|21456|21456|32|32|
|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_826254702915141632 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|268511|268511|62|62|
|tag_service|select * from account.account t where t.owner_type = :1|1|15|15||0|0|4733424|4733424|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|2|2||0|0|1847132|1847132|0|0|
|tag_service|delete from tag_service.label_vip_match_818707624273952768 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818707624273952768 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|46669|46669|0|0|
|statistic|select es.sales_id , mb.user_name , mb.mobile_no , mb.user_id , '_822257848045047808' tableindex from base_erp_sales es inner join statistic.member mb on es.tenant_app_id = mb.tenant_app_id and es.member_user_id = mb.member_user_id where es.tenant_app_id = :1 limit :2 offset :3|1|1|1||0|0|519|519|259|259|
|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|12|12||0|0|411751|411751|82|82|
|statistic|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|1|1|1||0|0|868811|868811|22|22|
|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-1023:59:59.0' collect_time , es.sales_status , '_822257848045047808' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|13|13||0|0|306832|306832|245|245|
|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|11|6||0|0|524321|262163|0|0|
|statistic|select t.source_type , t.amount from ( select source_type , sum ( amount ) amount from statistic.result_add_shop_source where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 group by source_type ) t order by t.amount desc|2|2|1||0|0|231272|115638|7|4|
|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|28|17||0|0|1072080|536040|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_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|2|6|4||0|0|21058|16773|21|14|
|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|8|4||0|0|33811|19901|6|4|
|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|4|3||0|0|3402245|1701324|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|13|8||0|0|445264|222632|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_891434732540272640 where tenant_app_id = :1 and vip_id = :2|2|4|2||0|0|135280|67640|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_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|2|21|12||0|0|279326|253316|2|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 , :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 ) and ( user.nick_name like concat ( :273 , :274 , :275 ) or user.mobile_no = :276 ) ) order by tenantuser.create_time desc limit :277|2|14|10||0|0|4178054|2089071|2|1|
|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|2|3|1||0|0|368730|184365|2|1|
|authorization_service|update user_login_token set login_code = :1 where id = :2|2|53|26||0|0|2|1|0|0|
|erp_to_platform|insert into sync_log ( id , row_id , msg_id , tenant_id , tenant_app_id , busi_type , status , create_time , xml_data , remark ) values ( :1 , :2 , null , :3 , :4 , :5 , :6 , :7 , :8 , null )|2|53|27||0|0|0|0|0|0|
|tag_service|insert into tag_service.label_vip_match_830220893509701632 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|10|6||0|0|17485441|8743255|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_817878088380628992 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_817878088380628992 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|2|15|8||0|0|70081|48852|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_491650258254827520 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|4|2||0|0|13902|6951|2|1|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|2|25|13||0|0|4034914|2017457|2|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_826254702915141632 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|1||0|0|29512|25465|9|9|
||select * from message_push.message_log t where t.tenant_id = :1 and t.tenant_app_id = :2 and t.user_id = :3 order by id desc limit :4|2|44|39||0|0|2102746|1905981|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|4|2||0|0|227771|113887|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_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|2|4|3||0|0|21010|16746|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826254702915141632 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|2|4|3||0|0|198317|149989|4909|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_821174502091165696 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|2|1||0|0|7278|4158|2|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|2|3|2||0|0|92838|50485|6000|3000|
|qrcode_service|insert into qrcode_scan_log ( id , tenant_id , tenant_app_id , qrcode_id , from_id , from_type , open_id ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 )|2|18|17||0|0|0|0|0|0|
|tag_service|delete from tag_service.label_vip_match_830220893509701632 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_830220893509701632 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|14|9||0|0|566525|283263|0|0|
|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|3890|2510|40|33|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and expire_time between :3 and :4 and shop_id = :5 and user_id = :6 and user_name > :7 and shop_name > :8|2|26|15||0|0|2317568|1158784|2|1|
|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|39|21||0|0|1106239|553131|0|0|
|tag_service|insert into tag_service.label_vip_match_814640285408600064 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|5|3||0|0|6661085|3331387|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|7|4||0|0|323929|161967|0|0|
|statistic|select t.user_id id , t.user_name name , t.score from ( select ec.user_id , ec.user_name , round ( ec.score/ec.amount ) score from ( select ec.user_id , ec.user_name , sum ( ec.score ) score , sum ( ec.amount ) amount from result_employee_comment ec where ec.tenant_id = :1 and ec.tenant_app_id = :2 and ec.shop_id = :3 and ec.statistic_date between :4 and :5 and ec.score > :6 and ec.user_id != :7 group by ec.user_id , ec.user_name ) ec ) t order by t.score desc|2|3|2||0|0|173200|101229|14|13|
|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|2|4|3||0|0|58075|37195|38|21|
|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|2|4|2||0|0|7361|4652|2|2|
|statistic|select tmp.shopid id , tmp.shopname name , tmp.amount saleamount , tmp.addamount valueamount , tmp.addrate finishrate from ( select t.shop_id shopid , t.shop_name shopname , t.amount , t.addamount , if ( t.amount = 0 , 100 , round ( t.addamount*100/t.amount ) ) addrate , t.valueaddamount from ( select sd.shop_id , os.shop_name , sum ( finish_amount ) addamount , sum ( un_finish_amount ) +sum ( finish_amount ) amount , sum ( ifnull ( sd.value_add_amount , 0 ) ) valueaddamount from statistic.result_employee_value sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.shop_id = os.shop_id left join ( select ep.* from statistic.off_employee ep inner join ( select tenant_app_id , employee_user_id , max ( employee_erp_id ) employee_erp_id from statistic.off_employee group by tenant_app_id , employee_user_id ) dep on ep.tenant_app_id = dep.tenant_app_id and ep.employee_erp_id = dep.employee_erp_id and ep.employee_user_id = dep.employee_user_id ) oe on sd.tenant_app_id = oe.tenant_app_id and sd.user_id = oe.employee_user_id where sd.tenant_id = :1 and sd.shop_id != :2 and sd.user_id != :3 and sd.sales_date between :4 and :5 group by sd.shop_id , os.shop_name ) t ) tmp order by tmp.addrate desc|2|2|1||0|0|78784|39392|24|12|
|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|2|3|2||0|0|3150951|1672173|4567|3000|
|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|14|9||0|0|23745000|11874809|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( t.grade_erp_id , -1 ) grade_erp_id , if ( t.grade_erp_id is null , '无' , ifnull ( gd.grade_name , '' ) ) grade_name , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.amount from ( select mb.tenant_id , mb.tenant_app_id , mb.shop_id , mt.grade_erp_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id , mt.grade_erp_id ) t left join statistic.grade gd on t.tenant_id = gd.tenant_id and t.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name|2|7|4||0|0|451261|309145|34|27|
|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|36|27||0|0|44863705|22434724|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_826254702915141632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|6|3||0|0|54059|45714|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|24|17||0|0|683584|341796|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 )|2|4|3||0|0|110800|55400|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|5871217|2936498|0|0|
|tag_service|delete from tag_service.label_vip_match_836363095600320512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836363095600320512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|230217|115111|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|242077|121051|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 group by tenant_id|2|13|8||0|0|877318|438659|2|1|
|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|4|3||0|0|4438221|2221080|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 group by tenant_id|2|12|7||0|0|724506|362253|2|1|
||/* applicationname = datagrip 2018.2.2 */ select em.tenant_wechatapp_id , em.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 user_service.erp_member em left join user_service.erp_integral_log el on em.tenant_wechatapp_id = el.tenant_wechatapp_id and em.member_erp_id = el.member_erp_id where em.tenant_wechatapp_id = :1 and em.create_time between :2 and :3 and el.is_disable = :4 group by em.tenant_wechatapp_id , em.member_erp_id|2|21|11||0|0|2591242|1410774|231310|230808|
|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|217876|108938|0|0|
|tag_service|insert into tag_service.label_vip_match_826954007829331968 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|13|8||0|0|6968746|3484403|0|0|
|statistic|select t.tenant_id , t.tenant_app_id , t.coupon_id , if ( t.coupon_type = 4 , vt.template_name , ct.coupon_name ) coupon_name , t.statistic_date , t.create_channel , count ( 1 ) get_amount from ( select tenant_id , tenant_app_id , coupon_template_id coupon_id , create_channel , date_format ( create_time , '%y-%m-%d' ) statistic_date , coupon_type from statistic.coupon_user where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 ) t left join coupon_service.coupon_template ct on t.coupon_id = ct.id left join value_added.value_added_template vt on t.tenant_app_id = vt.tenant_wechatapp_id and t.coupon_id = vt.id group by t.tenant_id , t.tenant_app_id , t.coupon_id , ct.coupon_name , t.statistic_date , t.create_channel , t.coupon_type|2|26|21||0|0|718966|359853|1|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|3|2||0|0|147984|73992|0|0|
|wx_gateway|select count ( 0 ) from wx_template_msg where title = :1|2|30|15||0|0|845000|572584|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|2|5|3||0|0|259560|129780|2|1|
|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|2|3|2||0|0|5093|3173|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_835720547919761408 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_835720547919761408 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|3||0|0|21145|18568|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|28|17||0|0|1165582|582796|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|5|3||0|0|200262|100132|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 ) and ( user.nick_name like concat ( :91 , :92 , :93 ) or user.mobile_no = :94 ) )|2|16|10||0|0|519704|259853|2|1|
|user_service|select * from user_service.user where plat_unionid = :1|2|12|11||0|0|3962547|1981281|2|1|
|customer|commit|2|9|6||0|0|0|0|0|0|
|statistic|select bm.id , group_concat ( distinct sd.category_erp_id ) categoryid , group_concat ( distinct sd.category_name ) categoryname , min ( es.sales_date ) firstsalestime , max ( es.sales_date ) lastsalestime from base_user_member bu inner join member_extra bm on bu.tenant_app_id = bm.tenant_app_id and bu.user_id = bm.user_id inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where bu.tenant_app_id = :1 and sd.sales_type = :2 and es.sales_status = :3 group by bm.id order by bm.id limit :4 offset :5|2|4|3||0|0|26973|17154|20|18|
|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 ) and ( user.nick_name like concat ( :79 , :80 , :81 ) or user.mobile_no = :82 ) ) order by tenantuser.create_time desc limit :83|2|12|9||0|0|4095604|2047804|2|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 )|2|2|1||0|0|1207085|604551|81|80|
|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|42|22||0|0|106463511|53240536|0|0|
|statistic|select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join statistic.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.create_time >= :4 and mb.create_time <= :5 and mb.register_flag = :6|2|4|2||0|0|3904646|1952323|10272|5136|
|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|15785652|7915198|0|0|
|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|5||0|0|7196102|3598209|0|0|
|tenant|select id , tenant_id , tenant_wechatapp_id , sales_erp_id , sales_no , sales_date , member_erp_id , employee_erp_id , employee_name , dept_erp_id , amount , sales_remark , receipts , sales_status , is_sales , busi_date , create_time , update_time from erp_sales where id = :1|2|2|1||0|0|2|1|2|1|
|account|select id , tenant_id , tenant_wechatapp_id , account_type , user_id , mch_billno , send_name , mch_id , sub_mch_id , wxappid , msgappid , re_openid , total_amount , total_num , wishing , client_ip , act_name , remark , scene_id , risk_info , consume_mch_id , send_time , order_status , failure_reason , biz_id , biz_type , biz_tag , send_listid , need_callback , create_time , update_time , user_name , mobile_no , receive_time , refund_amount , refund_time from wx_redpacket_send_order where order_status in ( :1 , :2 ) order by id desc|2|2|1||0|0|31344|15676|10|6|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 group by tenant_id|2|4|2||0|0|259560|129780|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_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|2|7|6||0|0|19549|11539|2|1|
|statistic|select t.shop_id id , t.shop_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.shop_id , ec.shop_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.tenant_app_id = :3 and ec.sales_date between :4 and :5 group by ec.shop_id , ec.shop_name ) ec ) t order by t.finish_rate desc|2|19|10||0|0|1737534|868803|22|20|
|tag_service|insert into tag_service.label_vip_match_836363095600320512 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_836363095600320512 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|3|2||0|0|5932412|2968173|0|0|
|tag_service|insert into tag_service.label_vip_match_821229068421742592 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|49|33||0|0|86535044|43286281|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 ) and ( user.nick_name like concat ( :91 , :92 , :93 ) or user.mobile_no = :94 ) ) order by tenantuser.create_time desc limit :95|2|5|4||0|0|1779171|1674702|12|6|
|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-1023:59:59.0' collect_time , es.sales_status , '_816450513213112320' 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|3|2||0|0|33749|19872|20|15|
|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 )|2|3|2||0|0|160274|149646|25|14|
|tag_service|delete from tag_service.label_vip_match_891434732540272640 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_891434732540272640 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|270430|135226|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|224134|112068|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_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|2|2|1||0|0|168599|165293|206|202|
|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|6497583|3249228|0|0|
|tag_service|delete from tag_service.label_vip_match_490810080325931008 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490810080325931008 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|14|8||0|0|571088|285560|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|8|5||0|0|264516|132258|0|0|
|tag_service|delete from tag_service.label_vip_match_814019237554196480 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814019237554196480 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|4||0|0|189350|94676|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|4|3||0|0|91233|62666|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|33|27||0|0|732732|366376|0|0|
|tag_service|delete from tag_service.label_vip_match_889699715132813312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_889699715132813312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|172657|86329|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|6|4||0|0|209592|104796|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|4|2||0|0|165472|82736|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|14|10||0|0|449800|224904|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|2|3|2||0|0|78066|39033|0|0|
|tag_service|delete from tag_service.label_vip_match_819000302970638336 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_819000302970638336 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|3|2||0|0|155980|77990|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|156292|78150|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|8|5||0|0|9663284|4832129|0|0|
|activity_service|commit|2|32|25||0|0|0|0|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|19097445|9553914|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|2|1||0|0|115264|57632|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|857440|428822|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|118478|59240|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|137304|68652|0|0|
|statistic|select od.id , od.tenant_id , od.tenant_wechatapp_id tenant_app_id , od.order_no , od.source , od.type , od.activity_id , od.activity_type , od.user_id , od.user_name , od.mobile_no , od.take_type , td.shop_id , td.shop_name , od.coupon_id , dt.product_id goods_id , dt.product_name goods_name , dt.art_no style_no , dt.sku_id , dt.spec , gs.barcode , od.product_fee , od.freight_fee , od.discount_fee , od.total_fee , od.payment_fee , od.status , od.finish_type , od.take_shop_id , od.take_shop_name , od.take_employee_user_id , od.take_employee_user_name , od.manager_shop_id , od.manager_shop_name , od.manager_user_id , od.manager_user_name , od.manager_mobile_no , od.manager_brokerage , od.create_time , od.update_time , '2019-06-1023:59:59.0' collect_time , dt.quantity from `order`.order_info od left join order.order_detail dt on od.id = dt.order_id left join deliver.trade_deliver td on od.id = td.trade_id left join goods.goods_sku gs on dt.sku_id = gs.id where od.tenant_wechatapp_id = :1 and od.create_time >= :2 and od.create_time <= :3 limit :4 offset :5|2|3|2||0|0|66378|33223|42|25|
|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|4|3||0|0|139335|69669|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|6|3||0|0|32591|20176|0|0|
|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|53|32||0|0|119648620|59832035|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|31|27||0|0|967495|906773|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_489024659472388096 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|23118|13423|1733|1020|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and user_id = :4 and user_name > :5 and shop_name > :6|2|25|13||0|0|2317568|1158784|2|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|2|3|1||0|0|26937|20997|4120|3000|
|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|4|2||0|0|253820|126910|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_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|2|2|1||0|0|369903|205620|6000|3000|
|tag_service|insert into tag_service.label_vip_match_823688108565368832 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|21|12||0|0|35563736|17785532|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|1||0|0|2198253|1705330|568|317|
|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|25|15||0|0|1017192|508602|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816440425157005312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|620965|362559|360|241|
|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|9|6||0|0|316144|158072|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|2|5|3||0|0|9535|4848|20|10|
|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|6389519|3194938|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|49|46||0|0|1000984|906893|66|60|
|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|32|19||0|0|1229388|614744|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_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|2|3|2||0|0|9609|4932|12|12|
|tag_service|insert into tag_service.label_vip_match_839295151019966464 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_839295151019966464 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|3|2||0|0|313413|171979|0|0|
|facepass_sync|commit|2|9|6||0|0|0|0|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|3|5|3||0|0|782583|591772|8917|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_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|3|7|3||0|0|72956|54891|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|11|7||0|0|119487|49355|36|15|
|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|3|11|7||0|0|1038258|346086|0|0|
|tag_service|insert into tag_service.label_vip_match_486900027235635200 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|3|10|6||0|0|7342875|3621099|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|88124|62544|66|48|
|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|3|4|2||0|0|23834|12248|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_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|3|38|30||0|0|367345|307778|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_830220893509701632 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|3|6|3||0|0|29204|26884|3|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_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 ) limit :9|3|5|2||0|0|78715|36346|27|10|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|3|3|1||0|0|372000|144000|9000|3000|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|3|9|4||0|0|114468|111669|19|10|
|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 )|3|15|9||0|0|823585|274529|0|0|
|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|4312593|1784877|0|0|
|statistic|select mb.tenant_app_id , mb.member_user_id , mb.user_id , mb.user_name , mb.mobile_no , '_885278795660111872' tableindex from statistic.base_erp_member be inner join statistic.member mb on be.tenant_app_id = mb.tenant_app_id and be.member_erp_id = mb.member_user_id where be.tenant_app_id = :1 limit :2 offset :3|3|17|9||0|0|80260|30260|10130|5000|
|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|1621164|737057|8742|3000|
|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|76|49||0|0|132705484|65846248|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|3|5|2||0|0|150423|50141|2|1|
|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|3|3|1||0|0|60150|20145|3|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|949655|462678|84|41|
|customize_page|commit|3|34|22||0|0|0|0|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_830220893509701632 where tenant_app_id = :1 and vip_id = :2|3|16|6||0|0|424944|141648|3|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|3|3|1||0|0|357703|159721|7637|3000|
|tag_service|delete from tag_service.label_vip_match_486900027235635200 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_486900027235635200 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|3|16|10||0|0|665940|221980|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|3|8|4||0|0|152712|121713|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_817878088380628992 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|33|20||0|0|248130|105213|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 ) )|3|3|1||0|0|122469|40825|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 )|3|4|1||0|0|93907|57387|83|52|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828778547559579648 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|3|5|2||0|0|1262989|468634|6442|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 )|4|5|2||0|0|739742|510530|298|117|
|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|42|15||0|0|979637|279430|4|1|
|statistic|select cu.id , cu.tenant_id , cu.tenant_wechatapp_id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.create_channel , cu.coupon_state , cu.user_name , cu.creator_name , cu.face_value , cu.begin_time , cu.end_time , cu.remark , cu.create_time , cu.update_time , cu.mobile_no , cu.creator_mobile_no , if ( cu.coupon_type = 4 , vu.template_id , cu.coupon_template_id ) coupon_template_id from coupon_service.coupon_user cu left join value_added.value_added_user vu on cu.tenant_wechatapp_id = vu.tenant_wechatapp_id and cu.id = vu.coupon_user_id where cu.tenant_wechatapp_id = :1 and cu.update_time >= :2 and cu.update_time <= :3 limit :4 offset :5|4|8|3||0|0|18263|7768|32|20|
|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|4|14|4||0|0|483179|260204|19|10|
|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|4|10|4||0|0|71415|24275|6|5|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_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|23|7||0|0|153825|74212|4|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_823709122435256320 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|14|8||0|0|54688|49643|4|1|
|statistic|select bu.tenant_app_id , bu.user_id , count ( 1 ) order_amount from statistic.base_order_user bu left join statistic.order_info od on bu.tenant_app_id = od.tenant_app_id and bu.user_id = od.user_id where bu.tenant_app_id = :1 and od.status in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 ) group by bu.tenant_app_id , bu.user_id|4|5|2||0|0|128664|32192|47|25|
|statistic|select es.tenant_wechatapp_id tenant_app_id , es.member_erp_id , ifnull ( sum ( es.amount ) , 0 ) salesbalance , count ( 1 ) salesamount from base_erp_member bm inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id where bm.tenant_app_id = :1 and es.sales_status = :2 group by es.tenant_wechatapp_id , es.member_erp_id limit :3 offset :4|4|16|7||0|0|168062|153934|5368|5000|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_817517269994225664' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|4|19|9||0|0|48583|22195|132|45|
|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|4|32|15||0|0|141076|72291|3|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|13269764|3600208|1138|420|
|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|4|24|9||0|0|575432|143858|4|1|
|statistic|select t.shop_id id , t.shop_name name , t.totalamount , t.finishamount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finish_rate from ( select shop_id , shop_name , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and shop_id != :4 and user_id != :5 group by shop_id , shop_name ) ec ) t order by t.finish_rate desc|4|8|3||0|0|190313|52009|102|27|
|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|7|2||0|0|48124|34911|0|0|
||select * from account.account where owner_id = :1 and account_type = :2|4|8|2||0|0|18938463|4734648|4|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_834615931371048960 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|6|2||0|0|83985|66033|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 )|4|5|2||0|0|752172|341504|193|72|
|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|57|42||0|0|2944180|736075|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_836363095600320512 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|10|5||0|0|56136|26229|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|47|42||0|0|469757|455270|144|108|
|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|4|113|78||0|0|183437344|90414044|0|0|
|statistic|select ec.scene , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finishrate from ( select scene , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and user_id != :4 and shop_name != :5 group by scene ) ec order by ec.scene|4|9|3||0|0|190005|51933|25|7|
|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|4|6|2||0|0|4316498|1219670|8218|3000|
|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|4|6|3||0|0|416802|104403|0|0|
|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 )|4|5|2||0|0|1537916|386426|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and user_name > :4 and shop_name > :5|4|44|11||0|0|4635136|1158784|4|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_469175049962786816' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|5|17|6||0|0|15559|5020|39|30|
|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|5|21|8||0|0|3634048|998937|5|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_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|5|22|8||0|0|406777|307333|102|70|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_835720547919761408 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|6|2||0|0|115357|43643|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|2590144|654944|326|91|
|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|22|13||0|0|707902|141583|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 , :10|5|12|3||0|0|150316|50308|50|10|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|5|13|5||0|0|333737|99943|13|5|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_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|5|26|7||0|0|106129|32634|0|0|
|statistic|select t.user_id id , t.user_name name , t.amount from ( select user_id , user_name , sum ( amount ) amount from statistic.result_add_shop_user where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 and user_name > :6 group by user_id , user_name ) t order by t.amount desc|5|9|2||0|0|1307885|261629|85|30|
|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|5|227|75||0|0|2646718|660973|2765|1291|
|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 , :96|5|12|6||0|0|6067832|2165724|26|6|
|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|40|14||0|0|1903892|382531|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_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|194|124||0|0|1326349|994123|8|8|
|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|5|47|15||0|0|1059979|522237|3|1|
|statistic|select id , tenant_id , tenant_wechatapp_id tenant_app_id , src_type , page_id , tenant_app_open_id , user_id , user_name , mobile_no , head_img , create_time push_time , 0 pull_status from customize_page.award_qualified where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 limit :4 offset :5|5|35|16||0|0|1912895|382579|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_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|8|2||0|0|2394201|596922|204|66|
|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|5|47|15||0|0|1322201|279405|5|1|
|user_service|select tu.user_id as userid , tu.mobile_no as mobileno , tu.user_name as username , u.nick_name as nickname , u.head_img_url as headimgurl from tenant_user tu join `user` u on tu.user_id = u.id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and ( u.mobile_no = :3 or u.nick_name like concat ( :4 , :5 , :6 ) or tu.user_name like concat ( :7 , :8 , :9 ) )|6|19|6||0|0|263970|81762|16|13|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816096827580399616 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|11|2||0|0|10803104|3194062|447|146|
|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|6|80|15||0|0|2084745|368094|5|1|
|position|commit|6|86|24||0|0|0|0|0|0|
|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|6|19|7||0|0|2897343|741067|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_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|9|2||0|0|2556312|644582|15472|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_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|17|6||0|0|227572|53386|0|0|
|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|7|1||0|0|100|33|0|0|
|activity_service|select count ( distinct ( user_id ) ) from user_trace where tenant_app_id = :1 and activity_id = :2 and status != :3|6|7|1||0|0|288369|64341|6|1|
|authorization_service|commit|6|102|23||0|0|0|0|0|0|
|statistic|select t.shop_id id , t.shop_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.shop_id , ec.shop_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.sales_date between :3 and :4 group by ec.shop_id , ec.shop_name ) ec ) t order by t.finish_rate desc|6|32|12||0|0|5212758|868827|105|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_814020764498956288 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|6|21|7||0|0|195348|71161|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_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|6|8|2||0|0|3095346|720071|13978|3000|
|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|6|14|5||0|0|217168|89238|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|7|34|6||0|0|1282568|183224|7|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_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|4||0|0|18748002|4969143|1955|407|
|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|7|9|2||0|0|2112585|462627|18057|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|7|13|3||0|0|13358749|2397048|20322|3000|
|statistic|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.subscribe_flag = :4 and mb.bind_flag = :5 and mb.full_flag = :6 and mb.create_time >= :7 and mb.create_time <= :8 and mb.register_flag = :9|7|18|3||0|0|4244997|746133|9653|1769|
|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 )|7|12|3||0|0|9196798|2979318|1706|319|
|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 )|7|15|4||0|0|3305945|878025|870|200|
|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|14|2||0|0|12523879|3245390|541|180|
|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|47|13||0|0|397546|110732|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 , mt.shop_id , mb.source_type , count ( * ) amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type|8|13|2||0|0|4333065|672556|640|108|
|statistic|select tu.id , ifnull ( ey.user_id , em.employee_erp_id ) employee_user_id , '2019-06-1023: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|8|12|2||0|0|161105|74108|308|123|
|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|8|12|3||0|0|44693|25942|53|10|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , sum ( tmp.cancel_amount ) cancel_amount , sum ( tmp.full_amount ) full_amount , sum ( tmp.bind_amount ) bind_amount , sum ( tmp.subscribe_amount ) subscribe_amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.cancel_amount , t.full_amount , t.bind_amount , t.subscribe_amount from ( select mb.tenant_id , mb.tenant_app_id , mt.shop_id , sum ( if ( mb.subscribe_flag = 0 , 1 , 0 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name|8|13|2||0|0|4221886|660279|163|44|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|8|11|2||0|0|1033653|226556|23306|3000|
|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|9|19|4||0|0|366615|40735|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 )|9|19|8||0|0|7905296|2342305|4718|1021|
|tag_service|commit|9|10|1||0|0|0|0|0|0|
|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|74|41||0|0|9188009|918817|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|10|29|7||0|0|584814|139701|10|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|10|21|4||0|0|4773832|693891|28067|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 , 'unknow' sourcetype , tu.create_time createtime , '2019-06-1023:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , '粉丝' , '游客' ) identity from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 order by tu.id limit :4 offset :5|10|21|6||0|0|66528|11230|89|22|
|tag_service|select distinct date_format ( create_time , '%y' ) from statistic.member where tenant_id = :1 and tenant_app_id = :2|10|19|3||0|0|2130525|343467|19|2|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|10|20|3||0|0|4265955|593995|30000|3000|
|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|10|23|4||0|0|330663|146851|0|0|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( 1 ) finish_amount from ( select bg.id , bg.tenant_id , bg.tenant_app_id , bg.shop_id , bg.shop_name , bg.user_id , bg.user_name , bg.status , bg.scene , date_format ( bg.expire_time , '%y-%m-%d' ) expire_date , date_format ( bg.update_time , '%y-%m-%d' ) statistic_date from statistic.backlog bg where bg.tenant_app_id = :1 and bg.status = :2 and bg.shop_id != :3 and bg.user_id != :4 and bg.update_time >= :5 and bg.update_time <= :6 ) t group by t.tenant_id , t.tenant_app_id , t.shop_id , t.shop_name , t.user_id , t.user_name , t.scene , t.expire_date , t.statistic_date limit :7 offset :8|10|101|25||0|0|11554908|1156939|197|166|
|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|10|40|8||0|0|8687434|868789|10|1|
|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|48|13||0|0|15279000|3165369|6852|1336|
|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|10|91|15||0|0|4365938|459582|7|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_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|11|21|3||0|0|6734156|953372|30704|3000|
|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|11|282|51||0|0|12699092|1157007|302|200|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|12|31|6||0|0|285660|23805|12|1|
|coupon_service|select id as usercouponid , coupon_no as couponno , end_time as endtime , begin_time as begintime , face_value as facevalue , coupon_name as couponname , coupon_type as coupontype , remark , exchange_shop , off_type from coupon_user where owner_id = :1 and coupon_template_id = :2 and coupon_state = :3 and end_time > now ( ) limit :4|12|23|6||0|0|4317242|362173|11|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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 )|12|45|7||0|0|48430628|11937699|3005|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_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|13|17|2||0|0|7117830|1225860|33916|3000|
|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|13|49|8||0|0|11291537|868819|70|24|
|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|13|41|7||0|0|26855938|3294246|36774|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_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|14|42|9||0|0|1282245|232818|14|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_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|14|27|4||0|0|5910757|654840|39570|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_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 )|14|27|4||0|0|13076253|3297658|1534|214|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|14|40|6||0|0|15230234|1782618|1532|170|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 group by tenant_id|14|75|15||0|0|28244398|2017457|14|1|
|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|14|51|17||0|0|188151|55897|328|95|
|statistic|select tenant_wechatapp_id , user_id , source_type , create_time , '2019-06-1023: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|14|31|7||0|0|373892|98125|469|116|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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 )|14|34|5||0|0|18154598|4016276|1943|373|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_885278795660111872 where tenant_app_id = :1 and vip_id = :2|15|150|15||0|0|4614435|307629|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_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|15|36|8||0|0|11093868|1545551|39992|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-1023: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|15|35|6||0|0|91921|10002|5060|5000|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|15|21|2||0|0|3552995|236881|0|0|
|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|15|23|2||0|0|2539588|169455|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_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|15|43|7||0|0|16266087|2127207|41816|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|16|45|6||0|0|28644480|2987413|46195|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_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|45|6||0|0|21480069|2478766|47072|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 )|16|30|3||0|0|13930627|3156948|220|65|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2|16|28|3||0|0|9654672|605042|1198|247|
|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|3816595|478357|339|64|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|17|46|5||0|0|5419022|318766|17|1|
|statistic|select bg.id , bd.content , bd.create_time from employee.backlog bg left join employee.backlog_detail bd on bg.id = bd.backlog_id where bg.tenant_app_id = :1 and bd.create_time >= :2 and bd.create_time <= :3 limit :4 offset :5|18|42|6||0|0|1917271|298862|2646|592|
|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 )|18|26|3||0|0|12728172|3045958|2981|373|
|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|18|79|15||0|0|3126724|761161|16091|5000|
|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|18|172|15||0|0|4895889|276649|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_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|18|96|12||0|0|99979398|10842041|51363|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_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|74|12||0|0|15356368|3748878|220|28|
|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|19|76|10||0|0|6868481|362174|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|19|56|4||0|0|1120061|260199|123|10|
|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 )|20|129|25||0|0|159598574|38510566|12015|1692|
|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|110|19||0|0|192288032|45528622|9760|1518|
|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|100|16||0|0|41746910|8553902|6143|1130|
|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 )|20|130|12||0|0|2280229|216843|20|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_823688108565368832 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|94|13||0|0|70574564|17526321|11502|1741|
|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|48|4||0|0|21833216|1697290|60295|3000|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|21|47|8||0|0|248245|12133|248245|12133|
|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|23|77|8||0|0|908471|138520|23|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|23|118|13||0|0|2429322|279916|23|1|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , retries , success_time , send_fail_msg , create_time , update_time , send_data from customer_face_register_message where status in ( :1 , :2 ) and retries < :3 limit :4|23|35|2||0|0|232726|10130|0|0|
|user_service|commit|24|367|26||0|0|0|0|0|0|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|25|81|8||0|0|42354672|3026336|72463|3000|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|26|72|6||0|0|11405134|438659|26|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|26|29|1||0|0|111498|6636|260|10|
|tag_service|select * from account.account t where t.owner_id = :1 and account_type = :2|26|54|2||0|0|123075774|4733967|26|1|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|26|66|6||0|0|9418578|362253|26|1|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|27|51|4||0|0|714811|35693|27|1|
|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|28|281|58||0|0|4137000|664342|4900|1123|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|30|72|5||0|0|965429|32208|5|2|
|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|30|35|1||0|0|387602|38062|300|10|
|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|31|142|10||0|0|1275575|41232|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_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|157|10||0|0|115935614|7203581|94664|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|65|6||0|0|18366690|1925238|5061|375|
|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 )|34|142|13||0|0|68595112|2017646|34|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|35|151|14||0|0|75070113|4510299|102842|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_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|135|10||0|0|90147185|5012135|109416|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-1023: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|38|117|22||0|0|2961628|293003|1684|260|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|42|114|7||0|0|2084964|99957|42|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_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|42|230|12||0|0|157294419|7463155|123010|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_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|235|27||0|0|307924562|66257782|17646|2226|
|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|44|183|11||0|0|2135273|50044|44|1|
|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|45|286|49||0|0|7138159|740372|1430|136|
|order|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|46|79|3||0|0|108849|2509|108849|2509|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|46|65|2||0|0|108852|2509|108852|2509|
|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 )|46|335|15||0|0|2930349|66491|0|0|
|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-1023: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-1023: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|47|264|57||0|0|2964146|368471|2026|310|
|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|50|129|8||0|0|8819|447|0|0|
|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|52|126|10||0|0|27594016|789644|42|27|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_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|58|725|33||0|0|666781515|28528106|170084|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|59|228|36||0|0|1528251|139765|2779|668|
|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|212|24||0|0|154205765|38990765|5696|1013|
|statistic|select id , timestampdiff ( year , solar_birthday , '2019-06-0923:59:59.001' ) age from member where tenant_app_id = :1 and birthday_month_day = :2 limit :3 offset :4|63|210|26||0|0|4157083|343584|3495|652|
|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 )|71|124|4||0|0|15764557|429215|566|22|
|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|73|224|24||0|0|3198940|292995|4605|656|
|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|77|265|25||0|0|5094612|712531|17337|5000|
|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|77|355|24||0|0|2014613|223126|8656|1161|
|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|81|412|33||0|0|7779942|960637|2843|230|
|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|83|494|16||0|0|167070085|3732577|248606|3000|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|86|1022|21||0|0|1181915525|35775026|254295|3000|
|statistic|select ac.tenant_app_id , ac.owner_id user_id from account.account ac where ac.tenant_app_id = :1 and ac.owner_type = :2 and ac.account_type = :3 and ac.update_time >= :4 and ac.update_time <= :5 limit :6 offset :7|86|402|37||0|0|1878122|139668|9739|4457|
|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|89|143|11||0|0|3763124|125999|89|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_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|1132|25||0|0|1181410800|29480292|272712|3000|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|97|200|3||0|0|229258|2509|229258|2509|
|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|98|602|15||0|0|445672692|11619852|288393|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|100|396|8||0|0|402381779|8556256|295322|3000|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|119|737|42||0|0|779360879|90905526|27761|2019|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|128|247|3||0|0|303603|2509|303603|2509|
|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|149|1913|32||0|0|2359261751|53123713|429392|3000|
|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 )|439|1563|11||0|0|272961813|621782|106|20|
