-
@@ -60,12 +60,11 @@
dataType: "json",
data: {
"postName" : function() {
- return $.trim($("#postName").val());
+ return $.common.trim($("#postName").val());
}
},
dataFilter: function(data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
@@ -77,12 +76,11 @@
dataType: "json",
data: {
"postCode" : function() {
- return $.trim($("#postCode").val());
+ return $.common.trim($("#postCode").val());
}
},
dataFilter: function(data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
diff --git a/src/main/resources/templates/system/post/edit.html b/src/main/resources/templates/system/post/edit.html
index 0498c887..4ab53835 100644
--- a/src/main/resources/templates/system/post/edit.html
+++ b/src/main/resources/templates/system/post/edit.html
@@ -26,17 +26,17 @@
@@ -105,12 +105,11 @@
dataType: "json",
data: {
name : function() {
- return $.trim($("#loginName").val());
+ return $.common.trim($("#loginName").val());
}
},
dataFilter: function(data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
@@ -134,12 +133,11 @@
dataType: "json",
data: {
name: function () {
- return $.trim($("#email").val());
+ return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
@@ -152,12 +150,11 @@
dataType: "json",
data: {
name: function () {
- return $.trim($("#phonenumber").val());
+ return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
diff --git a/src/main/resources/templates/system/user/edit.html b/src/main/resources/templates/system/user/edit.html
index a3afe15a..fdd76a90 100644
--- a/src/main/resources/templates/system/user/edit.html
+++ b/src/main/resources/templates/system/user/edit.html
@@ -42,7 +42,7 @@
@@ -105,15 +105,14 @@
dataType: "json",
data: {
"userId": function() {
- return $("input[name='userId']").val();
+ return $("#userId").val();
},
"email": function() {
- return $("input[name='email']").val();
+ return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
@@ -126,15 +125,14 @@
dataType: "json",
data: {
"userId": function() {
- return $("input[name='userId']").val();
+ return $("#userId").val();
},
"phonenumber": function() {
- return $("input[name='phonenumber']").val();
+ return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
- if (data == "0") return true;
- else return false;
+ return $.validate.unique(data);
}
}
},
diff --git a/src/main/resources/templates/system/user/profile/edit.html b/src/main/resources/templates/system/user/profile/edit.html
index 137d8830..cb07bfbd 100644
--- a/src/main/resources/templates/system/user/profile/edit.html
+++ b/src/main/resources/templates/system/user/profile/edit.html
@@ -39,11 +39,11 @@
diff --git a/src/main/resources/templates/vm/java/Controller.java.vm b/src/main/resources/templates/vm/java/Controller.java.vm
index 5d37a948..ac8fe2c6 100644
--- a/src/main/resources/templates/vm/java/Controller.java.vm
+++ b/src/main/resources/templates/vm/java/Controller.java.vm
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.constant.BusinessType;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import ${package}.domain.${className};
import ${package}.service.I${className}Service;
import com.ruoyi.framework.web.controller.BaseController;
@@ -66,7 +66,7 @@ public class ${className}Controller extends BaseController
* 新增保存${tableComment}
*/
@RequiresPermissions("${moduleName}:${classname}:add")
- @Log(title = "${tableComment}", action = BusinessType.INSERT)
+ @Log(title = "${tableComment}", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(${className} ${classname})
@@ -89,7 +89,7 @@ public class ${className}Controller extends BaseController
* 修改保存${tableComment}
*/
@RequiresPermissions("${moduleName}:${classname}:edit")
- @Log(title = "${tableComment}", action = BusinessType.UPDATE)
+ @Log(title = "${tableComment}", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(${className} ${classname})
@@ -101,7 +101,7 @@ public class ${className}Controller extends BaseController
* 删除${tableComment}
*/
@RequiresPermissions("${moduleName}:${classname}:remove")
- @Log(title = "${tableComment}", action = BusinessType.DELETE)
+ @Log(title = "${tableComment}", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)