交叉备份

master
王兵 4 years ago
parent 9081ed177a
commit 0ac23a1b35

@ -49,6 +49,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.Locale;
/**
* ControllerController
* htm{@link GlobalController#page(Model, HttpServletRequest, HttpServletResponse)}

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -70,7 +71,15 @@ public class DeptAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Dept.class).read(file.getBytes(), new WExcel.Processor<Dept>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Dept.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Dept>() {
@Override
public List<String> exec(Dept o, int index) {
DeptCreateRequest request = MapperUtil.map(o, DeptCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -70,7 +71,15 @@ public class DictAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Dict.class).read(file.getBytes(), new WExcel.Processor<Dict>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Dict.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Dict>() {
@Override
public List<String> exec(Dict o, int index) {
DictCreateRequest request = MapperUtil.map(o, DictCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -64,7 +65,15 @@ public class DictItemAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(DictItem.class).read(file.getBytes(), new WExcel.Processor<DictItem>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(DictItem.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<DictItem>() {
@Override
public List<String> exec(DictItem o, int index) {
DictItemCreateRequest request = MapperUtil.map(o, DictItemCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
@ -64,7 +65,15 @@ public class FileAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(File.class).read(file.getBytes(), new WExcel.Processor<File>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(File.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<File>() {
@Override
public List<String> exec(File o, int index) {
FileCreateRequest request = MapperUtil.map(o, FileCreateRequest.class);

@ -1,17 +1,7 @@
package ${domain}.action.ajax.wsys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.utils.MapperUtil;
import ${domain}.frame.utils.ResponseUtil;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.module.wsys.ent.Logerr;
import ${domain}.module.wsys.mgr.LogerrManager;
import ${domain}.module.wsys.req.LogerrCreateRequest;
import ${domain}.module.wsys.req.LogerrDeleteRequest;
@ -22,9 +12,6 @@ import ${domain}.module.wsys.rsp.LogerrDeleteResponse;
import ${domain}.module.wsys.rsp.LogerrFindResponse;
import ${domain}.module.wsys.rsp.LogerrUpdateResponse;
import java.io.IOException;
import java.util.List;
public class LogerrAjax {
@Autowired
@ -45,45 +32,4 @@ public class LogerrAjax {
public LogerrFindResponse find(LogerrFindRequest request) {
return logerrManager.find(request, LocalData.getToken());
}
public Object template(){
return ResponseUtil.apply(new WExcel<>(Logerr.class));
}
public Object exports(LogerrFindRequest request) {
LogerrFindResponse response = logerrManager.find(request, LocalData.getToken());
if (response.hasError()) {
return response;
} else if (response.getTotalCount() == 0) {
response.addError(ErrorType.BUSINESS_ERROR, "导出数据为空");
return response;
}
return ResponseUtil.apply(new WExcel<>(Logerr.class).addDatas(response.getResult()));
}
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Logerr.class).read(file.getBytes(), new WExcel.Processor<Logerr>() {
@Override
public List<String> exec(Logerr o, int index) {
LogerrCreateRequest request = MapperUtil.map(o, LogerrCreateRequest.class);
return ValidationUtil.validate(request);
}
});
if (sheet.hasError()) {
return ResponseUtil.apply(sheet.getBytes(), sheet.getName() + "-检查.xlsx");
} else {
return baseResponse;
}
} catch (IOException e) {
e.printStackTrace();
LogUtil.dumpException(e);
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件出错");
} catch (TemplateNotMatchException e) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, e.getMessage());
}
return baseResponse;
}
}

@ -1,16 +1,17 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.utils.MapperUtil;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.utils.ResponseUtil;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.module.wsys.ent.Profiles;
import ${domain}.module.wsys.mgr.ProfilesManager;
import ${domain}.module.wsys.req.ProfilesCreateRequest;
@ -64,7 +65,15 @@ public class ProfilesAjax{
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Profiles.class).read(file.getBytes(), new WExcel.Processor<Profiles>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Profiles.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Profiles>() {
@Override
public List<String> exec(Profiles o, int index) {
ProfilesCreateRequest request = MapperUtil.map(o, ProfilesCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -70,7 +71,15 @@ public class ResAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Res.class).read(file.getBytes(), new WExcel.Processor<Res>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Res.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Res>() {
@Override
public List<String> exec(Res o, int index) {
ResCreateRequest request = MapperUtil.map(o, ResCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -70,7 +71,15 @@ public class RoleAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Role.class).read(file.getBytes(), new WExcel.Processor<Role>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Role.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Role>() {
@Override
public List<String> exec(Role o, int index) {
RoleCreateRequest request = MapperUtil.map(o, RoleCreateRequest.class);

@ -14,7 +14,6 @@ import ${domain}.module.wsys.rsp.ScheduleStopResponse;
import java.util.Iterator;
import java.util.List;
public class ScheduleAjax {
@Autowired

@ -1,17 +1,17 @@
package ${domain}.action.ajax.wsys;
import com.fasterxml.jackson.core.TreeNode;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.utils.MapperUtil;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.utils.ResponseUtil;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.module.wsys.ent.TaskSql;
import ${domain}.module.wsys.mgr.TaskSqlManager;
import ${domain}.module.wsys.req.TaskSqlCreateRequest;
@ -65,7 +65,15 @@ public class TaskSqlAjax{
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(TaskSql.class).read(file.getBytes(), new WExcel.Processor<TaskSql>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(TaskSql.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<TaskSql>() {
@Override
public List<String> exec(TaskSql o, int index) {
TaskSqlCreateRequest request = MapperUtil.map(o, TaskSqlCreateRequest.class);

@ -1,17 +1,7 @@
package ${domain}.action.ajax.wsys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.base.BaseResponse;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.excel.WExcel;
import ${domain}.frame.excel.exception.TemplateNotMatchException;
import ${domain}.frame.utils.LogUtil;
import ${domain}.frame.utils.MapperUtil;
import ${domain}.frame.utils.ResponseUtil;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.module.wsys.ent.Tokens;
import ${domain}.module.wsys.mgr.TokensManager;
import ${domain}.module.wsys.req.TokensCreateRequest;
import ${domain}.module.wsys.req.TokensDeleteRequest;
@ -24,9 +14,6 @@ import ${domain}.module.wsys.rsp.TokensFindResponse;
import ${domain}.module.wsys.rsp.TokensLogoutResponse;
import ${domain}.module.wsys.rsp.TokensUpdateResponse;
import java.io.IOException;
import java.util.List;
public class TokensAjax {
@Autowired
@ -51,45 +38,4 @@ public class TokensAjax {
public TokensLogoutResponse logout(TokensLogoutRequest request) {
return tokensManager.logout(request, LocalData.getToken());
}
public Object template() {
return ResponseUtil.apply(new WExcel<>(Tokens.class));
}
public Object exports(TokensFindRequest request) {
TokensFindResponse response = tokensManager.find(request, LocalData.getToken());
if (response.hasError()) {
return response;
} else if (response.getTotalCount() == 0) {
response.addError(ErrorType.BUSINESS_ERROR, "导出数据为空");
return response;
}
return ResponseUtil.apply(new WExcel<>(Tokens.class).addDatas(response.getResult()));
}
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Tokens.class).read(file.getBytes(), new WExcel.Processor<Tokens>() {
@Override
public List<String> exec(Tokens o, int index) {
TokensCreateRequest request = MapperUtil.map(o, TokensCreateRequest.class);
return ValidationUtil.validate(request);
}
});
if (sheet.hasError()) {
return ResponseUtil.apply(sheet.getBytes(), sheet.getName() + "-检查.xlsx");
} else {
return baseResponse;
}
} catch (IOException e) {
e.printStackTrace();
LogUtil.dumpException(e);
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件出错");
} catch (TemplateNotMatchException e) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, e.getMessage());
}
return baseResponse;
}
}

@ -1,5 +1,8 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.auth.Token;
import ${domain}.frame.base.BaseResponse;
@ -16,24 +19,22 @@ import ${domain}.module.wsys.mgr.TokensManager;
import ${domain}.module.wsys.mgr.UserManager;
import ${domain}.module.wsys.req.TokensLogoutRequest;
import ${domain}.module.wsys.req.UserChangePwdRequest;
import ${domain}.module.wsys.req.UserResetPwdRequest;
import ${domain}.module.wsys.req.UserCreateRequest;
import ${domain}.module.wsys.req.UserDeleteRequest;
import ${domain}.module.wsys.req.UserFindRequest;
import ${domain}.module.wsys.req.UserLoginRequest;
import ${domain}.module.wsys.req.UserLogoutRequest;
import ${domain}.module.wsys.req.UserResetPwdRequest;
import ${domain}.module.wsys.req.UserUpdateRequest;
import ${domain}.module.wsys.rsp.TokensLogoutResponse;
import ${domain}.module.wsys.rsp.UserChangePwdResponse;
import ${domain}.module.wsys.rsp.UserResetPwdResponse;
import ${domain}.module.wsys.rsp.UserCreateResponse;
import ${domain}.module.wsys.rsp.UserDeleteResponse;
import ${domain}.module.wsys.rsp.UserFindResponse;
import ${domain}.module.wsys.rsp.UserLoginResponse;
import ${domain}.module.wsys.rsp.UserLogoutResponse;
import ${domain}.module.wsys.rsp.UserResetPwdResponse;
import ${domain}.module.wsys.rsp.UserUpdateResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
@ -121,7 +122,15 @@ public class UserAjax {
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(User.class).read(file.getBytes(), new WExcel.Processor<User>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(User.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<User>() {
@Override
public List<String> exec(User o, int index) {
UserCreateRequest request = MapperUtil.map(o, UserCreateRequest.class);

@ -1,5 +1,6 @@
package ${domain}.action.ajax.wsys;
import com.alibaba.excel.support.ExcelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import ${domain}.frame.auth.LocalData;
@ -64,7 +65,15 @@ public class VisitorAjax{
public Object imports(MultipartFile file) {
BaseResponse baseResponse = new BaseResponse();
try {
WExcel sheet = new WExcel<>(Visitor.class).read(file.getBytes(), new WExcel.Processor<Visitor>() {
// 检查文件格式
String originalFilename = file.getOriginalFilename() != null ? file.getOriginalFilename() : "";
if (originalFilename.matches("\\.xlsx?")) {
baseResponse.addError(ErrorType.BUSINESS_ERROR, "上传文件格式错误!");
return baseResponse;
}
// 兼容2003以前老版本.xls
ExcelTypeEnum excelTypeEnum = file.getOriginalFilename().endsWith(".xlsx") ? ExcelTypeEnum.XLSX : ExcelTypeEnum.XLS;
WExcel sheet = new WExcel<>(Visitor.class).read(file.getBytes(), excelTypeEnum, new WExcel.Processor<Visitor>() {
@Override
public List<String> exec(Visitor o, int index) {
VisitorCreateRequest request = MapperUtil.map(o, VisitorCreateRequest.class);

@ -6,6 +6,15 @@ import org.springframework.ui.Model;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* resources/templates/control/header.ftl<${r'#'}include controlHolder("nav")/> 访
* <br>
* 访Screen
*
* @author author
* @version 0.0.1
* @since 2020-11-01
*/
public class Header extends Control {
@Override

@ -7,6 +7,13 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* resources/templates/screen/index.ftl访Screen
*
* @author author
* @version 0.0.1
* @since 2020-11-01
*/
public class Index extends Screen {
@Override

@ -3,11 +3,14 @@ package ${domain}.frame.validation;
import org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorContextImpl;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.utils.StringUtil;
import ${domain}.module.wsys.ent.DictItem;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.List;
import java.util.Locale;
import java.util.function.Predicate;
import java.util.stream.Stream;
public class DictValidator implements ConstraintValidator<Dict, String> {
@ -21,6 +24,7 @@ public class DictValidator implements ConstraintValidator<Dict, String> {
@Override
public boolean isValid(String o, ConstraintValidatorContext constraintValidatorContext) {
String fieldName = "";
// 获取注解的字段名称,用于快速定位排查
if (constraintValidatorContext instanceof ConstraintValidatorContextImpl) {
ConstraintValidatorContextImpl validatorContext = (ConstraintValidatorContextImpl) constraintValidatorContext;
if (validatorContext.getConstraintViolationCreationContexts() != null
@ -30,41 +34,49 @@ public class DictValidator implements ConstraintValidator<Dict, String> {
}
}
if (StringUtil.isEmpty(o)) {
if (StringUtil.isEmpty(o)) {// 当值为空字符时,认为值有效
return true;
} else if (name == null) {
} else if (name == null) {// 当字典名称为空时,说明未指定字典,提示错误
// 禁用默认错误信息,防止错误信息与自定义信息乱串
constraintValidatorContext.disableDefaultConstraintViolation();
String message = String.format(Locale.CHINESE, "[ %s ] 未指定字典名称!", fieldName);
constraintValidatorContext.buildConstraintViolationWithTemplate(message).addConstraintViolation();
return false;
} else {
} else {// 加载字典,并验证提交值是否包含在内
// name 字典名称
${domain}.module.wsys.req.DictLoadRequest dictLoadRequest = new ${domain}.module.wsys.req.DictLoadRequest();
dictLoadRequest.setDictName(name);
${domain}.module.wsys.mgr.DictManager dictManager = LocalData.getBean(${domain}.module.wsys.mgr.DictManager.class);
${domain}.module.wsys.rsp.DictLoadResponse dictLoadResponse = dictManager.load(dictLoadRequest, LocalData.getSysToken());
// 如果加载字典出现错误,返回验证错误
if (dictLoadResponse.hasError()) {
// 禁用默认错误信息,防止错误信息与自定义信息乱串
constraintValidatorContext.disableDefaultConstraintViolation();
String message = String.format(Locale.CHINESE, "[ %s ] 验证字典 [ %s ] 值出现异常-> %s", fieldName, name, dictLoadResponse.getErrors().get(0).getMessage());
constraintValidatorContext.buildConstraintViolationWithTemplate(message).addConstraintViolation();
return false;
}
List<${domain}.module.wsys.ent.DictItem> dictItems = dictLoadResponse.getDictItems();
int i = 0;
for (; i < dictItems.size(); i++) {
${domain}.module.wsys.ent.DictItem dictItem = dictItems.get(i);
List<DictItem> dictItems = dictLoadResponse.getDictItems();
Stream<DictItem> list = dictItems.stream().filter(new Predicate<DictItem>() {
@Override
public boolean test(DictItem dictItem) {
if (o.equals(dictItem.getKey())) {
break;
return true;
}
return false;
}
if (i < dictItems.size()) {
return true;
} else {
String message = String.format(Locale.CHINESE, "%s 指定的字典 [ %s ] 中,未找到字典值(%s)", fieldName, name, o);
});
// 当未找到字典项时,认为值无效,返回验证错误
if (list.count() == 0) {
// 禁用默认错误信息,防止错误信息与自定义信息乱串
constraintValidatorContext.disableDefaultConstraintViolation();
String message = String.format(Locale.CHINESE, "[ %s ] 指定的字典 [ %s ] 中,未找到字典枚举(%s)", fieldName, name, o);
constraintValidatorContext.buildConstraintViolationWithTemplate(message).addConstraintViolation();
return false;
} else {
return true;
}
}
}

@ -19,14 +19,14 @@ public class Dict extends BaseEntity {
* DICT_NAME -
*/
@ExcelProperty("字典名称")
@ExcelNote("1-50长度的字典名称")
@ExcelNote("1-50长度的字典名称,中英文皆可")
private String dictName;
/**
* DICT_COMMENT -
* DICT_NOTE -
*/
@ExcelProperty("字典描述")
@ExcelNote("1-50长度的字典描述")
private String dictComment;
private String dictNote;
/**
* VERSION -
*/
@ -37,7 +37,7 @@ public class Dict extends BaseEntity {
* VALID -
*/
@ExcelProperty("是否有效")
@ExcelNote("Y/N,是/否")
@ExcelNote("描述字典有效或启用状态;Y/N,是/否")
private Boolean valid;
public String getDictName() {
@ -48,12 +48,12 @@ public class Dict extends BaseEntity {
this.dictName = dictName;
}
public String getDictComment() {
return this.dictComment;
public String getDictNote() {
return this.dictNote;
}
public void setDictComment(String dictComment) {
this.dictComment = dictComment;
public void setDictNote(String dictNote) {
this.dictNote = dictNote;
}
public String getVersion() {

@ -19,35 +19,35 @@ public class DictItem extends BaseEntity {
* DICT_NAME -
*/
@ExcelProperty("字典名称")
@ExcelNote("字典名称,可为中文或英文,且不能出现重复")
@ExcelNote("字典名称")
private String dictName;
/**
* KEY -
* KEY -
*/
@ExcelProperty("字典")
@ExcelNote("字典一般使用数字或字母 01,02... A,B...")
@ExcelProperty("字典枚举")
@ExcelNote("字典枚举一般使用数字或字母 01,02... A,B...")
private String key;
/**
* VALUE -
* VALUE -
*/
@ExcelProperty("字典")
@ExcelNote("字典一般是实际意思字符或文字\n 长度在(1-100)之间")
@ExcelProperty("字典描述")
@ExcelNote("字典描述一般是实际意思字符或文字\n 长度在(1-100)之间")
private String value;
/**
* SORT -
*/
@ExcelProperty("字典排序值")
@ExcelNote("用于标识字典排列顺序、必须为数字")
@ExcelNote("用于标识字典描述排列顺序、必须为数字")
private Integer sort;
/**
* VALID -
*/
@ExcelProperty("是否有效")
@ExcelNote("用于标识该字典是否有效")
@ExcelNote("用于标识该字典是否有效")
private Boolean valid;
public String getDictName() {

@ -81,4 +81,13 @@ public interface ProfilesManager {
* @return
*/
long getLong(String key, long defaultValue);
/**
*
*
* @param key
* @param defaultValue
* @return
*/
boolean getBoolean(String key, boolean defaultValue);
}

@ -187,6 +187,7 @@ public class ProfilesManagerImpl implements ${domain}.module.wsys.mgr.ProfilesMa
if (profilesFindResponse.getResult().size() == 0) {
// 主动保存未设置的键值
Profiles entity = new Profiles();
entity.setId(IDgenerator.nextId());
entity.setActive(LocalData.getActive());
entity.setKey(key);
entity.setValue(defaultValue);
@ -206,7 +207,7 @@ public class ProfilesManagerImpl implements ${domain}.module.wsys.mgr.ProfilesMa
*/
@Override
public int getInt(String key, int defaultValue) {
String string = this.getString(key, "");
String string = this.getString(key, String.valueOf(defaultValue));
if (!StringUtil.isEmpty(string)) {
try {
return Integer.parseInt(string);
@ -226,7 +227,7 @@ public class ProfilesManagerImpl implements ${domain}.module.wsys.mgr.ProfilesMa
*/
@Override
public long getLong(String key, long defaultValue) {
String string = this.getString(key, "");
String string = this.getString(key, String.valueOf(defaultValue));
if (!StringUtil.isEmpty(string)) {
try {
return Long.parseLong(string);
@ -236,4 +237,24 @@ public class ProfilesManagerImpl implements ${domain}.module.wsys.mgr.ProfilesMa
}
return defaultValue;
}
/**
*
*
* @param key
* @param defaultValue
* @return
*/
@Override
public boolean getBoolean(String key, boolean defaultValue) {
String string = this.getString(key, String.valueOf(defaultValue));
if (!StringUtil.isEmpty(string)) {
try {
return Boolean.parseBoolean(string);
} catch (Exception ignored) {
}
}
return defaultValue;
}
}

@ -11,6 +11,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ${domain}.config.CacheConfig;
import ${domain}.frame.auth.LocalData;
import ${domain}.frame.auth.Token;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.base.SortType;
@ -20,7 +21,6 @@ import ${domain}.frame.utils.Message;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.module.wsys.ent.Tokens;
import ${domain}.module.wsys.mpr.TokensMapper;
import ${domain}.module.wsys.req.ResFindRequest;
import ${domain}.module.wsys.req.ResLoadRequest;
import ${domain}.module.wsys.req.TokensBuildRequest;
import ${domain}.module.wsys.req.TokensCreateRequest;
@ -28,7 +28,6 @@ import ${domain}.module.wsys.req.TokensDeleteRequest;
import ${domain}.module.wsys.req.TokensFindRequest;
import ${domain}.module.wsys.req.TokensLogoutRequest;
import ${domain}.module.wsys.req.TokensUpdateRequest;
import ${domain}.module.wsys.rsp.ResFindResponse;
import ${domain}.module.wsys.rsp.ResLoadResponse;
import ${domain}.module.wsys.rsp.TokensBuildResponse;
import ${domain}.module.wsys.rsp.TokensCreateResponse;
@ -90,7 +89,9 @@ public class TokensManagerImpl implements ${domain}.module.wsys.mgr.TokensManage
for (Tokens tokens : tokensFindResponse.getResult()) {
TokensLogoutRequest tokensLogoutRequest = new TokensLogoutRequest();
tokensLogoutRequest.setToken(tokens.getToken());
TokensLogoutResponse tokensLogoutResponse = this.logout(tokensLogoutRequest, token);
// 为何不是直接使用this如果直接this调用无法被Spring代理注解即失效
TokensManager tokensManager = LocalData.getBean(TokensManager.class);
TokensLogoutResponse tokensLogoutResponse = tokensManager.logout(tokensLogoutRequest, token);
if (tokensLogoutResponse.hasError()) {
response.addErrors(tokensLogoutResponse.getErrors());
return response;

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="xyz.wbsite.module.wsys.mpr.DataMapper">
<select id="total" resultType="xyz.wbsite.module.wsys.ent.DataTotal">
SELECT
( SELECT COUNT( 1 ) + 1 FROM SYS_USER WHERE IS_DELETED = 0 AND USER_STATUS = '0' ) USER_ALL,
( SELECT COUNT( 1 ) FROM SYS_TOKENS WHERE IS_DELETED = 0 AND VALID = '1' ) USER_LINE,
( SELECT COUNT( 1 ) FROM SYS_DEPT WHERE IS_DELETED = 0 ) DEPT_ALL,
( SELECT COUNT( 1 ) FROM SYS_LOGERR WHERE IS_DELETED = 0 AND LOG_STATE = '0' ) ERROR_UN,
( SELECT COUNT( 1 ) FROM SYS_LOGERR WHERE IS_DELETED = 0 ) ERROR_ALL
</select>
<select id="login" resultType="xyz.wbsite.module.wsys.ent.DataCount">
SELECT * FROM
<foreach collection="list" item="item" index="index" open="(" close=")" separator="UNION ALL">
SELECT #{item.date1} "DATE",COUNT(1) "COUNT" FROM SYS_TOKENS WHERE date(LOGIN_TIME/1000,'unixepoch') = #{item.date2}
</foreach>
ORDER BY DATE
</select>
<select id="error" resultType="xyz.wbsite.module.wsys.ent.DataCount">
SELECT * FROM
<foreach collection="list" item="item" index="index" open="(" close=")" separator="UNION ALL">
SELECT #{item.date1} "DATE",COUNT( 1 ) "COUNT" FROM SYS_LOGERR WHERE date(CREATE_TIME) = #{item.date2}
</foreach>
ORDER BY DATE
</select>
</mapper>

@ -7,13 +7,13 @@
<sql id="table">`SYS_DICT`</sql>
<sql id="entityColumnList">
`ID`,`DICT_NAME`,`DICT_COMMENT`,`VERSION`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
`ID`,`DICT_NAME`,`DICT_NOTE`,`VERSION`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
</sql>
<resultMap id="dict" type="${domain}.module.wsys.ent.Dict">
<result column="ID" jdbcType="BIGINT" property="id"/>
<result column="DICT_NAME" jdbcType="VARCHAR" property="dictName"/>
<result column="DICT_COMMENT" jdbcType="VARCHAR" property="dictComment"/>
<result column="DICT_NOTE" jdbcType="VARCHAR" property="dictNote"/>
<result column="VERSION" jdbcType="VARCHAR" property="version"/>
<result column="VALID" jdbcType="BIT" property="valid"/>
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
@ -34,7 +34,7 @@
(
${r"#"}{request.id},
${r"#"}{request.dictName,jdbcType=VARCHAR},
${r"#"}{request.dictComment,jdbcType=VARCHAR},
${r"#"}{request.dictNote,jdbcType=VARCHAR},
${r"#"}{request.version,jdbcType=VARCHAR},
${r"#"}{request.valid,jdbcType=BIT},
0,
@ -56,7 +56,7 @@
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
${r"#"}{item.id},
${r"#"}{item.dictName,jdbcType=VARCHAR},
${r"#"}{item.dictComment,jdbcType=VARCHAR},
${r"#"}{item.dictNote,jdbcType=VARCHAR},
${r"#"}{item.version,jdbcType=VARCHAR},
${r"#"}{item.valid,jdbcType=BIT},
0,
@ -92,7 +92,7 @@
<include refid="table"/>
SET
`DICT_NAME` = ${r"#"}{request.dictName,jdbcType=VARCHAR},
`DICT_COMMENT` = ${r"#"}{request.dictComment,jdbcType=VARCHAR},
`DICT_NOTE` = ${r"#"}{request.dictNote,jdbcType=VARCHAR},
`VERSION` = ${r"#"}{request.version,jdbcType=VARCHAR},
`VALID` = ${r"#"}{request.valid,jdbcType=BIT},
`ROW_VERSION` = `ROW_VERSION` + 1,
@ -112,8 +112,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND `DICT_NAME` = ${r"#"}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND `DICT_COMMENT` = ${r"#"}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND `DICT_NOTE` = ${r"#"}{request.dictNote}
</if>
<if test="request.valid != null">
AND `VALID` = ${r"#"}{request.valid}
@ -129,8 +129,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND `DICT_NAME` = ${r"#"}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND `DICT_COMMENT` = ${r"#"}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND `DICT_NOTE` = ${r"#"}{request.dictNote}
</if>
<if test="request.valid != null">
AND `VALID` = ${r"#"}{request.valid}

@ -7,13 +7,13 @@
<sql id="table">"SYS_DICT"</sql>
<sql id="entityColumnList">
"ID","DICT_NAME","DICT_COMMENT","VERSION","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
"ID","DICT_NAME","DICT_NOTE","VERSION","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
</sql>
<resultMap id="dict" type="${domain}.module.wsys.ent.Dict">
<result column="ID" jdbcType="BIGINT" property="id"/>
<result column="DICT_NAME" jdbcType="VARCHAR" property="dictName"/>
<result column="DICT_COMMENT" jdbcType="VARCHAR" property="dictComment"/>
<result column="DICT_NOTE" jdbcType="VARCHAR" property="dictNote"/>
<result column="VERSION" jdbcType="VARCHAR" property="version"/>
<result column="VALID" jdbcType="BIT" property="valid"/>
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
@ -34,7 +34,7 @@
(
${r'#'}{request.id},
${r'#'}{request.dictName,jdbcType=VARCHAR},
${r'#'}{request.dictComment,jdbcType=VARCHAR},
${r'#'}{request.dictNote,jdbcType=VARCHAR},
${r'#'}{request.version,jdbcType=VARCHAR},
${r'#'}{request.valid,jdbcType=BIT},
0,
@ -56,7 +56,7 @@
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
${r'#'}{item.id},
${r'#'}{item.dictName,jdbcType=VARCHAR},
${r'#'}{item.dictComment,jdbcType=VARCHAR},
${r'#'}{item.dictNote,jdbcType=VARCHAR},
${r'#'}{item.version,jdbcType=VARCHAR},
${r'#'}{item.valid,jdbcType=BIT},
0,
@ -92,7 +92,7 @@
<include refid="table"/>
SET
"DICT_NAME" = ${r'#'}{request.dictName,jdbcType=VARCHAR},
"DICT_COMMENT" = ${r'#'}{request.dictComment,jdbcType=VARCHAR},
"DICT_NOTE" = ${r'#'}{request.dictNote,jdbcType=VARCHAR},
"VERSION" = ${r'#'}{request.version,jdbcType=VARCHAR},
"VALID" = ${r'#'}{request.valid,jdbcType=BIT},
"ROW_VERSION" = "ROW_VERSION" + 1,
@ -113,8 +113,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND "DICT_NAME" = ${r'#'}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND "DICT_COMMENT" = ${r'#'}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND "DICT_NOTE" = ${r'#'}{request.dictNote}
</if>
<if test="request.valid != null">
AND "VALID" = ${r'#'}{request.valid}
@ -131,8 +131,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND "DICT_NAME" = ${r'#'}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND "DICT_COMMENT" = ${r'#'}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND "DICT_NOTE" = ${r'#'}{request.dictNote}
</if>
<if test="request.valid != null">
AND "VALID" = ${r'#'}{request.valid}

@ -7,13 +7,13 @@
<sql id="table">"SYS_DICT"</sql>
<sql id="entityColumnList">
"ID","DICT_NAME","DICT_COMMENT","VERSION","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
"ID","DICT_NAME","DICT_NOTE","VERSION","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
</sql>
<resultMap id="dict" type="${domain}.module.wsys.ent.Dict">
<result column="ID" jdbcType="BIGINT" property="id"/>
<result column="DICT_NAME" jdbcType="VARCHAR" property="dictName"/>
<result column="DICT_COMMENT" jdbcType="VARCHAR" property="dictComment"/>
<result column="DICT_NOTE" jdbcType="VARCHAR" property="dictNote"/>
<result column="VERSION" jdbcType="VARCHAR" property="version"/>
<result column="VALID" jdbcType="BIT" property="valid"/>
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
@ -34,7 +34,7 @@
(
${r"#"}{request.id},
${r"#"}{request.dictName,jdbcType=VARCHAR},
${r"#"}{request.dictComment,jdbcType=VARCHAR},
${r"#"}{request.dictNote,jdbcType=VARCHAR},
${r"#"}{request.version,jdbcType=VARCHAR},
${r"#"}{request.valid,jdbcType=BIT},
0,
@ -56,7 +56,7 @@
<foreach collection="list" item= "item" index ="index" separator="," open="(" close=")">
${r"#"}{item.id},
${r"#"}{item.dictName,jdbcType=VARCHAR},
${r"#"}{item.dictComment,jdbcType=VARCHAR},
${r"#"}{item.dictNote,jdbcType=VARCHAR},
${r"#"}{item.version,jdbcType=VARCHAR},
${r"#"}{item.valid,jdbcType=BIT},
0,
@ -92,7 +92,7 @@
<include refid="table"/>
SET
DICT_NAME = ${r"#"}{request.dictName,jdbcType=VARCHAR},
DICT_COMMENT = ${r"#"}{request.dictComment,jdbcType=VARCHAR},
DICT_NOTE = ${r"#"}{request.dictNote,jdbcType=VARCHAR},
VERSION = ${r"#"}{request.version,jdbcType=VARCHAR},
VALID = ${r"#"}{request.valid,jdbcType=BIT},
"ROW_VERSION" = "ROW_VERSION" + 1,
@ -112,8 +112,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND DICT_NAME = ${r"#"}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND DICT_COMMENT = ${r"#"}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND DICT_NOTE = ${r"#"}{request.dictNote}
</if>
<if test="request.valid != null">
AND VALID = ${r"#"}{request.valid}
@ -129,8 +129,8 @@
<if test="request.dictName != null and request.dictName != ''">
AND DICT_NAME = ${r"#"}{request.dictName}
</if>
<if test="request.dictComment != null and request.dictComment != ''">
AND DICT_COMMENT = ${r"#"}{request.dictComment}
<if test="request.dictNote != null and request.dictNote != ''">
AND DICT_NOTE = ${r"#"}{request.dictNote}
</if>
<if test="request.valid != null">
AND VALID = ${r"#"}{request.valid}

@ -24,9 +24,9 @@ public class DictCreateRequest extends BaseRequest {
/**
*
*/
@NotBlank(message = "[dictComment]字典描述不能为空")
@NotBlank(message = "[dictNote]字典描述不能为空")
@Length(min = 1, max = 50, message = "字典描述长度不合法(1-50)")
private String dictComment;
private String dictNote;
/**
*
@ -49,12 +49,12 @@ public class DictCreateRequest extends BaseRequest {
this.dictName = dictName;
}
public String getDictComment() {
return this.dictComment;
public String getDictNote() {
return this.dictNote;
}
public void setDictComment(String dictComment) {
this.dictComment = dictComment;
public void setDictNote(String dictNote) {
this.dictNote = dictNote;
}
public String getVersion() {

@ -25,7 +25,7 @@ public class DictFindRequest extends BaseFindRequest {
/**
*
*/
private String dictComment;
private String dictNote;
/**
*
@ -58,12 +58,12 @@ public class DictFindRequest extends BaseFindRequest {
this.dictName = dictName;
}
public String getDictComment() {
return this.dictComment;
public String getDictNote() {
return this.dictNote;
}
public void setDictComment(String dictComment) {
this.dictComment = dictComment;
public void setDictNote(String dictNote) {
this.dictNote = dictNote;
}
public Boolean getValid() {

@ -21,15 +21,15 @@ public class DictItemCreateRequest extends BaseRequest {
private String dictName;
/**
*
*
*/
@Length(min = 1, max = 20, message = "[key]字典长度不合法(1-20)")
@Length(min = 1, max = 20, message = "[key]字典枚举长度不合法(1-20)")
private String key;
/**
*
*
*/
@Length(min = 1, max = 100, message = "[value]字典长度不合法(1-100)")
@Length(min = 1, max = 100, message = "[value]字典描述长度不合法(1-100)")
private String value;
/**

@ -24,12 +24,12 @@ public class DictItemFindRequest extends BaseFindRequest {
private String dictName;
/**
*
*
*/
private String key;
/**
*
*
*/
private String value;

@ -21,15 +21,15 @@ public class DictItemUpdateRequest extends BaseUpdateRequest {
private Long id;
/**
*
*
*/
@Length(min = 0, max = 10, message = "[key]字典长度不合法(0-10)")
@Length(min = 0, max = 10, message = "[key]字典枚举长度不合法(0-10)")
private String key;
/**
*
*
*/
@Length(min = 0, max = 100, message = "[value]字典长度不合法(0-100)")
@Length(min = 0, max = 100, message = "[value]字典描述长度不合法(0-100)")
private String value;
/**

@ -31,9 +31,9 @@ public class DictUpdateRequest extends BaseUpdateRequest {
/**
*
*/
@NotBlank(message = "[dictComment]字典描述不能为空")
@Length(min = 0, max = 50, message = "[dictComment]字典描述长度不合法(0-50)")
private String dictComment;
@NotBlank(message = "[dictNote]字典描述不能为空")
@Length(min = 0, max = 50, message = "[dictNote]字典描述长度不合法(0-50)")
private String dictNote;
/**
*
@ -64,12 +64,12 @@ public class DictUpdateRequest extends BaseUpdateRequest {
this.dictName = dictName;
}
public String getDictComment() {
return this.dictComment;
public String getDictNote() {
return this.dictNote;
}
public void setDictComment(String dictComment) {
this.dictComment = dictComment;
public void setDictNote(String dictNote) {
this.dictNote = dictNote;
}
public String getVersion() {

@ -42,7 +42,6 @@ public class ProfilesCreateRequest extends BaseRequest {
/**
* .
*/
@NotBlank(message = "[note]配置描述值不能为空")
@Length(min = 0, max = 255, message = "[note]配置描述长度不合法(0-50)")
private String note;

@ -48,7 +48,6 @@ public class ProfilesUpdateRequest extends BaseUpdateRequest {
/**
* .
*/
@NotBlank(message = "[note]配置描述不能为空")
@Length(min = 0, max = 255, message = "[note]配置描述长度不合法(0-255)")
private String note;

@ -5,7 +5,7 @@
<table ajax="true" api="false" create="true" delete="true" find="true" get="false" html="true" methods="[]" msvr="false" pageAdd="true" pageExp="true" pageImp="true" search="false" sys="true" tableComment="字典" tableName="DICT" update="true">
<field defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isLike="false" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典名称" fieldLength="50" fieldName="DICT_NAME" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典描述" fieldLength="50" fieldName="DICT_COMMENT" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典描述" fieldLength="50" fieldName="DICT_NOTE" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典版本" fieldLength="50" fieldName="VERSION" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isLike="false" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>
@ -18,8 +18,8 @@
<table ajax="true" api="false" create="true" delete="true" find="true" get="false" html="true" methods="[]" msvr="false" pageAdd="true" pageExp="true" pageImp="true" search="false" sys="true" tableComment="字典项" tableName="DICT_ITEM" update="true">
<field defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isLike="false" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典名称" fieldLength="50" fieldName="DICT_NAME" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典" fieldLength="20" fieldName="KEY" fieldType="String_var" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典" fieldLength="50" fieldName="VALUE" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典枚举" fieldLength="20" fieldName="KEY" fieldType="String_var" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典描述" fieldLength="50" fieldName="VALUE" fieldType="String_var50" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="排序" fieldLength="0" fieldName="SORT" fieldType="Integer" isLike="false" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isLike="false" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isLike="false" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>

@ -7,7 +7,7 @@
CREATE TABLE `SYS_DICT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`DICT_NAME` VARCHAR(50) COMMENT '字典名称',
`DICT_COMMENT` VARCHAR(50) COMMENT '字典描述',
`DICT_NOTE` VARCHAR(50) COMMENT '字典描述',
`VERSION` VARCHAR(50) COMMENT '字典版本',
`VALID` TINYINT(1) COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
@ -28,8 +28,8 @@ PRIMARY KEY (`ID`)
CREATE TABLE `SYS_DICT_ITEM` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`DICT_NAME` VARCHAR(50) COMMENT '字典名称',
`KEY` VARCHAR(20) COMMENT '字典',
`VALUE` VARCHAR(50) COMMENT '字典',
`KEY` VARCHAR(20) COMMENT '字典枚举',
`VALUE` VARCHAR(50) COMMENT '字典描述',
`SORT` INTEGER(10) COMMENT '排序',
`VALID` TINYINT(1) COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
@ -349,7 +349,7 @@ CREATE TABLE `SYS_PROFILES` (
`ACTIVE` VARCHAR(20) NOT NULL COMMENT '配置环境',
`KEY` VARCHAR(50) NOT NULL COMMENT '配置项名',
`VALUE` VARCHAR(50) NOT NULL COMMENT '配置项值',
`NOTE` VARCHAR(255) NOT NULL COMMENT '配置描述',
`NOTE` VARCHAR(255) DEFAULT NULL COMMENT '配置描述',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
`CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户',

@ -7,7 +7,7 @@
CREATE TABLE `SYS_DICT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`DICT_NAME` VARCHAR(50) COMMENT '字典名称',
`DICT_COMMENT` VARCHAR(50) COMMENT '字典描述',
`DICT_NOTE` VARCHAR(50) COMMENT '字典描述',
`VERSION` VARCHAR(50) COMMENT '字典版本',
`VALID` TINYINT(1) COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',

@ -7,8 +7,8 @@
CREATE TABLE `SYS_DICT_ITEM` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`DICT_NAME` VARCHAR(50) COMMENT '字典名称',
`KEY` VARCHAR(20) COMMENT '字典',
`VALUE` VARCHAR(50) COMMENT '字典',
`KEY` VARCHAR(20) COMMENT '字典枚举',
`VALUE` VARCHAR(50) COMMENT '字典描述',
`SORT` INTEGER(10) COMMENT '排序',
`VALID` TINYINT(1) COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',

@ -9,7 +9,7 @@ CREATE TABLE `SYS_PROFILES` (
`ACTIVE` VARCHAR(20) NOT NULL COMMENT '配置环境',
`KEY` VARCHAR(50) NOT NULL COMMENT '配置项名',
`VALUE` VARCHAR(50) NOT NULL COMMENT '配置项值',
`NOTE` VARCHAR(255) NOT NULL COMMENT '配置描述',
`NOTE` VARCHAR(255) DEFAULT NULL COMMENT '配置描述',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
`CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户',

@ -7,7 +7,7 @@
CREATE TABLE "SYS_DICT" (
"ID" NUMBER(19) NOT NULL,
"DICT_NAME" VARCHAR2(50) NULL,
"DICT_COMMENT" VARCHAR2(50) NULL,
"DICT_NOTE" VARCHAR2(50) NULL,
"VERSION" VARCHAR2(50) NULL,
"VALID" CHAR(1) NULL,
"ROW_VERSION" NUMBER(19) NOT NULL,
@ -20,7 +20,7 @@ CREATE TABLE "SYS_DICT" (
COMMENT ON TABLE "SYS_DICT" is '字典';
COMMENT ON COLUMN "SYS_DICT"."ID" is '主键';
COMMENT ON COLUMN "SYS_DICT"."DICT_NAME" is '字典名称';
COMMENT ON COLUMN "SYS_DICT"."DICT_COMMENT" is '字典描述';
COMMENT ON COLUMN "SYS_DICT"."DICT_NOTE" is '字典描述';
COMMENT ON COLUMN "SYS_DICT"."VERSION" is '字典版本';
COMMENT ON COLUMN "SYS_DICT"."VALID" is '是否有效';
COMMENT ON COLUMN "SYS_DICT"."ROW_VERSION" is '行版本';
@ -53,8 +53,8 @@ CREATE TABLE "SYS_DICT_ITEM" (
COMMENT ON TABLE "SYS_DICT_ITEM" is '字典项';
COMMENT ON COLUMN "SYS_DICT_ITEM"."ID" is '主键';
COMMENT ON COLUMN "SYS_DICT_ITEM"."DICT_NAME" is '字典名称';
COMMENT ON COLUMN "SYS_DICT_ITEM"."KEY" is '字典';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALUE" is '字典';
COMMENT ON COLUMN "SYS_DICT_ITEM"."KEY" is '字典枚举';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALUE" is '字典描述';
COMMENT ON COLUMN "SYS_DICT_ITEM"."SORT" is '排序';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALID" is '是否有效';
COMMENT ON COLUMN "SYS_DICT_ITEM"."ROW_VERSION" is '行版本';
@ -539,8 +539,8 @@ COMMENT ON COLUMN "SYS_LOGERR"."LAST_UPDATE_TIME" is '最后更新时间';
CREATE TABLE "SYS_PROFILES" (
"ID" NUMBER(19) NOT NULL,
"ACTIVE" VARCHAR(20) NULL,
"KEY" VARCHAR2(50) NULL,
"VALUE" VARCHAR2(50) NULL,
"KEY" VARCHAR2(50) NOT NULL,
"VALUE" VARCHAR2(50) NOT NULL,
"NOTE" VARCHAR2(255) NULL,
"ROW_VERSION" NUMBER(19) NOT NULL,
"IS_DELETED" CHAR(1) NOT NULL,

@ -7,7 +7,7 @@
CREATE TABLE "SYS_DICT" (
"ID" NUMBER(19) NOT NULL,
"DICT_NAME" VARCHAR2(50) NULL,
"DICT_COMMENT" VARCHAR2(50) NULL,
"DICT_NOTE" VARCHAR2(50) NULL,
"VERSION" VARCHAR2(50) NULL,
"VALID" CHAR(1) NULL,
"ROW_VERSION" NUMBER(19) NOT NULL,
@ -21,7 +21,7 @@ CREATE TABLE "SYS_DICT" (
COMMENT ON TABLE "SYS_DICT" is '字典';
COMMENT ON COLUMN "SYS_DICT"."ID" is '主键';
COMMENT ON COLUMN "SYS_DICT"."DICT_NAME" is '字典名称';
COMMENT ON COLUMN "SYS_DICT"."DICT_COMMENT" is '字典描述';
COMMENT ON COLUMN "SYS_DICT"."DICT_NOTE" is '字典描述';
COMMENT ON COLUMN "SYS_DICT"."VERSION" is '字典版本';
COMMENT ON COLUMN "SYS_DICT"."VALID" is '是否有效';
COMMENT ON COLUMN "SYS_DICT"."ROW_VERSION" is '行版本';

@ -22,8 +22,8 @@ CREATE TABLE "SYS_DICT_ITEM" (
COMMENT ON TABLE "SYS_DICT_ITEM" is '字典项';
COMMENT ON COLUMN "SYS_DICT_ITEM"."ID" is '主键';
COMMENT ON COLUMN "SYS_DICT_ITEM"."DICT_NAME" is '字典名称';
COMMENT ON COLUMN "SYS_DICT_ITEM"."KEY" is '字典';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALUE" is '字典';
COMMENT ON COLUMN "SYS_DICT_ITEM"."KEY" is '字典枚举';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALUE" is '字典描述';
COMMENT ON COLUMN "SYS_DICT_ITEM"."SORT" is '排序';
COMMENT ON COLUMN "SYS_DICT_ITEM"."VALID" is '是否有效';
COMMENT ON COLUMN "SYS_DICT_ITEM"."ROW_VERSION" is '行版本';

@ -7,7 +7,7 @@
CREATE TABLE IF NOT EXISTS SYS_DICT (
"ID" BIGINT PRIMARY KEY NOT NULL,
"DICT_NAME" VARCHAR(50),
"DICT_COMMENT" VARCHAR(50),
"DICT_NOTE" VARCHAR(50),
"VERSION" VARCHAR(50),
"VALID" BOOLEAN,
"ROW_VERSION" BIGINT NOT NULL,
@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS SYS_PROFILES (
"ACTIVE" VARCHAR(20) NOT NULL,
"KEY" VARCHAR(50) NOT NULL,
"VALUE" VARCHAR(50) NOT NULL,
"NOTE" VARCHAR(255) NOT NULL,
"NOTE" VARCHAR(255),
"ROW_VERSION" BIGINT NOT NULL,
"IS_DELETED" BOOLEAN NOT NULL,
"CREATE_BY" BIGINT NOT NULL,

@ -7,7 +7,7 @@
CREATE TABLE IF NOT EXISTS SYS_DICT (
"ID" BIGINT PRIMARY KEY NOT NULL,
"DICT_NAME" VARCHAR(50) NOT NULL,
"DICT_COMMENT" VARCHAR(50) NOT NULL,
"DICT_NOTE" VARCHAR(50) NOT NULL,
"VERSION" VARCHAR(50) NOT NULL,
"VALID" BOOLEAN NOT NULL,
"ROW_VERSION" BIGINT NOT NULL,

@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS SYS_PROFILES (
"ACTIVE" VARCHAR(20) NOT NULL,
"KEY" VARCHAR(50) NOT NULL,
"VALUE" VARCHAR(50) NOT NULL,
"NOTE" VARCHAR(255) NOT NULL,
"NOTE" VARCHAR(255),
"ROW_VERSION" BIGINT NOT NULL,
"IS_DELETED" BOOLEAN NOT NULL,
"CREATE_BY" BIGINT NOT NULL,

@ -1272,7 +1272,7 @@
</style>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
fileList: [],

@ -135,7 +135,7 @@
</style>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
dataTotal: {}
@ -317,7 +317,7 @@
var option = {
title: {
text: '登录凭证任务执行情况',
text: '任务执行情况',
subtext: '最近100次执行情况',
textStyle: {
color: '#515151',

@ -562,11 +562,11 @@
created: function () {
},
mounted: function () {
this.prop.menu = nav.getCookie("prop.menu") === 'true';
this.prop.open = nav.getCookie("prop.open") === 'true';
this.prop.coll = nav.getCookie("prop.coll") === 'true';
this.prop.tran = nav.getCookie("prop.tran") === 'true';
this.prop.full = nav.getCookie("prop.full") === 'true';
this.prop.menu = nav.getCookie("prop.menu");
this.prop.open = nav.getCookie("prop.open").length>0?JSON.parse(nav.getCookie("prop.open")):this.prop.open;
this.prop.coll = nav.getCookie("prop.coll").length>0?JSON.parse(nav.getCookie("prop.coll")):this.prop.coll;
this.prop.tran = nav.getCookie("prop.tran").length>0?JSON.parse(nav.getCookie("prop.tran")):this.prop.tran;
this.prop.full = nav.getCookie("prop.full").length>0?JSON.parse(nav.getCookie("prop.full")):this.prop.full;
if (this.prop.full) {
nav.screenFull();
} else {

@ -14,7 +14,7 @@
<el-input placeholder="密码" v-model="form.password" size="small" type="password" prefix-icon="el-icon-lock"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" style="width: 100%" size="small" :loading="isSubmit" :disabled="isSubmit" @click="submitForm('form')">登录</el-button>
<el-button type="primary" style="width: 100%" size="small" :loading="$isSubmit" :disabled="$isSubmit" @click="submitForm('form')">登录</el-button>
</el-form-item>
</el-form>
@ -88,7 +88,7 @@
<script type="text/javascript">
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
form: {
@ -101,7 +101,7 @@
],
password: [
{required: true, message: '请输入密码', trigger: 'change'}
],
]
}
},
mounted: function () {
@ -156,9 +156,9 @@
submitForm: function (formName) {
this.$refs[formName].validate(function (valid) {
if (valid) {
this.isSubmit = true;
this.$isSubmit = true;
new Ajax("wsys", "User").method("login").post(this.form, function (response) {
this.isSubmit = false;
this.$isSubmit = false;
if (response.errors.length > 0) {
nav.e(response.errors[0].message);
} else {

@ -109,7 +109,7 @@
<el-button-group style="float: right;">
<#if table.isPageImp()>
${print('<#if token.hasRes("/ajax/${module.name}/${table.getFName()}/template")>')}
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
${print('</#if>')}
@ -449,7 +449,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: '${module.getName()}',

@ -48,12 +48,12 @@
<el-button type="danger" size="mini" icon="el-icon-delete" @click="onBitchDelete">删除</el-button>
</#if>
<el-button type="warning" size="mini" icon="el-icon-share" @click="treeShow = true">树状</el-button>
</<el-button-group>>
<el-button type="warning" size="mini" icon="el-icon-share" @click="treeShow = true">结构</el-button>
</el-button-group>
<el-button-group>
<#if token.hasRes("/ajax/wsys/dept/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -231,10 +231,10 @@
</el-col>
<el-col :span="11" offset="1">
<el-button-group>
<el-tooltip effect="dark" content="过滤" placement="bottom">
<el-tooltip effect="dark" content="过滤" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-search" @click="$refs.tree.filter(treeFilter)">过滤</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="批量删除" placement="bottom">
<el-tooltip effect="dark" content="删除" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-delete" @click="onTreeDelete">删除</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="刷新" placement="bottom">
@ -281,7 +281,7 @@
</style>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -5,8 +5,8 @@
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="vm.dictName" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典名称"></el-input>
</el-form-item>
<el-form-item label="字典描述" prop="dictComment">
<el-input v-model="vm.dictComment" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典描述"></el-input>
<el-form-item label="字典描述" prop="dictNote">
<el-input v-model="vm.dictNote" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="vm.valid">
@ -37,11 +37,11 @@
<#if token.hasRes("/ajax/wsys/dict/delete")>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="onBitchDelete">删除</el-button>
</#if>
<el-button-group>
</el-button-group>
<el-button-group>
<#if token.hasRes("/ajax/wsys/dict/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -101,7 +101,7 @@
<el-table-column
align="center"
min-width="150"
prop="dictComment"
prop="dictNote"
label="字典描述">
</el-table-column>
<el-table-column
@ -164,8 +164,8 @@
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" clearable size="mini" placeholder="请输入字典名称"></el-input>
</el-form-item>
<el-form-item label="字典描述" prop="dictComment">
<el-input v-model="form.dictComment" clearable size="mini" placeholder="请输入字典描述"></el-input>
<el-form-item label="字典描述" prop="dictNote">
<el-input v-model="form.dictNote" clearable size="mini" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="字典版本" prop="version">
<el-date-picker
@ -192,7 +192,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',
@ -200,7 +200,7 @@
vm: {
id: null,
dictName: null,
dictComment: null,
dictNote: null,
valid: null,
startDate: null,
endDate: null,
@ -217,7 +217,7 @@
formShow: false,
id: null,
dictName: null,
dictComment: null,
dictNote: null,
version: null,
valid: false,
rowVersion: null
@ -227,7 +227,7 @@
{required: true, message: '请输入字典名称', trigger: 'blur'},
{min: 1, max: 50, message: '长度在 3 到 5 个字符', trigger: 'blur'}
],
dictComment: [
dictNote: [
{required: true, message: '字典描述不能为空', trigger: 'blur'},
{min: 1, max: 50, message: '字典描述长度在 1 到 50 个字符', trigger: 'blur'}
],
@ -246,7 +246,7 @@
this.form.formShow = true;
this.form.id = '';
this.form.dictName = '';
this.form.dictComment = '';
this.form.dictNote = '';
this.form.version = '';
this.form.valid = true;
},
@ -255,7 +255,7 @@
this.form.formShow = true;
this.form.id = item.id;
this.form.dictName = item.dictName;
this.form.dictComment = item.dictComment;
this.form.dictNote = item.dictNote;
this.form.version = item.version;
this.form.valid = item.valid;
this.form.rowVersion = item.rowVersion;

@ -5,11 +5,11 @@
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="vm.dictName" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典名称" readonly></el-input>
</el-form-item>
<el-form-item label="字典" prop="key">
<el-input v-model="vm.key" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典"></el-input>
<el-form-item label="字典枚举" prop="key">
<el-input v-model="vm.key" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典枚举"></el-input>
</el-form-item>
<el-form-item label="字典" prop="value">
<el-input v-model="vm.value" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典"></el-input>
<el-form-item label="字典描述" prop="value">
<el-input v-model="vm.value" @keyup.enter.native="onSearch" clearable size="mini" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="是否有效" prop="valid">
<el-radio-group v-model="vm.valid" clearable>
@ -44,7 +44,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/dictItem/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -99,13 +99,13 @@
align="center"
min-width="100"
prop="key"
label="字典">
label="字典枚举">
</el-table-column>
<el-table-column
align="center"
min-width="150"
prop="value"
label="字典">
label="字典描述">
</el-table-column>
<el-table-column
align="center"
@ -163,13 +163,13 @@
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="字典" prop="key">
<el-input v-model="form.key" clearable size="mini" placeholder="请输入字典"></el-input>
<el-form-item label="字典枚举" prop="key">
<el-input v-model="form.key" clearable size="mini" placeholder="请输入字典枚举"></el-input>
</el-form-item>
<el-form-item label="字典" prop="value">
<el-input v-model="form.value" clearable size="mini" placeholder="请输入字典"></el-input>
<el-form-item label="字典描述" prop="value">
<el-input v-model="form.value" clearable size="mini" placeholder="请输入字典描述"></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-form-item label="字典排序" prop="sort">
<el-input-number size="mini" v-model="form.sort" :min="1" :max="10000"
label="描述文字"></el-input-number>
</el-form-item>
@ -188,7 +188,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',
@ -219,11 +219,11 @@
},
formRules: {
key: [
{required: true, message: '请输入字典', trigger: 'blur'},
{required: true, message: '请输入字典枚举', trigger: 'blur'},
{min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'}
],
value: [
{required: true, message: '请输入字典', trigger: 'blur'},
{required: true, message: '请输入字典描述', trigger: 'blur'},
{min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur'}
],
sort: [

@ -44,7 +44,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/file/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -186,7 +186,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -142,7 +142,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -57,7 +57,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/logtask/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -111,7 +111,7 @@
label="执行状态">
<template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.execState == '1'">成功</el-tag>
<el-tag size="mini" v-if="scope.row.execState == '0'">失败</el-tag>
<el-tag size="mini" v-if="scope.row.execState == '0'" type="danger">失败</el-tag>
</template>
</el-table-column>
<el-table-column
@ -154,8 +154,8 @@
label="操作">
<template slot-scope="scope">
<wb-table-ops :arg="scope.row">
<#if token.hasRes("/ajax/wsys/logtask/update")>
<wb-table-op value="编辑" icon="el-icon-edit" @click="onEdit"></wb-table-op>
<#if token.hasRes("/ajax/wsys/logtask/view")>
<wb-table-op value="查看" icon="el-icon-view" @click="onView"></wb-table-op>
</#if>
<#if token.hasRes("/ajax/wsys/logtask/delete")>
<wb-table-op value="删除" icon="el-icon-delete" @click="onDelete"></wb-table-op>
@ -177,10 +177,57 @@
:total="vm.totalCount">
</el-pagination>
</el-card>
<el-dialog
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="任务ID" prop="taskId">
<el-input v-model="form.taskId" size="mini" readonly></el-input>
</el-form-item>
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="form.taskName" size="mini" readonly></el-input>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-input v-model="form.startTime" size="mini" readonly></el-input>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-input v-model="form.endTime" size="mini" readonly></el-input>
</el-form-item>
<el-form-item label="执行耗时" prop="execTime">
<el-input :value="form.execTime + 'ms'" size="mini" readonly></el-input>
</el-form-item>
<el-form-item label="执行状态" prop="execState">
<el-select v-model="form.execState" clearable size="mini" readonly>
<el-option key="1" label="成功" value="1"></el-option>
<el-option key="0" label="失败" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="执行结果" prop="execResult">
<el-input v-model="form.execResult" style="width: 504px;"
size="mini"
rows="10"
type="textarea"
maxlength="500"
show-word-limit readonly></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="form.formShow = false">关 闭</el-button>
</span>
</el-dialog>
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',
@ -198,11 +245,25 @@
totalCount: 0,
sortKey:'CREATE_TIME',
sortType:'DESC'
}
},
form: {
formTitle: "",
formShow: false,
id: "",
taskId: "",
taskName: "",
startTime: "",
endTime: "",
execTime: "",
execState: "",
execResult: "",
rowVersion: ""
},
formRules: {}
},
methods: {
onEdit: function (item) {
this.form.formTitle = "任务日志编辑";
onView: function (item) {
this.form.formTitle = "任务日志详情查看";
this.form.formShow = true;
this.form.id = item.id;
this.form.taskId = item.taskId;

@ -40,7 +40,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/profiles/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -178,7 +178,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -54,12 +54,12 @@
<el-button type="danger" size="mini" icon="el-icon-delete" @click="onBitchDelete">删除</el-button>
</#if>
<el-button type="warning" size="mini" icon="el-icon-share" @click="treeShow = true">树状</el-button>
<el-button type="warning" size="mini" icon="el-icon-share" @click="treeShow = true">结构</el-button>
</el-button-group>
<el-button-group>
<#if token.hasRes("/ajax/wsys/res/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -209,7 +209,7 @@
placeholder="请输入资源描述"></el-input>
</el-form-item>
<el-form-item label="是否免费" prop="free">
<el-tooltip effect="dark" content="对于不希望将模块完全或部分授权与角色时,可置为免费,即不需要授权情况下也拥有此资源。" placement="bottom">
<el-tooltip effect="dark" content="对于希望不授权也可以访问的资源可置为免费,即公共资源。" placement="bottom">
<el-switch v-model="form.free" active-text="免费" inactive-text="授权" clearable size="mini"></el-switch>
</el-tooltip>
</el-form-item>
@ -252,15 +252,15 @@
</el-col>
<el-col :span="11" offset="1">
<el-button-group>
<el-tooltip effect="dark" content="过滤" placement="bottom">
<el-tooltip effect="dark" content="过滤" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-search" @click="$refs.tree.filter(treeFilter)">查询</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="删除" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-delete" @click="onTreeDelete">删除</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="刷新" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-refresh" @click="onTreeLoad">刷新</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="批量删除" placement="bottom">
<el-button size="mini" type="primary" icon="el-icon-delete" @click="onTreeDelete">删除</el-button>
</el-tooltip>
</el-button-group>
</el-col>
</el-row>
@ -305,7 +305,7 @@
</style>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -37,7 +37,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/role/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -220,7 +220,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -78,7 +78,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -47,7 +47,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/taskSql/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -221,7 +221,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -184,7 +184,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -48,7 +48,7 @@
<el-button-group >
<#if token.hasRes("/ajax/wsys/user/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -220,7 +220,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -45,7 +45,7 @@
<el-button-group>
<#if token.hasRes("/ajax/wsys/visitor/template")>
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
<el-tooltip effect="dark" content="Excel导入模板下载" placement="bottom">
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
</el-tooltip>
</#if>
@ -224,7 +224,7 @@
</div>
<script>
var app = new Vue({
mixins: [mixin],
mixins: [mixinForMgr],
el: "#app",
data: {
module: 'wsys',

@ -104,7 +104,6 @@ public class DataInit {
List<Res> forDev = new ArrayList<>();
{// 初始化开发角色特有资源
forDev.add(createRes("0001", "核心设置菜单", "WEB", "DEV"));
forDev.add(createRes("000100", "开发帮助页", "WEB", "/helpDev.htm"));
forDev.add(createRes("000101", "系统配置菜单", "WEB", "DEV_PROFILES"));
forDev.add(createRes("00010101", "系统配置管理页", "WEB", "/wsys/profiles.htm"));
forDev.add(createRes("0001010101", "系统配置模板", "WEB", "/ajax/wsys/profiles/template"));
@ -355,7 +354,7 @@ public class DataInit {
if (dictFindResponse.getResult().size() == 0) {
DictCreateRequest dictCreateRequest = new DictCreateRequest();
dictCreateRequest.setDictName(name);
dictCreateRequest.setDictComment(comment);
dictCreateRequest.setDictNote(comment);
dictCreateRequest.setVersion(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
dictCreateRequest.setValid(true);
DictCreateResponse dictCreateResponse = dictManager.create(dictCreateRequest, token);

@ -48,7 +48,7 @@ public class DictTest {
public void testCreate() {
DictCreateRequest request = new DictCreateRequest();
request.setDictName("字典名称");
request.setDictComment("字典描述");
request.setDictNote("字典描述");
request.setVersion("字典版本号");
request.setValid(true);
@ -63,7 +63,7 @@ public class DictTest {
//创建数据
DictCreateRequest createRequest = new DictCreateRequest();
createRequest.setDictName("字典名称");
createRequest.setDictComment("字典描述");
createRequest.setDictNote("字典描述");
createRequest.setVersion("字典版本号");
createRequest.setValid(true);
@ -84,7 +84,7 @@ public class DictTest {
//创建数据
DictCreateRequest createRequest = new DictCreateRequest();
createRequest.setDictName("字典名称");
createRequest.setDictComment("字典描述");
createRequest.setDictNote("字典描述");
createRequest.setVersion("字典版本号");
createRequest.setValid(true);
@ -94,7 +94,7 @@ public class DictTest {
DictUpdateRequest request = new DictUpdateRequest();
request.setId(createResponse.getId());
request.setDictName("字典名称");
request.setDictComment("字典描述");
request.setDictNote("字典描述");
request.setVersion("字典版本号");
request.setValid(true);
@ -107,7 +107,7 @@ public class DictTest {
public void testFind() {
DictFindRequest request = new DictFindRequest();
request.setDictName("字典名称");
request.setDictComment("字典描述");
request.setDictNote("字典描述");
request.setValid(true);
DictFindResponse response = dictManager.find(request, token);
@ -120,7 +120,7 @@ public class DictTest {
//创建数据
DictCreateRequest createRequest = new DictCreateRequest();
createRequest.setDictName("字典名称");
createRequest.setDictComment("字典描述");
createRequest.setDictNote("字典描述");
createRequest.setVersion("字典版本号");
createRequest.setValid(true);

Loading…
Cancel
Save

Powered by TurnKey Linux.