较多改动,暂存
This commit is contained in:
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.cxyxiaomo.epp.PageTable.enums.AddType;
|
||||
import com.cxyxiaomo.epp.PageTable.enums.EditType;
|
||||
import com.cxyxiaomo.epp.PageTable.enums.FieldType;
|
||||
import com.cxyxiaomo.epp.PageTable.enums.SearchType;
|
||||
import com.cxyxiaomo.epp.PageTable.query.PageQuery;
|
||||
import com.cxyxiaomo.epp.PageTable.utils.FieldBuilder;
|
||||
@@ -19,10 +20,10 @@ import com.cxyxiaomo.epp.user.service.UserService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@@ -33,10 +34,10 @@ import java.util.List;
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private RoleService roleService;
|
||||
|
||||
/**
|
||||
@@ -101,7 +102,7 @@ public class UserController {
|
||||
// 指定前端表格显示列
|
||||
JSONArray columns = FieldBuilder.create()
|
||||
.add("username", "username", "账号", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.CAN_NOT_EDIT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.CAN_NOT_EDIT,
|
||||
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
|
||||
"用户名", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -110,7 +111,7 @@ public class UserController {
|
||||
"DPD @word(2, 10)"
|
||||
)
|
||||
.add("password", "password", "密码", "",
|
||||
false, SearchType.CAN_NOT_SEARCH, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.HIDDEN, SearchType.CAN_NOT_SEARCH, AddType.INPUT, EditType.INPUT,
|
||||
null,
|
||||
"必填", "若不修改则留空",
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -118,7 +119,7 @@ public class UserController {
|
||||
"DPD @word(2, 10)"
|
||||
)
|
||||
.add("roleId", "roleName", "角色", "",
|
||||
true, SearchType.SELECT, AddType.SELECT, EditType.SELECT,
|
||||
FieldType.TEXT, SearchType.SELECT, AddType.SELECT, EditType.SELECT,
|
||||
"用户角色",
|
||||
"用户的角色", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -126,7 +127,7 @@ public class UserController {
|
||||
"DPD @pick([\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"])"
|
||||
)
|
||||
.add("realname", "realname", "真实姓名", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
|
||||
"用户的真实姓名", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -135,7 +136,7 @@ public class UserController {
|
||||
"DPD @cword(2, 8)"
|
||||
)
|
||||
.add("phoneNumber", "phoneNumber", "电话", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
"电话号码",
|
||||
"支持11位手机号码、区号-7/8位座机号码", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -144,7 +145,7 @@ public class UserController {
|
||||
"DTD /^(1[3-9]\\d{9})$|^(0\\d{2,3}-?\\d{7,8})$/"
|
||||
)
|
||||
.add("idNumber", "idNumber", "身份证号", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
|
||||
"支持15位、18位数字、17位数字+X格式", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -155,7 +156,7 @@ public class UserController {
|
||||
"DTD /^(\\d{15})$|^(\\d{18})$|^(\\d{17}(\\d|X|x))$/"
|
||||
)
|
||||
.add("buildingId", "buildingId", "门栋单元", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
|
||||
"门栋及单元号,例如:11-05(11栋05单元)", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
@@ -163,7 +164,7 @@ public class UserController {
|
||||
"DTD /^\\d{2}-\\d{2}$/"
|
||||
)
|
||||
.add("doorplate", "doorplate", "门牌号", "",
|
||||
true, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldType.TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
|
||||
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
|
||||
"门牌号,例如:2003(20楼03户)", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
|
||||
FieldRuleListBuilder.create()
|
||||
|
Reference in New Issue
Block a user