|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|activity_service|select count ( distinct ( user_id ) ) from user_trace where tenant_app_id = :1 and activity_id = :2 and status != :3|1|1|1||0|0|64341|64341|1|1|
|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 , comment_id from erp_sales where id = :1|1|1|1||0|0|1|1|1|1|
|user_service|select t1.user_id as userid , t2.head_img_url as headimgurl , t2.nick_name as nickname , t1.mobile_no as mobileno , t1.is_subscribe as subscribe , t1.sex , t1.tenant_union_id as tenantunionid , date_format ( t1.bind_time , '%y-%m-%d%h:%i:%s' ) as registertime , t1.id as tenantuserid 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.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4 order by t1.bind_time asc limit :5|1|1|1||0|0|150111|150111|8|8|
|tenant|select id , sales_no , sales_date , member_erp_id , sales_erp_id , is_sales from erp_sales where sales_no like concat ( :1 , ...|1|1|1||0|0|484679|484679|0|0|
|coupon_service|select count ( 0 ) from coupon_user where coupon_template_id = :1|1|2|2||0|0|530633|530633|1|1|
|wx_gateway|/* applicationname = intellij idea 2019.1 */ select left ( vm.username , 32 ) as username , vm.sex , vm.birthday , vm.birthdaytype , vm.memorialname , vm.memorialday , vm.memorialtype , vm.interest , me.openid , left ( me.nickname , 32 ) as nickname , me.headimgurl , me.mobileno , wm.subscribe , wm.createtime as subscribetime , ee.vendorempid , vm.memberid , em.mobile_no , em.dept_erp_id from platform.vendor ve join platform.member me on me.vendorid = ve.id and me.openid != :1 and me.openid is not null and me.mobileno != :2 and me.mobileno is not null join platform.wechatmember wm on wm.id = me.wechatmemberid and wm.appid = ve.appid left join platform.vendormember vm on vm.id = me.vendormemberid left join platform.employee ee on ee.id = me.employeeid left join user_service.erp_member em on em.member_erp_id = vm.memberid and em.tenant_wechatapp_id = :3 where ve.appid = :4 group by me.mobileno having count ( * ) > :5 order by me.createtime desc|1|2|2||0|0|154315|154315|54|54|
|wx_gateway|insert into wx_user ( id , tenant_id , tenant_app_id , union_id , open_id , wx_app_id , cm_union_id , cm_open_id , user_id , status ) values ( :1 , :2 , :3 , null , :4 , :5 , null , :6 , :7 , :8 ) on duplicate key update wx_app_id = :9 , open_id = :10 , cm_open_id = :11 , status = :12 , create_time = create_time|1|43|43||0|0|0|0|0|0|
|wx_gateway|/* applicationname = intellij idea 2019.1 */ select count ( * ) from platform.vendor ve join platform.member me on me.vendorid = ve.id and me.openid != :1 and me.openid is not null and me.mobileno != :2 and me.mobileno is not null join platform.wechatmember wm on wm.id = me.wechatmemberid and wm.appid = ve.appid left join platform.vendormember vm on vm.id = me.vendormemberid left join platform.employee ee on ee.id = me.employeeid left join user_service.erp_member em on em.member_erp_id = vm.memberid and em.tenant_wechatapp_id = :3 where ve.appid = :4 order by me.createtime desc|1|8|8||0|0|130355|130355|1|1|
|employee|delete from backlog_report where tenant_app_id = :1 and employee_id = :2|1|7|7||0|0|9374|9374|0|0|
|erp_sync|update retry_data set tenant_id = :1 , tenant_app_id = :2 , business_type = :3 , operation_type = :4 , data_id = :5 , user_id = :6 , erp_member_id = :7 , need_erp_member_id = :8 , retry_times = :9 , msg = :10 , send_time = :11 , create_time = :12 , update_time = :13 , data = :14 where id = :15|1|16|16||0|0|1|1|0|0|
|wx_gateway|/* applicationname = intellij idea 2019.1 */ select left ( vm.username , 32 ) as username , vm.sex , vm.birthday , vm.birthdaytype , vm.memorialname , vm.memorialday , vm.memorialtype , vm.interest , me.openid , left ( me.nickname , 32 ) as nickname , me.headimgurl , me.mobileno , wm.subscribe , wm.createtime as subscribetime , ee.vendorempid , vm.memberid , em.mobile_no , em.dept_erp_id from platform.vendor ve join platform.member me on me.vendorid = ve.id and me.openid != :1 and me.openid is not null and me.mobileno != :2 and me.mobileno is not null join platform.wechatmember wm on wm.id = me.wechatmemberid and wm.appid = ve.appid left join platform.vendormember vm on vm.id = me.vendormemberid left join platform.employee ee on ee.id = me.employeeid left join user_service.erp_member em on em.member_erp_id = vm.memberid and em.tenant_wechatapp_id = :3 where ve.appid = :4 order by me.createtime desc|1|19|19||0|0|155317|155317|1002|1002|
|coupon_service|select cu.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.mobile_no , cu.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , wol.writeoff_user_name , wol.writeoff_shop_id as shopid , wol.dept_erp_id as erpdeptid from coupon_service.coupon_user cu left join coupon_service.write_off_log wol on wol.coupon_user_id = cu.id and wol.state = :1 left join coupon_service.reservation r on r.coupon_user_id = cu.id and r.state = :2 left join coupon_service.grant_info gi on gi.coupon_user_id = cu.id where cu.tenant_wechatapp_id = :3 and cu.coupon_template_id = :4 and cu.create_channel = :5 limit :6|1|5|5||0|0|78622|78622|20|20|
|value_added|-- 根据添加时间得出当前增值金额 update value_added_user set amount_added = if ( :1 > ( ( ( added_percent_per_day / :2 ) * if ( :3 >= timestampdiff ( day , date_format ( start_add_time , :4 ) , now ( ) ) :5 :6 :7 add_days , timestampdiff ( day , date_format ( start_add_time , :8 ) , now ( ) ) :9 :10 , add_days ) ) :11 ( ( devalue_percent_per_day / :12 ) * if ( :13 >= timestampdiff ( day , date_format ( start_add_time , :14 ) , now ( ) ) :15 :16 :17 add_days :18 keeping_days , :19 , timestampdiff ( day , date_format ( start_add_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 ( start_add_time , :28 ) , now ( ) ) :29 :30 :31 add_days , timestampdiff ( day , date_format ( start_add_time , :32 ) , now ( ) ) :33 :34 , add_days ) ) :35 ( ( devalue_percent_per_day / :36 ) * if ( :37 >= timestampdiff ( day , date_format ( start_add_time , :38 ) , now ( ) ) :39 :40 :41 add_days :42 keeping_days , :43 , timestampdiff ( day , date_format ( start_add_time , :44 ) , now ( ) ) :45 :46 :47 add_days :48 keeping_days ) ) ) * amount_pay ) , update_time = now ( ) where state = :49 and update_time <= curdate ( ) and ( start_add_time >= date_add ( curdate ( ) , interval :50 ( add_days :51 keeping_days :52 :53 ) day ) or ( amount_added > :54 and start_add_time < date_add ( curdate ( ) , interval :55 ( add_days :56 keeping_days :57 :58 ) day ) ) ) -- 判断条件 在增值时间内 增值金大于0 状态正常|1|3|3||0|0|185355|185355|0|0|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and tipfee > :2 and tippayno is not null and date_sub ( date ( :3 ) , interval :4 day ) = date_format ( tippaytime , :5 )|1|5|5||0|0|120774|120774|0|0|
|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|
|sms|select count ( 0 ) from ( select a.phone_numbers as phoneno , concat ( '【' , a.sign_name , '】' , case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end ) as content , a.template_code , a.out_id as outid , a.template_param , a.create_time as sendtime , a.create_time as recevietime , a.code as state , a.send_count , a.message from sms_send a left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = :1 where a.phone_numbers like concat ( :2 , :3 , :4 ) ) table_count|1|13|13||0|0|1405785|1405785|1|1|
|erp_sync|select count ( * ) from erp_sync.sync_record|1|2|2||0|0|1028603|1028603|1|1|
|erp_sync|insert into `job_execution_log` ( `id` , `job_name` , `task_id` , `hostname` , `ip` , `sharding_item` , `execution_source` , `is_success` , `start_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 )|1|40|40||0|0|0|0|0|0|
|gift_mail|insert into platform_sync_data_log ( id , busi_type , operate_type , busi_id , remark ) values ( :1 , :2 , :3 , :4 , ... twin point 32320-201 刀具五件套zw-k16","categoryid":"904887353670164480","productstatus":1,"tagprice":675.00,"defaultimageurl":"http://dmc-proimg.damaicheng.com/goodsimg/2017_05_19/1dd6efa8483ad6487799c880e56693d2.jpg","createtime":"2019-06-17 11:26:03","updatetime":"2019-06-19 00:00:07","busiid":"100526"}，变更后：{"id":"904887381004435456","productname":"双立人 twin point 32320-201 刀具五件套zw-k16","categoryid":"904887353670164480","productstatus":1,"tagprice":675.00,"defaultimageurl":"http://dmc-proimg.damaicheng.com/goodsimg/2017_05_19/1dd6efa8483ad6487799c880e56693d2.jpg","createtime":null,"updatetime":null,"busiid":null}' )|1|46|46||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|6520|6520|1510|1510|
|platform|select ifnull ( eid , 0 ) as eid , ifnull ( shopid , 0 ) as sid , vendorid , count ( 1 ) as quantity from productcerts where vendorid = :1 and to_days ( :2 ) :3 to_days ( createtime ) = :4 group by eid , shopid , vendorid|1|1|1||0|0|28984|28984|0|0|
|position|select * from geo_position where tenant_id = :1 and tenant_app_id = :2 and object_type = :3 and object_id = :4|1|1|1||0|0|1|1|1|1|
|account|select id , tenant_id , tenant_app_id , account_type , owner_type , owner_id , balance , platform_balance , cumulation , status , create_time , update_time from account where tenant_app_id = :1 and account_type = :2 and owner_type = :3 and owner_id = :4|1|4|4||0|0|1|1|1|1|
|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_id = :3 and ue.tenant_id = :4 and ue.tenant_wechatapp_id = :5 and tu.shop_id = :6|1|2|2||0|0|21789|21789|1|1|
|erp_sync|select * from retry_data where tenant_app_id = :1 and user_id = :2|1|2|2||0|0|5968|5968|2|2|
|message_push|delete from message_log where create_time < :1|1|17|17||0|0|222013|222013|0|0|
|timer|update task_info set name = :1 , params = :2 , cron = :3 , delay = null , next_time = :4 , status = :5 , create_time = :6 , update_time = :7 where id = :8|1|8|8||0|0|1|1|0|0|
|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 , -33.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|3|3||0|0|0|0|0|0|
|authorization_service|select id , user_id , tenant_id , tenant_wx_app_id , account_id , login_way , login_code , login_token , roles , status , expire_time , create_time , update_time , login_ip , login_time , login_data , employee_id , shop_id from user_login_token where tenant_id = :1 and login_way = :2|1|7|7||0|0|1|1|1|1|
|erp_sync|select count ( * ) from erp_to_platform.sync_log_20190923|1|4|4||0|0|5852075|5852075|1|1|
|user_service|select * from erp_member where tenant_wechatapp_id = :1 and member_erp_id in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 )|1|1|1||0|0|19|19|19|19|
|account|/* applicationname = datagrip 2019.1.2 */ select *from user_service.erp_member where mobile_no = :1|1|23|23||0|0|5219655|5219655|12|12|
|user_service|select * from user_employee where user_id = :1 and tenant_wechatapp_id = :2 and tenant_id = :3 limit :4|1|3|3||0|0|0|0|0|0|
|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 )|1|44|44||0|0|0|0|0|0|
|activity_service|commit|1|4|4||0|0|0|0|0|0|
|coupon_service|select count ( 0 ) from coupon_service.coupon_user cu left join coupon_service.write_off_log wol on wol.coupon_user_id = cu.id and wol.state = :1 left join coupon_service.reservation r on r.coupon_user_id = cu.id and r.state = :2 left join coupon_service.grant_info gi on gi.coupon_user_id = cu.id where cu.tenant_wechatapp_id = :3 and cu.coupon_template_id = :4 and cu.create_channel = :5|1|2|2||0|0|78622|78622|1|1|
|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 and scene_biz_id = :5|1|2|2||0|0|167868|167868|1|1|
|user_service|select * from erp_member where member_erp_id = :1 and tenant_id = :2 and tenant_wechatapp_id = :3 limit :4|1|4|4||0|0|1|1|1|1|
|sms|select count ( 0 ) from ( select a.phone_numbers as phoneno , concat ( '【' , a.sign_name , '】' , case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end ) as content , a.template_code , a.out_id as outid , a.template_param , a.create_time as sendtime , a.create_time as recevietime , a.code as state , a.send_count , a.message from sms_send a left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = :1 where a.tenant_app_id = :2 ) table_count|1|9|9||0|0|391024|391024|1|1|
|coupon_service|select * from coupon_user where datediff ( date_format ( end_time , :1 ) , date_format ( now ( ) , :2 ) ) = :3 and coupon_state in ( :4 )|1|1|1||0|0|530640|530640|1164|1164|
|sms|select a.phone_numbers as phoneno , concat ( '【' , a.sign_name , '】' , case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end ) as content , a.template_code , a.out_id as outid , a.template_param , a.create_time as sendtime , a.create_time as recevietime , a.code as state , a.send_count , a.message from sms_send a left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = :1 where a.phone_numbers like concat ( :2 , :3 , :4 ) order by a.create_time desc limit :5|1|1|1||0|0|1405789|1405789|4|4|
|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 tenant_wechatapp_id = :1 and page_id = :2 and ( user_id = :3 or tenant_app_open_id = :4 )|1|2|2||0|0|22140|22140|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|635003|635003|0|0|
|user_service|select count ( * ) from user_service.user_employee ue join user_service.tenant_user tu on tu.user_id = ue.user_id and tu.tenant_app_id = ue.tenant_wechatapp_id where ue.employee_id = :1 and ue.tenant_wechatapp_id = :2 and tu.shop_id = :3|1|3|3||0|0|21407|21407|1|1|
|timer|update task_info set name = :1 , params = :2 , cron = :3 , delay = null , next_time = null , status = :4 , create_time = :5 , update_time = :6 where id = :7|1|41|41||0|0|1|1|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 , 137.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 = 137.00 , user_name = :16 , create_time = create_time|1|4|4||0|0|0|0|0|0|
|corpwx|update external_user set un_assign_flag = :1 where ( tenant_id = :2 and un_assign_flag = :3 )|1|42|42||0|0|11242|11242|0|0|
|account|commit|1|38|38||0|0|0|0|0|0|
|payment|select id , tenant_id , tenant_app_id , goods_order_source , goods_order_no , goods_name , goods_amount , fee_type , request_ip , user_id , user_identify , user_sub_identify , pay_way , trade_type , order_start_time , order_expire_time , prepay_id , transaction_id , pay_amount , pay_finish_time , pay_status , pay_status_desc , error_msg , wxappid , sub_wxappid , mch_id , sub_mch_id , callback_tag , callback_result , create_time , update_time from pay_order where callback_result in ( :1 , :2 ) and pay_status in ( :3 , :4 ) order by id asc limit :5|1|2|2||0|0|53908|53908|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|40|40||0|0|0|0|0|0|
|mysql|insert into erp_to_platform.sync_log_20190923 select * from erp_to_platform.sync_log where create_time < date_sub ( now ( ) , interval :1 day )|1|99|99||0|0|12372050|12372050|0|0|
|erp_sync|update retry_data set tenant_id = :1 , tenant_app_id = :2 , business_type = :3 , operation_type = :4 , data_id = :5 , user_id = :6 , need_erp_member_id = :7 , retry_times = :8 , msg = :9 , send_time = :10 , create_time = :11 , update_time = :12 , data = :13 where id = :14|1|42|42||0|0|1|1|0|0|
|platform|select count ( 1 ) from coupondetail where vendorid = :1 and coupontype = :2 and couponstate = :3 and to_days ( :4 ) :5 to_days ( createtime ) = :6|1|3|3||0|0|319203|319203|1|1|
|user_service|commit|2|70|38||0|0|0|0|0|0|
|authorization_service|insert into user_login_token ( id , user_id , tenant_id , tenant_wx_app_id , account_id , login_way , login_code , login_token , roles , status , expire_time , create_time , update_time , login_ip , login_time , login_data , employee_id , shop_id ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , null , null , null , :14 , :15 )|2|10|7||0|0|0|0|0|0|
|erp_sync|select count ( * ) from erp_sync.sync_record_20190923|2|8|6||0|0|5756158|2878079|2|1|
|user_service|select scene_id , count ( * ) as quantity , scene_type from user_service.user_source where scene_type = :1 and scene_id in ( :2 ) and tenant_wechatapp_id = :3 group by scene_id|2|4|3||0|0|56733|52539|1|1|
|erp_sync|optimize table erp_sync.sync_record|2|167|85||0|0|0|0|0|0|
|employee|update backlog set leave_flag = :1 where tenant_app_id = :2 and employee_id = :3|2|6|3||0|0|126463|71840|0|0|
|user_service|select tu.id as tenantuserid , tu.user_id , u.nick_name , tu.user_name , tu.mobile_no , tu.head_img_url , tu.sex , tu.tenant_union_id as tenantunionid from tenant_user tu join `user` u on tu.user_id = u.id where tu.`status` = :1 and tu.tenant_app_id = :2 and tu.user_id in ( :3 )|2|4|2||0|0|2|1|2|1|
|account|insert into `job_execution_log` ( `id` , `job_name` , `task_id` , `hostname` , `ip` , `sharding_item` , `execution_source` , `is_success` , `start_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 )|2|81|40||0|0|0|0|0|0|
|payment|insert into `job_execution_log` ( `id` , `job_name` , `task_id` , `hostname` , `ip` , `sharding_item` , `execution_source` , `is_success` , `start_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 )|2|55|34||0|0|0|0|0|0|
|user_service|select tu.user_name as nickname , tu.head_img_url as userheadimg , eg.grade_name , tu.mobile_no as mobileno from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and em.member_erp_id = tu.erp_member_id left join user_service.erp_member_grade eg on tu.tenant_id = eg.tenant_id and em.grade_erp_id = eg.grade_erp_id where tu.user_id = :1 and tu.tenant_app_id = :2|2|5|3||0|0|6|3|2|1|
|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|2|13|7||0|0|1912303|957055|2|1|
|position|commit|2|12|8||0|0|0|0|0|0|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|2|2|1||0|0|4038|2019|4038|2019|
|value_added|select id , template_name as templatename , added_percent_per_day as addedpercentperday , add_days as adddays , keeping_days as keepingdays , devalue_percent_per_day as devaluepercentperday , exchange_days as exchangedays , is_disable as isdisable , effective_days as effectivedays , ifnull ( usenumber , 0 ) as usenumber , generator_method as generatormethod , remark as remark from value_added_template left join ( select template_id , count ( * ) usenumber from value_added_user where tenant_wechatapp_id = :1 group by template_id ) value_added_user on value_added_template.id = value_added_user.template_id where tenant_wechatapp_id = :2 and id = :3|2|3|2||0|0|111596|55798|2|1|
|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|2|4|3||0|0|87|67|0|0|
|account|select id , tenant_id , tenant_wechatapp_id , account_type , user_id , mch_billno , send_name , mch_id , sub_mch_id , wxappid , msgappid , re_openid , total_amount , total_num , wishing , client_ip , act_name , remark , scene_id , risk_info , consume_mch_id , send_time , order_status , failure_reason , biz_id , biz_type , biz_tag , send_listid , need_callback , create_time , update_time , user_name , mobile_no , receive_time , refund_amount , refund_time from wx_redpacket_send_order where order_status in ( :1 , :2 ) order by id desc|2|5|3||0|0|44493|22247|6|3|
|facepass_sync|insert into `job_execution_log` ( `id` , `job_name` , `task_id` , `hostname` , `ip` , `sharding_item` , `execution_source` , `is_success` , `start_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 )|2|80|40||0|0|0|0|0|0|
|timer|update task_info set next_time = :1 where id = :2|2|51|40||0|0|2|1|0|0|
|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|3|18|9||0|0|1591767|530763|1|1|
|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|3||0|0|91751|62528|32|32|
|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 )|3|92|41||0|0|0|0|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|3|6|3||0|0|348134|118366|3|1|
|authorization_service|select id , user_id , tenant_id , tenant_wx_app_id , account_id , login_way , login_code , login_token , roles , status , expire_time , create_time , update_time , login_ip , login_time , login_data , employee_id , shop_id from user_login_token where login_token = :1|3|9|5||0|0|3|1|3|1|
|platform|update vendormember vm inner join ( select sum ( integral ) as integral , sum ( if ( integral > 0 , integral , 0 ) ) as hisintegral from integrallog where vendorid = :1 and memberid = :2 and isdeleted = :3 ) s on :4 = :5 set vm.integral = ifnull ( s.integral , :6 ) , vm.hisintegral = ifnull ( s.hisintegral , :7 ) , vm.updatetime = now ( ) where vendorid = :8 and memberid = :9|4|5|1||0|0|15|4|0|0|
|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 , is_give , writeoff_time from coupon_user where coupon_template_id = :1 and owner_id = :2|4|41|15||0|0|1884277|530612|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|4|133|44||0|0|4|1|0|0|
|authorization_service|commit|4|95|40||0|0|0|0|0|0|
|qrcode_service|select *from qrcode_service.qrcode_scan_log where open_id = :1 and tenant_app_id = :2 order by create_time desc limit :3|5|14|6||0|0|5568088|1114460|4|1|
|erp_sync|insert into `job_status_trace_log` ( `id` , `job_name` , `original_task_id` , `task_id` , `slave_id` , `source` , `execution_type` , `sharding_item` , `state` , `message` , `creation_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 )|5|195|40||0|0|0|0|0|0|
|authorization_service|select id , user_id , tenant_id , tenant_wx_app_id , account_id , login_way , login_code , login_token , roles , status , expire_time , create_time , update_time , login_ip , login_time , login_data , employee_id , shop_id from user_login_token where employee_id = :1 and tenant_id = :2 and tenant_wx_app_id = :3 and shop_id = :4 and login_way = :5 and status = :6|5|11|4||0|0|30294|21529|5|1|
|authorization_service|select id , user_id , tenant_id , tenant_wx_app_id , account_id , login_way , login_code , login_token , roles , status , expire_time , create_time , update_time , login_ip , login_time , login_data , employee_id , shop_id from user_login_token where ( tenant_id = :1 and account_id = :2 and status = :3 )|5|11|5||0|0|558080|124056|10|2|
|platform|select left ( vm.username , 32 ) as username , vm.sex , vm.birthday , vm.birthdaytype , vm.memorialname , vm.memorialday , vm.memorialtype , vm.interest , me.openid , left ( me.nickname , 32 ) as nickname , me.headimgurl , me.mobileno , wm.subscribe , wm.createtime as subscribetime , ee.vendorempid , vm.memberid , em.mobile_no , em.dept_erp_id from platform.vendor ve join platform.member me on me.vendorid = ve.id and me.openid != :1 and me.openid is not null and me.mobileno != :2 and me.mobileno is not null join platform.wechatmember wm on wm.id = me.wechatmemberid and wm.appid = ve.appid left join platform.vendormember vm on vm.id = me.vendormemberid left join platform.employee ee on ee.id = me.employeeid left join user_service.erp_member em on em.member_erp_id = vm.memberid and em.tenant_wechatapp_id = :3 where ve.appid = :4 order by me.createtime desc|5|62|16||0|0|891375|178275|119800|23960|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|5|11|3||0|0|243500|48717|10|2|
|gift_mail|select count ( 0 ) from ( select t.* , tt.can_take_date , tt.shop_name , tt.take_shop_name , tt.take_employee_name , ta.recipients , ta.user_tel , concat ( ta.area , ta.address ) address , if ( t.trade_type = 3 , pl.id , it.barcode ) as barcode , if ( t.trade_type = 3 or t.trade_type = :1 , pl.default_image_url , p.default_image_url ) as defaultimageurl from trade t left outer join trade_take tt on tt.trade_id = t.id left outer join trade_addr ta on ta.trade_id = t.id left outer join product p on p.id = t.product_id left outer join platform_product pl on pl.id = t.product_id left outer join inventory it on it.product_id = t.product_id and it.specification = t.specification where ( t.tenant_wechatapp_id = :2 ) order by create_time desc ) tmp_count|5|6|2||0|0|75189|16112|5|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|6|8|2||0|0|86466|14411|0|0|
|facepass_sync|insert into `job_status_trace_log` ( `id` , `job_name` , `original_task_id` , `task_id` , `slave_id` , `source` , `execution_type` , `sharding_item` , `state` , `message` , `creation_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 )|7|278|40||0|0|0|0|0|0|
|gift_mail|select t.* , tt.can_take_date , tt.shop_name , tt.take_shop_name , tt.take_employee_name , ta.recipients , ta.user_tel , concat ( ta.area , ta.address ) address , if ( t.trade_type = 3 , pl.id , it.barcode ) as barcode , if ( t.trade_type = 3 or t.trade_type = :1 , pl.default_image_url , p.default_image_url ) as defaultimageurl from trade t left outer join trade_take tt on tt.trade_id = t.id left outer join trade_addr ta on ta.trade_id = t.id left outer join product p on p.id = t.product_id left outer join platform_product pl on pl.id = t.product_id left outer join inventory it on it.product_id = t.product_id and it.specification = t.specification where ( t.tenant_wechatapp_id = :2 ) order by create_time desc limit :3|7|14|3||0|0|108106|16878|140|20|
|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_app_id = :1 and ( tu.mobile_no = :2 or u.nick_name like concat ( :3 , :4 ) or tu.user_name like concat ( :5 , :6 ) )|7|21|6||0|0|856159|245949|324|320|
|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|9|32|7||0|0|620473|68968|135|15|
|tenant|select id , sales_no , sales_date , member_erp_id , sales_erp_id , is_sales from erp_sales where sales_no like concat ( :1 , :2 , :3 ) and sales_status = :4 and tenant_id = :5 and tenant_wechatapp_id = :6 order by sales_date desc limit :7|9|19|4||0|0|2922428|484679|1|1|
|sjfxjira|update clusteredjob set version = :1 , next_run = :2 where job_id = :3 and version = :4|10|270|42||0|0|10|1|0|0|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , create_time , update_time , receive_data , response_data from customer_face_sync_message where status = :1 and create_time < date_add ( now ( ) , interval :2 minute ) order by id asc limit :3|10|33|6||0|0|454008|48140|3|1|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|14|20|2||0|0|3438032|245590|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|40|12||0|0|3100860|206843|15|1|
|payment|insert into `job_status_trace_log` ( `id` , `job_name` , `original_task_id` , `task_id` , `slave_id` , `source` , `execution_type` , `sharding_item` , `state` , `message` , `creation_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 )|15|348|34||0|0|0|0|0|0|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|15|34|3||0|0|4788045|319203|15|1|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|16|27|5||0|0|141404|11272|16|1|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where tasktype = :1 and vendorid = :2 and date_format ( tasktime , :3 ) >= curdate ( ) and ( taskstatus = :4 or taskstatus = :5 )|16|24|3||0|0|10162272|635142|3|3|
|activity_service|select id , tenant_id , tenant_app_id , activity_id , user_id , tenant_app_open_id , customize_page_id , qualitied_id , status , remark , create_time , update_time from intelligent_marketing_activity_gift where `status` = :1 limit :2 , :3|17|26|5||0|0|4071194|239482|0|0|
|account|insert into `job_status_trace_log` ( `id` , `job_name` , `original_task_id` , `task_id` , `slave_id` , `source` , `execution_type` , `sharding_item` , `state` , `message` , `creation_time` ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 )|18|724|40||0|0|0|0|0|0|
|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 )|19|141|15||0|0|1688954|204484|17|1|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|20|28|2||0|0|41746|2138|41746|2138|
|user_service|select ue.employee_id as employeeid , count ( * ) as quantity from user_service.user_employee ue join user_service.tenant_user tu on ue.tenant_wechatapp_id = tu.tenant_app_id and ue.user_id = tu.user_id where employee_id in ( :1 ) and ue.tenant_wechatapp_id = :2 and tu.shop_id = :3 group by ue.employee_id|23|57|7||0|0|689639|80024|23|1|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|24|29|1||0|0|50160|2138|50160|2138|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|31|70|10||0|0|598102|22056|31|1|
|user_service|select count ( * ) 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.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4|75|204|15||0|0|7071958|201657|74|1|
