|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|corpwx|update external_user set un_assign_flag = :1 where ( tenant_id = :2 and un_assign_flag = :3 )|145|187|2||0|0|165939805|1154466|0|0|
|user_service|select ue.employee_id as employeeid , count ( * ) as quantity from user_service.user_employee ue join user_service.tenant_member_info tmi on ue.tenant_id = tmi.tenant_id and ue.tenant_wechatapp_id = tmi.tenant_app_id and ue.user_id = tmi.user_id where employee_id in ( :1 ) and ue.tenant_id = :2 and ue.tenant_wechatapp_id = :3 and tmi.shop_id = :4 group by ue.employee_id|101|140|3||0|0|33807959|427143|101|1|
|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|62|145|6||0|0|7901641|195697|62|1|
|user_service|select count ( * ) from user_service.tenant_member tm left join user_service.user_employee t3 on tm.tenant_id = t3.tenant_id and tm.user_id = t3.user_id and tm.tenant_app_id = t3.tenant_wechatapp_id join user_service.tenant_member_bind tmb on tm.tenant_id = tmb.tenant_id and tm.id = tmb.id join user_service.tenant_member_info tmi on tm.tenant_id = tmi.tenant_id and tm.id = tmi.id where t3.id is null and tmi.shop_id = :1 and tmi.tenant_app_id = :2 and tmi.tenant_id = :3|62|115|4||0|0|16284460|503797|62|1|
|authorization_service|update user_login_token set status = :1 , update_time = now ( ) where employee_id = :2 and tenant_id = :3 and tenant_wx_app_id = :4 and shop_id = :5 and login_way = :6 and status = :7|58|350|10||0|0|185|7|0|0|
|tenant|select count ( * ) from tenant.sneak_guest_maintain where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and event_type = :4 and create_time between :5 and :6|50|116|4||0|0|3674653|101225|50|1|
|user_service|select count ( 0 ) from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id join user_service.user_employee t3 on t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id and t1.user_id = t3.user_id and t3.employee_id = :1 where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.shop_id = :4|39|50|3||0|0|21716959|753307|39|1|
|tenant|select count ( * ) from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.tenant_id = s.tenant_id and sg.tenant_app_id = s.tenant_app_id and sg.id = s.sneak_guest_id join tenant.employee e on e.tenant_id = s.tenant_id and e.id = s.employee_id where s.tenant_id = :1 and s.tenant_app_id = :2 and sg.create_shop_id = :3 and s.event_type = :4 and s.create_time between :5 and :6|27|49|3||0|0|369806|22303|27|1|
|tenant|select count ( 0 ) from erp_sales es where es.tenant_id = :1 and es.tenant_wechatapp_id = :2 and es.sales_date >= :3 and es.employee_erp_id = :4 and es.sales_status = :5|24|201|11||0|0|2361156|103599|24|1|
|user_service|select count ( 0 ) from ( select tm.user_id as id , tm.user_name as username , tm.head_img_url as headimgurl , tm.user_name as nickname , tm.mobile_no as mobile , tm.sex , if ( ifnull ( wu.is_subscribe , 0 ) = 0 , false , true ) as hassubscribe from user_service.tenant_member tm left join user_service.user_employee ue on tm.tenant_id = ue.tenant_id and tm.tenant_app_id = ue.tenant_wechatapp_id and tm.user_id = ue.user_id join user_service.tenant_member_info tmi on tmi.tenant_id = tm.tenant_id and tmi.id = tm.id join user_service.tenant_member_bind tmb on tmb.tenant_id = tm.tenant_id and tmb.tenant_app_id = tm.tenant_app_id and tmb.user_id = tm.user_id left join user_service.wx_user wu on wu.id = tmb.wx_user_id where tm.tenant_id = :1 and tm.tenant_app_id = :2 order by tm.id desc ) tmp_count|24|101|10||0|0|4894327|796640|24|1|
|tenant|select es.id , es.sales_no , es.sales_date , es.member_erp_id , es.sales_erp_id , es.is_sales from erp_sales es where es.tenant_id = :1 and es.tenant_wechatapp_id = :2 and es.sales_status = :3 and es.sales_no like concat ( :4 , :5 ) order by es.sales_date desc limit :6|20|67|12||0|0|1906951|471947|10|1|
|shop_work|select * from shop_work.work_report wr where exists ( select * from shop_work.task t where t.tenant_id = wr.tenant_id and t.task_group_id = wr.id and t.status = :1 and t.task_type = :2 ) and tenant_id = :3|15|42|3||0|0|4065030|271174|13273|888|
|employee|select tenant_id , tenant_app_id , employee_id , scene , shop_id , count ( * ) as record from backlog where tenant_app_id = :1 and employee_id = :2 and expire_time >= :3 and status in ( :4 , :5 ) group by tenant_id , tenant_app_id , employee_id , scene , shop_id|6|6|1||0|0|40371|14560|11|4|
|coupon_service|update coupon_service.coupon_write_off_log set state = :1 where coupon_id = :2|6|15|3||0|0|5672723|947733|0|0|
|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|6|10|2||0|0|706663|117780|186|31|
|corpwx|select id , tenant_id , cwx_user_id , user_id , union_id , name , create_time , update_time , sex , avatar , tenant_user_id , un_assign_flag , corp_user_id , wx_user_id from external_user where ( tenant_id = :1 and un_assign_flag = :2 and wx_user_id = :3 )|6|7|1||0|0|377765|130411|0|0|
|user_service|select count ( 0 ) from wx_user where ( wx_app_id = :1 and union_id is null )|5|35|10||0|0|59585|24458|5|1|
|user_service|select t1.user_id as userid , t1.user_name as username , t1.sex , t1.mobile_no as mobileno , t1.head_img_url as headimg from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id join user_service.user_employee t3 on t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id and t1.user_id = t3.user_id and t3.employee_id = :1 where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.shop_id = :4 order by t3.update_time desc limit :5 , :6|5|5|1||0|0|3260761|657691|50|10|
|user_service|select count ( * ) from user_service.tenant_member_info t where t.tenant_id = :1 and t.tenant_app_id = :2 and t.shop_id = :3|4|6|1||0|0|838528|360502|4|1|
|account|select id , tenant_id , tenant_wechatapp_id , shop_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|4|4|1||0|0|288576|72163|77|25|
|user_service|select t1.user_id as userid , t1.user_name as username , t1.sex , t1.mobile_no as mobileno , t1.head_img_url as headimg from user_service.tenant_member t1 join user_service.tenant_member_info t2 on t1.tenant_id = t2.tenant_id and t1.id = t2.id join user_service.user_employee t3 on t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id and t1.user_id = t3.user_id and t3.employee_id = :1 where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.shop_id = :4 order by t3.update_time desc limit :5|4|5|1||0|0|1547834|657551|40|10|
|corpwx|select id , tenant_id , cwx_user_id , user_id , union_id , name , create_time , update_time , sex , avatar , tenant_user_id , un_assign_flag , corp_user_id , wx_user_id from external_user where ( tenant_id = :1 and union_id = :2 )|3|4|1||0|0|391522|130519|0|0|
|wx_gateway|select count ( 0 ) from wx_template_msg where tenant_id = :1 and tenant_app_id = :2|3|4|1||0|0|24768|8262|3|1|
|item_manage|select id , tenant_id , `name` , `describe` , `type` , parent_id , employee_id , status , start_time , end_time , startup_time , submit_time , sub_num , sub_complete_num , delete_flag , dynamic_update_time , before_status from task where ( tenant_id = :1 and type = :2 and parent_id = :3 )|3|3|1||0|0|110821|37052|2|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 ,|3|7|3||0|0|1797732|721644|903|387|
|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 , ifnull ( ee.not_add_value_plan , 0 ) as not_add_value_plan 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 left join erp_sales_extend ee on es.tenant_wechatapp_id = ee.tenant_wechatapp_id and es.sales_erp_id = ee.sales_erp_id and esd.sales_index = ee.sales_index where es.sales_status = :1 and es.tenant_wechatapp_id = :2 and esd.product_barcode = :3 order by es.sales_date desc|3|4|1||0|0|26987|8999|5047|1683|
|corpwx|select id , tenant_id , cwx_user_id , user_id , union_id , name , create_time , update_time , sex , avatar , tenant_user_id , un_assign_flag , corp_user_id , wx_user_id from external_user where ( tenant_id = :1 and union_id 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 , ...|3|4|1||0|0|57420|32126|26|26|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.coupon_name like concat ( concat ( :4 , :5 ) , :6 ) ) tmp_count|2|5|2||0|0|78153|39337|2|1|
|user_service|select count ( 0 ) from user_service.tenant_member tm join user_service.tenant_member_info tmi on tm.tenant_id = tmi.tenant_id and tm.id = tmi.id left join user_service.tenant_member_bind tmb on tm.tenant_id = tmb.tenant_id and tm.id = tmb.id left join user_service.wx_user wu on tmb.wx_user_id = wu.id where tm.tenant_id = :1 and tm.tenant_app_id = :2 and tm.user_id not in ( :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|2|21|12||0|0|328325|164261|2|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|2|3|1||0|0|943580|471807|0|0|
|user_service|select ue.user_id as id , tm.user_name as username , tm.head_img_url as headimgurl , tm.user_name as nickname , tm.mobile_no as mobile , tm.sex from user_service.user_employee ue join user_service.tenant_member tm on tm.tenant_id = ue.tenant_id and tm.tenant_app_id = ue.tenant_wechatapp_id and tm.user_id = ue.user_id join user_service.tenant_member_info tmi on tmi.tenant_id = tm.tenant_id and tmi.id = tm.id where ue.employee_id = :1 and ue.tenant_id = :2 and ue.tenant_wechatapp_id = :3 and tmi.shop_id = :4 order by tm.id desc|2|2|1||0|0|1280380|640190|2750|2342|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 ,|2|5|3||0|0|999289|602776|608|437|
|warranty_service|select count ( 0 ) from warranty_service.warranty where tenant_wechatapp_id = :1 and is_disable = false|1|1|1||0|0|4015|4015|1|1|
|employee|update backlog_system set status = :1 , finish_time = now ( ) where tenant_app_id = :2 and scene = :3|1|1|1||0|0|170927|170927|0|0|
|sms|select ifnull ( sum ( t2.sms_size ) , 0 ) as amount from sms.sms_send t1 join sms.sms_report t2 on t1.biz_id = t2.biz_id where t1.tenant_app_id = :1 and t1.create_time between date_format ( :2 , :3 ) and date_format ( :4 , :5 ) and t1.code = :6|1|1|1||0|0|982|982|1|1|
|order|select od.id , od.order_no orderno , od.status , od.take_type taketype , od.create_time createtime , od.remark , od.total_fee totalfee , od.freight_fee freightfee , od.discount_fee discountfee , od.take_id takeid , od.payment_fee paymentfee , dt.product_id productid , dt.price , dt.quantity , dt.sku_id skuid , dt.art_no artno , dt.image_url imageurl , dt.product_name productname , dt.take_remark takeremark , dt.take_day takeday , od.product_fee productfee , od.finish_type finishtype , od.send_time sendtime , od.receive_time receivetime , od.finish_time finishtime , od.child_status childstatus , od.send_good_remark sendgoodremark , od.service_flag serviceflag , od.coupon_id couponid , od.tenant_wechatapp_id tenantappid , od.tenant_id tenantid , od.pay_id payid , od.user_id userid , od.user_name username , od.mobile_no buymobileno , od.activity_id , od.offline_payment_fee , od.activity_type , dt.spec , od.take_shop_id , od.take_shop_name , od.take_employee_user_id , od.take_employee_user_name from order_info od left join order_detail dt on od.id = dt.order_id where od.status = :1 and od.receive_time <= :2|1|1|1||0|0|118834|118834|555|555|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|157026|157026|32|32|
|user_service|select count ( * ) num from user_service.user_employee_alloc_log where tenant_id = :1 and tenant_wechatapp_id = :2 and alloc_employee_id = :3 and alloc_date_time between :4 and :5|1|1|1||0|0|1204|1204|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|477967|477967|112|112|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.template_id = :4 ) tmp_count|1|3|3||0|0|113623|113623|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|351003|351003|64|64|
|coupon_service|select * from coupon_service.coupon where datediff ( date_format ( end_time , :1 ) , date_format ( now ( ) , :2 ) ) = :3 and coupon_state in ( :4 )|1|12|12||0|0|2607208|2607208|918|918|
|tenant|select count ( 0 ) from tenant.sneak_guest_maintain s join tenant.sneak_guest sg on sg.tenant_id = s.tenant_id and sg.tenant_app_id = s.tenant_app_id and sg.id = s.sneak_guest_id join tenant.employee e on e.tenant_id = s.tenant_id and e.id = s.employee_id where s.tenant_id = :1 and s.tenant_app_id = :2 and sg.create_shop_id = :3 and s.event_type = :4 and s.create_time between :5 and :6|1|1|1||0|0|22259|22259|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 )|1|1|1||0|0|408965|408965|15|15|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|15924|15924|30|30|
|value_added|select count ( 0 ) from ( select t1.id , t2.sales_no as salesno , date_format ( t2.sales_date , '%y-%m-%d' ) as salesdate , date_format ( t1.start_add_time , '%y-%m-%d' ) as valueadddate , t2.dept_erp_id as shopid , t1.shop_name as shopname , t2.employee_erp_id as userid , t2.employee_name as username , t1.product_name as productname , t1.amount_pay as amountpay , t1.id as valueaddno , t1.amount_added as valueaddamount , t1.state , if ( t1.state = 2 , t1.coupon_user_id , null ) as valueaddcoupon , t1.user_id as memberuserid from value_added.value_added_user t1 join value_added.`value_added_user_extend` t2 on t1.id = t2.id where t1.tenant_wechatapp_id = :1 and exists ( select null from value_added.value_added_category t3 join value_added.value_added_template t4 on t3.template_id = t4.id and t4.is_disable = :2 where t1.tenant_wechatapp_id = t3.tenant_wechatapp_id and t2.category_erp_id = t3.erp_product_category_id ) and t1.state != :3 ) tmp_count|1|1|1||0|0|83460|83460|1|1|
|employee|select count ( 0 ) from employee.backlog bg where bg.tenant_app_id = :1 and bg.scene = :2 and bg.leave_flag = :3|1|1|1||0|0|41033|41033|1|1|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|1|1|1||0|0|10157|10157|10157|10157|
|mysql|delete from wx_gateway.wx_template_msg where create_time < date_sub ( now ( ) , interval :1 day )|1|44|44||0|0|1646923|1646923|0|0|
|value_added|-- 增值达到最大天数 select 'value_added_limit_contact' as limitdaytype , t.tenant_wechatapp_id as tenantappid , t.user_id as userid , min ( ue.employee_erp_id ) employee_erp_id , group_concat ( t.product_barcode order by product_barcode asc ) as productcode , group_concat ( t.product_name order by product_barcode asc ) as productname from value_added_user t inner join value_added_user_extend ue on t.id = ue.id where t.tenant_wechatapp_id = :1 and t.state = :2 and t.start_add_time >= date_add ( date_format ( :3 , :4 ) , interval :5 * ( t.add_days-1 ) day ) and t.start_add_time < date_add ( date_format ( :6 , :7 ) , interval ( :8 * ( t.add_days-1 ) :9 :10 ) day ) group by t.tenant_wechatapp_id , t.user_id|1|2|2||0|0|47348|47348|41|41|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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|1|1|1||0|0|213504|213504|248|248|
||delete from user_service.erp_member_info where tenant_id = :1|1|7|7||0|0|45578|45578|0|0|
|user_service|select * from user_employee where tenant_wechatapp_id = :1 and employee_id = :2|1|1|1||0|0|301501|301501|0|0|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.coupon_type = :4 and cu.create_time >= :5 and cu.create_time <= :6 ) tmp_count|1|2|2||0|0|37341|37341|1|1|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.coupon_name like concat ( concat ( :4 , :5 ) , :6 ) and cu.coupon_state = :7 ) tmp_count|1|3|3||0|0|38809|38809|1|1|
|corpwx|select id , tenant_id , cwx_user_id , user_id , union_id , name , create_time , update_time , sex , avatar , tenant_user_id , un_assign_flag , corp_user_id , wx_user_id from external_user where ( tenant_id = :1 and wx_user_id = :2 )|1|1|1||0|0|17778|17778|1|1|
|employee|update backlog set status = :1 , finish_time = now ( ) where tenant_app_id = :2 and employee_id = :3 and status in ( :4 , :5 ) and shop_id = :6|1|1|1||0|0|6197|6197|0|0|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|2|2||0|0|456324|456324|25|25|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 )|1|1|1||0|0|325739|325739|23|23|
|mysql|delete from message_push.message_log where create_time < date_sub ( now ( ) , interval :1 day )|1|33|33||0|0|1861869|1861869|0|0|
||delete from user_service.erp_member where tenant_id = :1|1|8|8||0|0|45581|45581|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|1|1||0|0|155014|155014|0|0|
|employee|select id , tenant_id , tenant_app_id , shop_id , employee_id , user_id , external_user_id , mobile_no , scene , status , begin_time , expire_time , create_time , update_time , directional_task_id , member_erp_id , finish_time , md5_str , tenant_open_id , data from backlog_system where ( tenant_app_id = :1 and scene = :2 and status = :3 and create_time between :4 and :5 )|1|1|1||0|0|90035|90035|330|330|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.coupon_type = :4 ) tmp_count|1|3|3||0|0|43767|43767|1|1|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.coupon_type = :4 and cu.coupon_state = :5 and cu.template_id = :6 ) tmp_count|1|3|3||0|0|112898|112898|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :3 , :4 , :5 , :6 , :7 , :8 )|1|1|1||0|0|174266|174266|6|6|
|warranty_service|select count ( 0 ) from warranty_service.warranty where tenant_wechatapp_id = :1 and is_disable = false and sales_date >= :2 and sales_date <= :3|1|5|5||0|0|54693|54693|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|194988|194988|65|65|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and cu.create_time >= :4 and cu.create_time <= :5 ) tmp_count|1|4|4||0|0|169572|169572|1|1|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|116552|116552|28|28|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :3 , :4 )|1|1|1||0|0|11768|11768|2|2|
|order|select od.id , od.order_no orderno , od.status , od.take_type taketype , od.create_time createtime , od.remark , od.total_fee totalfee , od.freight_fee freightfee , od.discount_fee discountfee , od.take_id takeid , od.payment_fee paymentfee , dt.product_id productid , dt.price , dt.quantity , dt.sku_id skuid , dt.art_no artno , dt.image_url imageurl , dt.product_name productname , dt.take_remark takeremark , dt.take_day takeday , od.product_fee productfee , ad.user_name receivename , ad.mobile_no mobileno , ad.shop_name shopname , ad.address , ad.express_no expressno , ad.express_company expresscompany , od.finish_type finishtype , od.send_time sendtime , od.receive_time receivetime , od.finish_time finishtime , od.child_status childstatus , od.send_good_remark sendgoodremark , od.service_flag serviceflag , od.coupon_id couponid , od.tenant_wechatapp_id tenantappid , od.tenant_id from order_info od left join order_detail dt on od.id = dt.order_id left join order_address ad on od.id = ad.order_id where od.status = :1 and od.send_time <= :2 and od.take_type = :3|1|1|1||0|0|118279|118279|0|0|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|257804|257804|96|96|
|employee|select bg.id , bg.employee_id , bg.shop_id , bg.scene , bg.status , bg.create_time , bg.begin_time , bg.expire_time , bg.member_user_name , bg.mobile_no member_mobile_no from employee.backlog bg where bg.tenant_app_id = :1 and bg.scene = :2 and bg.leave_flag = :3 order by id desc limit :4|1|15|15||0|0|3474760|3474760|0|0|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|2|2||0|0|563047|563047|94|94|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|168022|168022|47|47|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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|1|1|1||0|0|367100|367100|152|152|
|user_service|select tenant_id , id , tenant_app_id , user_id , shop_id , birthday , birthday_is_lunar , address , memorial_name , memorial_day , memorial_day_is_lunar , interest , grade_id , create_time , update_time from tenant_member_info where tenant_id = :1 and tenant_app_id = :2 and user_id in ( :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 ,|1|1|1||0|0|2639|2639|2639|2639|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|171124|171124|106|106|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|140467|140467|31|31|
|user_service|select tu.user_id , tm.shop_id , mb.erp_member_id membererpid , tu.mobile_no , tu.user_name , ue.employee_id , tm.grade_id from user_service.tenant_member tu inner join user_service.tenant_member_info tm on tu.tenant_id = tm.tenant_id and tu.id = tm.id inner join user_service.tenant_member_bind mb on tu.tenant_id = mb.tenant_id and tu.id = mb.id left join user_service.user_employee ue on tu.tenant_app_id = ue.tenant_wechatapp_id and tu.user_id = ue.user_id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and mb.erp_member_id in ( :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 )|1|1|1||0|0|313028|313028|58|58|
|coupon_service|select count ( 0 ) from ( select cu.id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.source as couponchannel , cu.coupon_state , ce.user_name , ce.creator_user_name as creatorname , if ( coupon_type in ( 'point' , 'interact_point' ) , cu.face_value , round ( cu.face_value/100 , 2 ) ) as facevalue , cu.begin_time , cu.end_time , ce.remark , ce.mobile_no , ce.creator_mobile_no , cu.create_time , wol.create_time as writeofftime , r.create_time as reservationdate , r.shop_name as reservationshopname , if ( wol.employee_id is null , wol.user_name , wol.employee_name ) writeoffusername , wol.shop_id as shopid , wol.dept_erp_id as erpdeptid , cu.user_id , ce.source_user_id , ce.source_user_type , cal.create_time as abolishtime , cal.employee_id as abolishemployeeid from coupon_service.coupon cu join coupon_service.coupon_extend ce on ce.id = cu.id left join coupon_service.coupon_write_off_log wol on wol.tenant_app_id = cu.tenant_app_id and wol.coupon_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.coupon_abolish_log cal on cal.tenant_id = cu.tenant_id and cal.tenant_app_id = cu.tenant_app_id and cal.coupon_id = cu.id where cu.tenant_app_id = :3 and ce.mobile_no = :4 ) tmp_count|1|3|3||0|0|72040|72040|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 , a.source_type 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|3|3||0|0|51803|51803|1|1|
|employee|select id , tenant_id , tenant_app_id , backlog_id , url , status , create_time , update_time from backlog_file where ( tenant_id = :1 and tenant_app_id = :2 and backlog_id in ( :3 , :4 , :5 , :6 , :7 , :8 ) and status = :9 )|1|1|1||0|0|214801|214801|0|0|
