-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path74.js
1 lines (1 loc) · 3.19 KB
/
74.js
1
webpackJsonp([74],{364:function(e,t,a){"use strict";function r(e){a(894)}Object.defineProperty(t,"__esModule",{value:!0});var n=a(586),s=a(801),i=a(73),l=r,o=i(n.a,s.a,!1,l,"data-v-782eacf0",null);t.default=o.exports},586:function(e,t,a){"use strict";t.a={name:"SqlMybatisLogAnalysis",data:function(){return{before_placeholder:"转换前的log;\n\n2021-08-13 22:33:32.666 DEBUG 15984 --- [nio-8080-exec-8] c.g.b.mapper.TbUserMapper.selectPage : ==> Preparing: SELECT COUNT(1) FROM tb_user\n2021-08-13 22:33:32.666 DEBUG 15984 --- [nio-8080-exec-8] c.g.b.mapper.TbUserMapper.selectPage : ==> Parameters:\n2021-08-13 22:33:32.667 DEBUG 15984 --- [nio-8080-exec-8] c.g.b.mapper.TbUserMapper.selectPage : ==> Preparing: SELECT id,username,password,state,phone,email,createtime,updatetime,last_login_time FROM tb_user LIMIT ?,?\n2021-08-13 22:33:32.667 DEBUG 15984 --- [nio-8080-exec-8] c.g.b.mapper.TbUserMapper.selectPage : ==> Parameters: 0(Long), 10(Long)\n2021-08-13 22:33:32.668 DEBUG 15984 --- [nio-8080-exec-8] c.g.b.mapper.TbUserMapper.selectPage : <== Total: 1",after_placeholder:"转换后的SQL;\n\nSELECT COUNT(1) FROM tb_user ;\n\nSELECT id,username,password,state,phone,email,createtime,updatetime,last_login_time FROM tb_user LIMIT 0,10 ;",before_textarea:"",after_textarea:""}},methods:{clear:function(){this.before_textarea="",this.after_textarea=""},transformation:function(){this.after_textarea="";for(var e=this.before_textarea,t=[];e.lastIndexOf("Preparing: ")>-1;)t.unshift(e.substring(e.lastIndexOf("Preparing: "))),e=e.substring(0,e.lastIndexOf("Preparing: "));for(var a=0;a<t.length;a++)this.parseSql(t[a])},parseSql:function(e){for(var t=e.indexOf("Preparing: "),a=e.length-1,r=t;r<e.length;r++)if("\n"===e[r]){a=r;break}for(var n=e.substring(t+"Preparing: ".length,a),s=e.indexOf("Parameters: "),i=e.length-1,l=s;l<e.length;l++)if("\n"===e[l]){i=l;break}var o=e.substring(s+"Parameters: ".length,i+1);o=o.split(",");for(var p=0;p<o.length;p++){var c=o[p].substring(0,o[p].lastIndexOf("(")),f=o[p].substring(o[p].lastIndexOf("(")+1,o[p].lastIndexOf(")"));n="String"===f||"Timestamp"===f||"Date"===f?n.replace("?","'"+c.trim()+"'"):n.replace("?",c.trim())}this.after_textarea+="\n\n"+n+";"}}}},697:function(e,t,a){t=e.exports=a(7)(void 0),t.push([e.i,".my-btn[data-v-782eacf0]{text-align:center;padding:15px}",""])},801:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-input",{attrs:{rows:10,type:"textarea",placeholder:e.before_placeholder},model:{value:e.before_textarea,callback:function(t){e.before_textarea=t},expression:"before_textarea"}}),e._v(" "),a("div",{staticClass:"my-btn"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.transformation}},[e._v("转换")]),e._v(" "),a("el-button",{attrs:{size:"small",type:"danger"},on:{click:e.clear}},[e._v("清空")])],1),e._v(" "),a("el-input",{attrs:{rows:10,type:"textarea",placeholder:e.after_placeholder},model:{value:e.after_textarea,callback:function(t){e.after_textarea=t},expression:"after_textarea"}})],1)},n=[],s={render:r,staticRenderFns:n};t.a=s},894:function(e,t,a){var r=a(697);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);a(74)("69be9c3e",r,!0,{})}});