parent
687d138f77
commit
8774eda6a9
@ -0,0 +1,74 @@
|
||||
package ${domain}.module.wsvr.ent;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import ${domain}.frame.base.BaseEntity;
|
||||
import ${domain}.frame.excel.annotation.ExcelNote;
|
||||
import ${domain}.frame.excel.annotation.ExcelSheet;
|
||||
|
||||
/**
|
||||
* LOGERR - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
@ExcelSheet("错误日志")
|
||||
public class Logerr extends BaseEntity {
|
||||
|
||||
/**
|
||||
* LOG_TYPE - 日志类型
|
||||
*/
|
||||
@ExcelProperty("日志类型")
|
||||
@ExcelNote("")
|
||||
private String logType;
|
||||
/**
|
||||
* LOG_TITLE - 任务标题
|
||||
*/
|
||||
@ExcelProperty("任务标题")
|
||||
@ExcelNote("")
|
||||
private String logTitle;
|
||||
/**
|
||||
* LOG_NOTE - 日志描述
|
||||
*/
|
||||
@ExcelProperty("日志描述")
|
||||
@ExcelNote("")
|
||||
private String logNote;
|
||||
/**
|
||||
* LOG_STATE - 日志状态
|
||||
*/
|
||||
@ExcelProperty("日志状态")
|
||||
@ExcelNote("")
|
||||
private String logState;
|
||||
|
||||
public String getLogType() {
|
||||
return this.logType;
|
||||
}
|
||||
|
||||
public void setLogType(String logType) {
|
||||
this.logType = logType;
|
||||
}
|
||||
|
||||
public String getLogTitle() {
|
||||
return this.logTitle;
|
||||
}
|
||||
|
||||
public void setLogTitle(String logTitle) {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
public String getLogNote() {
|
||||
return this.logNote;
|
||||
}
|
||||
|
||||
public void setLogNote(String logNote) {
|
||||
this.logNote = logNote;
|
||||
}
|
||||
|
||||
public String getLogState() {
|
||||
return this.logState;
|
||||
}
|
||||
|
||||
public void setLogState(String logState) {
|
||||
this.logState = logState;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package ${domain}.module.wsvr.mgr;
|
||||
|
||||
import ${domain}.frame.auth.Token;
|
||||
import ${domain}.module.wsvr.req.LogerrCreateRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrDeleteRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrFindRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrUpdateRequest;
|
||||
import ${domain}.module.wsvr.rsp.LogerrCreateResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrDeleteResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrFindResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrUpdateResponse;
|
||||
|
||||
/**
|
||||
* 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public interface LogerrManager {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogerrCreateResponse create(LogerrCreateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogerrDeleteResponse delete(LogerrDeleteRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogerrUpdateResponse update(LogerrUpdateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogerrFindResponse find(LogerrFindRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 快速添加错误日志
|
||||
*
|
||||
* @param logType 日志类型
|
||||
* @param logTitle 标题
|
||||
* @param logNote 描述
|
||||
* @return
|
||||
*/
|
||||
boolean addErr(String logType, String logTitle, String logNote);
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
package ${domain}.module.wsys.mgr;
|
||||
package ${domain}.module.wsvr.mgr;
|
||||
|
||||
import ${domain}.frame.auth.Token;
|
||||
import ${domain}.module.wsys.req.ProfilesCreateRequest;
|
||||
import ${domain}.module.wsys.req.ProfilesDeleteRequest;
|
||||
import ${domain}.module.wsys.req.ProfilesFindRequest;
|
||||
import ${domain}.module.wsys.req.ProfilesUpdateRequest;
|
||||
import ${domain}.module.wsys.rsp.ProfilesCreateResponse;
|
||||
import ${domain}.module.wsys.rsp.ProfilesDeleteResponse;
|
||||
import ${domain}.module.wsys.rsp.ProfilesFindResponse;
|
||||
import ${domain}.module.wsys.rsp.ProfilesUpdateResponse;
|
||||
import ${domain}.module.wsvr.req.ProfilesCreateRequest;
|
||||
import ${domain}.module.wsvr.req.ProfilesDeleteRequest;
|
||||
import ${domain}.module.wsvr.req.ProfilesFindRequest;
|
||||
import ${domain}.module.wsvr.req.ProfilesUpdateRequest;
|
||||
import ${domain}.module.wsvr.rsp.ProfilesCreateResponse;
|
||||
import ${domain}.module.wsvr.rsp.ProfilesDeleteResponse;
|
||||
import ${domain}.module.wsvr.rsp.ProfilesFindResponse;
|
||||
import ${domain}.module.wsvr.rsp.ProfilesUpdateResponse;
|
||||
|
||||
/**
|
||||
* 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public interface ProfilesManager {
|
||||
|
@ -0,0 +1,157 @@
|
||||
<?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="${domain}.module.wsvr.mpr.LogerrMapper">
|
||||
|
||||
<sql id="table">"SYS_LOGERR"</sql>
|
||||
|
||||
<sql id="entityColumnList">
|
||||
"ID","LOG_TYPE","LOG_TITLE","LOG_NOTE","LOG_STATE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||
</sql>
|
||||
|
||||
<resultMap id="logerr" type="${domain}.module.wsvr.ent.Logerr">
|
||||
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||
<result column="LOG_TYPE" jdbcType="VARCHAR" property="logType"/>
|
||||
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
|
||||
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
|
||||
<result column="LOG_STATE" jdbcType="VARCHAR" property="logState"/>
|
||||
<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>
|
||||
|
||||
<insert id="insert">
|
||||
INSERT INTO
|
||||
<include refid="table"/>
|
||||
(
|
||||
<include refid="entityColumnList"/>
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
${r'#'}{request.id},
|
||||
${r'#'}{request.logType,jdbcType=VARCHAR},
|
||||
${r'#'}{request.logTitle,jdbcType=VARCHAR},
|
||||
${r'#'}{request.logNote,jdbcType=VARCHAR},
|
||||
${r'#'}{request.logState,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="," open="(" close=")">
|
||||
${r'#'}{item.id},
|
||||
${r'#'}{item.logType,jdbcType=VARCHAR},
|
||||
${r'#'}{item.logTitle,jdbcType=VARCHAR},
|
||||
${r'#'}{item.logNote,jdbcType=VARCHAR},
|
||||
${r'#'}{item.logState,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'#'}{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteBatch">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET "IS_DELETED" = 1
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" IN
|
||||
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||
${r'#'}{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="update">
|
||||
UPDATE
|
||||
<include refid="table"/>
|
||||
SET
|
||||
LOG_TYPE = ${r'#'}{request.logType,jdbcType=VARCHAR},
|
||||
LOG_TITLE = ${r'#'}{request.logTitle,jdbcType=VARCHAR},
|
||||
LOG_NOTE = ${r'#'}{request.logNote,jdbcType=VARCHAR},
|
||||
LOG_STATE = ${r'#'}{request.logState,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="find" resultMap="logerr">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE "IS_DELETED" = 0
|
||||
<if test="request.logType != null and request.logType != ''">
|
||||
AND "LOG_TYPE" = ${r'#'}{request.logType}
|
||||
</if>
|
||||
<if test="request.logTitle != null and request.logTitle != ''">
|
||||
AND "LOG_TITLE" = ${r'#'}{request.logTitle}
|
||||
</if>
|
||||
<if test="request.logState != null and request.logState != ''">
|
||||
AND "LOG_STATE" = ${r'#'}{request.logState}
|
||||
</if>
|
||||
<if test="request.startDate != null">
|
||||
AND strftime('%s',"CREATE_TIME", 'utc')*1000 >= ${r'#'}{{request.startDate}
|
||||
</if>
|
||||
<if test="request.endDate != null">
|
||||
AND strftime('%s',"CREATE_TIME", 'utc')*1000 <= ${r'#'}{{request.endDate}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="search" resultMap="logerr">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE "IS_DELETED" = 0
|
||||
</select>
|
||||
|
||||
<select id="getById" resultMap="logerr">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" = ${r'#'}{id}
|
||||
</select>
|
||||
|
||||
<select id="getByIds" resultMap="logerr">
|
||||
SELECT
|
||||
<include refid="entityColumnList"/>
|
||||
FROM
|
||||
<include refid="table"/>
|
||||
WHERE "IS_DELETED" = 0
|
||||
AND "ID" IN
|
||||
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||
${r'#'}{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,77 @@
|
||||
package ${domain}.module.wsvr.req;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import ${domain}.frame.base.BaseRequest;
|
||||
import ${domain}.frame.validation.Select;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* LogerrCreateRequest - 错误日志新增
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrCreateRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 日志类型.
|
||||
*/
|
||||
@NotNull(message = "[logType]日志类型不能为NULL")
|
||||
@Select({"系统错误", "任务错误", "业务错误"})
|
||||
private String logType;
|
||||
|
||||
/**
|
||||
* 任务标题.
|
||||
*/
|
||||
@NotBlank(message = "[logTitle]任务标题不能为空")
|
||||
@Length(min = 0, max = 50, message = "[logTitle]任务标题长度不合法(0-50)")
|
||||
private String logTitle;
|
||||
|
||||
/**
|
||||
* 日志描述.
|
||||
*/
|
||||
@Length(min = 0, max = 500, message = "[logNote]日志描述长度不合法(0-500)")
|
||||
private String logNote;
|
||||
|
||||
/**
|
||||
* 日志状态.
|
||||
*/
|
||||
@NotNull(message = "[logState]日志状态不能为NULL")
|
||||
@Select({"0", "1", "2"})
|
||||
private String logState;
|
||||
|
||||
public String getLogType() {
|
||||
return this.logType;
|
||||
}
|
||||
|
||||
public void setLogType(String logType) {
|
||||
this.logType = logType;
|
||||
}
|
||||
|
||||
public String getLogTitle() {
|
||||
return this.logTitle;
|
||||
}
|
||||
|
||||
public void setLogTitle(String logTitle) {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
public String getLogNote() {
|
||||
return this.logNote;
|
||||
}
|
||||
|
||||
public void setLogNote(String logNote) {
|
||||
this.logNote = logNote;
|
||||
}
|
||||
|
||||
public String getLogState() {
|
||||
return this.logState;
|
||||
}
|
||||
|
||||
public void setLogState(String logState) {
|
||||
this.logState = logState;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package ${domain}.module.wsvr.req;
|
||||
|
||||
import ${domain}.frame.base.BaseRequest;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* LogerrDeleteRequest - 错误日志删除
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrDeleteRequest 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,91 @@
|
||||
package ${domain}.module.wsvr.req;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import ${domain}.frame.base.BaseUpdateRequest;
|
||||
import ${domain}.frame.validation.Select;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* LogerrUpdateRequest - 错误日志更新
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrUpdateRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为NULL")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 日志类型.
|
||||
*/
|
||||
@NotNull(message = "[logType]日志类型不能为NULL")
|
||||
@Select({"系统错误", "任务错误", "业务错误"})
|
||||
private String logType;
|
||||
|
||||
/**
|
||||
* 任务标题.
|
||||
*/
|
||||
@NotBlank(message = "[logTitle]任务标题不能为空")
|
||||
@Length(min = 0, max = 50, message = "[logTitle]任务标题长度不合法(0-50)")
|
||||
private String logTitle;
|
||||
|
||||
/**
|
||||
* 日志描述.
|
||||
*/
|
||||
@Length(min = 0, max = 500, message = "[logNote]日志描述长度不合法(0-500)")
|
||||
private String logNote;
|
||||
|
||||
/**
|
||||
* 日志状态.
|
||||
*/
|
||||
@NotNull(message = "[logState]日志状态不能为NULL")
|
||||
@Select({"0", "1", "2"})
|
||||
private String logState;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLogType() {
|
||||
return this.logType;
|
||||
}
|
||||
|
||||
public void setLogType(String logType) {
|
||||
this.logType = logType;
|
||||
}
|
||||
|
||||
public String getLogTitle() {
|
||||
return this.logTitle;
|
||||
}
|
||||
|
||||
public void setLogTitle(String logTitle) {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
public String getLogNote() {
|
||||
return this.logNote;
|
||||
}
|
||||
|
||||
public void setLogNote(String logNote) {
|
||||
this.logNote = logNote;
|
||||
}
|
||||
|
||||
public String getLogState() {
|
||||
return this.logState;
|
||||
}
|
||||
|
||||
public void setLogState(String logState) {
|
||||
this.logState = logState;
|
||||
}
|
||||
}
|
@ -1,25 +1,27 @@
|
||||
package ${domain}.module.wsys.req;
|
||||
package ${domain}.module.wsvr.req;
|
||||
|
||||
import ${domain}.frame.base.BaseFindRequest;
|
||||
import ${domain}.frame.validation.Select;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* ProfilesFindRequest - 系统配置查询
|
||||
*
|
||||
* @author author
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class ProfilesFindRequest extends BaseFindRequest {
|
||||
|
||||
/**
|
||||
* 环境
|
||||
* 环境.
|
||||
*/
|
||||
@Select({"dev", "prod"})
|
||||
private String active;
|
||||
|
||||
/**
|
||||
* 键
|
||||
* 配置键.
|
||||
*/
|
||||
private String key;
|
||||
|
@ -0,0 +1,26 @@
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* LogerrCreateResponse - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrCreateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* LogerrDeleteResponse - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrDeleteResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 删除数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseFindResponse;
|
||||
import ${domain}.module.wsvr.ent.Logerr;
|
||||
|
||||
/**
|
||||
* LogerrFindResponse - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrFindResponse extends BaseFindResponse<Logerr> {
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* LogerrUpdateResponse - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class LogerrUpdateResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 更新数目
|
||||
*/
|
||||
private Long result;
|
||||
|
||||
public Long getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public void setResult(Long result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package ${domain}.module.wsys.rsp;
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesCreateResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class ProfilesCreateResponse extends BaseResponse {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package ${domain}.module.wsys.rsp;
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesDeleteResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class ProfilesDeleteResponse extends BaseResponse {
|
||||
|
@ -0,0 +1,13 @@
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseFindResponse;
|
||||
|
||||
/**
|
||||
* ProfilesFindResponse - 系统配置
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class ProfilesFindResponse extends BaseFindResponse<${domain}.module.wsvr.ent.Profiles> {
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package ${domain}.module.wsys.rsp;
|
||||
package ${domain}.module.wsvr.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseResponse;
|
||||
|
||||
/**
|
||||
* ProfilesUpdateResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
public class ProfilesUpdateResponse extends BaseResponse {
|
||||
|
@ -1,117 +0,0 @@
|
||||
package ${domain}.module.wsys.ent;
|
||||
|
||||
import ${domain}.frame.excel.annotation.ExcelNote;
|
||||
import ${domain}.frame.excel.annotation.ExcelSelect;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import ${domain}.frame.excel.annotation.ExcelSheet;
|
||||
import ${domain}.frame.base.BaseEntity;
|
||||
|
||||
/**
|
||||
* LOG_ERR - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-06-07
|
||||
*/
|
||||
@ExcelSheet("错误日志")
|
||||
public class LogErr extends BaseEntity {
|
||||
|
||||
/**
|
||||
* LOG_ERR_TYPE - 错误类型
|
||||
*/
|
||||
@ExcelProperty("错误类型")
|
||||
@ExcelNote("")
|
||||
private String logErrType;
|
||||
/**
|
||||
* LOG_TITLE - 日志标题
|
||||
*/
|
||||
@ExcelProperty("日志标题")
|
||||
@ExcelNote("")
|
||||
private String logTitle;
|
||||
/**
|
||||
* LOG_NOTE - 日志内容
|
||||
*/
|
||||
@ExcelProperty("日志内容")
|
||||
@ExcelNote("")
|
||||
private String logNote;
|
||||
/**
|
||||
* LOG_ERR_RESULT - 处理结果
|
||||
*/
|
||||
@ExcelProperty("处理结果")
|
||||
@ExcelNote("")
|
||||
private String logErrResult;
|
||||
/**
|
||||
* LOG_ATTR1 - 属性1
|
||||
*/
|
||||
@ExcelProperty("属性1")
|
||||
@ExcelNote("")
|
||||
private String logAttr1;
|
||||
/**
|
||||
* LOG_ATTR2 - 属性2
|
||||
*/
|
||||
@ExcelProperty("属性2")
|
||||
@ExcelNote("")
|
||||
private String logAttr2;
|
||||
/**
|
||||
* LOG_ATTR3 - 属性3
|
||||
*/
|
||||
@ExcelProperty("属性3")
|
||||
@ExcelNote("")
|
||||
private String logAttr3;
|
||||
|
||||
public String getLogErrType() {
|
||||
return this.logErrType;
|
||||
}
|
||||
|
||||
public void setLogErrType(String logErrType) {
|
||||
this.logErrType = logErrType;
|
||||
}
|
||||
|
||||
public String getLogTitle() {
|
||||
return this.logTitle;
|
||||
}
|
||||
|
||||
public void setLogTitle(String logTitle) {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
public String getLogNote() {
|
||||
return this.logNote;
|
||||
}
|
||||
|
||||
public void setLogNote(String logNote) {
|
||||
this.logNote = logNote;
|
||||
}
|
||||
|
||||
public String getLogErrResult() {
|
||||
return this.logErrResult;
|
||||
}
|
||||
|
||||
public void setLogErrResult(String logErrResult) {
|
||||
this.logErrResult = logErrResult;
|
||||
}
|
||||
|
||||
public String getLogAttr1() {
|
||||
return this.logAttr1;
|
||||
}
|
||||
|
||||
public void setLogAttr1(String logAttr1) {
|
||||
this.logAttr1 = logAttr1;
|
||||
}
|
||||
|
||||
public String getLogAttr2() {
|
||||
return this.logAttr2;
|
||||
}
|
||||
|
||||
public void setLogAttr2(String logAttr2) {
|
||||
this.logAttr2 = logAttr2;
|
||||
}
|
||||
|
||||
public String getLogAttr3() {
|
||||
return this.logAttr3;
|
||||
}
|
||||
|
||||
public void setLogAttr3(String logAttr3) {
|
||||
this.logAttr3 = logAttr3;
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package ${domain}.module.wsys.mgr;
|
||||
|
||||
import ${domain}.frame.auth.Token;
|
||||
import ${domain}.module.wsys.req.LogErrCreateRequest;
|
||||
import ${domain}.module.wsys.req.LogErrDeleteRequest;
|
||||
import ${domain}.module.wsys.req.LogErrFindRequest;
|
||||
import ${domain}.module.wsys.req.LogErrUpdateRequest;
|
||||
import ${domain}.module.wsys.rsp.LogErrCreateResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrDeleteResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrFindResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrUpdateResponse;
|
||||
|
||||
/**
|
||||
* 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2017-01-01
|
||||
*/
|
||||
public interface LogErrManager {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogErrCreateResponse create(LogErrCreateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogErrDeleteResponse delete(LogErrDeleteRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogErrUpdateResponse update(LogErrUpdateRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @param token 令牌
|
||||
* @return
|
||||
*/
|
||||
LogErrFindResponse find(LogErrFindRequest request, Token token);
|
||||
|
||||
/**
|
||||
* 快速添加错误日志
|
||||
* @param LogErrType SYS_ERR、BIZ_ERR
|
||||
* @param title 标题
|
||||
* @param content 描述
|
||||
* @return
|
||||
*/
|
||||
boolean addErr(String LogErrType, String title, String content);
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
package ${domain}.module.wsys.req;
|
||||
|
||||
import ${domain}.frame.base.BaseRequest;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import ${domain}.frame.validation.Dict;
|
||||
|
||||
/**
|
||||
* LogErrCreateRequest - 错误日志新增
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-06-07
|
||||
*/
|
||||
public class LogErrCreateRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 错误类型.
|
||||
*/
|
||||
@Dict(name = "LOG_ERR_TYPE")
|
||||
private String logErrType;
|
||||
|
||||
/**
|
||||
* 日志标题.
|
||||
*/
|
||||
@NotBlank(message = "[logTitle]日志标题不能为空")
|
||||
@Length(min = 0, max = 50, message = "[logTitle]日志标题长度不合法(0-50)")
|
||||
private String logTitle;
|
||||
|
||||
/**
|
||||
* 日志内容.
|
||||
*/
|
||||
private String logNote;
|
||||
|
||||
/**
|
||||
* 处理结果.
|
||||
*/
|
||||
@NotNull(message = "[logErrResult]处理结果不能为NULL")
|
||||
@Dict(name = "LOG_ERR_RESULT")
|
||||
private String logErrResult;
|
||||
|
||||
/**
|
||||
* 属性1.
|
||||
*/
|
||||
@Length(min = 0, max = 50, message = "[logAttr1]属性1长度不合法(0-50)")
|
||||
private String logAttr1;
|
||||
|
||||
/**
|
||||
* 属性2.
|
||||
*/
|
||||
@Length(min = 0, max = 50, message = "[logAttr2]属性2长度不合法(0-50)")
|
||||
private String logAttr2;
|
||||
|
||||
/**
|
||||
* 属性3.
|
||||
*/
|
||||
@Length(min = 0, max = 50, message = "[logAttr3]属性3长度不合法(0-50)")
|
||||
private String logAttr3;
|
||||
|
||||
public String getLogErrType() {
|
||||
return this.logErrType;
|
||||
}
|
||||
|
||||
public void setLogErrType(String logErrType) {
|
||||
this.logErrType = logErrType;
|
||||
}
|
||||
|
||||
public String getLogTitle() {
|
||||
return this.logTitle;
|
||||
}
|
||||
|
||||
public void setLogTitle(String logTitle) {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
public String getLogNote() {
|
||||
return this.logNote;
|
||||
}
|
||||
|
||||
public void setLogNote(String logNote) {
|
||||
this.logNote = logNote;
|
||||
}
|
||||
|
||||
public String getLogErrResult() {
|
||||
return this.logErrResult;
|
||||
}
|
||||
|
||||
public void setLogErrResult(String logErrResult) {
|
||||
this.logErrResult = logErrResult;
|
||||
}
|
||||
|
||||
public String getLogAttr1() {
|
||||
return this.logAttr1;
|
||||
}
|
||||
|
||||
public void setLogAttr1(String logAttr1) {
|
||||
this.logAttr1 = logAttr1;
|
||||
}
|
||||
|
||||
public String getLogAttr2() {
|
||||
return this.logAttr2;
|
||||
}
|
||||
|
||||
public void setLogAttr2(String logAttr2) {
|
||||
this.logAttr2 = logAttr2;
|
||||
}
|
||||
|
||||
public String getLogAttr3() {
|
||||
return this.logAttr3;
|
||||
}
|
||||
|
||||
public void setLogAttr3(String logAttr3) {
|
||||
this.logAttr3 = logAttr3;
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package ${domain}.module.wsys.req;
|
||||
|
||||
import ${domain}.frame.base.BaseUpdateRequest;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import ${domain}.frame.validation.Dict;
|
||||
|
||||
/**
|
||||
* LogErrUpdateRequest - 错误日志更新
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-06-07
|
||||
*/
|
||||
public class LogErrUpdateRequest extends BaseUpdateRequest {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@NotNull(message = "[id]主键不能为NULL")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 处理结果.
|
||||
*/
|
||||
@NotNull(message = "[logErrResult]处理结果不能为NULL")
|
||||
@Dict(name = "LOG_ERR_RESULT")
|
||||
private String logErrResult;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLogErrResult() {
|
||||
return this.logErrResult;
|
||||
}
|
||||
|
||||
public void setLogErrResult(String logErrResult) {
|
||||
this.logErrResult = logErrResult;
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package ${domain}.module.wsys.rsp;
|
||||
|
||||
import ${domain}.frame.base.BaseFindResponse;
|
||||
import ${domain}.module.wsys.ent.LogErr;
|
||||
|
||||
/**
|
||||
* LogErrFindResponse - 错误日志
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2017-01-01
|
||||
*/
|
||||
public class LogErrFindResponse extends BaseFindResponse<LogErr> {
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package ${domain}.module.wsys.rsp;
|
||||
|
||||
import ${domain}.module.wsys.ent.Profiles;
|
||||
import ${domain}.frame.base.BaseFindResponse;
|
||||
|
||||
/**
|
||||
* ProfilesFindResponse - 系统配置
|
||||
*
|
||||
* @author author
|
||||
* @version 0.0.1
|
||||
* @since 2020-05-24
|
||||
*/
|
||||
public class ProfilesFindResponse extends BaseFindResponse<Profiles> {
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for LOG_ERR - 错误日志
|
||||
-- Target : MySQL
|
||||
-- Author : wangbing
|
||||
-- Date: : 2020-06-07
|
||||
-- ----------------------------
|
||||
CREATE TABLE `SYS_LOG_ERR` (
|
||||
`ID` BIGINT(20) NOT NULL COMMENT '主键',
|
||||
`LOG_ERR_TYPE` VARCHAR(20) COMMENT '错误类型',
|
||||
`LOG_TITLE` VARCHAR(50) NOT NULL COMMENT '日志标题',
|
||||
`LOG_NOTE` TEXT COMMENT '日志内容',
|
||||
`LOG_ERR_RESULT` VARCHAR(20) NOT NULL COMMENT '处理结果',
|
||||
`LOG_ATTR1` VARCHAR(50) COMMENT '属性1',
|
||||
`LOG_ATTR2` VARCHAR(50) COMMENT '属性2',
|
||||
`LOG_ATTR3` VARCHAR(50) COMMENT '属性3',
|
||||
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
|
||||
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
`CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户',
|
||||
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
|
||||
`LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户',
|
||||
`LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='错误日志';
|
@ -1,19 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for PROFILES - 系统配置
|
||||
-- Target : MySQL
|
||||
-- Author : wangbing
|
||||
-- Date: : 2020-06-08
|
||||
-- ----------------------------
|
||||
CREATE TABLE `SYS_PROFILES` (
|
||||
`ID` BIGINT(20) NOT NULL COMMENT '主键',
|
||||
`ACTIVE` VARCHAR(20) NOT NULL COMMENT '环境',
|
||||
`KEY` VARCHAR(50) NOT NULL COMMENT '键',
|
||||
`VALUE` VARCHAR(50) NOT NULL COMMENT '值',
|
||||
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
|
||||
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
`CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户',
|
||||
`CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
|
||||
`LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户',
|
||||
`LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
|
@ -1,38 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for LOG_ERR - 错误日志
|
||||
-- Target : Oracle
|
||||
-- Author : wangbing
|
||||
-- Date: : 2020-06-18
|
||||
-- ----------------------------
|
||||
CREATE TABLE "SYS_LOG_ERR" (
|
||||
"ID" NUMBER(19) NOT NULL,
|
||||
"LOG_ERR_TYPE" VARCHAR(20) NULL,
|
||||
"LOG_TITLE" VARCHAR2(50) NULL,
|
||||
"LOG_NOTE" LONG NULL,
|
||||
"LOG_ERR_RESULT" VARCHAR(20) NULL,
|
||||
"LOG_ATTR1" VARCHAR2(50) NULL,
|
||||
"LOG_ATTR2" VARCHAR2(50) NULL,
|
||||
"LOG_ATTR3" VARCHAR2(50) NULL,
|
||||
"ROW_VERSION" NUMBER(19) NOT NULL,
|
||||
"IS_DELETED" CHAR(1) NOT NULL,
|
||||
"CREATE_BY" NUMBER(19) NOT NULL,
|
||||
"CREATE_TIME" DATE NOT NULL,
|
||||
"LAST_UPDATE_BY" NUMBER(19) NULL,
|
||||
"LAST_UPDATE_TIME" DATE NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "SYS_LOG_ERR" is '错误日志';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."ID" is '主键';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_TYPE" is '错误类型';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_TITLE" is '日志标题';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_NOTE" is '日志内容';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ERR_RESULT" is '处理结果';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR1" is '属性1';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR2" is '属性2';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LOG_ATTR3" is '属性3';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."ROW_VERSION" is '行版本';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."IS_DELETED" is '是否已删除';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_BY" is '创建用户';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."CREATE_TIME" is '创建时间';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_BY" is '最后更新用户';
|
||||
COMMENT ON COLUMN "SYS_LOG_ERR"."LAST_UPDATE_TIME" is '最后更新时间';
|
@ -1,30 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for PROFILES - 系统配置
|
||||
-- Target : Oracle
|
||||
-- Author : wangbing
|
||||
-- Date: : 2020-06-18
|
||||
-- ----------------------------
|
||||
CREATE TABLE "SYS_PROFILES" (
|
||||
"ID" NUMBER(19) NOT NULL,
|
||||
"ACTIVE" VARCHAR(20) NULL,
|
||||
"KEY" VARCHAR2(50) NULL,
|
||||
"VALUE" VARCHAR2(50) NULL,
|
||||
"ROW_VERSION" NUMBER(19) NOT NULL,
|
||||
"IS_DELETED" CHAR(1) NOT NULL,
|
||||
"CREATE_BY" NUMBER(19) NOT NULL,
|
||||
"CREATE_TIME" DATE NOT NULL,
|
||||
"LAST_UPDATE_BY" NUMBER(19) NULL,
|
||||
"LAST_UPDATE_TIME" DATE NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "SYS_PROFILES" is '系统配置';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."ID" is '主键';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."ACTIVE" is '环境';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."KEY" is '键';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."VALUE" is '值';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."ROW_VERSION" is '行版本';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."IS_DELETED" is '是否已删除';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."CREATE_BY" is '创建用户';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."CREATE_TIME" is '创建时间';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_BY" is '最后更新用户';
|
||||
COMMENT ON COLUMN "SYS_PROFILES"."LAST_UPDATE_TIME" is '最后更新时间';
|
@ -1,22 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for LOG_ERR - 错误日志
|
||||
-- Target : SQLite
|
||||
-- Author : wangbing
|
||||
-- Date: : 2020-06-07
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS SYS_LOG_ERR (
|
||||
"ID" BIGINT PRIMARY KEY NOT NULL,
|
||||
"LOG_ERR_TYPE" VARCHAR(20),
|
||||
"LOG_TITLE" VARCHAR(50) NOT NULL,
|
||||
"LOG_NOTE" TEXT,
|
||||
"LOG_ERR_RESULT" VARCHAR(20) NOT NULL,
|
||||
"LOG_ATTR1" VARCHAR(50),
|
||||
"LOG_ATTR2" VARCHAR(50),
|
||||
"LOG_ATTR3" VARCHAR(50),
|
||||
"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,18 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- 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
|
||||
);
|
@ -1,254 +0,0 @@
|
||||
<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="logErrType">
|
||||
<el-input-dict v-model="vm.logErrType" clearable size="mini" placeholder="请输入错误类型"
|
||||
dict-name="LOG_ERR_TYPE"></el-input-dict>
|
||||
</el-form-item>
|
||||
<el-form-item label="错误标题" prop="logTitle">
|
||||
<el-input v-model="vm.logTitle" clearable size="mini" placeholder="请输入错误标题"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理结果" prop="logErrResult">
|
||||
<el-input-dict v-model="vm.logErrResult" clearable size="mini" placeholder="请输入处理结果"
|
||||
dict-name="LOG_ERR_RESULT"></el-input-dict>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始日期" prop="startDate">
|
||||
<el-date-picker v-model="vm.startDate" clearable size="mini" placeholder="请输入开始日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期" prop="endDate">
|
||||
<el-date-picker v-model="vm.endDate" clearable size="mini" placeholder="请输入结束日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</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-check" @click="onBitchSolve">解决</el-button>
|
||||
|
||||
<el-button type="warning" size="mini" icon="el-icon-minus" @click="onBitchShelve">搁置</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-button-group style="float: right;">
|
||||
<el-tooltip effect="dark" content="解决" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-check" @click="onBitchSolve"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip effect="dark" content="搁置" placement="bottom">
|
||||
<el-button size="mini" icon="el-icon-minus" @click="onBitchShelve"></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="无数据"
|
||||
:stripe="true"
|
||||
:data="result"
|
||||
size="mini">
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="45"
|
||||
type="selection">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="id"
|
||||
label="主键">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="90"
|
||||
prop="logErrType"
|
||||
label="错误类型">
|
||||
<template slot-scope="scope">
|
||||
<el-view-dict v-model="scope.row.logErrType" dict-name="LOG_ERR_TYPE"></el-view-dict>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="logTitle"
|
||||
label="错误标题">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="logNote"
|
||||
label="错误内容">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="logErrResult"
|
||||
label="处理结果">
|
||||
<template slot-scope="scope">
|
||||
<el-view-dict v-model="scope.row.logErrResult" dict-name="LOG_ERR_RESULT"></el-view-dict>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="createTime"
|
||||
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="onSolve"></wb-dropdown-item>
|
||||
<wb-dropdown-item value="搁置" icon="el-icon-edit" @click="onShelve"></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"
|
||||
@size-change="onPageSizeChange"
|
||||
:current-page="vm.pageNumber"
|
||||
:page-size="vm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="vm.totalCount">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
mixins: [mixin],
|
||||
el: "#app",
|
||||
data: {
|
||||
module: 'wmnt',
|
||||
target: 'logErr',
|
||||
vm: {//条件及分页参数
|
||||
logErrType: null,
|
||||
logTitle: null,
|
||||
logErrResult: null,
|
||||
logAttr1: null,
|
||||
logAttr2: null,
|
||||
logAttr3: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sortKey: 'CREATE_TIME',
|
||||
sortType: 'DESC'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSolve: function (item) {
|
||||
new Ajax("wsys", "logErr").update({
|
||||
id: item.id,
|
||||
logErrResult: '1',
|
||||
rowVersion: item.rowVersion
|
||||
},function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
} else {
|
||||
nav.s("更新成功.");
|
||||
this.onFind();
|
||||
}
|
||||
}.bind(this))
|
||||
},
|
||||
onShelve: function (item) {
|
||||
new Ajax("wsys", "logErr").update({
|
||||
id: item.id,
|
||||
logErrResult: '2',
|
||||
rowVersion: item.rowVersion
|
||||
},function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
} else {
|
||||
nav.s("更新成功.");
|
||||
this.onFind();
|
||||
}
|
||||
}.bind(this))
|
||||
},
|
||||
onBitchSolve: function () {
|
||||
if (this.select.length == 0) {
|
||||
nav.w("至少选中一项!");
|
||||
} else {
|
||||
nav.tipShow("批量处理中...");
|
||||
this.select.forAsync(function (item, next) {
|
||||
new Ajax("wsys", "logErr").update({
|
||||
id: item.id,
|
||||
logErrResult: '1',
|
||||
rowVersion: item.rowVersion
|
||||
}, function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
}
|
||||
next();
|
||||
}.bind(this))
|
||||
}, function () {
|
||||
nav.tipClose();
|
||||
nav.s("批量处理完成.")
|
||||
this.onFind();
|
||||
}.bind(this))
|
||||
}
|
||||
},
|
||||
onBitchShelve: function () {
|
||||
if (this.select.length == 0) {
|
||||
nav.w("至少选中一项!");
|
||||
} else {
|
||||
nav.tipShow("批量处理中...");
|
||||
this.select.forAsync(function (item, next) {
|
||||
new Ajax("wsys", "logErr").update({
|
||||
id: item.id,
|
||||
logErrResult: '2',
|
||||
rowVersion: item.rowVersion
|
||||
}, function (response) {
|
||||
if (response.errors.length > 0) {
|
||||
nav.e(response.errors[0].message);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
}.bind(this))
|
||||
}, function () {
|
||||
nav.tipClose();
|
||||
nav.s("批量处理完成.")
|
||||
this.onFind();
|
||||
}.bind(this))
|
||||
}
|
||||
},
|
||||
onDelete: function (item) {
|
||||
this.$confirm('将删除该项, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
new Ajax("wsys", "logErr").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,263 @@
|
||||
<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="logType">
|
||||
<el-select v-model="vm.logType" clearable size="mini" filterable placeholder="请输入日志类型">
|
||||
<el-option key="系统错误" label="系统错误" value="系统错误"></el-option>
|
||||
<el-option key="任务错误" label="任务错误" value="任务错误"></el-option>
|
||||
<el-option key="业务错误" label="业务错误" value="业务错误"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务标题" prop="logTitle">
|
||||
<el-input v-model="vm.logTitle" clearable size="mini" placeholder="请输入任务标题"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日志状态" prop="logState">
|
||||
<el-select v-model="vm.logState" clearable size="mini" filterable placeholder="请输入日志状态">
|
||||
<el-option key="0" label="待处理" value="0"></el-option>
|
||||
<el-option key="1" label="处理中" value="1"></el-option>
|
||||
<el-option key="2" label="已处理" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始日期" prop="startDate">
|
||||
<el-date-picker v-model="vm.startDate" clearable size="mini" placeholder="请输入开始日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期" prop="endDate">
|
||||
<el-date-picker v-model="vm.endDate" clearable size="mini" placeholder="请输入结束日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</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="无数据"
|
||||
:stripe="true"
|
||||
:data="result"
|
||||
size="mini">
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="45"
|
||||
type="selection">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="id"
|
||||
label="主键">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="100"
|
||||
prop="logType"
|
||||
label="日志类型">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="180"
|
||||
prop="logTitle"
|
||||
label="任务标题">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="180"
|
||||
prop="logNote"
|
||||
label="日志描述">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="100"
|
||||
prop="logState"
|
||||
label="日志状态">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="140"
|
||||
prop="createTime"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="120"
|
||||
fixed="right"
|
||||
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"
|
||||
@size-change="onPageSizeChange"
|
||||
: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.formTitle"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="form.formShow">
|
||||
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
|
||||
<el-form-item label="日志类型" prop="logType">
|
||||
<el-select v-model="form.logType" clearable size="mini" filterable placeholder="请输入日志类型">
|
||||
<el-option key="系统错误" label="系统错误" value="系统错误"></el-option>
|
||||
<el-option key="任务错误" label="任务错误" value="任务错误"></el-option>
|
||||
<el-option key="业务错误" label="业务错误" value="业务错误"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务标题" prop="logTitle">
|
||||
<el-input v-model="form.logTitle" clearable size="mini" placeholder="请输入任务标题" maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日志描述" prop="logNote">
|
||||
<el-input v-model="form.logNote"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入日志描述"
|
||||
type="textarea"
|
||||
maxlength="500"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-select v-model="vm.logState" clearable size="mini" filterable placeholder="请输入日志状态">
|
||||
<el-option key="0" label="待处理" value="0"></el-option>
|
||||
<el-option key="1" label="处理中" value="1"></el-option>
|
||||
<el-option key="2" label="已处理" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="form.formShow = 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: 'wsvr',
|
||||
target: 'logerr',
|
||||
vm: {//条件及分页参数
|
||||
logType: null,
|
||||
logTitle: null,
|
||||
logState: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sortKey:'CREATE_TIME',
|
||||
sortType:'DESC'
|
||||
},
|
||||
form: {//待提交表单
|
||||
formTitle: "",
|
||||
formShow: false,
|
||||
id: null,
|
||||
logType: null,
|
||||
logTitle: null,
|
||||
logNote: null,
|
||||
logState: null,
|
||||
rowVersion: null
|
||||
},
|
||||
formRules: {
|
||||
logType: [
|
||||
{required: true, message: '日志类型不能为空', trigger: 'blur'},
|
||||
],
|
||||
logTitle: [
|
||||
{required: true, message: '任务标题不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 50, message: '任务标题长度在 1 到 50 个字符', trigger: 'blur'}
|
||||
],
|
||||
logNote: [
|
||||
{min: 1, max: 500, message: '日志描述长度在 1 到 500 个字符', trigger: 'blur'}
|
||||
],
|
||||
logState: [
|
||||
{required: true, message: '日志状态不能为空', trigger: 'blur'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCreate: function () {
|
||||
this.form.formTitle = "错误日志新增";
|
||||
this.form.formShow = true;
|
||||
this.form.id = "";
|
||||
this.form.logType = "";
|
||||
this.form.logTitle = "";
|
||||
this.form.logNote = "";
|
||||
this.form.logState = "";
|
||||
},
|
||||
onEdit: function (item) {
|
||||
this.form.formTitle = "错误日志编辑";
|
||||
this.form.formShow = true;
|
||||
this.form.id = item.id;
|
||||
this.form.logType = item.logType;
|
||||
this.form.logTitle = item.logTitle;
|
||||
this.form.logNote = item.logNote;
|
||||
this.form.logState = item.logState;
|
||||
this.form.rowVersion = item.rowVersion;
|
||||
},
|
||||
onDelete: function (item) {
|
||||
this.$confirm('将删除该项, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
new Ajax("E:\wangbing\source\dbtool\target\project\wadmin\src\main\resources\templates\screen\wsvr", "logerr").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,112 @@
|
||||
package ${domain}.wsvr;
|
||||
|
||||
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 ${domain}.frame.auth.Token;
|
||||
import ${domain}.module.wsvr.mgr.LogerrManager;
|
||||
import ${domain}.module.wsvr.req.LogerrCreateRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrDeleteRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrFindRequest;
|
||||
import ${domain}.module.wsvr.req.LogerrUpdateRequest;
|
||||
import ${domain}.module.wsvr.rsp.LogerrCreateResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrDeleteResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrFindResponse;
|
||||
import ${domain}.module.wsvr.rsp.LogerrUpdateResponse;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
/**
|
||||
* LogerrTest - - 错误日志测试用例
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-07-06
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Transactional
|
||||
public class LogerrTest {
|
||||
|
||||
@Autowired
|
||||
private Token token;
|
||||
|
||||
@Autowired
|
||||
private LogerrManager logerrManager;
|
||||
|
||||
@Test
|
||||
public void testCreate() {
|
||||
LogerrCreateRequest request = new LogerrCreateRequest();
|
||||
request.setLogType("value");
|
||||
request.setLogTitle("任务标题");
|
||||
request.setLogNote("日志描述");
|
||||
request.setLogState("value");
|
||||
|
||||
LogerrCreateResponse response = logerrManager.create(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
|
||||
//创建数据
|
||||
LogerrCreateRequest createRequest = new LogerrCreateRequest();
|
||||
createRequest.setLogType("value");
|
||||
createRequest.setLogTitle("任务标题");
|
||||
createRequest.setLogNote("日志描述");
|
||||
createRequest.setLogState("value");
|
||||
|
||||
LogerrCreateResponse createResponse = logerrManager.create(createRequest,token);
|
||||
|
||||
assertTrue(!createResponse.hasError() && createResponse.getId() > 0);
|
||||
//删除数据
|
||||
LogerrDeleteRequest request = new LogerrDeleteRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
LogerrDeleteResponse response = logerrManager.delete(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
//创建数据
|
||||
LogerrCreateRequest createRequest = new LogerrCreateRequest();
|
||||
createRequest.setLogType("value");
|
||||
createRequest.setLogTitle("任务标题");
|
||||
createRequest.setLogNote("日志描述");
|
||||
createRequest.setLogState("value");
|
||||
|
||||
LogerrCreateResponse createResponse = logerrManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//更新数据
|
||||
LogerrUpdateRequest request = new LogerrUpdateRequest();
|
||||
request.setId(createResponse.getId());
|
||||
request.setLogType("value");
|
||||
request.setLogTitle("任务标题");
|
||||
request.setLogNote("日志描述");
|
||||
request.setLogState("value");
|
||||
|
||||
LogerrUpdateResponse response = logerrManager.update(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFind() {
|
||||
LogerrFindRequest request = new LogerrFindRequest();
|
||||
request.setLogType("value");
|
||||
request.setLogTitle("任务标题");
|
||||
request.setLogState("value");
|
||||
|
||||
LogerrFindResponse response = logerrManager.find(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
package ${domain}.wsys;
|
||||
|
||||
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 ${domain}.frame.auth.Token;
|
||||
import ${domain}.module.wsys.mgr.LogErrManager;
|
||||
import ${domain}.module.wsys.req.LogErrCreateRequest;
|
||||
import ${domain}.module.wsys.req.LogErrDeleteRequest;
|
||||
import ${domain}.module.wsys.req.LogErrFindRequest;
|
||||
import ${domain}.module.wsys.req.LogErrUpdateRequest;
|
||||
import ${domain}.module.wsys.rsp.LogErrCreateResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrDeleteResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrFindResponse;
|
||||
import ${domain}.module.wsys.rsp.LogErrUpdateResponse;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
/**
|
||||
* LogErrTest - - 错误日志测试用例
|
||||
*
|
||||
* @author wangbing
|
||||
* @version 0.0.1
|
||||
* @since 2020-06-07
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Transactional
|
||||
public class LogErrTest {
|
||||
|
||||
@Autowired
|
||||
private Token token;
|
||||
|
||||
@Autowired
|
||||
private LogErrManager logErrManager;
|
||||
|
||||
@Test
|
||||
public void testCreate() {
|
||||
LogErrCreateRequest request = new LogErrCreateRequest();
|
||||
request.setLogErrType("code");
|
||||
request.setLogTitle("日志标题");
|
||||
request.setLogNote("content");
|
||||
request.setLogErrResult("code");
|
||||
request.setLogAttr1("属性1");
|
||||
request.setLogAttr2("属性2");
|
||||
request.setLogAttr3("属性3");
|
||||
|
||||
LogErrCreateResponse response = logErrManager.create(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
|
||||
//创建数据
|
||||
LogErrCreateRequest createRequest = new LogErrCreateRequest();
|
||||
createRequest.setLogErrType("code");
|
||||
createRequest.setLogTitle("日志标题");
|
||||
createRequest.setLogNote("content");
|
||||
createRequest.setLogErrResult("code");
|
||||
createRequest.setLogAttr1("属性1");
|
||||
createRequest.setLogAttr2("属性2");
|
||||
createRequest.setLogAttr3("属性3");
|
||||
|
||||
LogErrCreateResponse createResponse = logErrManager.create(createRequest,token);
|
||||
|
||||
assertTrue(!createResponse.hasError() && createResponse.getId() > 0);
|
||||
//删除数据
|
||||
LogErrDeleteRequest request = new LogErrDeleteRequest();
|
||||
request.setId(createResponse.getId());
|
||||
|
||||
LogErrDeleteResponse response = logErrManager.delete(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
//创建数据
|
||||
LogErrCreateRequest createRequest = new LogErrCreateRequest();
|
||||
createRequest.setLogErrType("code");
|
||||
createRequest.setLogTitle("日志标题");
|
||||
createRequest.setLogNote("content");
|
||||
createRequest.setLogErrResult("code");
|
||||
createRequest.setLogAttr1("属性1");
|
||||
createRequest.setLogAttr2("属性2");
|
||||
createRequest.setLogAttr3("属性3");
|
||||
|
||||
LogErrCreateResponse createResponse = logErrManager.create(createRequest, token);
|
||||
|
||||
assertTrue(!createResponse.hasError());
|
||||
|
||||
//更新数据
|
||||
LogErrUpdateRequest request = new LogErrUpdateRequest();
|
||||
request.setId(createResponse.getId());
|
||||
request.setLogErrResult("code");
|
||||
|
||||
LogErrUpdateResponse response = logErrManager.update(request,token);
|
||||
|
||||
assertTrue(!response.hasError() && response.getResult() == 1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFind() {
|
||||
LogErrFindRequest request = new LogErrFindRequest();
|
||||
request.setLogErrType("code");
|
||||
request.setLogTitle("日志标题");
|
||||
request.setLogErrResult("code");
|
||||
|
||||
LogErrFindResponse response = logErrManager.find(request,token);
|
||||
|
||||
assertTrue(!response.hasError());
|
||||
}
|
||||
}
|
Loading…
Reference in new issue