|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|account|/* applicationname = datagrip 2019.1.2 */ select * from gift_mail.trade t join account.account_flow a on a.busi_id = t.id where t.cash_price is null and a.busi_type = :1 and t.trade_type in ( :2 , :3 )|1|21|21||0|0|4934513|4934513|57|57|
|message_push|delete from message_log where create_time < :1|1|16|16||0|0|176611|176611|0|0|
|mysql|delete from erp_sync.sync_record where create_time < date_sub ( now ( ) , interval :1 day )|1|2|2||0|0|1137236|1137236|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|6|6||0|0|120774|120774|0|0|
|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|1|5|5||0|0|87628|87628|0|0|
|user_service|/* applicationname = intellij idea 2019.3.1 */ select * from user_service.erp_integral_log where tenant_id = :1 and create_time = :2|1|8|8||0|0|353531|353531|501|501|
|value_added|select count ( 0 ) from ( select t.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 , t.is_disable as isdisable , effective_days as effectivedays , ifnull ( usenumber , 0 ) as usenumber , remark as remark , generator_method as generatormethod , history_added_percent_per_day as historyaddedpercentperday , history_devalue_percent_per_day as historydevaluepercentperday , extra.before_sale_time as beforesaletime from value_added.value_added_template t left join value_added.value_added_template_extra extra on t.id = extra.value_added_template_id and extra.is_disable = :1 left join ( select template_id , count ( * ) usenumber from value_added.value_added_user where tenant_wechatapp_id = :2 group by template_id ) value_added_user on t.id = value_added_user.template_id where t.tenant_wechatapp_id = :3 ) table_count|1|1|1||0|0|68968|68968|1|1|
|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|270810|270810|0|0|
|wx_gateway|select * from wx_user where user_id = :1 and open_id not like :2 limit :3|1|4|4||0|0|775683|775683|1|1|
|erp_sync|select * from retry_data where tenant_app_id = :1 and user_id = :2|1|1|1||0|0|5942|5942|3|3|
|user_service|/* applicationname = intellij idea 2019.3.1 */ select * from user_service.erp_integral_log where tenant_id = :1 and create_time = :2 and integral = :3|1|5|5||0|0|450453|450453|2|2|
|account|/* applicationname = datagrip 2019.1.2 */ select *from account.account_flow a inner join gift_mail.trade t on t.id = a.busi_id and t.trade_type in ( :1 , :2 ) and t.cash_price is null|1|41|41||0|0|4955450|4955450|138|138|
|coupon_service|select * from coupon_user where datediff ( date_format ( end_time , :1 ) , date_format ( now ( ) , :2 ) ) = :3 and coupon_state in ( :4 )|1|15|15||0|0|548754|548754|1|1|
||/* applicationname = intellij idea 2019.3.1 */ select * from authorization_service.user_login_token where tenant_id = :1 and roles = :2 and status = :3 order by id desc limit :4|1|4|4||0|0|3570050|3570050|0|0|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub ( now ( ) , interval :1 day )|1|62|62||0|0|1606003|1606003|0|0|
|coupon_service|select count ( 0 ) from coupon_user where coupon_template_id = :1|1|1|1||0|0|729073|729073|1|1|
|mysql|update gift_mail.trade t join account.account_flow a on a.busi_id = t.id set t.cash_price = a.amount where t.cash_price is null and a.busi_type = :1 and t.trade_type in ( :2 , :3 )|1|31|31||0|0|4935214|4935214|0|0|
|mysql|insert into erp_sync.sync_record_20190924 select * from erp_sync.sync_record where create_time < date_sub ( now ( ) , interval :1 day )|1|31|31||0|0|1137236|1137236|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|
|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|
|tenant|select count ( 0 ) from erp_sales join erp_department on erp_sales.dept_erp_id = erp_department.dept_erp_id and erp_sales.tenant_id = erp_department.tenant_id join tenant on erp_sales.tenant_id = tenant.id and tenant.`status` = :1 where :2 = :3 and erp_sales.tenant_id = :4|1|15|15||0|0|2029934|2029934|0|0|
||/* applicationname = intellij idea 2019.3.1 */ select * from authorization_service.user_login_token where tenant_id = :1 and roles like :2 and status = :3 order by id desc limit :4|1|3|3||0|0|3570053|3570053|3|3|
|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|73540|73540|0|0|
|mysql|delete from message_push.message_log where create_time < date_sub ( now ( ) , interval :1 day )|1|2|2||0|0|33608|33608|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 , :2 , :3 , :4 , :5 , :6 , :7 ) and ue.tenant_wechatapp_id = :8 and tu.shop_id = :9 group by ue.employee_id|1|1|1||0|0|72469|72469|6|6|
|user_service|/* applicationname = intellij idea 2019.3.1 */ select * from user_service.erp_member where tenant_id = :1 and mobile_no in ( :2 , :3 )|1|8|8||0|0|390563|390563|2|2|
|user_service|select count ( 0 ) from ( 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 ) table_count|1|3|3||0|0|143684|143684|1|1|
|account|/* applicationname = datagrip 2019.1.2 */ select * from account.account_flow a inner join gift_mail.trade t on t.id = a.busi_id and t.trade_type in ( :1 , :2 ) and t.cash_price is null where a.busi_type = :3|1|33|33||0|0|4931801|4931801|57|57|
|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|441268|441268|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|322224|322224|1|1|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and status = :2 and date_sub ( curdate ( ) , interval :3 day ) = date_format ( salesdate , :4 )|1|1|1||0|0|120774|120774|0|0|
|user_service|/* applicationname = intellij idea 2019.3.1 */ select * from user_service.erp_member where mobile_no = :1|1|31|31||0|0|6142724|6142724|2|2|
|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 and tenant_wx_app_id = :4 )|1|5|5||0|0|280842|280842|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 , :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 ) and ue.tenant_wechatapp_id = :35 and tu.shop_id = :36 group by ue.employee_id|1|3|3||0|0|86024|86024|31|31|
|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|2|5|3||0|0|15592|7796|3590|1795|
|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|4|3||0|0|62572|31310|23|16|
|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|2|20|10||0|0|2198184|1099158|2|1|
|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|2|12|10||0|0|1456023|728013|0|0|
|account|/* applicationname = datagrip 2019.1.2 */ select * from account.account_flow a inner join gift_mail.trade t on t.id = a.busi_id and t.trade_type in ( :1 , :2 ) where a.busi_type = :3 and t.cash_price is null|2|64|33||0|0|9866559|4934484|114|57|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|2|3|1||0|0|21919|10960|21919|10960|
|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|9|5||0|0|95588|62568|85|71|
|employee|update backlog set leave_flag = :1 where tenant_app_id = :2 and employee_id = :3|3|12|6||0|0|264955|139382|0|0|
|employee|select count ( 0 ) from backlog where tenant_app_id = :1 and employee_id = :2 and status in ( :3 , :4 ) and shop_id = :5 and scene = :6 and expire_time >= :7|4|5|1||0|0|3552|1110|4|1|
|order|select id from order_operator_log where tenant_wechatapp_id = :1 and order_id = :2 and ( src_child_status = :3 and dst_child_status = :4 ) order by create_time desc limit :5|5|5|1||0|0|1278251|255688|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|5|19|5||0|0|594335|141814|5|1|
|order|select max ( create_time ) from `order`.order_operator_log where tenant_wechatapp_id = :1 and order_id = :2|5|5|1||0|0|1278260|255717|5|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|5|6|2||0|0|683672|244639|1|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|7|8|1||0|0|109565|15653|0|0|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|10|22|5||0|0|249529|28575|25|8|
|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 )|13|21|3||0|0|599785|62215|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|13|21|2||0|0|249|32|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|13|22|3||0|0|5539|714|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|15|22|3||0|0|535456|103562|15|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|15|81|15||0|0|10445617|729194|6|1|
|gift_mail|select * from ( select p.* , sp.take_type , ifnull ( pp.integral_price , ifnull ( ( select min ( inventory.price ) from inventory where inventory.product_id = p.id ) , :1 ) ) as price , ifnull ( t.quantity , :2 ) quantity , pt.partner_name vendorname , 0.0 distance , c.categroy_name categroy_name , pp.partner_id partner_id from product p inner join category c on c.id = p.category_id left outer join self_product sp on p.id = sp.product_id left outer join partner_product pp on p.id = pp.product_id left outer join partner pt on pt.id = pp.partner_id left outer join ( select product_id , sum ( quantity ) quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where ( ( p.is_disable is null or p.is_disable = :3 ) ) ) as p where ( p.tenant_id = :4 ) order by p.id desc limit :5 , :6|18|22|1||0|0|318794|17759|210|15|
|user_service|select user_id , user_name , mobile_no , head_img_url from user_service.tenant_user where tenant_id = :1 and tenant_app_id = :2 and user_name like concat ( :3 , :4 , :5 ) limit :6|19|82|11||0|0|1658281|141780|80|12|
|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|20|29|3||0|0|1183346|68969|20|1|
|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|22|61|6||0|0|2193206|99738|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 )|29|57|7||0|0|4589238|280575|55|2|
|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 )|31|228|15||0|0|1906045|199454|27|1|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|34|72|3||0|0|789722|30224|34|1|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|34|51|2||0|0|8387756|250932|1|1|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|35|73|4||0|0|2307560|65936|19|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|37|87|5||0|0|1684795|47120|5|1|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|39|98|5||0|0|12566736|322224|39|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 )|39|74|5||0|0|29217064|749171|20|9|
|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|53|138|8||0|0|1816059|95929|53|1|
|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|65|176|8||0|0|23776740|365796|0|0|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|68|169|5||0|0|1643777|28605|68|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|174|870|15||0|0|16718612|172089|169|1|
|gift_mail|select * from ( select p.* , sp.take_type , ifnull ( pp.integral_price , ifnull ( ( select min ( inventory.price ) from inventory where inventory.product_id = p.id ) , :1 ) ) as price , ifnull ( t.quantity , :2 ) quantity , pt.partner_name vendorname , 0.0 distance , c.categroy_name categroy_name , pp.partner_id partner_id from product p inner join category c on c.id = p.category_id left outer join self_product sp on p.id = sp.product_id left outer join partner_product pp on p.id = pp.product_id left outer join partner pt on pt.id = pp.partner_id left outer join ( select product_id , sum ( quantity ) quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where ( ( p.is_disable is null or p.is_disable = :3 ) ) ) as p where ( p.tenant_id = :4 ) order by p.id desc limit :5|221|264|2||0|0|3920151|17909|3457|20|
|gift_mail|select count ( 0 ) from ( select p.* , sp.take_type , ifnull ( pp.integral_price , ifnull ( ( select min ( inventory.price ) from inventory where inventory.product_id = p.id ) , :1 ) ) as price , ifnull ( t.quantity , :2 ) quantity , pt.partner_name vendorname , 0.0 distance , c.categroy_name categroy_name , pp.partner_id partner_id from product p inner join category c on c.id = p.category_id left outer join self_product sp on p.id = sp.product_id left outer join partner_product pp on p.id = pp.product_id left outer join partner pt on pt.id = pp.partner_id left outer join ( select product_id , sum ( quantity ) quantity from gift_mail.inventory group by product_id ) t on p.id = t.product_id where ( ( p.is_disable is null or p.is_disable = :3 ) ) ) as p where ( p.tenant_id = :4 )|239|288|2||0|0|4234918|17889|239|1|
