diff --git a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java index bfc425b8e1..c9df95100b 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java @@ -177,7 +177,7 @@ public class LoginController { content = null; // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 System.out.println(tmpStr.equals(signature.toUpperCase())); - return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; + return tmpStr != null && tmpStr.equals(signature.toUpperCase()); } /** @@ -225,7 +225,7 @@ public class LoginController { if (echostr == null || echostr.isEmpty()) { return nonce; } - if (this.checkSignature(signature, timestamp, nonce)) { + if (checkSignature(signature, timestamp, nonce)) { return echostr; } return nonce; diff --git a/epmet-auth/src/main/java/com/epmet/controller/WxController.java b/epmet-auth/src/main/java/com/epmet/controller/WxController.java index 3ea0b091a5..857e0ecc9d 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/WxController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/WxController.java @@ -84,7 +84,7 @@ public class WxController { content = null; // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 System.out.println(tmpStr.equals(signature.toUpperCase())); - return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; + return tmpStr != null && tmpStr.equals(signature.toUpperCase()); } /** @@ -132,7 +132,7 @@ public class WxController { if (echostr == null || echostr.isEmpty()) { return nonce; } - if (this.checkSignature(signature, timestamp, nonce)) { + if (checkSignature(signature, timestamp, nonce)) { return echostr; } return nonce; diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java index cbb68142ee..115009f9e9 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java @@ -60,10 +60,6 @@ public class CaptchaServiceImpl implements CaptchaService { String captcha = captchaRedis.get(uuid); //验证码是否正确 - if(code.equalsIgnoreCase(captcha)){ - return true; - } - - return false; + return code.equalsIgnoreCase(captcha); } } diff --git a/epmet-cloud-generator/src/main/resources/static/js/common.js b/epmet-cloud-generator/src/main/resources/static/js/common.js index 2594d4ca32..9ea9a4ca98 100644 --- a/epmet-cloud-generator/src/main/resources/static/js/common.js +++ b/epmet-cloud-generator/src/main/resources/static/js/common.js @@ -40,7 +40,7 @@ window.alert = function(msg, callback){ callback("ok"); } }); -} +}; //重写confirm式样框 window.confirm = function(msg, callback){ @@ -50,7 +50,7 @@ window.confirm = function(msg, callback){ callback("ok"); } }); -} +}; //选择一条记录 function getSelectedRow() { @@ -60,13 +60,13 @@ function getSelectedRow() { alert("请选择一条记录"); return ; } - + var selectedIDs = grid.getGridParam("selarrrow"); if(selectedIDs.length > 1){ alert("只能选择一条记录"); return ; } - + return selectedIDs[0]; } @@ -78,6 +78,6 @@ function getSelectedRows() { alert("请选择一条记录"); return ; } - + return grid.getGridParam("selarrrow"); -} \ No newline at end of file +} diff --git a/epmet-cloud-generator/src/main/resources/static/libs/router.js b/epmet-cloud-generator/src/main/resources/static/libs/router.js index 57ff6efa05..d5b33611aa 100644 --- a/epmet-cloud-generator/src/main/resources/static/libs/router.js +++ b/epmet-cloud-generator/src/main/resources/static/libs/router.js @@ -69,7 +69,7 @@ cb.apply(self, arr); } else { - self.index && self.go(self.index); + self.index && self.go(self.index); } }; @@ -80,7 +80,7 @@ var self = this; self.reload(); - } + }; /** * 获取callback @@ -89,9 +89,9 @@ function getCb(addr, hashList) { for(var key in hashList) { if(key == addr) { - return hashList[key] + return hashList[key] } } return false; } -})(); \ No newline at end of file +})(); diff --git a/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm b/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm index 154ff11b6d..435224d75b 100644 --- a/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm +++ b/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm @@ -22,9 +22,9 @@ export default { data () { return { visible: false, - dataForm: { + dataForm: {; #foreach($column in $columns) - ${column.attrname}: ''#if($velocityCount != $columns.size()),#end + ${column.attrname}: ''#if($velocityCount != $columns.size()),;#end #end } @@ -32,12 +32,12 @@ export default { }, computed: { dataRule () { - return { + return {; #foreach($column in $columns) #if($column.columnName != $pk.columnName) ${column.attrname}: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ]#if($velocityCount != $columns.size()),#end + ]#if($velocityCount != $columns.size()),;#end #end #end @@ -46,19 +46,19 @@ export default { }, methods: { init () { - this.visible = true + this.visible = true; this.$nextTick(() => { this.$refs['dataForm'].resetFields() - if (this.dataForm.${pk.attrname}) { + if (this.dataForm.${pk.attrname}); { this.getInfo() } }) }, // 获取信息 getInfo () { - #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`).then(({ data: res }) => { + #[[this.$http.get(]];#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`;).then(({ data: res }) => { if (res.code !== 0) { - #[[return this.$message.error(res.msg)]]# + #[[;return this.$message.error(res.msg);]]# } this.dataForm = { ...this.dataForm, @@ -69,19 +69,19 @@ export default { // 表单提交 dataFormSubmitHandle: debounce(function () { #[[this.$refs['dataForm'].validate((valid) => {]]# - if (!valid) { + if (!valid); { return false } - #[[this.$http]]#[!this.dataForm.${pk.attrname} ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => { + #[[this.$http]];#[!this.dataForm.$;{pk.attrname} ? 'post' : 'put';]('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { - #[[return this.$message.error(res.msg)]]# + #[[;return this.$message.error(res.msg);]]# } - this.$message({ - #[[message: this.$t('prompt.success'),]]# - type: 'success', - duration: 500, - onClose: () => { - this.visible = false + this.$message({; + #[[message;: this.$t('prompt.success'),;]]# + type;: 'success', + duration;: 500, + onClose;: () => { + this.visible = false; this.$emit('refreshDataList') } }) diff --git a/epmet-cloud-generator/src/main/resources/template/index.vue.vm b/epmet-cloud-generator/src/main/resources/template/index.vue.vm index 2a4c8ba292..f2cb7597fd 100644 --- a/epmet-cloud-generator/src/main/resources/template/index.vue.vm +++ b/epmet-cloud-generator/src/main/resources/template/index.vue.vm @@ -55,7 +55,7 @@ export default { deleteURL: '/${moduleName}/${pathName}', deleteIsBatch: true }, - dataForm: { + dataForm: {; ${pk.attrname}: '' } } diff --git a/epmet-cloud-generator/src/main/resources/views/index.html b/epmet-cloud-generator/src/main/resources/views/index.html index 7a329f867b..39b6a1833d 100644 --- a/epmet-cloud-generator/src/main/resources/views/index.html +++ b/epmet-cloud-generator/src/main/resources/views/index.html @@ -40,7 +40,7 @@