|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog|1|4|4||0|0|502|502|502|502|
|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|322223|322223|1|1|
|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 , 2328.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 = 2328.00 , sales_remark = :20 , receipts = :21 , sales_status = :22 , is_sales = :23 , busi_date = :24|1|15|15||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select count ( * ) from employee.backlog where id <= :1|1|20|20||0|0|777950|777950|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|11|11||0|0|0|0|0|0|
|payment|commit|1|11|11||0|0|0|0|0|0|
|timer|update task_info set next_time = :1 where id = :2|1|11|11||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 , 47.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 = 47.00 , user_name = :16 , create_time = create_time|1|15|15||0|0|0|0|0|0|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub ( now ( ) , interval :1 day )|1|51|51||0|0|1386790|1386790|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|25|25||0|0|1|1|0|0|
|erp_sync|select * from retry_data where tenant_app_id = :1 and user_id = :2|1|2|2||0|0|5199|5199|3|3|
|erp_sync|insert into retry_data ( id , tenant_id , tenant_app_id , business_type , operation_type , data_id , user_id , erp_member_id , need_erp_member_id , retry_times , msg , send_time , create_time , data ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 )|1|17|17||0|0|0|0|0|0|
|mysql|delete from erp_sync.sync_record where create_time < date_sub ( now ( ) , interval :1 day )|1|3|3||0|0|1042052|1042052|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\\":\\"948045804310949888\\"}"}' , :6 , :7 )|1|4|4||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select count ( * ) from employee.backlog where shop_id = :1|1|3|3||0|0|1742750|1742750|1|1|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|1|1|1||0|0|43918|43918|1|1|
|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\\":\\"850153199259193344\\"}"}' , :6 , :7 )|1|22|22||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( id , tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time , busi_type , busi_id ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , 47.00 , :8 , :9 , :10 , :11 , :12 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|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|220034|220034|0|0|
|warranty_service|insert into warranty ( id , tenant_wechatapp_id , user_id , erp_sales_id , warranty_no , is_disable , warranty_data , update_employee_id , employee_erp_id , dept_erp_id , sales_no , sales_date ) values ( :1 , :2 , :3 , :4 , :5 , :6 , ... 微信：254.00","userid":"879629739491430400","amount":254,"detail":[{"id":"477929656575300598","saleserpid":"197830","salestype":"销售","productbarcode":"05320111823308","productname":"足金腕饰","certno":"","categoryname":"黄金 ( g ) ... = c380t7auhaw04uxxgbowojzebc21b9s-mu4ghj3y3hexolalj-dq5hty9t5rjnauv4fzttbc2-ef-kkvcqxmookvgiscftym8uw1zbdc0fcvcfsyshqcbmv4hfenf2yqnfu1zq0nz5wyyro-ewpla9loeacghjgwloegagxq0ddy0ovcqsaowkq1gwlaimid5jozhn4lhl9i5ykgd-3r2a&media_id = 14okkcebapcsl9yfudttjhkca-8iaz6cyuqd9bhzyvywqtfebbttenyrhmsuw7l0m"],"serverids":["14okkcebapcsl9yfudttjhkca-8iaz6cyuqd9bhzyvywqtfebbttenyrhmsuw7l0m"]},{"id":"477929656575300599","saleserpid":"197830","salestype":"以旧换新","productbarcode":"lfxzjjl","productname":"老凤祥足金旧料","certno":"","categoryname":"旧料","totalweight":"0.00g","stoneweight":"0.000","goldweight":"0.00g","remark":"","quantity":0,"amounttotal":-13261,"imgurls":[],"serverids":null},{"id":"477929656575300600","saleserpid":"197830","salestype":"收券","productbarcode":"lq","productname":"礼券","certno":"","categoryname":"费用","totalweight":"0.00g","stoneweight":"0.000","goldweight":"0.00g","remark":"","quantity":0,"amounttotal":0,"imgurls":[],"serverids":null},{"id":"477929656575300601","saleserpid":"197830","salestype":"收券","productbarcode":"lq","productname":"礼券","certno":"","categoryname":"费用","totalweight":"0.00g","stoneweight":"0.000","goldweight":"0.00g","remark":"","quantity":0,"amounttotal":0,"imgurls":[],"serverids":null}]}' , :7 , :8 , :9 , :10 , :11 )|1|19|19||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|2|2||0|0|640733|640733|0|0|
|corpwx|update external_user set un_assign_flag = :1 where ( tenant_id = :2 and un_assign_flag = :3 )|1|1|1||0|0|27446|27446|0|0|
|message_push|delete from message_log where create_time < :1|1|16|16||0|0|216301|216301|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|16|16||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( id , tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time , busi_type , busi_id ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , 7791.00 , :8 , :9 , :10 , :11 , :12 ) on duplicate key update update_time = now ( )|1|24|24||0|0|0|0|0|0|
|warranty_service|select count ( 0 ) from warranty_service.warranty where tenant_wechatapp_id = :1 and is_disable = false and dept_erp_id = :2 and sales_date >= :3 and sales_date <= :4 and employee_erp_id in ( :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 )|1|8|8||0|0|48961|48961|1|1|
||/* applicationname = intellij idea 2019.1 */ select tenant_id , tenant_wechatapp_id , user_id , from_id from user_service.user_source where source_type = :1 order by tenant_id , tenant_wechatapp_id , from_id limit :2 , :3|1|5|5||0|0|1489254|1489254|10000|10000|
|coupon_service|insert into coupon_mall_order ( id , mall_product_id , price , account_detail_id , pay_type , create_time , update_time , quantity , order_state , order_type , user_id ) values ( :1 , :2 , 11.00 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 )|1|6|6||0|0|0|0|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|1|2|2||0|0|24972|24972|3|3|
|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 )|1|11|11||0|0|0|0|0|0|
|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|640864|640864|1|1|
|coupon_service|select count ( 0 ) from coupon_user where coupon_template_id = :1|1|2|2||0|0|595722|595722|1|1|
|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|
|mysql|delete from erp_to_platform.sync_log where create_time < date_sub ( now ( ) , interval :1 day )|1|2|2||0|0|194866|194866|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 )|1|11|11||0|0|0|0|0|0|
|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|595753|595753|1616|1616|
|mysql|insert into erp_sync.sync_record_20190924 select * from erp_sync.sync_record where create_time < date_sub ( now ( ) , interval :1 day )|1|33|33||0|0|1042052|1042052|0|0|
|tenant|select count ( 0 ) from tenant.erp_sales es left join tenant.tenant_wechatapp_shop shop on shop.tenant_wechatapp_id = es.tenant_wechatapp_id and shop.dept_erp_id = es.dept_erp_id join tenant.employee e on e.tenant_id = es.tenant_id and e.employee_erp_id = es.employee_erp_id join tenant.employee_shop esh on esh.tenant_app_id = es.tenant_wechatapp_id and esh.employee_id = e.id and esh.dept_erp_id = es.dept_erp_id where es.tenant_wechatapp_id = :1 and es.sales_date >= :2 and es.sales_date <= :3 and es.dept_erp_id = :4 and es.comment_id is not null and es.comment_id != :5 and esh.status in ( :6 , :7 )|1|2|2||0|0|95704|95704|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 , 8605.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 = 8605.00 , user_name = :16 , create_time = create_time|1|24|24||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select count ( * ) from employee.backlog bg left join tenant.employee ey on bg.employee_id = ey.id where ey.id is null|1|2|2||0|0|1847556|1847556|1|1|
|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 , 8295.20 , :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 = 8295.20 , sales_remark = :20 , receipts = :21 , sales_status = :22 , is_sales = :23 , busi_date = :24|1|24|24||0|0|0|0|0|0|
||/* applicationname = intellij idea 2019.1 */ select count ( * ) from user_service.user_source where source_type = :1|1|5|5||0|0|1478884|1478884|1|1|
|sms|insert into sms_report ( id , phone_number , success , biz_id , out_id , send_time , report_time , err_code , err_msg , sms_size , create_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , null )|1|29|29||0|0|0|0|0|0|
|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|11|11||0|0|0|0|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|1|1||0|0|28984|28984|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select count ( * ) from employee.backlog where leave_flag = :1|1|46|46||0|0|1742750|1742750|1|1|
|warranty_service|select *from warranty_service.warranty where upload_frequency <= :1 and version = :2 and warranty_img_url is null|1|15|15||0|0|449077|449077|0|0|
|mysql|delete from message_push.message_log where create_time < date_sub ( now ( ) , interval :1 day )|1|2|2||0|0|35579|35579|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|28|28||0|0|1|1|0|0|
|mysql|insert into erp_to_platform.sync_log_20190924 select * from erp_to_platform.sync_log where create_time < date_sub ( now ( ) , interval :1 day )|1|3|3||0|0|194866|194866|0|0|
|user_service|insert into erp_integral_log ( id , tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time , busi_type , busi_id ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , 45.00 , :8 , :9 , :10 , :11 , :12 ) on duplicate key update update_time = now ( )|1|19|19||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog where create_time <= :1|1|40|40||0|0|1742750|1742750|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|
|account|/* applicationname = datagrip 2018.2.2 */ select max ( id ) from employee.backlog where create_time <= :1|2|3|2||0|0|3485500|1742750|2|1|
|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 , null , :6 , null , null )|2|48|24||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 , :4|2|5|3||0|0|37396|18708|40|20|
|user_service|insert low_priority ignore into `user_service`.`_erp_integral_log_new` ( `id` , `tenant_id` , `tenant_wechatapp_id` , `integral_erp_id` , `member_erp_id` , `note_erp_id` , `remark` , `integral` , `is_disable` , `erp_create_time` , `create_time` , `update_time` , `busi_type` , `busi_id` ) select `id` , `tenant_id` , `tenant_wechatapp_id` , `integral_erp_id` , `member_erp_id` , `note_erp_id` , `remark` , `integral` , `is_disable` , `erp_create_time` , `create_time` , `update_time` , `busi_type` , `busi_id` from `user_service`.`erp_integral_log` force index ( `primary` ) where ( ( `id` >= :1 ) ) and ( ( `id` <= :2 ) ) lock in share mode /*pt-online-schema-change :3 copy nibble*/|2|6|4||0|0|13213|9141|0|0|
|activity_service|commit|2|23|18||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|3|1||0|0|4222|2111|4222|2111|
||/* applicationname = intellij idea 2019.1 */ select * from user_service.user_source where source_type = :1 order by tenant_id , tenant_wechatapp_id , from_id limit :2 , :3|3|10|5||0|0|5185559|2125658|2000|1000|
|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 )|3|50|29||0|0|0|0|0|0|
|facepass_sync|commit|3|48|22||0|0|0|0|0|0|
|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|3|5|3||0|0|356|145|0|0|
|customer|commit|3|49|23||0|0|0|0|0|0|
|employee|commit|3|36|29||0|0|0|0|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.status = :2 and ut.activity_id = :3|3|30|11||0|0|3224020|1074918|3|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|7|3||0|0|93337|62543|61|48|
|sjfxjira|update clusteredjob set version = :1 , next_run = :2 where job_id = :3 and version = :4|3|49|17||0|0|3|1|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|3|4|2||0|0|68490|25442|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|9|5||0|0|52|33|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 )|4|45|11||0|0|0|0|0|0|
|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 )|4|45|11||0|0|0|0|0|0|
||/* applicationname = intellij idea 2019.1 */ select * from user_service.erp_integral_log where busi_type != :1 order by id desc limit :2|4|80|30||0|0|21684641|5914138|17|8|
|employee|update backlog set leave_flag = :1 where tenant_app_id = :2 and employee_id = :3|5|14|3||0|0|345195|104076|0|0|
|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|55|11||0|0|0|0|0|0|
|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 ) )|5|21|11||0|0|674378|314348|5|1|
|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|6|13|2||0|0|114644|19200|2488|426|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|6|12|4||0|0|128420|23675|21|6|
|wx_gateway|select * from wx_user where user_id = :1 and open_id not like :2 limit :3|7|41|9||0|0|8396556|1764608|7|1|
|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|7|16|4||0|0|857352|157166|7|1|
|customize_page|select id , tenant_id , tenant_wechatapp_id , page_id , user_id , tenant_app_open_id , create_time , update_time , business_id , src_type , user_name , mobile_no , head_img from award_qualified where tenant_wechatapp_id = :1 and page_id = :2 and ( user_id = :3 or tenant_app_open_id = :4 )|7|12|3||0|0|175925|41404|0|0|
|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|7|8|1||0|0|363760|61309|7|1|
|user_service|commit|7|95|26||0|0|0|0|0|0|
|authorization_service|commit|8|151|28||0|0|0|0|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 )|9|99|11||0|0|0|0|0|0|
|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|9|15|3||0|0|250998|79185|9|1|
|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|23|4||0|0|1903177|448295|2|1|
|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|9|128|20||0|0|0|0|0|0|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|10|24|5||0|0|543276|54353|34|4|
|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|11|22|5||0|0|876996|79889|272|30|
|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|12|18|2||0|0|175500|14625|0|0|
|position|commit|15|268|28||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 account_id = :2 and status = :3 )|16|41|8||0|0|2231650|171151|30|2|
|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|16|29|3||0|0|9538841|596187|0|0|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|17|32|2||0|0|177575|12057|17|1|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , create_time , update_time , receive_data , response_data from customer_face_sync_message where status = :1 and create_time < date_add ( now ( ) , interval :2 minute ) order by id asc limit :3|18|42|5||0|0|613966|36555|0|0|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|18|48|4||0|0|5800014|322223|18|1|
|tenant|select count ( 0 ) from erp_sales where tenant_id = :1 and tenant_wechatapp_id = :2 and sales_date >= :3 and employee_erp_id = :4 and sales_status = :5|20|40|3||0|0|4408724|220573|20|1|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|22|39|7||0|0|5307587|247792|0|0|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where tasktype = :1 and vendorid = :2 and date_format ( tasktime , :3 ) >= curdate ( ) and ( taskstatus = :4 or taskstatus = :5 )|23|30|2||0|0|14739872|640864|17|12|
|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|26|83|8||0|0|509747|24296|520|20|
|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|28|48|4||0|0|530184|22749|28|1|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|36|48|2||0|0|76585|2180|76585|2180|
|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|37|73|7||0|0|10600204|286492|0|0|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|37|77|5||0|0|747780|23674|37|1|
|customer|select count ( 0 ) from customer_face_pass t where t.shop_id = :1 and t.is_checkin = :2 and t.enter_shop_time >= date_sub ( current_date , interval :3 day )|38|322|15||0|0|3485640|185028|34|1|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|42|55|2||0|0|89328|2180|89328|2180|
|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|151|224|4||0|0|90009482|596187|44|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|169|496|13||0|0|15587369|166316|169|1|
