commit
cc9c3d5b05
41 changed files with 638 additions and 110 deletions
@ -1,4 +1,22 @@ |
||||
package com.daqing.financial.hrms; |
||||
|
||||
import com.daqing.framework.domain.hrms.request.DeptAddRequest; |
||||
import com.daqing.framework.model.response.ResponseResult; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
|
||||
/** |
||||
* @Author: gongsj. |
||||
* @Description: 部门管理controllerApi定义 |
||||
* @Date:Created in 2020/09/07 11:33. |
||||
* @Modified By: |
||||
*/ |
||||
@Api(value = "部门管理相关操作", tags = "提供部门信息增删改查等相关方法") |
||||
public interface DeptControllerApi { |
||||
|
||||
/** |
||||
* 新增一条部门信息 |
||||
*/ |
||||
@ApiOperation(value = "新增一条部门信息", notes = "新增一条部门信息") |
||||
ResponseResult save(DeptAddRequest deptAddRequest); |
||||
} |
||||
|
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/crms_auth"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/crms_auth.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/crms"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/crms.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/guarantee"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/guarantee.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/hrms_auth"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/hrms_auth.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/hrms"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/hrms.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,47 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<configuration> |
||||
<!--定义日志文件的存储地址,使用绝对路径--> |
||||
<property name="LOG_HOME" value="d:/logs/daqing/workflow"/> |
||||
|
||||
<!-- Console 输出设置 --> |
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 按照每天生成日志文件 --> |
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<!--日志文件输出的文件名--> |
||||
<fileNamePattern>${LOG_HOME}/workflow.%d{yyyy-MM-dd}.log</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- 异步输出 --> |
||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
<discardingThreshold>0</discardingThreshold> |
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
<queueSize>512</queueSize> |
||||
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
<appender-ref ref="FILE"/> |
||||
</appender> |
||||
|
||||
|
||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</logger> |
||||
<logger name="org.springframework.boot" level="DEBUG"/> |
||||
<root level="info"> |
||||
<!--<appender-ref ref="ASYNC"/>--> |
||||
<appender-ref ref="FILE"/> |
||||
<appender-ref ref="CONSOLE"/> |
||||
</root> |
||||
</configuration> |
@ -0,0 +1,37 @@ |
||||
package com.daqing.framework.model.response; |
||||
|
||||
/** |
||||
* @Author: gongsj. |
||||
* @Description: 系统操作状态集接口 |
||||
* @Date:Created in 2020/09/09 15:35. |
||||
* @Modified By: |
||||
* 10000-- 通用错误码 |
||||
* 22000-- 人资管理系统错误码 |
||||
* 23000-- 人资管理系统认证系统错误码 |
||||
* 24000-- 客户管理系统错误码 |
||||
* 25000-- 客户管理系统认证系统错误码 |
||||
* 26000-- 工作流程管理系统错误码 |
||||
* 27000-- 担保业务系统错误码 |
||||
*/ |
||||
public interface ResultCode { |
||||
/** |
||||
* 操作是否成功 |
||||
* |
||||
* @return true为成功,false操作失败 |
||||
*/ |
||||
boolean success(); |
||||
|
||||
/** |
||||
* 操作码 |
||||
* |
||||
* @return 操作码 |
||||
*/ |
||||
int code(); |
||||
|
||||
/** |
||||
* 提示信息 |
||||
* |
||||
* @return 提示信息 |
||||
*/ |
||||
String message(); |
||||
} |
@ -0,0 +1,32 @@ |
||||
package com.daqing.framework.domain.hrms.request; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 新增部门请求体对象 |
||||
* |
||||
* @author gongsj |
||||
* @email gongsj@gmail.com |
||||
* @date 2020-09-07 17:12:14 |
||||
*/ |
||||
@Data |
||||
public class DeptAddRequest implements Serializable { |
||||
|
||||
/** |
||||
* 部门名称 |
||||
*/ |
||||
private String name; |
||||
/** |
||||
* 上级部门id |
||||
*/ |
||||
private Long parentId; |
||||
/** |
||||
* 排序 |
||||
*/ |
||||
private Integer sort; |
||||
} |
@ -0,0 +1,51 @@ |
||||
package com.daqing.framework.domain.hrms.response; |
||||
|
||||
import com.daqing.framework.model.response.ResultCode; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Getter; |
||||
import lombok.ToString; |
||||
|
||||
/** |
||||
* @Author: gongsj. |
||||
* @Description: 部门相关操作状态集 |
||||
* @Date:Created in 2020/09/09 15:35. |
||||
* @Modified By: |
||||
*/ |
||||
@ToString |
||||
@AllArgsConstructor |
||||
public enum DeptCode implements ResultCode { |
||||
|
||||
DEPT_NAME_ILLEGAL(false, 22001, "部门名称为空或已存在!"), |
||||
DEPT_ID_NOT_EXSIT(false, 22002, "部门id不存在!"), |
||||
DEPT_LEVEL_ILLEGAL(false, 22003, "部门层级不可超出5级!"); |
||||
|
||||
/** |
||||
* 操作是否成功 |
||||
*/ |
||||
@Getter |
||||
private boolean success; |
||||
|
||||
/** |
||||
* 状态码 |
||||
*/ |
||||
@Getter |
||||
private int code; |
||||
|
||||
/** |
||||
* 提示信息 |
||||
*/ |
||||
@Getter |
||||
private String message; |
||||
|
||||
public boolean success() { |
||||
return this.success; |
||||
} |
||||
|
||||
public int code() { |
||||
return this.code; |
||||
} |
||||
|
||||
public String message() { |
||||
return this.message; |
||||
} |
||||
} |
Loading…
Reference in new issue