parent
969e9958f9
commit
de998a27b6
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../../js/jquery.min.js" type="text/javascript"></script>
|
||||
<link href="../../../css/base.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="api">
|
||||
<h3>用户登录</h3>
|
||||
<h5>请求方法</h5>
|
||||
|
||||
<div class="wrapper">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="200">参数</th>
|
||||
<th width="100">类型</th>
|
||||
<th width="100">必需</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>字符串</td>
|
||||
<td style="color: red">是</td>
|
||||
<td>用户登录名称</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>字符串</td>
|
||||
<td style="color: red">是</td>
|
||||
<td>用户登录密码</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<h5>响应参数</h5>
|
||||
|
||||
<div class="wrapper">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="200">参数</th>
|
||||
<th width="100">类型</th>
|
||||
<th width="100">必有</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>token</td>
|
||||
<td>字符串</td>
|
||||
<td>是</td>
|
||||
<td>用户操作凭证</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>taskCount</td>
|
||||
<td>数字</td>
|
||||
<td>否</td>
|
||||
<td>任务数量</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||||
<link href="css/base.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,63 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.api {
|
||||
width: 700px;
|
||||
margin: 20px auto;
|
||||
border-left: 8px solid #dddfe4;
|
||||
border-right: 1px solid #eef0f4;
|
||||
}
|
||||
|
||||
h3 {
|
||||
background: #eef0f4;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
padding: 5px;
|
||||
color: #989898;
|
||||
font-weight: normal;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
padding: 16px;
|
||||
background: #eef0f4;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
display: table;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
table tr th, table tr td {
|
||||
font-size: 14px;
|
||||
color: #4f4f4f;
|
||||
line-height: 22px;
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
word-break: normal !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
table tr th {
|
||||
font-weight: 700;
|
||||
background-color: #eff3f5;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,97 @@
|
||||
package ${basePackage}.action.ajax.example;
|
||||
|
||||
import com.fasterxml.jackson.core.TreeNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import ${basePackage}.frame.excel.WExcel;
|
||||
import ${basePackage}.frame.utils.LogUtil;
|
||||
import ${basePackage}.frame.auth.LocalData;
|
||||
import ${basePackage}.frame.base.ErrorType;
|
||||
import ${basePackage}.frame.utils.MapperUtil;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
import ${basePackage}.frame.utils.ResponseUtil;
|
||||
import ${basePackage}.frame.utils.ValidationUtil;
|
||||
import ${basePackage}.frame.excel.exception.ReadErrorException;
|
||||
import ${basePackage}.frame.excel.exception.TemplateNotMatchException;
|
||||
import ${basePackage}.module.system.ent.Profiles;
|
||||
import ${basePackage}.module.system.mgr.ProfilesManager;
|
||||
import ${basePackage}.module.system.req.ProfilesCreateRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesDeleteRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesFindRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesGetRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.ProfilesCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesFindResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesGetResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesUpdateResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class ProfilesAjax{
|
||||
|
||||
@Autowired
|
||||
private ProfilesManager profilesManager;
|
||||
|
||||
public ProfilesCreateResponse create(ProfilesCreateRequest request) {
|
||||
return profilesManager.create(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public ProfilesDeleteResponse delete(ProfilesDeleteRequest request) {
|
||||
return profilesManager.delete(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public ProfilesUpdateResponse update(ProfilesUpdateRequest request) {
|
||||
return profilesManager.update(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public ProfilesFindResponse find(ProfilesFindRequest request) {
|
||||
return profilesManager.find(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public ProfilesGetResponse get(ProfilesGetRequest request) {
|
||||
return profilesManager.get(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public Object template(){
|
||||
return ResponseUtil.apply(new WExcel<>(Profiles.class));
|
||||
}
|
||||
|
||||
public Object exports(ProfilesFindRequest request) {
|
||||
ProfilesFindResponse response = profilesManager.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<>(Profiles.class).loadData(response.getResult()));
|
||||
}
|
||||
|
||||
public Object imports(MultipartFile file) {
|
||||
BaseResponse baseResponse = new BaseResponse();
|
||||
try {
|
||||
WExcel sheet = new WExcel<>(Profiles.class).loadData(file.getBytes(), new WExcel.Processor<Profiles>() {
|
||||
@Override
|
||||
public List<String> exec(Profiles o) {
|
||||
ProfilesCreateRequest request = MapperUtil.map(o, ProfilesCreateRequest.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 | ReadErrorException e) {
|
||||
baseResponse.addError(ErrorType.BUSINESS_ERROR, e.getMessage());
|
||||
}
|
||||
return baseResponse;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package ${basePackage}.action.ajax.example;
|
||||
|
||||
import com.fasterxml.jackson.core.TreeNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import ${basePackage}.frame.excel.WExcel;
|
||||
import ${basePackage}.frame.utils.LogUtil;
|
||||
import ${basePackage}.frame.auth.LocalData;
|
||||
import ${basePackage}.frame.base.ErrorType;
|
||||
import ${basePackage}.frame.utils.MapperUtil;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
import ${basePackage}.frame.utils.ResponseUtil;
|
||||
import ${basePackage}.frame.utils.ValidationUtil;
|
||||
import ${basePackage}.frame.excel.exception.ReadErrorException;
|
||||
import ${basePackage}.frame.excel.exception.TemplateNotMatchException;
|
||||
import ${basePackage}.module.system.ent.TaskSql;
|
||||
import ${basePackage}.module.system.mgr.TaskSqlManager;
|
||||
import ${basePackage}.module.system.req.TaskSqlCreateRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlDeleteRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlFindRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlGetRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlFindResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlGetResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlUpdateResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class TaskSqlAjax{
|
||||
|
||||
@Autowired
|
||||
private TaskSqlManager taskSqlManager;
|
||||
|
||||
public TaskSqlCreateResponse create(TaskSqlCreateRequest request) {
|
||||
return taskSqlManager.create(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public TaskSqlDeleteResponse delete(TaskSqlDeleteRequest request) {
|
||||
return taskSqlManager.delete(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public TaskSqlUpdateResponse update(TaskSqlUpdateRequest request) {
|
||||
return taskSqlManager.update(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public TaskSqlFindResponse find(TaskSqlFindRequest request) {
|
||||
return taskSqlManager.find(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public TaskSqlGetResponse get(TaskSqlGetRequest request) {
|
||||
return taskSqlManager.get(request, LocalData.getToken());
|
||||
}
|
||||
|
||||
public Object template(){
|
||||
return ResponseUtil.apply(new WExcel<>(TaskSql.class));
|
||||
}
|
||||
|
||||
public Object exports(TaskSqlFindRequest request) {
|
||||
TaskSqlFindResponse response = taskSqlManager.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<>(TaskSql.class).loadData(response.getResult()));
|
||||
}
|
||||
|
||||
public Object imports(MultipartFile file) {
|
||||
BaseResponse baseResponse = new BaseResponse();
|
||||
try {
|
||||
WExcel sheet = new WExcel<>(TaskSql.class).loadData(file.getBytes(), new WExcel.Processor<TaskSql>() {
|
||||
@Override
|
||||
public List<String> exec(TaskSql o) {
|
||||
TaskSqlCreateRequest request = MapperUtil.map(o, TaskSqlCreateRequest.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 | ReadErrorException e) {
|
||||
baseResponse.addError(ErrorType.BUSINESS_ERROR, e.getMessage());
|
||||
}
|
||||
return baseResponse;
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package ${basePackage}.module.system.ent;
|
||||
|
||||
import ${basePackage}.frame.base.BaseEntity;
|
||||
import ${basePackage}.frame.excel.annotation.ColumnDescription;
|
||||
import ${basePackage}.frame.excel.annotation.ColumnName;
|
||||
import ${basePackage}.frame.excel.annotation.SheetName;
|
||||
|
||||
/**
|
||||
* PROFILES - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@SheetName("系统配置")
|
||||
public class Profiles extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ACTIVE - 环境
|
||||
*/
|
||||
@ColumnName("环境")
|
||||
@ColumnDescription("")
|
||||
private String active;
|
||||
/**
|
||||
* KEY - 键
|
||||
*/
|
||||
@ColumnName("键")
|
||||
@ColumnDescription("")
|
||||
private String key;
|
||||
/**
|
||||
* VALUE - 值
|
||||
*/
|
||||
@ColumnName("值")
|
||||
@ColumnDescription("")
|
||||
private String value;
|
||||
|
||||
public String getActive() {
|
||||
return this.active;
|
||||
}
|
||||
|
||||
public void setActive(String active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package ${basePackage}.module.system.ent;
|
||||
|
||||
import ${basePackage}.frame.base.BaseEntity;
|
||||
import ${basePackage}.frame.excel.annotation.ColumnDescription;
|
||||
import ${basePackage}.frame.excel.annotation.ColumnList;
|
||||
import ${basePackage}.frame.excel.annotation.ColumnName;
|
||||
import ${basePackage}.frame.excel.annotation.SheetName;
|
||||
|
||||
/**
|
||||
* TASK_SQL - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@SheetName("SQL任务")
|
||||
public class TaskSql extends BaseEntity {
|
||||
|
||||
/**
|
||||
* TASK_NAME - 任务名称
|
||||
*/
|
||||
@ColumnName("任务名称")
|
||||
@ColumnDescription("")
|
||||
private String taskName;
|
||||
/**
|
||||
* TASK_NOTE - 详细注释
|
||||
*/
|
||||
@ColumnName("详细注释")
|
||||
@ColumnDescription("")
|
||||
private String taskNote;
|
||||
/**
|
||||
* TASK_TYPE - 任务类型
|
||||
*/
|
||||
@ColumnName("任务类型")
|
||||
@ColumnDescription("")
|
||||
private String taskType;
|
||||
/**
|
||||
* TYPE_VALUE - 任务类型值
|
||||
*/
|
||||
@ColumnName("任务类型值")
|
||||
@ColumnDescription("")
|
||||
private String typeValue;
|
||||
/**
|
||||
* TASK_SQL - 任务SQL
|
||||
*/
|
||||
@ColumnName("任务SQL")
|
||||
@ColumnDescription("")
|
||||
private String taskSql;
|
||||
/**
|
||||
* VALID - 是否有效
|
||||
*/
|
||||
@ColumnName("是否有效")
|
||||
@ColumnDescription("")
|
||||
@ColumnList({"是","否"})
|
||||
private Boolean valid;
|
||||
|
||||
public String getTaskName() {
|
||||
return this.taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskNote() {
|
||||
return this.taskNote;
|
||||
}
|
||||
|
||||
public void setTaskNote(String taskNote) {
|
||||
this.taskNote = taskNote;
|
||||
}
|
||||
|
||||
public String getTaskType() {
|
||||
return this.taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTypeValue() {
|
||||
return this.typeValue;
|
||||
}
|
||||
|
||||
public void setTypeValue(String typeValue) {
|
||||
this.typeValue = typeValue;
|
||||
}
|
||||
|
||||
public String getTaskSql() {
|
||||
return this.taskSql;
|
||||
}
|
||||
|
||||
public void setTaskSql(String taskSql) {
|
||||
this.taskSql = taskSql;
|
||||
}
|
||||
|
||||
public Boolean getValid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public void setValid(Boolean valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package ${basePackage}.module.system.mgr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.req.ProfilesCreateRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesDeleteRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesFindRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesGetRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.ProfilesCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesFindResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesGetResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesUpdateResponse;
|
||||
|
||||
/**
|
||||
* 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public interface ProfilesManager {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
ProfilesCreateResponse create(ProfilesCreateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
ProfilesDeleteResponse delete(ProfilesDeleteRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
ProfilesUpdateResponse update(ProfilesUpdateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
ProfilesFindResponse find(ProfilesFindRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
ProfilesGetResponse get(ProfilesGetRequest request, Token token);
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package ${basePackage}.module.system.mgr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.frame.base.ErrorType;
|
||||
import ${basePackage}.frame.utils.IDgenerator;
|
||||
import ${basePackage}.frame.utils.MapperUtil;
|
||||
import ${basePackage}.frame.utils.Message;
|
||||
import ${basePackage}.frame.utils.ValidationUtil;
|
||||
import ${basePackage}.module.system.ent.Profiles;
|
||||
import ${basePackage}.module.system.mpr.ProfilesMapper;
|
||||
import ${basePackage}.module.system.req.ProfilesCreateRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesDeleteRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesFindRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesGetRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.ProfilesCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesFindResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesGetResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesUpdateResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.github.pagehelper.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* PROFILES - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@Transactional
|
||||
@Service
|
||||
public class ProfilesManagerImpl implements ProfilesManager {
|
||||
|
||||
@Autowired
|
||||
private ProfilesMapper profilesMapper;
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public ProfilesCreateResponse create(ProfilesCreateRequest request, Token token) {
|
||||
ProfilesCreateResponse response = new ProfilesCreateResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
{// 键唯一检查
|
||||
ProfilesFindRequest profilesFindRequest = new ProfilesFindRequest();
|
||||
profilesFindRequest.setActive(request.getActive());
|
||||
profilesFindRequest.setKey(request.getKey());
|
||||
ProfilesFindResponse profilesFindResponse = this.find(profilesFindRequest, token);
|
||||
if (profilesFindResponse.hasError()) {
|
||||
response.addErrors(profilesFindResponse.getErrors());
|
||||
return response;
|
||||
} else if (profilesFindResponse.getTotalCount() > 0) {
|
||||
response.addError(ErrorType.UNIQUENESS_ERROR, "[key]键已存在,请检查!");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
long id = IDgenerator.nextId();
|
||||
Profiles entity = MapperUtil.map(request, Profiles.class);
|
||||
entity.setId(id);
|
||||
|
||||
long result = profilesMapper.insert(entity, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setId(id);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public ProfilesDeleteResponse delete(ProfilesDeleteRequest request, Token token) {
|
||||
ProfilesDeleteResponse response = new ProfilesDeleteResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
long result = profilesMapper.delete(request, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setResult(result);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public ProfilesUpdateResponse update(ProfilesUpdateRequest request, Token token) {
|
||||
ProfilesUpdateResponse response = new ProfilesUpdateResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
long result = profilesMapper.update(request, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setResult(result);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public ProfilesFindResponse find(ProfilesFindRequest request, Token token) {
|
||||
ProfilesFindResponse response = new ProfilesFindResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
if (request.getPageSize() != 0) {
|
||||
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
|
||||
}
|
||||
if (StringUtil.isNotEmpty(request.getSortKey())) {
|
||||
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
|
||||
}
|
||||
PageInfo<Profiles> pageInfo = new PageInfo<>(profilesMapper.find(request, token));
|
||||
|
||||
response.setResult(pageInfo.getList());
|
||||
response.setTotalCount(pageInfo.getTotal());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public ProfilesGetResponse get(ProfilesGetRequest request, Token token) {
|
||||
ProfilesGetResponse response = new ProfilesGetResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
Profiles po = profilesMapper.get(request, token);
|
||||
|
||||
if (po != null) {
|
||||
response.setProfiles(po);
|
||||
} else {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package ${basePackage}.module.system.mgr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.req.TaskSqlCreateRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlDeleteRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlFindRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlGetRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlFindResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlGetResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlUpdateResponse;
|
||||
|
||||
/**
|
||||
* SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public interface TaskSqlManager {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
TaskSqlCreateResponse create(TaskSqlCreateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
TaskSqlDeleteResponse delete(TaskSqlDeleteRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
TaskSqlUpdateResponse update(TaskSqlUpdateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
TaskSqlFindResponse find(TaskSqlFindRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
TaskSqlGetResponse get(TaskSqlGetRequest request, Token token);
|
||||
}
|
@ -0,0 +1,177 @@
|
||||
package ${basePackage}.module.system.mgr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.frame.base.ErrorType;
|
||||
import ${basePackage}.frame.utils.IDgenerator;
|
||||
import ${basePackage}.frame.utils.MapperUtil;
|
||||
import ${basePackage}.frame.utils.Message;
|
||||
import ${basePackage}.frame.utils.ValidationUtil;
|
||||
import ${basePackage}.module.system.ent.TaskSql;
|
||||
import ${basePackage}.module.system.mpr.TaskSqlMapper;
|
||||
import ${basePackage}.module.system.req.TaskSqlCreateRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlDeleteRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlFindRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlGetRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlFindResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlGetResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlUpdateResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.github.pagehelper.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* TASK_SQL - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@Transactional
|
||||
@Service
|
||||
public class TaskSqlManagerImpl implements TaskSqlManager {
|
||||
|
||||
@Autowired
|
||||
private TaskSqlMapper taskSqlMapper;
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public TaskSqlCreateResponse create(TaskSqlCreateRequest request, Token token) {
|
||||
TaskSqlCreateResponse response = new TaskSqlCreateResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
long id = IDgenerator.nextId();
|
||||
TaskSql entity = MapperUtil.map(request, TaskSql.class);
|
||||
entity.setId(id);
|
||||
|
||||
long result = taskSqlMapper.insert(entity, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setId(id);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public TaskSqlDeleteResponse delete(TaskSqlDeleteRequest request, Token token) {
|
||||
TaskSqlDeleteResponse response = new TaskSqlDeleteResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
long result = taskSqlMapper.delete(request, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setResult(result);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
public TaskSqlUpdateResponse update(TaskSqlUpdateRequest request, Token token) {
|
||||
TaskSqlUpdateResponse response = new TaskSqlUpdateResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
long result = taskSqlMapper.update(request, token);
|
||||
if (1L != result) {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
|
||||
return response;
|
||||
}
|
||||
response.setResult(result);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public TaskSqlFindResponse find(TaskSqlFindRequest request, Token token) {
|
||||
TaskSqlFindResponse response = new TaskSqlFindResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
if (request.getPageSize() != 0) {
|
||||
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
|
||||
}
|
||||
if (StringUtil.isNotEmpty(request.getSortKey())) {
|
||||
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
|
||||
}
|
||||
PageInfo<TaskSql> pageInfo = new PageInfo<>(taskSqlMapper.find(request, token));
|
||||
|
||||
response.setResult(pageInfo.getList());
|
||||
response.setTotalCount(pageInfo.getTotal());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 响应
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public TaskSqlGetResponse get(TaskSqlGetRequest request, Token token) {
|
||||
TaskSqlGetResponse response = new TaskSqlGetResponse();
|
||||
|
||||
ValidationUtil.validate(request, response);
|
||||
if (response.hasError()) {
|
||||
return response;
|
||||
}
|
||||
|
||||
TaskSql po = taskSqlMapper.get(request, token);
|
||||
|
||||
if (po != null) {
|
||||
response.setTaskSql(po);
|
||||
} else {
|
||||
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package ${basePackage}.module.system.mpr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.ent.Profiles;
|
||||
import ${basePackage}.module.system.req.ProfilesDeleteRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesFindRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesGetRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesUpdateRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PROFILES - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @date 2020-05-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProfilesMapper {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long insert(@Param("request") Profiles request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long insertBatch(@Param("list") List<Profiles> request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long delete(@Param("request") ProfilesDeleteRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long update(@Param("request") ProfilesUpdateRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回对象
|
||||
*/
|
||||
List<Profiles> find(@Param("request") ProfilesFindRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回对象
|
||||
*/
|
||||
Profiles get(@Param("request") ProfilesGetRequest request, @Param("token") Token token);
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
<?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="${basePackage}.module.system.mpr.ProfilesMapper">
|
||||
|
||||
<sql id="table">"SYS_PROFILES"</sql>
|
||||
|
||||
<sql id="entityColumnList">
|
||||
"ID","ACTIVE","KEY","VALUE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||
</sql>
|
||||
|
||||
<resultMap id="profiles" type="${basePackage}.module.system.ent.Profiles">
|
||||
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||
<result column="ACTIVE" jdbcType="VARCHAR" property="active"/>
|
||||
<result column="KEY" jdbcType="VARCHAR" property="key"/>
|
||||
<result column="VALUE" jdbcType="VARCHAR" property="value"/>
|
||||
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="find" resultMap="profiles">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE
|
||||
"IS_DELETED" = 0
|
||||
<if test="request.active != null and request.active != ''">
|
||||
AND ACTIVE = ${r"#"}{request.active}
|
||||
</if>
|
||||
<if test="request.key != null and request.key != ''">
|
||||
AND KEY = ${r"#"}{request.key}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="search" resultMap="profiles">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE
|
||||
"IS_DELETED" = 0
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
INSERT INTO
|
||||
<include refid="table"/>
|
||||
(
|
||||
<include refid="entityColumnList"/>
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
${r"#"}{request.id},
|
||||
${r"#"}{request.active,jdbcType=VARCHAR},
|
||||
${r"#"}{request.key,jdbcType=VARCHAR},
|
||||
${r"#"}{request.value,jdbcType=VARCHAR},
|
||||
0,
|
||||
0,
|
||||
${r"#"}{token.userId,jdbcType=NUMERIC},
|
||||
datetime('now','localtime'),
|
||||
NULL,
|
||||
NULL
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO
|
||||
<include refid="table"/>
|
||||
(
|
||||
<include refid="entityColumnList"/>
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
${r"#"}{item.id},
|
||||
${r"#"}{item.active,jdbcType=VARCHAR},
|
||||
${r"#"}{item.key,jdbcType=VARCHAR},
|
||||
${r"#"}{item.value,jdbcType=VARCHAR},
|
||||
0,
|
||||
0,
|
||||
${r"#"}{token.userId,jdbcType=NUMERIC},
|
||||
datetime('now','localtime'),
|
||||
NULL,
|
||||
NULL
|
||||
)
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
<update id="delete">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET "IS_DELETED" = 1
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" = ${r"#"}{request.id}
|
||||
</update>
|
||||
|
||||
<update id="update">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET
|
||||
ACTIVE = ${r"#"}{request.active,jdbcType=VARCHAR},
|
||||
KEY = ${r"#"}{request.key,jdbcType=VARCHAR},
|
||||
VALUE = ${r"#"}{request.value,jdbcType=VARCHAR},
|
||||
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||
"LAST_UPDATE_BY" = ${r"#"}{token.userId},
|
||||
"LAST_UPDATE_TIME" = datetime('now','localtime')
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" = ${r"#"}{request.id}
|
||||
AND "ROW_VERSION" = ${r"#"}{request.rowVersion}
|
||||
</update>
|
||||
|
||||
<select id="get" resultMap="profiles">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE IS_DELETED = 0
|
||||
AND ID = ${r"#"}{request.id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,143 @@
|
||||
<?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="${basePackage}.module.system.mpr.TaskSqlMapper">
|
||||
|
||||
<sql id="table">"SYS_TASK_SQL"</sql>
|
||||
|
||||
<sql id="entityColumnList">
|
||||
"ID","TASK_NAME","TASK_NOTE","TASK_TYPE","TYPE_VALUE","TASK_SQL","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||
</sql>
|
||||
|
||||
<resultMap id="taskSql" type="${basePackage}.module.system.ent.TaskSql">
|
||||
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||
<result column="TASK_NAME" jdbcType="VARCHAR" property="taskName"/>
|
||||
<result column="TASK_NOTE" jdbcType="VARCHAR" property="taskNote"/>
|
||||
<result column="TASK_TYPE" jdbcType="VARCHAR" property="taskType"/>
|
||||
<result column="TYPE_VALUE" jdbcType="VARCHAR" property="typeValue"/>
|
||||
<result column="TASK_SQL" jdbcType="VARCHAR" property="taskSql"/>
|
||||
<result column="VALID" jdbcType="BIT" property="valid"/>
|
||||
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="find" resultMap="taskSql">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE
|
||||
"IS_DELETED" = 0
|
||||
<if test="request.taskName != null and request.taskName != ''">
|
||||
AND TASK_NAME = ${r"#"}{request.taskName}
|
||||
</if>
|
||||
<if test="request.taskNote != null and request.taskNote != ''">
|
||||
AND TASK_NOTE = ${r"#"}{request.taskNote}
|
||||
</if>
|
||||
<if test="request.taskType != null and request.taskType != ''">
|
||||
AND TASK_TYPE = ${r"#"}{request.taskType}
|
||||
</if>
|
||||
<if test="request.valid != null">
|
||||
AND VALID = ${r"#"}{request.valid}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="search" resultMap="taskSql">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE
|
||||
"IS_DELETED" = 0
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
INSERT INTO
|
||||
<include refid="table"/>
|
||||
(
|
||||
<include refid="entityColumnList"/>
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
${r"#"}{request.id},
|
||||
${r"#"}{request.taskName,jdbcType=VARCHAR},
|
||||
${r"#"}{request.taskNote,jdbcType=VARCHAR},
|
||||
${r"#"}{request.taskType,jdbcType=VARCHAR},
|
||||
${r"#"}{request.typeValue,jdbcType=VARCHAR},
|
||||
${r"#"}{request.taskSql,jdbcType=VARCHAR},
|
||||
${r"#"}{request.valid,jdbcType=BIT},
|
||||
0,
|
||||
0,
|
||||
${r"#"}{token.userId,jdbcType=NUMERIC},
|
||||
datetime('now','localtime'),
|
||||
NULL,
|
||||
NULL
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO
|
||||
<include refid="table"/>
|
||||
(
|
||||
<include refid="entityColumnList"/>
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
${r"#"}{item.id},
|
||||
${r"#"}{item.taskName,jdbcType=VARCHAR},
|
||||
${r"#"}{item.taskNote,jdbcType=VARCHAR},
|
||||
${r"#"}{item.taskType,jdbcType=VARCHAR},
|
||||
${r"#"}{item.typeValue,jdbcType=VARCHAR},
|
||||
${r"#"}{item.taskSql,jdbcType=VARCHAR},
|
||||
${r"#"}{item.valid,jdbcType=BIT},
|
||||
0,
|
||||
0,
|
||||
${r"#"}{token.userId,jdbcType=NUMERIC},
|
||||
datetime('now','localtime'),
|
||||
NULL,
|
||||
NULL
|
||||
)
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
<update id="delete">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET "IS_DELETED" = 1
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" = ${r"#"}{request.id}
|
||||
</update>
|
||||
|
||||
<update id="update">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET
|
||||
TASK_NAME = ${r"#"}{request.taskName,jdbcType=VARCHAR},
|
||||
TASK_NOTE = ${r"#"}{request.taskNote,jdbcType=VARCHAR},
|
||||
TASK_TYPE = ${r"#"}{request.taskType,jdbcType=VARCHAR},
|
||||
TYPE_VALUE = ${r"#"}{request.typeValue,jdbcType=VARCHAR},
|
||||
TASK_SQL = ${r"#"}{request.taskSql,jdbcType=VARCHAR},
|
||||
VALID = ${r"#"}{request.valid,jdbcType=BIT},
|
||||
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||
"LAST_UPDATE_BY" = ${r"#"}{token.userId},
|
||||
"LAST_UPDATE_TIME" = datetime('now','localtime')
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" = ${r"#"}{request.id}
|
||||
AND "ROW_VERSION" = ${r"#"}{request.rowVersion}
|
||||
</update>
|
||||
|
||||
<select id="get" resultMap="taskSql">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE IS_DELETED = 0
|
||||
AND ID = ${r"#"}{request.id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,76 @@
|
||||
package ${basePackage}.module.system.mpr;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.ent.TaskSql;
|
||||
import ${basePackage}.module.system.req.TaskSqlDeleteRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlFindRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlGetRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlUpdateRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TASK_SQL - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @date 2020-05-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface TaskSqlMapper {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long insert(@Param("request") TaskSql request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long insertBatch(@Param("list") List<TaskSql> request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long delete(@Param("request") TaskSqlDeleteRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回数量
|
||||
*/
|
||||
long update(@Param("request") TaskSqlUpdateRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回对象
|
||||
*/
|
||||
List<TaskSql> find(@Param("request") TaskSqlFindRequest request, @Param("token") Token token);
|
||||
|
||||
/**
|
||||
* 获得对象
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return 返回对象
|
||||
*/
|
||||
TaskSql get(@Param("request") TaskSqlGetRequest request, @Param("token") Token token);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseRequest;
|
||||
import ${basePackage}.frame.validation.Dict;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* ProfilesCreateRequest - 系统配置新增
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesCreateRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 环境.
|
||||
*/
|
||||
@NotNull(message = "[active]环境不能为NULL")
|
||||
@Dict(name = "ACTIVE")
|
||||
private String active;
|
||||
|
||||
/**
|
||||
* 键
|
||||
*/
|
||||
@NotBlank(message = "[key]键不能为空")
|
||||
@Length(min = 0, max = 50, message = "[key]键长度不合法(0-50)")
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@NotBlank(message = "[value]值不能为空")
|
||||
@Length(min = 0, max = 50, message = "[value]值长度不合法(0-50)")
|
||||
private String value;
|
||||
|
||||
public String getActive() {
|
||||
return this.active;
|
||||
}
|
||||
|
||||
public void setActive(String active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* ProfilesDeleteRequest - 系统配置删除
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesDeleteRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为空")
|
||||
private long id;
|
||||
|
||||
public long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseFindRequest;
|
||||
|
||||
/**
|
||||
* ProfilesRequest - 系统配置查询
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesFindRequest extends BaseFindRequest {
|
||||
|
||||
/**
|
||||
* 环境
|
||||
*/
|
||||
private String active;
|
||||
|
||||
/**
|
||||
* 键
|
||||
*/
|
||||
private String key;
|
||||
|
||||
public String getActive() {
|
||||
return this.active;
|
||||
}
|
||||
|
||||
public void setActive(String active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseRequest;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* ProfilesGetRequest - 系统配置获取
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesGetRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为空")
|
||||
private long id;
|
||||
|
||||
public long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||
import ${basePackage}.frame.validation.Dict;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* ProfilesUpdateRequest - 系统配置更新
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesUpdateRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为NULL")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 环境.
|
||||
*/
|
||||
@NotNull(message = "[active]环境不能为NULL")
|
||||
@Dict(name = "ACTIVE")
|
||||
private String active;
|
||||
|
||||
/**
|
||||
* 键
|
||||
*/
|
||||
@NotBlank(message = "[key]键不能为空")
|
||||
@Length(min = 0, max = 50, message = "[key]键长度不合法(0-50)")
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@NotBlank(message = "[value]值不能为空")
|
||||
@Length(min = 0, max = 50, message = "[value]值长度不合法(0-50)")
|
||||
private String value;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getActive() {
|
||||
return this.active;
|
||||
}
|
||||
|
||||
public void setActive(String active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseRequest;
|
||||
import ${basePackage}.frame.validation.Dict;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* TaskSqlCreateRequest - SQL任务新增
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlCreateRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@NotBlank(message = "[taskName]任务名称不能为空")
|
||||
@Length(min = 0, max = 50, message = "[taskName]任务名称长度不合法(0-50)")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 详细注释
|
||||
*/
|
||||
@Length(min = 0, max = 255, message = "[taskNote]详细注释长度不合法(0-255)")
|
||||
private String taskNote;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@NotNull(message = "[taskType]任务类型不能为NULL")
|
||||
@Dict(name = "TASK_TYPE")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 任务类型值
|
||||
*/
|
||||
@NotBlank(message = "[typeValue]任务类型值不能为空")
|
||||
@Length(min = 0, max = 50, message = "[typeValue]任务类型值长度不合法(0-50)")
|
||||
private String typeValue;
|
||||
|
||||
/**
|
||||
* 任务SQL
|
||||
*/
|
||||
@NotBlank(message = "[taskSql]任务SQL不能为空")
|
||||
@Length(min = 0, max = 2500, message = "[taskSql]任务SQL长度不合法(0-2500)")
|
||||
private String taskSql;
|
||||
|
||||
/**
|
||||
* 是否有效
|
||||
*/
|
||||
@NotNull(message = "[valid]是否有效不能为NULL")
|
||||
private Boolean valid;
|
||||
|
||||
public String getTaskName() {
|
||||
return this.taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskNote() {
|
||||
return this.taskNote;
|
||||
}
|
||||
|
||||
public void setTaskNote(String taskNote) {
|
||||
this.taskNote = taskNote;
|
||||
}
|
||||
|
||||
public String getTaskType() {
|
||||
return this.taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTypeValue() {
|
||||
return this.typeValue;
|
||||
}
|
||||
|
||||
public void setTypeValue(String typeValue) {
|
||||
this.typeValue = typeValue;
|
||||
}
|
||||
|
||||
public String getTaskSql() {
|
||||
return this.taskSql;
|
||||
}
|
||||
|
||||
public void setTaskSql(String taskSql) {
|
||||
this.taskSql = taskSql;
|
||||
}
|
||||
|
||||
public Boolean getValid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public void setValid(Boolean valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* TaskSqlDeleteRequest - SQL任务删除
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlDeleteRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为空")
|
||||
private long id;
|
||||
|
||||
public long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseFindRequest;
|
||||
import ${basePackage}.frame.validation.Dict;
|
||||
|
||||
/**
|
||||
* TaskSqlRequest - SQL任务查询
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlFindRequest extends BaseFindRequest {
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 详细注释
|
||||
*/
|
||||
private String taskNote;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@Dict(name = "TASK_TYPE")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 是否有效
|
||||
*/
|
||||
private Boolean valid;
|
||||
|
||||
public String getTaskName() {
|
||||
return this.taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskNote() {
|
||||
return this.taskNote;
|
||||
}
|
||||
|
||||
public void setTaskNote(String taskNote) {
|
||||
this.taskNote = taskNote;
|
||||
}
|
||||
|
||||
public String getTaskType() {
|
||||
return this.taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public Boolean getValid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public void setValid(Boolean valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseRequest;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* TaskSqlGetRequest - SQL任务获取
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlGetRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为空")
|
||||
private long id;
|
||||
|
||||
public long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package ${basePackage}.module.system.req;
|
||||
|
||||
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||
import ${basePackage}.frame.validation.Dict;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* TaskSqlUpdateRequest - SQL任务更新
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlUpdateRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为NULL")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@NotBlank(message = "[taskName]任务名称不能为空")
|
||||
@Length(min = 0, max = 50, message = "[taskName]任务名称长度不合法(0-50)")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 详细注释
|
||||
*/
|
||||
@Length(min = 0, max = 255, message = "[taskNote]详细注释长度不合法(0-255)")
|
||||
private String taskNote;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@NotNull(message = "[taskType]任务类型不能为NULL")
|
||||
@Dict(name = "TASK_TYPE")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 任务类型值
|
||||
*/
|
||||
@NotBlank(message = "[typeValue]任务类型值不能为空")
|
||||
@Length(min = 0, max = 50, message = "[typeValue]任务类型值长度不合法(0-50)")
|
||||
private String typeValue;
|
||||
|
||||
/**
|
||||
* 任务SQL
|
||||
*/
|
||||
@NotBlank(message = "[taskSql]任务SQL不能为空")
|
||||
@Length(min = 0, max = 2500, message = "[taskSql]任务SQL长度不合法(0-2500)")
|
||||
private String taskSql;
|
||||
|
||||
/**
|
||||
* 是否有效
|
||||
*/
|
||||
@NotNull(message = "[valid]是否有效不能为NULL")
|
||||
private Boolean valid;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return this.taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskNote() {
|
||||
return this.taskNote;
|
||||
}
|
||||
|
||||
public void setTaskNote(String taskNote) {
|
||||
this.taskNote = taskNote;
|
||||
}
|
||||
|
||||
public String getTaskType() {
|
||||
return this.taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTypeValue() {
|
||||
return this.typeValue;
|
||||
}
|
||||
|
||||
public void setTypeValue(String typeValue) {
|
||||
this.typeValue = typeValue;
|
||||
}
|
||||
|
||||
public String getTaskSql() {
|
||||
return this.taskSql;
|
||||
}
|
||||
|
||||
public void setTaskSql(String taskSql) {
|
||||
this.taskSql = taskSql;
|
||||
}
|
||||
|
||||
public Boolean getValid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public void setValid(Boolean valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesCreateResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesCreateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesDeleteResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesDeleteResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 删除数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.module.system.ent.Profiles;
|
||||
import ${basePackage}.frame.base.BaseFindResponse;
|
||||
|
||||
/**
|
||||
* ProfilesFindResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesFindResponse extends BaseFindResponse<Profiles> {
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.module.system.ent.Profiles;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesGetResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesGetResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 系统配置
|
||||
*/
|
||||
private ${basePackage}.module.system.ent.Profiles profiles;
|
||||
|
||||
public ${basePackage}.module.system.ent.Profiles getProfiles() {
|
||||
return this.profiles;
|
||||
}
|
||||
|
||||
public void setProfiles(Profiles profiles) {
|
||||
this.profiles = profiles;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesUpdateResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesUpdateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 更新数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* TaskSqlCreateResponse - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlCreateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* TaskSqlDeleteResponse - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlDeleteResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 删除数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.module.system.ent.TaskSql;
|
||||
import ${basePackage}.frame.base.BaseFindResponse;
|
||||
|
||||
/**
|
||||
* TaskSqlFindResponse - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlFindResponse extends BaseFindResponse<TaskSql> {
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.module.system.ent.TaskSql;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* TaskSqlGetResponse - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlGetResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* SQL任务
|
||||
*/
|
||||
private TaskSql taskSql;
|
||||
|
||||
public TaskSql getTaskSql() {
|
||||
return this.taskSql;
|
||||
}
|
||||
|
||||
public void setTaskSql(TaskSql taskSql) {
|
||||
this.taskSql = taskSql;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.module.system.rsp;
|
||||
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* TaskSqlUpdateResponse - SQL任务
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class TaskSqlUpdateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 更新数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for PROFILES - 系统配置
|
||||
-- Target : SQLite
|
||||
-- Author : author
|
||||
-- Date: : 2020-06-04
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS SYS_PROFILES (
|
||||
"ID" BIGINT PRIMARY KEY NOT NULL,
|
||||
"ACTIVE" VARCHAR(20) NOT NULL,
|
||||
"KEY" VARCHAR(50) NOT NULL,
|
||||
"VALUE" VARCHAR(50) NOT NULL,
|
||||
"ROW_VERSION" BIGINT NOT NULL,
|
||||
"IS_DELETED" BOOLEAN NOT NULL,
|
||||
"CREATE_BY" BIGINT NOT NULL,
|
||||
"CREATE_TIME" DATETIME NOT NULL,
|
||||
"LAST_UPDATE_BY" BIGINT,
|
||||
"LAST_UPDATE_TIME" DATETIME
|
||||
);
|
@ -0,0 +1,21 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for TASK_SQL - SQL任务
|
||||
-- Target : SQLite
|
||||
-- Author : author
|
||||
-- Date: : 2020-06-04
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS SYS_TASK_SQL (
|
||||
"ID" BIGINT PRIMARY KEY NOT NULL,
|
||||
"TASK_NAME" VARCHAR(50) NOT NULL,
|
||||
"TASK_NOTE" VARCHAR(250),
|
||||
"TASK_TYPE" VARCHAR(20) NOT NULL,
|
||||
"TYPE_VALUE" VARCHAR(50) NOT NULL,
|
||||
"TASK_SQL" TEXT NOT NULL,
|
||||
"VALID" BOOLEAN NOT NULL,
|
||||
"ROW_VERSION" BIGINT NOT NULL,
|
||||
"IS_DELETED" BOOLEAN NOT NULL,
|
||||
"CREATE_BY" BIGINT NOT NULL,
|
||||
"CREATE_TIME" DATETIME NOT NULL,
|
||||
"LAST_UPDATE_BY" BIGINT,
|
||||
"LAST_UPDATE_TIME" DATETIME
|
||||
);
|
@ -1,211 +1,576 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<projectName>wadmin</projectName>
|
||||
<projectBasePackage>xyz.wbsite</projectBasePackage>
|
||||
<projectAuthor>wangbing</projectAuthor>
|
||||
<needMoreDB>false</needMoreDB>
|
||||
<needEMail>false</needEMail>
|
||||
<needSys>false</needSys>
|
||||
<needCloud>false</needCloud>
|
||||
<needAsync>false</needAsync>
|
||||
<database>MySQL</database>
|
||||
<modules>
|
||||
<module>
|
||||
<moduleComment>系统</moduleComment>
|
||||
<modulePrefix>SYS_</modulePrefix>
|
||||
<moduleName>system</moduleName>
|
||||
<hasSysFields/>
|
||||
<tables>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="字典" tableName="DICT" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典名称" fieldLength="50" fieldName="DICT_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典描述" fieldLength="50" fieldName="DICT_COMMENT" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典版本" fieldLength="50" fieldName="VERSION" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="字典项" tableName="DICT_ITEM" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典名称" fieldLength="50" fieldName="DICT_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典键" fieldLength="20" fieldName="KEY" fieldType="String_var" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典值" fieldLength="50" fieldName="VALUE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="排序" fieldLength="0" fieldName="SORT" fieldType="Integer" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="资源" tableName="RES" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源代码" fieldLength="50" fieldName="RES_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源名称" fieldLength="50" fieldName="RES_NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源类型" fieldLength="20" fieldName="RES_TYPE" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源内容" fieldLength="255" fieldName="RES_VALUE" fieldType="String_var255" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级代码" fieldLength="50" fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级名称" fieldLength="50" fieldName="SUP_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否免费" fieldLength="0" fieldName="FREE" fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="19" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="19" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="用户" tableName="USER" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户账户" fieldLength="100" fieldName="USER_NAME" fieldType="String_var100" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户代码" fieldLength="50" fieldName="USER_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户别名" fieldLength="50" fieldName="USER_ALIAS" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户密码" fieldLength="50" fieldName="USER_PWD" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户状态" fieldLength="20" fieldName="USER_STATUS" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门主键" fieldLength="0" fieldName="DEPT_ID" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50" fieldName="DEPT_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100" fieldName="DEPT_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="19" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="部门" tableName="DEPT" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50" fieldName="DEPT_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100" fieldName="DEPT_NAME" fieldType="String_var100" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门别名" fieldLength="50" fieldName="DEPT_ALIAS" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级代码" fieldLength="50" fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级名称" fieldLength="100" fieldName="SUP_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="角色" tableName="ROLE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50" fieldName="CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色名称" fieldLength="50" fieldName="NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色描述" fieldLength="50" fieldName="COMMENT" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="通行证" tableName="TOKENS" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="登录令牌" fieldLength="50" fieldName="TOKEN" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户主键" fieldLength="0" fieldName="USER_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户名称" fieldLength="50" fieldName="USER_NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="登录时间" fieldLength="0" fieldName="LOGIN_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="有效时间" fieldLength="0" fieldName="VALID_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0" fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门主键" fieldLength="0" fieldName="DEPT_ID" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50" fieldName="DEPT_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100" fieldName="DEPT_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端类型" fieldLength="20" fieldName="TERMINAL_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端地址" fieldLength="50" fieldName="TERMINAL_IP" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端信息" fieldLength="500" fieldName="TERMINAL_INFO" fieldType="String_var500" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="文件" tableName="FILE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="文件名称" fieldLength="255" fieldName="NAME" fieldType="String_var255" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="文件类型" fieldLength="20" fieldName="FILE_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="扩展属性1" fieldLength="50" fieldName="ATTRIBUTE1" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="扩展属性2" fieldLength="50" fieldName="ATTRIBUTE2" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="存放地址" fieldLength="500" fieldName="LOCATION" fieldType="String_var500" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="访问地址" fieldLength="500" fieldName="URL" fieldType="String_var500" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="下载地址" fieldLength="500" fieldName="URL_DOWNLOAD" fieldType="String_var500" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="false" search="false" sys="true" tableComment="用户角色授权" tableName="USER_ROLE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户主键" fieldLength="0" fieldName="USER_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户代码" fieldLength="50" fieldName="USER_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色主键" fieldLength="0" fieldName="ROLE_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50" fieldName="ROLE_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="false" search="false" sys="true" tableComment="角色资源关系" tableName="ROLE_RES" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色主键" fieldLength="0" fieldName="ROLE_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50" fieldName="ROLE_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源主键" fieldLength="0" fieldName="RES_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源代码" fieldLength="50" fieldName="RES_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true" tableComment="错误日志" tableName="LOG_ERR" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误类型" fieldLength="20" fieldName="LOG_ERR_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误标题" fieldLength="50" fieldName="TITLE" fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误内容" fieldLength="0" fieldName="CONTENT" fieldType="String_super" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="处理结果" fieldLength="20" fieldName="LOG_ERR_RESULT" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性1" fieldLength="50" fieldName="ATTRIBUTE1" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性2" fieldLength="50" fieldName="ATTRIBUTE2" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性3" fieldLength="50" fieldName="ATTRIBUTE3" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0" fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0" fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0" fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0" fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
</tables>
|
||||
</module>
|
||||
</modules>
|
||||
<projectName>wadmin</projectName>
|
||||
<projectBasePackage>xyz.wbsite</projectBasePackage>
|
||||
<projectAuthor>wangbing</projectAuthor>
|
||||
<needMoreDB>false</needMoreDB>
|
||||
<needEMail>false</needEMail>
|
||||
<needSys>false</needSys>
|
||||
<needCloud>false</needCloud>
|
||||
<needAsync>false</needAsync>
|
||||
<database>MySQL</database>
|
||||
<modules>
|
||||
<module>
|
||||
<moduleComment>系统</moduleComment>
|
||||
<modulePrefix>SYS_</modulePrefix>
|
||||
<moduleName>system</moduleName>
|
||||
<hasSysFields/>
|
||||
<tables>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="字典" tableName="DICT" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典名称" fieldLength="50"
|
||||
fieldName="DICT_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典描述" fieldLength="50"
|
||||
fieldName="DICT_COMMENT" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典版本" fieldLength="50"
|
||||
fieldName="VERSION" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="字典项" tableName="DICT_ITEM" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典名称" fieldLength="50"
|
||||
fieldName="DICT_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典键" fieldLength="20" fieldName="KEY"
|
||||
fieldType="String_var" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="字典值" fieldLength="50"
|
||||
fieldName="VALUE" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="排序" fieldLength="0" fieldName="SORT"
|
||||
fieldType="Integer" isMust="false" isPrimaryKey="false" isQuery="false"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="资源" tableName="RES" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源代码" fieldLength="50"
|
||||
fieldName="RES_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源名称" fieldLength="50"
|
||||
fieldName="RES_NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源类型" fieldLength="20"
|
||||
fieldName="RES_TYPE" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源内容" fieldLength="255"
|
||||
fieldName="RES_VALUE" fieldType="String_var255" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级代码" fieldLength="50"
|
||||
fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级名称" fieldLength="50"
|
||||
fieldName="SUP_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否免费" fieldLength="0" fieldName="FREE"
|
||||
fieldType="Boolean" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="19"
|
||||
fieldName="CREATE_BY" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="19"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="用户" tableName="USER" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户账户" fieldLength="100"
|
||||
fieldName="USER_NAME" fieldType="String_var100" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户代码" fieldLength="50"
|
||||
fieldName="USER_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户别名" fieldLength="50"
|
||||
fieldName="USER_ALIAS" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户密码" fieldLength="50"
|
||||
fieldName="USER_PWD" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户状态" fieldLength="20"
|
||||
fieldName="USER_STATUS" fieldType="Dict" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门主键" fieldLength="0"
|
||||
fieldName="DEPT_ID" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50"
|
||||
fieldName="DEPT_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100"
|
||||
fieldName="DEPT_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="19"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="部门" tableName="DEPT" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50"
|
||||
fieldName="DEPT_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100"
|
||||
fieldName="DEPT_NAME" fieldType="String_var100" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门别名" fieldLength="50"
|
||||
fieldName="DEPT_ALIAS" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级代码" fieldLength="50"
|
||||
fieldName="SUP_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="上级名称" fieldLength="100"
|
||||
fieldName="SUP_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="角色" tableName="ROLE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50"
|
||||
fieldName="CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色名称" fieldLength="50"
|
||||
fieldName="NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色描述" fieldLength="50"
|
||||
fieldName="COMMENT" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="通行证" tableName="TOKENS" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="登录令牌" fieldLength="50"
|
||||
fieldName="TOKEN" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户主键" fieldLength="0"
|
||||
fieldName="USER_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户名称" fieldLength="50"
|
||||
fieldName="USER_NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="登录时间" fieldLength="0"
|
||||
fieldName="LOGIN_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="有效时间" fieldLength="0"
|
||||
fieldName="VALID_TIME" fieldType="Date" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门主键" fieldLength="0"
|
||||
fieldName="DEPT_ID" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门代码" fieldLength="50"
|
||||
fieldName="DEPT_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="部门名称" fieldLength="100"
|
||||
fieldName="DEPT_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端类型" fieldLength="20"
|
||||
fieldName="TERMINAL_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端地址" fieldLength="50"
|
||||
fieldName="TERMINAL_IP" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="终端信息" fieldLength="500"
|
||||
fieldName="TERMINAL_INFO" fieldType="String_var500" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="文件" tableName="FILE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="文件名称" fieldLength="255"
|
||||
fieldName="NAME" fieldType="String_var255" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="文件类型" fieldLength="20"
|
||||
fieldName="FILE_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="扩展属性1" fieldLength="50"
|
||||
fieldName="ATTRIBUTE1" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="扩展属性2" fieldLength="50"
|
||||
fieldName="ATTRIBUTE2" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="存放地址" fieldLength="500"
|
||||
fieldName="LOCATION" fieldType="String_var500" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="访问地址" fieldLength="500"
|
||||
fieldName="URL" fieldType="String_var500" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="下载地址" fieldLength="500"
|
||||
fieldName="URL_DOWNLOAD" fieldType="String_var500" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="false" search="false" sys="true"
|
||||
tableComment="用户角色授权" tableName="USER_ROLE" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户主键" fieldLength="0"
|
||||
fieldName="USER_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="用户代码" fieldLength="50"
|
||||
fieldName="USER_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色主键" fieldLength="0"
|
||||
fieldName="ROLE_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50"
|
||||
fieldName="ROLE_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="false" search="false" sys="true"
|
||||
tableComment="角色资源关系" tableName="ROLE_RES" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色主键" fieldLength="0"
|
||||
fieldName="ROLE_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="角色代码" fieldLength="50"
|
||||
fieldName="ROLE_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源主键" fieldLength="0"
|
||||
fieldName="RES_ID" fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="资源代码" fieldLength="50"
|
||||
fieldName="RES_CODE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="错误日志" tableName="LOG_ERR" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误类型" fieldLength="20"
|
||||
fieldName="LOG_ERR_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误标题" fieldLength="50"
|
||||
fieldName="TITLE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="错误内容" fieldLength="0"
|
||||
fieldName="CONTENT" fieldType="String_super" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="处理结果" fieldLength="20"
|
||||
fieldName="LOG_ERR_RESULT" fieldType="Dict" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性1" fieldLength="50"
|
||||
fieldName="ATTRIBUTE1" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性2" fieldLength="50"
|
||||
fieldName="ATTRIBUTE2" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="属性3" fieldLength="50"
|
||||
fieldName="ATTRIBUTE3" fieldType="String_var50" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="SQL任务" tableName="TASK_SQL" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"
|
||||
isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="任务名称" fieldLength="50"
|
||||
fieldName="TASK_NAME" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="详细注释" fieldLength="255"
|
||||
fieldName="TASK_NOTE" fieldType="String_var255" isMust="false" isPrimaryKey="false"
|
||||
isQuery="true" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="任务类型" fieldLength="20"
|
||||
fieldName="TASK_TYPE" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false" isUnique="false">
|
||||
<dictItem key="Cron" value="Cron表达式"/>
|
||||
<dictItem key="DelayRepeat" value="间隔重复"/>
|
||||
<dictItem key="FixRepeat" value="绝对重复"/>
|
||||
</field>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="任务类型值" fieldLength="50"
|
||||
fieldName="TYPE_VALUE" fieldType="String_var50" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="任务SQL" fieldLength="2500"
|
||||
fieldName="TASK_SQL" fieldType="String_var2500" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="是否有效" fieldLength="0"
|
||||
fieldName="VALID" fieldType="Boolean" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"
|
||||
isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
<table create="true" delete="true" find="true" get="true" html="true" search="false" sys="true"
|
||||
tableComment="系统配置" tableName="PROFILES" update="true">
|
||||
<fields>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false"
|
||||
isUnique="false"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="环境" fieldLength="20"
|
||||
fieldName="ACTIVE" fieldType="Dict" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false" isUnique="false">
|
||||
<dictItem key="dev" value="开发环境"/>
|
||||
<dictItem key="prod" value="生产环境"/>
|
||||
</field>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="键" fieldLength="50" fieldName="KEY"
|
||||
fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="true"
|
||||
isSearch="false" isUnique="true"/>
|
||||
<field IsSystem="false" defaultValue="NULL" fieldComment="值" fieldLength="50" fieldName="VALUE"
|
||||
fieldType="String_var50" isMust="true" isPrimaryKey="false" isQuery="false"
|
||||
isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="行版本" fieldLength="0"
|
||||
fieldName="ROW_VERSION" fieldType="Long" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="0" fieldComment="是否已删除" fieldLength="0"
|
||||
fieldName="IS_DELETED" fieldType="Boolean" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="创建用户" fieldLength="0" fieldName="CREATE_BY"
|
||||
fieldType="Long" isMust="true" isPrimaryKey="false" isQuery="false" isSearch="false"
|
||||
isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="NULL" fieldComment="创建时间" fieldLength="0"
|
||||
fieldName="CREATE_TIME" fieldType="Date" isMust="true" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新用户" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_BY" fieldType="Long" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
<field IsSystem="true" defaultValue="" fieldComment="最后更新时间" fieldLength="0"
|
||||
fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false"
|
||||
isQuery="false" isSearch="false" isUnique="false"/>
|
||||
</fields>
|
||||
</table>
|
||||
</tables>
|
||||
</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
@ -0,0 +1,218 @@
|
||||
<div id="app" v-cloak>
|
||||
<el-card class="box-card">
|
||||
<el-form class="search" :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
|
||||
<el-form-item label="环境" prop="active">
|
||||
<el-input-dict v-model="vm.active" clearable size="mini" placeholder="请输入环境" dict-name="ACTIVE" ></el-input-dict>
|
||||
</el-form-item>
|
||||
<el-form-item label="键" prop="key">
|
||||
<el-input v-model="vm.key" clearable size="mini" placeholder="请输入键"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" @click="onSearch">搜索</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-refresh-left" @click="onReset('vm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>
|
||||
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="onExport">导出</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-button-group style="float: right;">
|
||||
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="Excel导入" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-upload2" @click="onImport"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="批量删除" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-delete" @click="onBitchDelete"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="刷新" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-refresh" @click="onFind"></el-button>
|
||||
</el-tooltip>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
class="data"
|
||||
@selection-change="onSelectionChange"
|
||||
empty-text="无数据"
|
||||
:data="result"
|
||||
size="mini">
|
||||
<el-table-column
|
||||
align="center"
|
||||
type="selection"
|
||||
width="45">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="id"
|
||||
label="主键"
|
||||
width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="100"
|
||||
prop="active"
|
||||
label="环境">
|
||||
<template slot-scope="scope">
|
||||
<el-view-dict v-model="scope.row.active" dict-name="ACTIVE"></el-view-dict>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="key"
|
||||
label="键">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="value"
|
||||
label="值">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="140"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
fixed="right"
|
||||
width="120"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<wb-dropdown :arg="scope.row">
|
||||
<wb-dropdown-item value="编辑" icon="el-icon-edit" @click="onEdit"></wb-dropdown-item>
|
||||
<wb-dropdown-item value="删除" icon="el-icon-delete" @click="onDelete"></wb-dropdown-item>
|
||||
</wb-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
background
|
||||
v-if="vm.totalCount > vm.pageSize"
|
||||
style="margin-top: 10px"
|
||||
@current-change="onPageChange"
|
||||
:current-page="vm.pageNumber"
|
||||
:page-size="vm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="vm.totalCount">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:custom-class="'dialog'"
|
||||
:title="form.title"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="form.dialog">
|
||||
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
|
||||
<el-form-item label="环境" prop="active">
|
||||
<el-input-dict v-model="form.active" clearable size="mini" placeholder="请输入环境" dict-name="ACTIVE" ></el-input-dict>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="form.dialog = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="onSave">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
mixins: [mixin],
|
||||
el: "#app",
|
||||
data: {
|
||||
module: 'example',
|
||||
target: 'profiles',
|
||||
vm: {//条件及分页参数
|
||||
active: "",
|
||||
key: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sortKey:'CREATE_TIME',
|
||||
sortType:'DESC'
|
||||
},
|
||||
form: {//待提交表单
|
||||
title: "",
|
||||
dialog: false,
|
||||
id: '',
|
||||
active: "",
|
||||
key: "",
|
||||
value: "",
|
||||
rowVersion: ""
|
||||
},
|
||||
formRules: {
|
||||
active: [
|
||||
{required: true, message: '环境不能为空', trigger: 'blur'},
|
||||
],
|
||||
key: [
|
||||
{required: true, message: '键不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 50, message: '键长度在 1 到 50 个字符', trigger: 'blur'}
|
||||
],
|
||||
value: [
|
||||
{required: true, message: '值不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 50, message: '值长度在 1 到 50 个字符', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCreate: function () {
|
||||
this.form.title = "系统配置新增";
|
||||
this.form.dialog = true;
|
||||
this.form.id = "";
|
||||
this.form.active = "";
|
||||
this.form.key = "";
|
||||
this.form.value = "";
|
||||
},
|
||||
onEdit: function (item) {
|
||||
this.form.title = "系统配置编辑";
|
||||
this.form.dialog = true;
|
||||
this.form.id = item.id;
|
||||
this.form.active = item.active;
|
||||
this.form.key = item.key;
|
||||
this.form.value = item.value;
|
||||
this.form.rowVersion = item.rowVersion;
|
||||
},
|
||||
onDelete: function (item) {
|
||||
this.$confirm('将删除该项, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
new Ajax("example", "profiles").delete({id: item.id}, function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
} else {
|
||||
nav.s("删除成功");
|
||||
this.onFind();
|
||||
}
|
||||
}.bind(this))
|
||||
}.bind(this)).catch(function (action) {
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.onFind();
|
||||
},
|
||||
})
|
||||
</script>
|
@ -0,0 +1,281 @@
|
||||
<div id="app" v-cloak>
|
||||
<el-card class="box-card">
|
||||
<el-form class="search" :inline="true" :model="vm" ref="vm" label-position="right" label-width="90px">
|
||||
<el-form-item label="任务名称" prop="taskName">
|
||||
<el-input v-model="vm.taskName" clearable size="mini" placeholder="请输入任务名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细注释" prop="taskNote">
|
||||
<el-input v-model="vm.taskNote" clearable size="mini" placeholder="请输入详细注释"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="taskType">
|
||||
<el-input-dict v-model="vm.taskType" clearable size="mini" placeholder="请输入任务类型" dict-name="TASK_TYPE" ></el-input-dict>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有效" prop="valid">
|
||||
<el-radio-group v-model="vm.valid" clearable size="mini">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" @click="onSearch">搜索</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-refresh-left" @click="onReset('vm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>
|
||||
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="onExport">导出</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-button-group style="float: right;">
|
||||
<el-tooltip effect="dark" content="Excel模板下载" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-date" @click="onTemplate"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="Excel导入" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-upload2" @click="onImport"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="批量删除" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-delete" @click="onBitchDelete"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="刷新" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-refresh" @click="onFind"></el-button>
|
||||
</el-tooltip>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
class="data"
|
||||
@selection-change="onSelectionChange"
|
||||
empty-text="无数据"
|
||||
:data="result"
|
||||
size="mini">
|
||||
<el-table-column
|
||||
align="center"
|
||||
type="selection"
|
||||
width="45">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="id"
|
||||
label="主键"
|
||||
width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="taskName"
|
||||
label="任务名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="taskNote"
|
||||
label="详细注释">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="100"
|
||||
prop="taskType"
|
||||
label="任务类型">
|
||||
<template slot-scope="scope">
|
||||
<el-view-dict v-model="scope.row.taskType" dict-name="TASK_TYPE"></el-view-dict>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="typeValue"
|
||||
label="任务类型值">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="240"
|
||||
prop="taskSql"
|
||||
label="任务SQL">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="valid"
|
||||
label="是否有效">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.valid">是</span>
|
||||
<span v-if="!scope.row.valid">否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="140"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
fixed="right"
|
||||
width="120"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<wb-dropdown :arg="scope.row">
|
||||
<wb-dropdown-item value="编辑" icon="el-icon-edit" @click="onEdit"></wb-dropdown-item>
|
||||
<wb-dropdown-item value="删除" icon="el-icon-delete" @click="onDelete"></wb-dropdown-item>
|
||||
</wb-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
background
|
||||
v-if="vm.totalCount > vm.pageSize"
|
||||
style="margin-top: 10px"
|
||||
@current-change="onPageChange"
|
||||
:current-page="vm.pageNumber"
|
||||
:page-size="vm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="vm.totalCount">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:custom-class="'dialog'"
|
||||
:title="form.title"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="form.dialog">
|
||||
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
|
||||
<el-form-item label="任务名称" prop="taskName">
|
||||
<el-input v-model="form.taskName" clearable size="mini" placeholder="请输入任务名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细注释" prop="taskNote">
|
||||
<el-input v-model="form.taskNote" clearable size="mini" placeholder="请输入详细注释"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="taskType">
|
||||
<el-input-dict v-model="form.taskType" clearable size="mini" placeholder="请输入任务类型" dict-name="TASK_TYPE" ></el-input-dict>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型值" prop="typeValue">
|
||||
<el-input v-model="form.typeValue" clearable size="mini" placeholder="请输入任务类型值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务SQL" prop="taskSql">
|
||||
<el-input v-model="form.taskSql" clearable size="mini" placeholder="请输入任务SQL"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有效" prop="valid">
|
||||
<el-radio-group v-model="form.valid" clearable size="mini">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="form.dialog = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="onSave">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
mixins: [mixin],
|
||||
el: "#app",
|
||||
data: {
|
||||
module: 'example',
|
||||
target: 'taskSql',
|
||||
vm: {//条件及分页参数
|
||||
taskName: "",
|
||||
taskNote: "",
|
||||
taskType: "",
|
||||
valid: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sortKey:'CREATE_TIME',
|
||||
sortType:'DESC'
|
||||
},
|
||||
form: {//待提交表单
|
||||
title: "",
|
||||
dialog: false,
|
||||
id: '',
|
||||
taskName: "",
|
||||
taskNote: "",
|
||||
taskType: "",
|
||||
typeValue: "",
|
||||
taskSql: "",
|
||||
valid: "",
|
||||
rowVersion: ""
|
||||
},
|
||||
formRules: {
|
||||
taskName: [
|
||||
{required: true, message: '任务名称不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 50, message: '任务名称长度在 1 到 50 个字符', trigger: 'blur'}
|
||||
],
|
||||
taskNote: [
|
||||
{min: 1, max: 255, message: '详细注释长度在 1 到 255 个字符', trigger: 'blur'}
|
||||
],
|
||||
taskType: [
|
||||
{required: true, message: '任务类型不能为空', trigger: 'blur'},
|
||||
],
|
||||
typeValue: [
|
||||
{required: true, message: '任务类型值不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 50, message: '任务类型值长度在 1 到 50 个字符', trigger: 'blur'}
|
||||
],
|
||||
taskSql: [
|
||||
{required: true, message: '任务SQL不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 2500, message: '任务SQL长度在 1 到 2500 个字符', trigger: 'blur'}
|
||||
],
|
||||
valid: [
|
||||
{required: true, message: '是否有效不能为空', trigger: 'blur'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCreate: function () {
|
||||
this.form.title = "SQL任务新增";
|
||||
this.form.dialog = true;
|
||||
this.form.id = "";
|
||||
this.form.taskName = "";
|
||||
this.form.taskNote = "";
|
||||
this.form.taskType = "";
|
||||
this.form.typeValue = "";
|
||||
this.form.taskSql = "";
|
||||
this.form.valid = "";
|
||||
},
|
||||
onEdit: function (item) {
|
||||
this.form.title = "SQL任务编辑";
|
||||
this.form.dialog = true;
|
||||
this.form.id = item.id;
|
||||
this.form.taskName = item.taskName;
|
||||
this.form.taskNote = item.taskNote;
|
||||
this.form.taskType = item.taskType;
|
||||
this.form.typeValue = item.typeValue;
|
||||
this.form.taskSql = item.taskSql;
|
||||
this.form.valid = item.valid;
|
||||
this.form.rowVersion = item.rowVersion;
|
||||
},
|
||||
onDelete: function (item) {
|
||||
this.$confirm('将删除该项, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
new Ajax("example", "taskSql").delete({id: item.id}, function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
} else {
|
||||
nav.s("删除成功");
|
||||
this.onFind();
|
||||
}
|
||||
}.bind(this))
|
||||
}.bind(this)).catch(function (action) {
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.onFind();
|
||||
},
|
||||
})
|
||||
</script>
|
@ -0,0 +1,130 @@
|
||||
package ${basePackage}.system;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.mgr.ProfilesManager;
|
||||
import ${basePackage}.module.system.req.ProfilesCreateRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesDeleteRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesFindRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesGetRequest;
|
||||
import ${basePackage}.module.system.req.ProfilesUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.ProfilesCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesFindResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesGetResponse;
|
||||
import ${basePackage}.module.system.rsp.ProfilesUpdateResponse;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
/**
|
||||
* ProfilesTest - - 系统配置测试用例
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Transactional
|
||||
public class ProfilesTest {
|
||||
|
||||
@Autowired
|
||||
private Token token;
|
||||
|
||||
@Autowired
|
||||
private ProfilesManager profilesManager;
|
||||
|
||||
@Test
|
||||
public void testCreate() {
|
||||
ProfilesCreateRequest request = new ProfilesCreateRequest();
|
||||
request.setActive("环境");
|
||||
request.setKey("键");
|
||||
request.setValue("值");
|
||||
|
||||
ProfilesCreateResponse response = profilesManager.create(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
|
||||
//创建数据
|
||||
ProfilesCreateRequest createRequest = new ProfilesCreateRequest();
|
||||
createRequest.setActive("环境");
|
||||
createRequest.setKey("键");
|
||||
createRequest.setValue("值");
|
||||
|
||||
ProfilesCreateResponse createResponse = profilesManager.create(createRequest,token);
|
||||
|
||||
assertTrue(!createResponse.hasError() && createResponse.getId() > 0);
|
||||
//删除数据
|
||||
ProfilesDeleteRequest request = new ProfilesDeleteRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
ProfilesDeleteResponse response = profilesManager.delete(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
//创建数据
|
||||
ProfilesCreateRequest createRequest = new ProfilesCreateRequest();
|
||||
createRequest.setActive("环境");
|
||||
createRequest.setKey("键");
|
||||
createRequest.setValue("值");
|
||||
|
||||
ProfilesCreateResponse createResponse = profilesManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//更新数据
|
||||
ProfilesUpdateRequest request = new ProfilesUpdateRequest();
|
||||
request.setId(createResponse.getId());
|
||||
request.setActive("环境");
|
||||
request.setKey("键");
|
||||
request.setValue("值");
|
||||
|
||||
ProfilesUpdateResponse response = profilesManager.update(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFind() {
|
||||
ProfilesFindRequest request = new ProfilesFindRequest();
|
||||
request.setActive("环境");
|
||||
request.setKey("键");
|
||||
|
||||
ProfilesFindResponse response = profilesManager.find(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet() {
|
||||
//创建数据
|
||||
ProfilesCreateRequest createRequest = new ProfilesCreateRequest();
|
||||
createRequest.setActive("环境");
|
||||
createRequest.setKey("键");
|
||||
createRequest.setValue("值");
|
||||
|
||||
ProfilesCreateResponse createResponse = profilesManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//获得数据
|
||||
ProfilesGetRequest request = new ProfilesGetRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
ProfilesGetResponse response = profilesManager.get(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getProfiles() != null);
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
package ${basePackage}.system;
|
||||
|
||||
import ${basePackage}.frame.auth.Token;
|
||||
import ${basePackage}.module.system.mgr.TaskSqlManager;
|
||||
import ${basePackage}.module.system.req.TaskSqlCreateRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlDeleteRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlFindRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlGetRequest;
|
||||
import ${basePackage}.module.system.req.TaskSqlUpdateRequest;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlCreateResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlDeleteResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlFindResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlGetResponse;
|
||||
import ${basePackage}.module.system.rsp.TaskSqlUpdateResponse;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
/**
|
||||
* TaskSqlTest - - SQL任务测试用例
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Transactional
|
||||
public class TaskSqlTest {
|
||||
|
||||
@Autowired
|
||||
private Token token;
|
||||
|
||||
@Autowired
|
||||
private TaskSqlManager taskSqlManager;
|
||||
|
||||
@Test
|
||||
public void testCreate() {
|
||||
TaskSqlCreateRequest request = new TaskSqlCreateRequest();
|
||||
request.setTaskName("任务名称");
|
||||
request.setTaskNote("详细注释");
|
||||
request.setTaskType("code");
|
||||
request.setTypeValue("任务类型值");
|
||||
request.setTaskSql("任务SQL");
|
||||
request.setValid(true);
|
||||
|
||||
TaskSqlCreateResponse response = taskSqlManager.create(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
|
||||
//创建数据
|
||||
TaskSqlCreateRequest createRequest = new TaskSqlCreateRequest();
|
||||
createRequest.setTaskName("任务名称");
|
||||
createRequest.setTaskNote("详细注释");
|
||||
createRequest.setTaskType("code");
|
||||
createRequest.setTypeValue("任务类型值");
|
||||
createRequest.setTaskSql("任务SQL");
|
||||
createRequest.setValid(true);
|
||||
|
||||
TaskSqlCreateResponse createResponse = taskSqlManager.create(createRequest,token);
|
||||
|
||||
assertTrue(!createResponse.hasError() && createResponse.getId() > 0);
|
||||
//删除数据
|
||||
TaskSqlDeleteRequest request = new TaskSqlDeleteRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
TaskSqlDeleteResponse response = taskSqlManager.delete(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
//创建数据
|
||||
TaskSqlCreateRequest createRequest = new TaskSqlCreateRequest();
|
||||
createRequest.setTaskName("任务名称");
|
||||
createRequest.setTaskNote("详细注释");
|
||||
createRequest.setTaskType("code");
|
||||
createRequest.setTypeValue("任务类型值");
|
||||
createRequest.setTaskSql("任务SQL");
|
||||
createRequest.setValid(true);
|
||||
|
||||
TaskSqlCreateResponse createResponse = taskSqlManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//更新数据
|
||||
TaskSqlUpdateRequest request = new TaskSqlUpdateRequest();
|
||||
request.setId(createResponse.getId());
|
||||
request.setTaskName("任务名称");
|
||||
request.setTaskNote("详细注释");
|
||||
request.setTaskType("code");
|
||||
request.setTypeValue("任务类型值");
|
||||
request.setTaskSql("任务SQL");
|
||||
request.setValid(true);
|
||||
|
||||
TaskSqlUpdateResponse response = taskSqlManager.update(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFind() {
|
||||
TaskSqlFindRequest request = new TaskSqlFindRequest();
|
||||
request.setTaskName("任务名称");
|
||||
request.setTaskNote("详细注释");
|
||||
request.setTaskType("code");
|
||||
request.setValid(true);
|
||||
|
||||
TaskSqlFindResponse response = taskSqlManager.find(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet() {
|
||||
//创建数据
|
||||
TaskSqlCreateRequest createRequest = new TaskSqlCreateRequest();
|
||||
createRequest.setTaskName("任务名称");
|
||||
createRequest.setTaskNote("详细注释");
|
||||
createRequest.setTaskType("code");
|
||||
createRequest.setTypeValue("任务类型值");
|
||||
createRequest.setTaskSql("任务SQL");
|
||||
createRequest.setValid(true);
|
||||
|
||||
TaskSqlCreateResponse createResponse = taskSqlManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//获得数据
|
||||
TaskSqlGetRequest request = new TaskSqlGetRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
TaskSqlGetResponse response = taskSqlManager.get(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getTaskSql() != null);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue