|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 0.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 0.00 , update_time = :27|1|9|9||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user_service.user user on tenantuser.user_id = user.id where ( tenantuser.tenant_id = :1 and tenantuser.tenant_app_id = :2 and tenantuser.user_id not in ( :3 ) )|1|6|6||0|0|139663|139663|1|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 ) and ( user.nick_name like concat ( :116 , :117 , :118 ) or tenantuser.mobile_no = :119 ) )|1|1|1||0|0|9636|9636|1|1|
|user_service|select tu.user_id as userid , tu.mobile_no as mobileno , tu.user_name as username , u.nick_name as nickname , u.head_img_url as headimgurl from tenant_user tu join `user` u on tu.user_id = u.id where tu.tenant_app_id = :1 and ( tu.mobile_no = :2 or u.nick_name like concat ( :3 , :4 ) or tu.user_name like concat ( :5 , :6 ) )|1|2|2||0|0|12302|12302|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|1|5|5||0|0|18790|18790|1236|1236|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 16528.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 16528.00 , update_time = :27|1|3|3||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|2|2||0|0|169263|169263|0|0|
|employee|update backlog set employee_id = :1 , user_id = :2 where ( employee_id = :3 and tenant_app_id = :4 and status in ( :5 , :6 ) )|1|2|2||0|0|28809|28809|0|0|
|message_push|delete from message_log where create_time < :1|1|17|17||0|0|209717|209717|0|0|
|user_service|select * from erp_integral_log where tenant_id = :1 and update_time >= :2 and update_time <= :3 order by tenant_wechatapp_id , member_erp_id|1|5|5||0|0|86398|86398|12856|12856|
|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|1|1|1||0|0|51892|51892|1|1|
|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|631370|631370|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 ) and ( user.nick_name like concat ( :66 , :67 , :68 ) or tenantuser.mobile_no = :69 ) )|1|2|2||0|0|103870|103870|1|1|
|warranty_service|select count ( 0 ) from warranty_service.warranty where tenant_wechatapp_id = :1 and is_disable = false and dept_erp_id = :2 and employee_erp_id = :3 and sales_date >= :4 and sales_date <= :5 and employee_erp_id in ( :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 , :345 , :346 , :347 , :348 , :349 , :350 , :351 , :352 , :353 , :354 , :355 , :356 , :357 , :358 , :359 , :360 , :361 , :362 , :363 , :364 , :365 , :366 , :367 , :368 , :369 , :370 , :371 , :372 , :373 , :374 , :375 , :376 , :377 , :378 , :379 , :380 , :381 , :382 , :383 , :384 , :385 , :386 , :387 , :388 , :389 , :390 , :391 , :392 , :393 , :394 , :395 , :396 , :397 , :398 , :399 , :400 , :401 , :402 , :403 , :404 , :405 , :406 , :407 , :408 , :409 , :410 , :411 , :412 , :413 , :414 , :415 , :416 , :417 , :418 , :419 , :420 , :421 , :422 , :423 , :424 , :425 , :426 , :427 , :428 , :429 , :430 , :431 , :432 , :433 , :434 , :435 , :436 , :437 , :438 , :439 , :440 , :441 , :442 , :443 , :444 , :445 , :446 , :447 , :448 , :449 , :450 , :451 , :452 , :453 , :454 , :455 , :456 , :457 , :458 , :459 , :460 , :461 , :462 , :463 , :464 , :465 , :466 , :467 , :468 , :469 , :470 , :471 , :472 , :473 , :474 , :475 , :476 , :477 , :478 , :479 , :480 )|1|5|5||0|0|28545|28545|1|1|
|activity_service|select assist_task_activity_id as id , count ( distinct user_id ) as partakenum , sum ( if ( partake_type = 'appoint' and status = :1 , :2 , :3 ) ) as appointnum , sum ( if ( partake_type = :4 , :5 , :6 ) ) as applynum , sum ( if ( partake_type = :7 and status >= :8 , :9 , :10 ) ) as finishnum from assist_task_user where assist_task_activity_id in ( :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 ) group by assist_task_activity_id|1|2|2||0|0|374407|374407|18|18|
|coupon_service|select count ( 0 ) from coupon_service.coupon_user cu left join coupon_service.write_off_log wol on wol.coupon_user_id = cu.id left join coupon_service.reservation r on r.coupon_user_id = cu.id and state = :1 left join coupon_service.grant_info gi on gi.coupon_user_id = cu.id where cu.tenant_wechatapp_id = :2 and cu.coupon_state = :3 and cu.create_time >= :4 and cu.create_time <= :5 and cu.coupon_template_id = :6 and cu.create_channel = :7|1|1|1||0|0|75415|75415|1|1|
|user_service|insert into erp_member_info ( id , tenant_id , tenant_wechatapp_id , erp_member_id , mobile_no , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , create_time , update_time ) values ( null , :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , 5499.00 , :14 , :15 ) on duplicate key update erp_member_id = :16 , mobile_no = :17 , user_name = :18 , sex = :19 , birthday = :20 , birthday_is_lunar = :21 , home_address = :22 , memorialday = :23 , memorialday_name = :24 , memorialday_is_lunar = :25 , interested = :26 , amount = 5499.00 , update_time = :27|1|12|12||0|0|0|0|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|2|2||0|0|66068|66068|1|1|
|user_service|select t.id , t.tenant_app_id , t.user_id , t.erp_member_id from tenant_user t where t.tenant_app_id = :1 and t.shop_id = :2 and t.mobile_no is not null and t.mobile_no != :3 order by id asc limit :4 , :5|1|8|8||0|0|2665613|2665613|2541|2541|
||commit|1|1|1||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where user_id != :1 and tenant_app_id = :2|1|2|2||0|0|112253|112253|1|1|
||load data local infile 'import_data/914339923195113472_20190828151734_1_member.csv' replace into table user_service.erp_member_info character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , erp_member_id , @employee_erp_id , @grade_erp_id , @card_no , @dept_erp_id , mobile_no , @consumption_integral , user_name , sex , birthday , birthday_is_lunar , home_address , memorialday , memorialday_name , memorialday_is_lunar , interested , amount , erp_create_time , @status ) set update_time = now ( )|1|12|12||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 ) and ( user.nick_name like concat ( :88 , :89 , :90 ) or tenantuser.mobile_no = :91 ) )|1|6|6||0|0|106894|106894|1|1|
|platform|select * from ( select * from coupondetail where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and expirytime >= now ( ) ) as tv limit :4 , :5|1|2|2||0|0|318771|318771|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|1|5|5||0|0|28545|28545|1|1|
|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 `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|4|4||0|0|120774|120774|0|0|
||load data local infile 'import_data/914339923195113472_20190828151734_1_member.csv' replace into table user_service.erp_member character set utf8mb4 fields terminated by :1 lines starting by :2 ( tenant_id , tenant_wechatapp_id , member_erp_id , employee_erp_id , grade_erp_id , card_no , dept_erp_id , mobile_no , consumption_integral , user_name , @sex , @birthday , @birthday_is_lunar , @home_address , @memorialday , @memorialday_name , @memorialday_is_lunar , @interested , @amount , erp_create_time , status ) set update_time = now ( )|1|16|16||0|0|0|0|0|0|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , create_time , update_time , receive_data , response_data from customer_face_sync_message where status = :1 and create_time < date_add ( now ( ) , interval :2 minute ) order by id asc limit :3|2|3|2||0|0|131011|67452|2|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user_service.user user on tenantuser.user_id = user.id where ( tenantuser.tenant_id = :1 and tenantuser.tenant_app_id = :2 and tenantuser.user_id not in ( :3 , :4 , :5 ) )|2|15|9||0|0|423928|211969|2|1|
|coupon_service|select count ( 0 ) from coupon_service.coupon_user cu left join coupon_service.write_off_log wol on wol.coupon_user_id = cu.id left join coupon_service.reservation r on r.coupon_user_id = cu.id and state = :1 left join coupon_service.grant_info gi on gi.coupon_user_id = cu.id where cu.tenant_wechatapp_id = :2|2|30|15||0|0|140933|70580|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 , :345 , :346 , :347 , :348 , :349 , :350 , :351 , :352 , :353 , :354 , :355 , :356 , :357 , :358 , :359 , :360 , :361 , :362 , :363 , :364 , :365 , :366 , :367 , :368 , :369 , :370 , :371 , :372 , :373 , :374 , :375 , :376 , :377 , :378 , :379 , :380 , :381 , :382 , :383 , :384 , :385 , :386 , :387 , :388 , :389 , :390 , :391 , :392 , :393 , :394 , :395 , :396 , :397 , :398 , :399 , :400 , :401 , :402 , :403 , :404 , :405 , :406 , :407 , :408 , :409 , :410 , :411 , :412 , :413 , :414 , :415 , :416 , :417 , :418 , :419 , :420 , :421 , :422 , :423 , :424 , :425 , :426 , :427 , :428 , :429 , :430 , :431 , :432 , :433 , :434 , :435 , :436 , :437 , :438 , :439 , :440 , :441 , :442 , :443 , :444 , :445 , :446 , :447 , :448 , :449 , :450 , :451 , :452 , :453 , :454 , :455 , :456 , :457 , :458 , :459 , :460 , :461 , :462 , :463 , :464 , :465 , :466 , :467 , :468 , :469 , :470 , :471 , :472 , :473 , :474 , :475 , :476 ) and ( user.nick_name like concat ( :477 , :478 , :479 ) or tenantuser.mobile_no = :480 ) )|2|19|11||0|0|304168|152109|2|1|
|user_service|select count ( 0 ) from ( select t1.erp_member_id as membererpid , t2.head_img_url as headimgurl , t2.nick_name as nickname , t1.mobile_no as mobileno , date_format ( t1.bind_time , '%y-%m-%d%h:%i:%s' ) as registertime from tenant_user t1 join `user` t2 on t1.user_id = t2.id left join user_employee t3 on t1.user_id = t3.user_id and t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id where t3.id is null and t1.mobile_no is not null and t1.mobile_no != :1 and t1.erp_member_id is not null and t1.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4 ) table_count|3|7|3||0|0|121746|60016|3|1|
|warranty_service|select count ( 0 ) from warranty_service.warranty where tenant_wechatapp_id = :1 and is_disable = false and dept_erp_id = :2 and employee_erp_id = :3 and sales_date >= :4 and sales_date <= :5 and employee_erp_id in ( :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 )|3|11|4||0|0|54619|18207|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|6|3||0|0|91000|62545|55|49|
|user_service|select id , plat_unionid , plat_openid , user_name , mobile_no , nick_name , sex , head_img_url , country , province , city , status , create_time , update_time , is_subscribe , subscribe_time from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 ) limit :8|3|7|2||0|0|8055519|2685180|5|2|
|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|3|6|3||0|0|616542|279465|1|1|
|gift_mail|select count ( 0 ) from ( select t.* , tt.can_take_date , tt.shop_name , tt.take_shop_name , tt.take_employee_name , ta.recipients , ta.user_tel , concat ( ta.area , ta.address ) address , if ( t.trade_type = 3 , pl.id , it.barcode ) as barcode , if ( t.trade_type = 3 or t.trade_type = :1 , pl.default_image_url , p.default_image_url ) as defaultimageurl from trade t left outer join trade_take tt on tt.trade_id = t.id left outer join trade_addr ta on ta.trade_id = t.id left outer join product p on p.id = t.product_id left outer join platform_product pl on pl.id = t.product_id left outer join inventory it on it.product_id = t.product_id and it.specification = t.specification where ( t.tenant_wechatapp_id = :2 ) order by create_time desc ) tmp_count|5|13|3||0|0|81476|16970|5|1|
|user_service|select tenantuser.* , user.nick_name from tenant_user tenantuser join user_service.user user on tenantuser.user_id = user.id where ( tenantuser.tenant_id = :1 and tenantuser.tenant_app_id = :2 and ( tenantuser.user_name like concat ( :3 , :4 , :5 ) or user.nick_name like concat ( :6 , :7 , :8 ) or tenantuser.mobile_no = :9 ) and tenantuser.user_id not in ( :10 , :11 , :12 ) ) order by tenantuser.user_id asc limit :13|5|41|11||0|0|8740909|2877630|26|8|
|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|5|6|2||0|0|1300|1283|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|7|7|1||0|0|89848|12952|137|20|
|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|7|13|2||0|0|1392782|199073|7|1|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|7|17|3||0|0|2231397|318771|7|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 limit :3|7|26|6||0|0|147356|29793|140|20|
|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|8|23|6||0|0|442039|147771|8|1|
|employee|select * from backlog where tenant_app_id = :1 and user_id = :2 and status in ( :3 , :4 ) and scene = :5 and expire_time >= :6 order by create_time desc limit :7|10|37|6||0|0|1190970|119097|13|3|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|10|14|2||0|0|2437392|243754|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 )|11|15|2||0|0|6946467|631497|8|7|
|customer|select count ( 0 ) from customer_face_pass t where :1 = :2 and t.is_checkin = :3 and t.shop_id = :4 and t.person_type not in ( :5 )|13|78|14||0|0|932966|183567|13|1|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|13|21|2||0|0|299276|38383|13|1|
|user_service|select count ( 0 ) from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 )|14|30|7||0|0|37592430|2685180|14|1|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|29|58|4||0|0|1264799|109233|29|1|
|authorization_service|update user_login_token set status = :1 where user_id = :2 and tenant_id = :3 and tenant_wx_app_id = :4 and login_way = :5|51|126|7||0|0|11455|662|0|0|
