mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-15 07:03:48 +08:00
v2.0 代码提交
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
# 项目配置
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
# swagger文档
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
status : 这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,会看到log4j2内部各种详细输出
|
||||
monitorInterval : Log4j能够自动检测修改配置文件和重新配置本身, 设置间隔秒数。
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/dev</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
<AppenderRef ref="info"/>
|
||||
<AppenderRef ref="warn"/>
|
||||
<AppenderRef ref="error"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
|
||||
</Configuration>
|
||||
@@ -1,18 +0,0 @@
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
#日志输出到控制台
|
||||
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||
# 设置 p6spy driver 代理
|
||||
deregisterdrivers=true
|
||||
# 取消JDBC URL前缀
|
||||
useprefix=true
|
||||
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||
excludecategories=info,debug,result,commit,resultset
|
||||
# 日期格式
|
||||
dateformat=yyyy-MM-dd HH:mm:ss
|
||||
# 开启慢sql
|
||||
outagedetection=true
|
||||
# 慢SQL记录标准(单位秒)
|
||||
outagedetectioninterval=2
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.category.dao.CategoryDao">
|
||||
|
||||
<!-- 根据父级id 查询子类 -->
|
||||
<select id="queryByParentId"
|
||||
resultType="net.lab1024.sa.admin.module.business.category.domain.entity.CategoryEntity">
|
||||
SELECT * FROM t_category
|
||||
WHERE
|
||||
parent_id IN
|
||||
<foreach collection="parentIdList" open="(" separator="," close=")" item="id">#{id}</foreach>
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据父级id 查询子类 -->
|
||||
<select id="queryByParentIdAndType"
|
||||
resultType="net.lab1024.sa.admin.module.business.category.domain.entity.CategoryEntity">
|
||||
SELECT * FROM t_category
|
||||
WHERE
|
||||
parent_id IN
|
||||
<foreach collection="parentIdList" open="(" separator="," close=")" item="id">#{id}</foreach>
|
||||
AND category_type = #{categoryType}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
|
||||
<select id="queryByType"
|
||||
resultType="net.lab1024.sa.admin.module.business.category.domain.entity.CategoryEntity">
|
||||
SELECT * FROM t_category
|
||||
WHERE category_type = #{categoryType}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
|
||||
<!-- 查看类目 -->
|
||||
<select id="selectOne" resultType="net.lab1024.sa.admin.module.business.category.domain.entity.CategoryEntity">
|
||||
SELECT * FROM t_category
|
||||
<where>
|
||||
<if test="categoryType != null">
|
||||
AND category_type = #{categoryType}
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="categoryName != null">
|
||||
AND category_name = #{categoryName}
|
||||
</if>
|
||||
<if test="deletedFlag != null">
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectByTypeAndId"
|
||||
resultType="net.lab1024.sa.admin.module.business.category.domain.entity.CategoryEntity">
|
||||
select * from t_category where category_type = #{categoryType} and category_id = #{categoryId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.goods.dao.GoodsDao">
|
||||
<update id="batchUpdateDeleted">
|
||||
update t_goods
|
||||
set deleted_flag = #{deletedFlag}
|
||||
WHERE goods_id IN
|
||||
<foreach collection="goodsIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 分页 查询商品 -->
|
||||
<select id="query" resultType="net.lab1024.sa.admin.module.business.goods.domain.vo.GoodsVO">
|
||||
SELECT * FROM t_goods
|
||||
<where>
|
||||
<if test="query.searchWord != null and query.searchWord !=''">
|
||||
INSTR(goods_name,#{query.searchWord})
|
||||
</if>
|
||||
<if test="query.place != null">
|
||||
AND place = #{query.place}
|
||||
</if>
|
||||
<if test="query.goodsStatus != null">
|
||||
AND goods_status = #{query.goodsStatus}
|
||||
</if>
|
||||
<if test="query.categoryId != null">
|
||||
AND category_id = #{query.categoryId}
|
||||
</if>
|
||||
<if test="query.shelvesFlag != null">
|
||||
AND shelves_flag = #{query.shelvesFlag}
|
||||
</if>
|
||||
<if test="query.deletedFlag != null">
|
||||
AND deleted_flag = #{query.deletedFlag}
|
||||
</if>
|
||||
</where>
|
||||
<if test="query.sortItemList == null or query.sortItemList.size == 0">
|
||||
ORDER BY goods_id DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.notice.NoticeDao">
|
||||
<update id="updateWatchAmount">
|
||||
UPDATE t_notice
|
||||
SET watch_amount = watch_amount + 1
|
||||
WHERE notice_id = #{noticeId}
|
||||
</update>
|
||||
<update id="batchDeleteNotice">
|
||||
UPDATE t_notice
|
||||
SET deleted_flag = #{deletedFlag}
|
||||
WHERE notice_id IN
|
||||
<foreach collection="noticeIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateNotice">
|
||||
UPDATE t_notice
|
||||
SET notice_type = #{noticeType},
|
||||
notice_belong_type = #{noticeBelongType},
|
||||
notice_title = #{noticeTitle},
|
||||
notice_content = #{noticeContent},
|
||||
link_address = #{linkAddress},
|
||||
cover_file_key = #{coverFileKey},
|
||||
accessory_file_keys = #{accessoryFileKeys},
|
||||
top_flag = #{topFlag},
|
||||
publish_time = #{publishTime},
|
||||
disabled_flag = #{disabledFlag}
|
||||
WHERE notice_id = #{noticeId}
|
||||
</update>
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeVO">
|
||||
SELECT tn.*,
|
||||
e.actual_name AS createUserName
|
||||
FROM t_notice tn
|
||||
LEFT JOIN t_employee e ON tn.create_user_id = e.employee_id
|
||||
<where>
|
||||
tn.deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(tn.notice_title,#{queryForm.keywords}) OR INSTR(e.actual_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.noticeType != null">
|
||||
AND tn.notice_type = #{queryForm.noticeType}
|
||||
</if>
|
||||
<if test="queryForm.noticeBelongType != null">
|
||||
AND tn.notice_belong_type = #{queryForm.noticeBelongType}
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(tn.publish_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
</if>
|
||||
<if test="queryForm.endTime != null">
|
||||
AND DATE_FORMAT(tn.publish_time, '%Y-%m-%d') <= #{queryForm.endTime}
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND tn.disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
<if test="queryForm.sortItemList == null or queryForm.sortItemList.size == 0">
|
||||
ORDER BY tn.top_flag DESC,tn.publish_time DESC
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDetail" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeVO">
|
||||
SELECT tn.*,
|
||||
e.actual_name AS createUserName
|
||||
FROM t_notice tn
|
||||
LEFT JOIN t_employee e ON tn.create_user_id = e.employee_id
|
||||
WHERE tn.notice_id = #{noticeId}
|
||||
AND tn.deleted_flag = #{deletedFlag}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.oa.bank.BankDao">
|
||||
<update id="deleteBank">
|
||||
UPDATE t_oa_bank
|
||||
SET deleted_flag = #{deletedFlag}
|
||||
WHERE bank_id = #{bankId}
|
||||
</update>
|
||||
<select id="queryByAccountNumber"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.bank.domain.BankEntity">
|
||||
SELECT *
|
||||
FROM t_oa_bank
|
||||
WHERE enterprise_id = #{enterpriseId}
|
||||
AND account_number = #{accountNumber}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
<if test="excludeBankId != null">
|
||||
AND bank_id != #{excludeBankId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.oa.bank.domain.BankVO">
|
||||
SELECT t_oa_bank.*,
|
||||
t_oa_enterprise.enterprise_name
|
||||
FROM t_oa_bank
|
||||
LEFT JOIN t_oa_enterprise ON t_oa_bank.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
<where>
|
||||
t_oa_bank.deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(t_oa_bank.bank_name,#{queryForm.keywords}) OR
|
||||
INSTR(t_oa_bank.account_name,#{queryForm.keywords}) OR
|
||||
INSTR(t_oa_bank.account_number,#{queryForm.keywords}) OR
|
||||
INSTR(t_oa_bank.create_user_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(t_oa_bank.create_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
</if>
|
||||
<if test="queryForm.endTime != null">
|
||||
AND DATE_FORMAT(t_oa_bank.create_time, '%Y-%m-%d') <= #{queryForm.endTime}
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND t_oa_bank.disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
<if test="queryForm.enterpriseId != null">
|
||||
AND t_oa_bank.enterprise_id = #{queryForm.enterpriseId}
|
||||
</if>
|
||||
</where>
|
||||
<if test="queryForm.sortItemList == null or queryForm.sortItemList.size == 0">
|
||||
ORDER BY t_oa_bank.create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDetail" resultType="net.lab1024.sa.admin.module.business.oa.bank.domain.BankVO">
|
||||
SELECT t_oa_bank.*,
|
||||
t_oa_enterprise.enterprise_name
|
||||
FROM t_oa_bank
|
||||
LEFT JOIN t_oa_enterprise ON t_oa_bank.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
WHERE t_oa_bank.bank_id = #{bankId}
|
||||
AND t_oa_bank.deleted_flag = #{deletedFlag}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.oa.enterprise.dao.EnterpriseEmployeeDao">
|
||||
|
||||
<delete id="deleteByEnterpriseAndEmployeeIdList">
|
||||
delete from t_oa_enterprise_employee where enterprise_id = #{enterpriseId} and employee_id in
|
||||
<foreach collection="employeeIdList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByEmployeeId">
|
||||
delete from t_oa_enterprise_employee where employee_id = #{employeeId}
|
||||
</delete>
|
||||
|
||||
<select id="selectByEnterpriseId"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.entity.EnterpriseEmployeeEntity">
|
||||
select * from t_oa_enterprise_employee where enterprise_id = #{enterpriseId}
|
||||
</select>
|
||||
|
||||
<select id="selectByEnterpriseAndEmployeeIdList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.entity.EnterpriseEmployeeEntity">
|
||||
select * from t_oa_enterprise_employee where enterprise_id = #{enterpriseId} and employee_id in
|
||||
<foreach collection="employeeIdList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByEmployeeIdList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
||||
select
|
||||
t_oa_enterprise_employee.*,
|
||||
t_oa_enterprise.enterprise_name,
|
||||
t_employee.actual_name as employeeName
|
||||
from t_oa_enterprise_employee
|
||||
left join t_oa_enterprise on t_oa_enterprise_employee.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
left join t_employee on t_oa_enterprise_employee.employee_id = t_employee.employee_id
|
||||
where t_oa_enterprise_employee.employee_id in
|
||||
<foreach collection="employeeIdList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByEnterpriseIdList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
||||
select
|
||||
t_oa_enterprise_employee.*,
|
||||
t_oa_enterprise.enterprise_name,
|
||||
t_employee.*,
|
||||
t_employee.actual_name as employeeName
|
||||
from t_oa_enterprise_employee
|
||||
left join t_oa_enterprise on t_oa_enterprise_employee.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
left join t_employee on t_oa_enterprise_employee.employee_id = t_employee.employee_id
|
||||
where t_oa_enterprise_employee.enterprise_id in
|
||||
<foreach collection="enterpriseIdList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectEnterpriseIdByEmployeeId" resultType="java.lang.Long">
|
||||
select enterprise_id from t_oa_enterprise_employee where employee_id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="selectEmployeeIdByEnterpriseIdList" resultType="java.lang.Long">
|
||||
select employee_id from t_oa_enterprise_employee where enterprise_id in
|
||||
<foreach collection="enterpriseIdList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="queryPageEmployeeList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
||||
select
|
||||
t_oa_enterprise_employee.*,
|
||||
t_oa_enterprise.enterprise_name,
|
||||
t_employee.*,
|
||||
t_employee.actual_name as employeeName
|
||||
from t_oa_enterprise_employee
|
||||
left join t_oa_enterprise on t_oa_enterprise_employee.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
left join t_employee on t_oa_enterprise_employee.employee_id = t_employee.employee_id
|
||||
where t_oa_enterprise_employee.enterprise_id = #{queryForm.enterpriseId}
|
||||
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
||||
AND (
|
||||
INSTR(t_employee.actual_name,#{queryForm.keyword})
|
||||
OR INSTR(t_employee.phone,#{queryForm.keyword})
|
||||
OR INSTR(t_employee.login_name,#{queryForm.keyword})
|
||||
)
|
||||
</if>
|
||||
<if test="queryForm.deletedFlag != null">
|
||||
AND t_employee.deleted_flag = #{queryForm.deletedFlag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.oa.enterprise.dao.EnterpriseDao">
|
||||
<update id="deleteEnterprise">
|
||||
UPDATE t_oa_enterprise
|
||||
SET deleted_flag = #{deletedFlag}
|
||||
WHERE enterprise_id = #{enterpriseId}
|
||||
</update>
|
||||
<select id="queryByEnterpriseName"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.entity.EnterpriseEntity">
|
||||
SELECT *
|
||||
FROM t_oa_enterprise
|
||||
WHERE enterprise_name = #{enterpriseName}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
<if test="excludeEnterpriseId != null">
|
||||
AND enterprise_id != #{excludeEnterpriseId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryPage"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO">
|
||||
SELECT t_oa_enterprise.*
|
||||
FROM t_oa_enterprise
|
||||
<where>
|
||||
deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(enterprise_name,#{queryForm.keywords}) OR INSTR(contact,#{queryForm.keywords}) OR
|
||||
INSTR(contact_phone,#{queryForm.keywords}) OR INSTR(create_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
</if>
|
||||
<if test="queryForm.endTime != null">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{queryForm.endTime}
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
<if test="queryForm.sortItemList == null or queryForm.sortItemList.size == 0">
|
||||
ORDER BY create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseListVO">
|
||||
SELECT enterprise_id, enterprise_name
|
||||
FROM t_oa_enterprise
|
||||
WHERE disabled_flag = #{disabledFlag}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
<if test="type != null">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDetail"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO">
|
||||
SELECT oe.*
|
||||
FROM t_oa_enterprise oe
|
||||
WHERE oe.enterprise_id = #{enterpriseId} AND oe.deleted_flag = #{deletedFlag}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.oa.invoice.InvoiceDao">
|
||||
<update id="deleteInvoice">
|
||||
UPDATE t_oa_invoice
|
||||
SET deleted_flag = #{deletedFlag}
|
||||
WHERE invoice_id = #{invoiceId}
|
||||
</update>
|
||||
<select id="queryByAccountNumber"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.invoice.domain.InvoiceEntity">
|
||||
SELECT *
|
||||
FROM t_oa_invoice
|
||||
WHERE enterprise_id = #{enterpriseId}
|
||||
AND account_number = #{accountNumber}
|
||||
AND deleted_flag = #{deletedFlag}
|
||||
<if test="excludeInvoiceId != null">
|
||||
AND invoice_id != #{excludeInvoiceId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.oa.invoice.domain.InvoiceVO">
|
||||
SELECT t_oa_invoice.*,
|
||||
t_oa_enterprise.enterprise_name
|
||||
FROM t_oa_invoice
|
||||
LEFT JOIN t_oa_enterprise ON t_oa_invoice.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
<where>
|
||||
t_oa_invoice.deleted_flag = #{queryForm.deletedFlag}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords != ''">
|
||||
AND (INSTR(t_oa_invoice.invoice_heads,#{queryForm.keywords}) OR INSTR(t_oa_invoice.account_number,#{queryForm.keywords}) OR
|
||||
INSTR(t_oa_invoice.create_user_name,#{queryForm.keywords}))
|
||||
</if>
|
||||
<if test="queryForm.startTime != null">
|
||||
AND DATE_FORMAT(t_oa_invoice.create_time, '%Y-%m-%d') >= #{queryForm.startTime}
|
||||
</if>
|
||||
<if test="queryForm.endTime != null">
|
||||
AND DATE_FORMAT(t_oa_invoice.create_time, '%Y-%m-%d') <= #{queryForm.endTime}
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND t_oa_invoice.disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
<if test="queryForm.enterpriseId != null">
|
||||
AND t_oa_invoice.enterprise_id = #{queryForm.enterpriseId}
|
||||
</if>
|
||||
</where>
|
||||
<if test="queryForm.sortItemList == null or queryForm.sortItemList.size == 0">
|
||||
ORDER BY t_oa_invoice.create_time DESC
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDetail" resultType="net.lab1024.sa.admin.module.business.oa.invoice.domain.InvoiceVO">
|
||||
SELECT t_oa_invoice.*,
|
||||
t_oa_enterprise.enterprise_name
|
||||
FROM t_oa_invoice
|
||||
LEFT JOIN t_oa_enterprise ON t_oa_invoice.enterprise_id = t_oa_enterprise.enterprise_id
|
||||
WHERE t_oa_invoice.invoice_id = #{invoiceId}
|
||||
AND t_oa_invoice.deleted_flag = #{deletedFlag}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,244 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.business.oa.notice.dao.NoticeDao">
|
||||
|
||||
<!-- ================================== 可见范围相关 ================================== -->
|
||||
|
||||
<insert id="insertVisibleRange">
|
||||
insert into t_notice_visible_range
|
||||
(notice_id, data_type, data_id)
|
||||
values
|
||||
<foreach collection="visibleRangeFormList" separator="," item="item">
|
||||
( #{noticeId} , #{item.dataType}, #{item.dataId} )
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteVisibleRange">
|
||||
delete
|
||||
from t_notice_visible_range
|
||||
where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
<select id="queryVisibleRange"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeVisibleRangeVO">
|
||||
select *
|
||||
from t_notice_visible_range
|
||||
where notice_id = #{noticeId}
|
||||
</select>
|
||||
|
||||
<!-- ================================== 通知公告【主表】相关 ================================== -->
|
||||
<update id="updateDeletedFlag">
|
||||
update t_notice
|
||||
set deleted_flag = true
|
||||
where notice_id = #{noticeId}
|
||||
</update>
|
||||
|
||||
<!-- 后管分页查询资讯 -->
|
||||
<select id="query" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeVO">
|
||||
SELECT
|
||||
t_notice.* ,
|
||||
t_notice_type.notice_type_name as noticeTypeName,
|
||||
t_employee.actual_name as createUserName,
|
||||
t_department.name as departmentName
|
||||
FROM t_notice
|
||||
left join t_notice_type on t_notice_type.notice_type_id = t_notice.notice_type_id
|
||||
left join t_employee on t_notice.create_user_id = t_employee.employee_id
|
||||
left join t_department on t_employee.department_id = t_department.department_id
|
||||
<where>
|
||||
<if test="query.noticeTypeId != null">
|
||||
AND t_notice_type.notice_type_id = #{query.noticeTypeId}
|
||||
</if>
|
||||
<if test="query.keywords != null and query.keywords !=''">
|
||||
AND ( INSTR(t_notice.title,#{query.keywords})
|
||||
OR INSTR(t_notice.author,#{query.keywords})
|
||||
OR INSTR(t_notice.source,#{query.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="query.documentNumber != null and query.documentNumber !=''">
|
||||
AND INSTR(t_notice.document_number, #{query.documentNumber})
|
||||
</if>
|
||||
<if test="query.createUserId != null">
|
||||
AND t_notice.create_user_id = #{createUserId}
|
||||
</if>
|
||||
<if test="query.deletedFlag != null">
|
||||
and t_notice.deleted_flag = #{query.deletedFlag}
|
||||
</if>
|
||||
<if test="query.createTimeBegin != null">
|
||||
AND DATE_FORMAT(t_notice.create_time, '%Y-%m-%d') >= DATE_FORMAT(#{query.createTimeBegin},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.createTimeEnd != null">
|
||||
AND DATE_FORMAT(t_notice.create_time, '%Y-%m-%d') <= DATE_FORMAT(#{query.createTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.publishTimeBegin != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') >= DATE_FORMAT(#{query.publishTimeBegin},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.publishTimeEnd != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') <= DATE_FORMAT(#{query.publishTimeEnd},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
<if test="query.sortItemList == null or query.sortItemList.size == 0">
|
||||
ORDER BY t_notice.publish_time DESC, t_notice.notice_id DESC
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- ================================== 通知公告【员工查看】相关 ================================== -->
|
||||
<select id="queryEmployeeNotice"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeEmployeeVO">
|
||||
select
|
||||
t_notice.*,
|
||||
t_notice_type.notice_type_name,
|
||||
(select count(*) from t_notice_view_record where t_notice_view_record.employee_id = #{requestEmployeeId} and
|
||||
t_notice_view_record.notice_id = t_notice.notice_id) as viewFlag
|
||||
from t_notice
|
||||
left join t_notice_type on t_notice.notice_type_id = t_notice_type.notice_type_id
|
||||
<where>
|
||||
<if test="!administratorFlag">
|
||||
t_notice.notice_id in
|
||||
(select t_notice_visible_range.notice_id
|
||||
from t_notice_visible_range
|
||||
where
|
||||
(t_notice_visible_range.data_type = #{departmentDataType}
|
||||
<if test="requestEmployeeDepartmentIdList != null and requestEmployeeDepartmentIdList.size > 0">
|
||||
and
|
||||
t_notice_visible_range.data_id
|
||||
in
|
||||
<foreach collection="requestEmployeeDepartmentIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
or ( t_notice_visible_range.data_type = #{employeeDataType} and t_notice_visible_range.data_id =
|
||||
#{requestEmployeeId} )
|
||||
)
|
||||
</if>
|
||||
and t_notice.all_visible_flag = true
|
||||
and t_notice.deleted_flag = #{deletedFlag}
|
||||
and t_notice.publish_time < now()
|
||||
<if test="query.noticeTypeId != null">
|
||||
AND t_notice_type.notice_type_id = #{query.noticeTypeId}
|
||||
</if>
|
||||
<if test="query.keywords != null and query.keywords !=''">
|
||||
AND ( INSTR(t_notice.title,#{query.keywords})
|
||||
OR INSTR(t_notice.author,#{query.keywords})
|
||||
OR INSTR(t_notice.documentNumber,#{query.keywords})
|
||||
OR INSTR(t_notice.source,#{query.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="query.publishTimeBegin != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') >= DATE_FORMAT(#{query.publishTimeBegin},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.publishTimeEnd != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') <= DATE_FORMAT(#{query.publishTimeEnd},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.notViewFlag">
|
||||
AND viewFlag = 0
|
||||
</if>
|
||||
</where>
|
||||
order by t_notice.publish_time desc
|
||||
</select>
|
||||
<select id="queryEmployeeNotViewNotice"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeEmployeeVO">
|
||||
select * from
|
||||
(
|
||||
select
|
||||
t_notice.*,
|
||||
t_notice_type.notice_type_name,
|
||||
(select count(*) from t_notice_view_record where t_notice_view_record.employee_id = #{requestEmployeeId} and
|
||||
t_notice_view_record.notice_id = t_notice.notice_id) as viewFlag
|
||||
from t_notice
|
||||
left join t_notice_type on t_notice.notice_type_id = t_notice_type.notice_type_id
|
||||
<where>
|
||||
<if test="!administratorFlag">
|
||||
t_notice.notice_id in
|
||||
(select t_notice_visible_range.notice_id
|
||||
from t_notice_visible_range
|
||||
where
|
||||
(t_notice_visible_range.data_type = #{departmentDataType}
|
||||
<if test="requestEmployeeDepartmentIdList != null and requestEmployeeDepartmentIdList.size > 0">
|
||||
and
|
||||
t_notice_visible_range.data_id
|
||||
in
|
||||
<foreach collection="requestEmployeeDepartmentIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
or ( t_notice_visible_range.data_type = #{employeeDataType} and t_notice_visible_range.data_id =
|
||||
#{requestEmployeeId} )
|
||||
)
|
||||
</if>
|
||||
and t_notice.all_visible_flag = true
|
||||
and t_notice.deleted_flag = #{deletedFlag}
|
||||
and t_notice.publish_time < now()
|
||||
<if test="query.noticeTypeId != null">
|
||||
AND t_notice_type.notice_type_id = #{query.noticeTypeId}
|
||||
</if>
|
||||
<if test="query.keywords != null and query.keywords !=''">
|
||||
AND ( INSTR(t_notice.title,#{query.keywords})
|
||||
OR INSTR(t_notice.author,#{query.keywords})
|
||||
OR INSTR(t_notice.documentNumber,#{query.keywords})
|
||||
OR INSTR(t_notice.source,#{query.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="query.publishTimeBegin != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') >= DATE_FORMAT(#{query.publishTimeBegin},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="query.publishTimeEnd != null">
|
||||
AND DATE_FORMAT(t_notice.publish_time, '%Y-%m-%d') <= DATE_FORMAT(#{query.publishTimeEnd},
|
||||
'%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
) t where viewFlag = 0
|
||||
order by t.publish_time desc
|
||||
</select>
|
||||
<select id="queryNoticeViewRecordList"
|
||||
resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
|
||||
select t_notice_view_record.*,
|
||||
t_employee.actual_name as employeeName,
|
||||
t_department.name as departmentName
|
||||
from t_notice_view_record
|
||||
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
|
||||
left join t_department on t_department.department_id = t_employee.department_id
|
||||
where
|
||||
notice_id = #{queryForm.noticeId}
|
||||
<if test="queryForm.keywords != null and queryForm.keywords !=''">
|
||||
AND (
|
||||
INSTR(t_employee.actual_name,#{queryForm.keywords})
|
||||
OR INSTR(t_notice_view_record.first_ip,#{queryForm.keywords})
|
||||
OR INSTR(t_notice_view_record.first_user_agent,#{queryForm.keywords})
|
||||
OR INSTR(t_notice_view_record.last_ip,#{queryForm.keywords})
|
||||
OR INSTR(t_notice_view_record.last_user_agent,#{queryForm.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="queryForm.departmentId != null ">
|
||||
and t_department.department_id = #{queryForm.departmentId}
|
||||
</if>
|
||||
order by t_notice_view_record.update_time desc,t_notice_view_record.create_time desc
|
||||
</select>
|
||||
|
||||
<!-- ================================== 通知公告【员工查看记录】相关 ================================== -->
|
||||
<select id="viewRecordCount" resultType="java.lang.Long">
|
||||
select count(*)
|
||||
from t_notice_view_record
|
||||
where notice_id = #{noticeId}
|
||||
and employee_id = #{employeeId}
|
||||
</select>
|
||||
<insert id="insertViewRecord">
|
||||
insert into t_notice_view_record (notice_id, employee_id, first_ip, first_user_agent, page_view_count)
|
||||
values (#{noticeId}, #{employeeId}, #{ip}, #{userAgent}, #{pageViewCount})
|
||||
</insert>
|
||||
<update id="updateViewRecord">
|
||||
update t_notice_view_record
|
||||
set page_view_count = page_view_count + 1,
|
||||
last_ip = #{ip},
|
||||
last_user_agent = #{userAgent}
|
||||
where notice_id = #{noticeId}
|
||||
and employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.department.dao.DepartmentDao">
|
||||
|
||||
|
||||
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
||||
SELECT t_department.*,
|
||||
t_employee.actual_name as managerName,
|
||||
parent_department.`name` as parentName
|
||||
FROM t_department
|
||||
left join t_employee on t_department.manager_id = t_employee.employee_id
|
||||
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
||||
order by sort desc
|
||||
</select>
|
||||
|
||||
<select id="countSubDepartment" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM t_department
|
||||
WHERE parent_id = #{departmentId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,200 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.employee.dao.EmployeeDao">
|
||||
|
||||
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||
SELECT
|
||||
t_employee.*,
|
||||
t_department.name AS departmentName
|
||||
FROM t_employee
|
||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||
<where>
|
||||
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
||||
AND (
|
||||
INSTR(t_employee.actual_name,#{queryForm.keyword})
|
||||
OR INSTR(t_employee.phone,#{queryForm.keyword})
|
||||
OR INSTR(t_employee.login_name,#{queryForm.keyword})
|
||||
)
|
||||
</if>
|
||||
<if test="departmentIdList != null and departmentIdList.size > 0">
|
||||
and
|
||||
t_employee.department_id
|
||||
in
|
||||
<foreach collection="departmentIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="queryForm.disabledFlag != null">
|
||||
AND t_employee.disabled_flag = #{queryForm.disabledFlag}
|
||||
</if>
|
||||
<if test="queryForm.deletedFlag != null">
|
||||
AND t_employee.deleted_flag = #{queryForm.deletedFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateDisableFlag">
|
||||
UPDATE t_employee
|
||||
SET disabled_flag = #{disabledFlag}
|
||||
WHERE employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getByLoginName" resultType="net.lab1024.sa.admin.module.system.employee.domain.entity.EmployeeEntity">
|
||||
SELECT *
|
||||
FROM t_employee
|
||||
<where>
|
||||
login_name = #{loginName}
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getByActualName" resultType="net.lab1024.sa.admin.module.system.employee.domain.entity.EmployeeEntity">
|
||||
SELECT *
|
||||
FROM t_employee
|
||||
<where>
|
||||
actual_name = #{actualName}
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getByPhone" resultType="net.lab1024.sa.admin.module.system.employee.domain.entity.EmployeeEntity">
|
||||
SELECT *
|
||||
FROM t_employee
|
||||
<where>
|
||||
phone = #{phone}
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||
SELECT *
|
||||
FROM t_employee
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="countByDepartmentId" resultType="integer">
|
||||
SELECT count(1) FROM t_employee
|
||||
WHERE
|
||||
department_id = #{departmentId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByDepartmentId"
|
||||
resultType="net.lab1024.sa.admin.module.system.employee.domain.entity.EmployeeEntity">
|
||||
SELECT *
|
||||
FROM t_employee
|
||||
<where>
|
||||
department_id = #{departmentId}
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectByActualName"
|
||||
resultType="net.lab1024.sa.admin.module.system.employee.domain.entity.EmployeeEntity">
|
||||
SELECT * FROM t_employee
|
||||
<where>
|
||||
actual_name = #{actualName}
|
||||
AND department_id in
|
||||
<foreach collection="departmentIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeIdByDepartmentIdList" resultType="java.lang.Long">
|
||||
SELECT employee_id
|
||||
FROM t_employee
|
||||
<where>
|
||||
department_id IN
|
||||
<foreach collection="departmentIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getEmployeeId" resultType="java.lang.Long">
|
||||
SELECT employee_id
|
||||
FROM t_employee
|
||||
<where>
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeIdByDepartmentId" resultType="java.lang.Long">
|
||||
SELECT employee_id
|
||||
FROM t_employee
|
||||
<where>
|
||||
department_id = #{departmentId}
|
||||
<if test="disabledFlag != null">
|
||||
AND disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeByIds" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||
SELECT * FROM t_employee
|
||||
where employee_id IN
|
||||
<foreach collection="employeeIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||
SELECT t_employee.*,
|
||||
t_department.name AS departmentName
|
||||
FROM t_employee
|
||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||
where t_employee.employee_id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="selectEmployeeByDisabledAndDeleted"
|
||||
resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||
SELECT
|
||||
t_employee.*,
|
||||
t_department.name AS departmentName
|
||||
FROM t_employee
|
||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||
<where>
|
||||
<if test="disabledFlag != null">
|
||||
AND t_employee.disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
<if test="deletedFlag != null">
|
||||
AND t_employee.deleted_flag = #{deletedFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updatePassword">
|
||||
UPDATE t_employee
|
||||
SET login_pwd = #{password}
|
||||
WHERE employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.menu.dao.MenuDao">
|
||||
|
||||
<delete id="deleteByMenuIdList">
|
||||
<if test="menuIdList != null and menuIdList.size > 0">
|
||||
<foreach collection="menuIdList" item="item" separator=";">
|
||||
update t_menu
|
||||
set deleted_flag = #{deletedFlag},
|
||||
update_user_id = #{updateUserId}
|
||||
where menu_id = #{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="getByMenuName"
|
||||
resultType="net.lab1024.sa.admin.module.system.menu.domain.entity.MenuEntity">
|
||||
select *
|
||||
from t_menu
|
||||
where menu_name = #{menuName}
|
||||
and parent_id = #{parentId}
|
||||
and deleted_flag = #{deletedFlag} limit 1
|
||||
</select>
|
||||
<select id="queryMenuList" resultType="net.lab1024.sa.admin.module.system.menu.domain.vo.MenuVO">
|
||||
select * from t_menu
|
||||
where deleted_flag = #{deletedFlag}
|
||||
<if test="disabledFlag != null">
|
||||
and disabled_flag = #{disabledFlag}
|
||||
</if>
|
||||
<if test="menuTypeList != null and menuTypeList.size > 0">
|
||||
and menu_type in
|
||||
<foreach collection="menuTypeList" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by parent_id desc,sort asc
|
||||
</select>
|
||||
<select id="getPointListByMenuId"
|
||||
resultType="net.lab1024.sa.admin.module.system.menu.domain.entity.MenuEntity">
|
||||
select *
|
||||
from t_menu
|
||||
where parent_id = #{menuId}
|
||||
and deleted_flag = #{deletedFlag}
|
||||
and menu_type = #{menuType}
|
||||
</select>
|
||||
|
||||
<select id="queryMenuByEmployeeId"
|
||||
resultType="net.lab1024.sa.admin.module.system.menu.domain.vo.MenuVO">
|
||||
select t_menu.* from t_menu
|
||||
left join t_role_menu on t_role_menu.menu_id = t_menu.menu_id
|
||||
left join t_role_employee on t_role_employee.role_id = t_role_menu.role_id
|
||||
where t_menu.disabled_flag = #{disabledFlag} and t_menu.deleted_flag = #{deletedFlag}
|
||||
<if test="employeeId != null">
|
||||
and t_role_employee.employee_id = #{employeeId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryMenuByType" resultType="net.lab1024.sa.admin.module.system.menu.domain.entity.MenuEntity">
|
||||
select *
|
||||
from t_menu
|
||||
where disabled_flag = #{disabledFlag}
|
||||
and deleted_flag = #{deletedFlag}
|
||||
and menu_type = #{menuType}
|
||||
</select>
|
||||
<select id="getByWebPerms" resultType="net.lab1024.sa.admin.module.system.menu.domain.entity.MenuEntity">
|
||||
select *
|
||||
from t_menu
|
||||
where web_perms = #{webPerms}
|
||||
and deleted_flag = #{deletedFlag} limit 1
|
||||
</select>
|
||||
<select id="selectMenuIdByParentIdList" resultType="java.lang.Long">
|
||||
<if test="menuIdList != null and menuIdList.size > 0">
|
||||
select menu_id from t_menu where parent_id in
|
||||
<foreach collection="menuIdList" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.role.dao.RoleDataScopeDao">
|
||||
|
||||
<resultMap id="DataScopeRoleEntity" type="net.lab1024.sa.admin.module.system.role.domain.entity.RoleDataScopeEntity"></resultMap>
|
||||
|
||||
<select id="listByRoleId" resultMap="DataScopeRoleEntity">
|
||||
select id,data_scope_type,view_type,role_id,update_time,create_time from t_role_data_scope where role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<select id="listByRoleIdList" resultMap="DataScopeRoleEntity">
|
||||
select id,data_scope_type,view_type,role_id,update_time,create_time from t_role_data_scope where role_id IN
|
||||
<foreach collection="roleIdList" item="item" open="(" close= ")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByRoleId">
|
||||
DELETE FROM t_role_data_scope
|
||||
WHERE role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.role.dao.RoleEmployeeDao">
|
||||
|
||||
|
||||
<resultMap id="EmployeeVO"
|
||||
type="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO"></resultMap>
|
||||
|
||||
|
||||
<select id="selectRoleIdByEmployeeId" resultType="java.lang.Long">
|
||||
SELECT er.role_id
|
||||
FROM t_role_employee er
|
||||
WHERE er.employee_id = #{employeeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRoleEmployeeByName" resultMap="EmployeeVO">
|
||||
SELECT
|
||||
t_employee.employee_id,
|
||||
t_employee.login_name,
|
||||
t_employee.login_pwd,
|
||||
t_employee.actual_name,
|
||||
t_employee.phone,
|
||||
t_employee.department_id,
|
||||
t_employee.disabled_flag,
|
||||
t_employee.remark,
|
||||
t_employee.update_time,
|
||||
t_employee.create_time
|
||||
FROM
|
||||
t_role_employee
|
||||
left join t_employee on t_role_employee.employee_id = t_employee.employee_id
|
||||
left join t_role on t_role_employee.role_id = t_role.role_id
|
||||
<where>
|
||||
<if test="queryForm.keywords != null and queryForm.keywords!= ''">
|
||||
AND (
|
||||
INSTR(t_employeeactual_name,#{queryForm.keywords})
|
||||
OR INSTR(t_employeephone,#{queryForm.keywords})
|
||||
OR INSTR(t_employeelogin_name,#{queryForm.keywords})
|
||||
)
|
||||
</if>
|
||||
<if test="queryForm.roleId != null">
|
||||
AND t_role_employee.role_id = #{queryForm.roleId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmployeeByRoleId" resultMap="EmployeeVO">
|
||||
SELECT t_employee.employee_id,
|
||||
t_employee.login_name,
|
||||
t_employee.login_pwd,
|
||||
t_employee.actual_name,
|
||||
t_employee.phone,
|
||||
t_employee.department_id,
|
||||
t_employee.disabled_flag,
|
||||
t_employee.remark,
|
||||
t_employee.update_time,
|
||||
t_employee.create_time
|
||||
FROM t_role_employee
|
||||
left join t_employee on t_role_employee.employee_id = t_employee.employee_id
|
||||
WHERE t_role_employee.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<select id="selectEmployeeIdByRoleIdList" resultType="java.lang.Long">
|
||||
SELECT
|
||||
employee_id
|
||||
FROM
|
||||
t_role_employee
|
||||
WHERE
|
||||
role_id in
|
||||
<foreach collection="roleIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectRoleIdByEmployeeIdList"
|
||||
resultType="net.lab1024.sa.admin.module.system.role.domain.entity.RoleEmployeeEntity">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
t_role_employee
|
||||
WHERE
|
||||
employee_id in
|
||||
<foreach collection="employeeIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleByEmployeeIdList"
|
||||
resultType="net.lab1024.sa.admin.module.system.role.domain.vo.RoleEmployeeVO">
|
||||
SELECT
|
||||
t_role_employee.role_id,
|
||||
t_role_employee.employee_id,
|
||||
t_role.role_name
|
||||
FROM
|
||||
t_role_employee
|
||||
LEFT JOIN t_role ON t_role.role_id = t_role_employee.role_id
|
||||
WHERE
|
||||
employee_id in
|
||||
<foreach collection="employeeIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<delete id="deleteByEmployeeId">
|
||||
DELETE
|
||||
FROM t_role_employee
|
||||
WHERE employee_id = #{employeeId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteByRoleId">
|
||||
DELETE
|
||||
FROM t_role_employee
|
||||
WHERE role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByEmployeeIdRoleId">
|
||||
DELETE
|
||||
FROM t_role_employee
|
||||
WHERE role_id = #{roleId}
|
||||
and employee_id = #{employeeId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="batchDeleteEmployeeRole">
|
||||
DELETE FROM t_role_employee
|
||||
WHERE role_id = #{roleId} and employee_id in
|
||||
<foreach collection="employeeIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.role.dao.RoleDao">
|
||||
|
||||
<resultMap id="RoleEntity"
|
||||
type="net.lab1024.sa.admin.module.system.role.domain.entity.RoleEntity"></resultMap>
|
||||
|
||||
|
||||
<select id="getByRoleName" resultMap="RoleEntity">
|
||||
SELECT *
|
||||
FROM t_role
|
||||
WHERE role_name = #{roleName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.sa.admin.module.system.role.dao.RoleMenuDao">
|
||||
<delete id="deleteByRoleId">
|
||||
delete
|
||||
from t_role_menu
|
||||
where role_id = #{roleId}
|
||||
</delete>
|
||||
<select id="queryMenuIdByRoleId" resultType="java.lang.Long">
|
||||
select menu_id
|
||||
from t_role_menu
|
||||
where role_id = #{roleId}
|
||||
</select>
|
||||
<select id="queryAllRoleMenu"
|
||||
resultType="net.lab1024.sa.admin.module.system.role.domain.entity.RoleMenuEntity">
|
||||
select *
|
||||
from t_role_menu
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByRoleIdList"
|
||||
resultType="net.lab1024.sa.admin.module.system.menu.domain.entity.MenuEntity">
|
||||
|
||||
SELECT
|
||||
t_menu.*
|
||||
from t_menu
|
||||
left join t_role_menu on t_role_menu.menu_id = t_menu.menu_id
|
||||
<where>
|
||||
<if test="deletedFlag != null">
|
||||
and t_menu.deleted_flag = #{deletedFlag}
|
||||
</if>
|
||||
<if test="roleIdList != null and roleIdList.size > 0">
|
||||
and t_role_menu.role_id in
|
||||
<foreach collection="roleIdList" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by t_menu.menu_id
|
||||
ORDER BY t_menu.sort ASC
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,18 +0,0 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
datasource:
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v2_pre?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: Lab1024
|
||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
status : 这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,会看到log4j2内部各种详细输出
|
||||
monitorInterval : Log4j能够自动检测修改配置文件和重新配置本身, 设置间隔秒数。
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/pre</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
<AppenderRef ref="info"/>
|
||||
<AppenderRef ref="warn"/>
|
||||
<AppenderRef ref="error"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
|
||||
</Configuration>
|
||||
@@ -1,18 +0,0 @@
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
#日志输出到控制台
|
||||
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||
# 设置 p6spy driver 代理
|
||||
deregisterdrivers=true
|
||||
# 取消JDBC URL前缀
|
||||
useprefix=true
|
||||
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||
excludecategories=info,debug,result,commit,resultset
|
||||
# 日期格式
|
||||
dateformat=yyyy-MM-dd HH:mm:ss
|
||||
# 开启慢sql
|
||||
outagedetection=true
|
||||
# 慢SQL记录标准(单位秒)
|
||||
outagedetectioninterval=2
|
||||
@@ -1,18 +0,0 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
datasource:
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v2_prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: Lab1024
|
||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
status : 这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,会看到log4j2内部各种详细输出
|
||||
monitorInterval : Log4j能够自动检测修改配置文件和重新配置本身, 设置间隔秒数。
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/prod</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
<Root level="warn">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
<AppenderRef ref="info"/>
|
||||
<AppenderRef ref="warn"/>
|
||||
<AppenderRef ref="error"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
|
||||
</Configuration>
|
||||
@@ -1,18 +0,0 @@
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
#日志输出到控制台
|
||||
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||
# 设置 p6spy driver 代理
|
||||
deregisterdrivers=true
|
||||
# 取消JDBC URL前缀
|
||||
useprefix=true
|
||||
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||
excludecategories=info,debug,result,commit,resultset
|
||||
# 日期格式
|
||||
dateformat=yyyy-MM-dd HH:mm:ss
|
||||
# 开启慢sql
|
||||
outagedetection=true
|
||||
# 慢SQL记录标准(单位秒)
|
||||
outagedetectioninterval=2
|
||||
@@ -1,18 +0,0 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: '/'
|
||||
port: 1024
|
||||
spring:
|
||||
profiles:
|
||||
active: '@profiles.active@'
|
||||
datasource:
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v2_test?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: Lab1024
|
||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
project:
|
||||
name: sa-admin
|
||||
module: net.lab1024.sa.admin.module
|
||||
swagger:
|
||||
host: localhost:${server.port}
|
||||
tag-class: net.lab1024.sa.admin.constant.AdminSwaggerTagConst
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
status : 这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,会看到log4j2内部各种详细输出
|
||||
monitorInterval : Log4j能够自动检测修改配置文件和重新配置本身, 设置间隔秒数。
|
||||
-->
|
||||
<Configuration status="INFO" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/test</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
</Console>
|
||||
<RollingFile name="debug" fileName="${log-path}/debug/smart-admin_debug.log"
|
||||
filePattern="${log-path}/debug/smart-admin_debug_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/debug" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_debug_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="info" fileName="${log-path}/info/smart-admin_info.log"
|
||||
filePattern="${log-path}/info/smart-admin_info_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/info" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_info_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="warn" fileName="${log-path}/warn/smart-admin_warn.log"
|
||||
filePattern="${log-path}/warn/smart-admin_warn_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/warn" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_warn_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
<RollingFile name="error" fileName="${log-path}/error/smart-admin_error.log"
|
||||
filePattern="${log-path}/error/smart-admin_error_%d{yyyy-MM-dd}-%i.log">
|
||||
<Filters>
|
||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30">
|
||||
<Delete basePath="${log-path}/error" maxDepth="1">
|
||||
<IfFileName glob="smart-admin_error_*.log"/>
|
||||
<IfLastModified age="15d"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="debug"/>
|
||||
<AppenderRef ref="info"/>
|
||||
<AppenderRef ref="warn"/>
|
||||
<AppenderRef ref="error"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
|
||||
</Configuration>
|
||||
@@ -1,18 +0,0 @@
|
||||
#相关的包
|
||||
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||
# 日志格式
|
||||
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||
#日志输出到控制台
|
||||
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||
# 设置 p6spy driver 代理
|
||||
deregisterdrivers=true
|
||||
# 取消JDBC URL前缀
|
||||
useprefix=true
|
||||
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||
excludecategories=info,debug,result,commit,resultset
|
||||
# 日期格式
|
||||
dateformat=yyyy-MM-dd HH:mm:ss
|
||||
# 开启慢sql
|
||||
outagedetection=true
|
||||
# 慢SQL记录标准(单位秒)
|
||||
outagedetectioninterval=2
|
||||
Reference in New Issue
Block a user