Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
7f4a0f1a
Commit
7f4a0f1a
authored
Dec 22, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】修改配置文件
parent
7ba6d932
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
718 additions
and
16 deletions
+718
-16
RetailController.java
...io/office/modules/manage/controller/RetailController.java
+108
-0
RetailDao.java
src/main/java/io/office/modules/manage/dao/RetailDao.java
+17
-0
RetailEntity.java
...in/java/io/office/modules/manage/entity/RetailEntity.java
+124
-0
RetailService.java
.../java/io/office/modules/manage/service/RetailService.java
+24
-0
BarcodeGenerationServiceImpl.java
...les/manage/service/impl/BarcodeGenerationServiceImpl.java
+3
-1
RetailServiceImpl.java
...office/modules/manage/service/impl/RetailServiceImpl.java
+47
-0
RetailEntityVo.java
...a/io/office/modules/manage/vo/request/RetailEntityVo.java
+123
-0
application-dev.yml
src/main/resources/application-dev.yml
+2
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+233
-15
RetailDao.xml
src/main/resources/mapper/manage/RetailDao.xml
+37
-0
No files found.
src/main/java/io/office/modules/manage/controller/RetailController.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.vo.request.RetailEntityVo
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.entity.RetailEntity
;
import
io.office.modules.manage.service.RetailService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@RestController
@RequestMapping
(
"/retail"
)
public
class
RetailController
{
@Autowired
private
RetailService
retailService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:retail:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
retailService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:retail:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
RetailEntity
retail
=
retailService
.
getById
(
id
);
return
R
.
ok
().
put
(
"retail"
,
retail
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:retail:save")
public
R
save
(
@RequestBody
RetailEntity
retail
){
retailService
.
save
(
retail
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:retail:update")
public
R
update
(
@RequestBody
RetailEntity
retail
){
retailService
.
updateById
(
retail
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:retail:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
retailService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
/**
* 应用指南列表
* @param retailEntityVo
* @return
*/
/* @Login
@PostMapping("/api/guideList")
public R guideList(@RequestBody RetailEntityVo retailEntityVo) {
*//* Page<RetailEntity> page = this.retailService.queryPage(retailEntityVo,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);*//*
}*/
}
src/main/java/io/office/modules/manage/dao/RetailDao.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.RetailEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@Mapper
public
interface
RetailDao
extends
BaseMapper
<
RetailEntity
>
{
}
src/main/java/io/office/modules/manage/entity/RetailEntity.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@Data
@TableName
(
"retail"
)
public
class
RetailEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
Integer
columnid
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
titleOld
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
Date
releasedate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
String
source
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
String
directpath
;
/**
* $column.comments
*/
private
String
pic
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
private
Integer
hits
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
Integer
classid
;
/**
* $column.comments
*/
private
Date
publicdate
;
/**
* $column.comments
*/
private
Date
startdate
;
/**
* $column.comments
*/
private
String
ishead
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
/**
* $column.comments
*/
private
String
showtime
;
/**
* $column.comments
*/
private
Date
checkdate
;
}
src/main/java/io/office/modules/manage/service/RetailService.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.RetailEntity
;
import
io.office.modules.manage.vo.request.RetailEntityVo
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
public
interface
RetailService
extends
IService
<
RetailEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPageList
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/BarcodeGenerationServiceImpl.java
View file @
7f4a0f1a
...
...
@@ -8,6 +8,7 @@ import io.office.modules.manage.utils.CheckAICodeUtil;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -19,7 +20,8 @@ public class BarcodeGenerationServiceImpl implements BarcodeGenerationService {
private
final
Log
logger
=
LogFactory
.
getLog
(
getClass
());
public
static
final
String
SEPERATOR
=
"ñ"
;
public
static
final
String
prefix_host
=
"http://81.68.189.225:9091/office/"
;
@Value
(
"${prefix_host}"
)
public
String
prefix_host
;
public
static
final
String
prefix_url
=
"barcodegeneration/api/gensvg?type="
;
@Override
...
...
src/main/java/io/office/modules/manage/service/impl/RetailServiceImpl.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.modules.manage.vo.request.RetailEntityVo
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.RetailDao
;
import
io.office.modules.manage.entity.RetailEntity
;
import
io.office.modules.manage.service.RetailService
;
@Service
(
"retailService"
)
public
class
RetailServiceImpl
extends
ServiceImpl
<
RetailDao
,
RetailEntity
>
implements
RetailService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
RetailEntity
>
page
=
this
.
page
(
new
Query
<
RetailEntity
>().
getPage
(
params
),
new
QueryWrapper
<
RetailEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
PageUtils
queryPageList
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
RetailEntity
>
retailEntityQueryWrapper
=
new
QueryWrapper
<>();
retailEntityQueryWrapper
.
eq
(
"classid"
,
"1"
);
retailEntityQueryWrapper
.
gt
(
"levels"
,
"0"
);
retailEntityQueryWrapper
.
eq
(
"status"
,
"1"
);
retailEntityQueryWrapper
.
orderByAsc
(
"levels"
);
retailEntityQueryWrapper
.
orderByAsc
(
"id"
);
IPage
<
RetailEntity
>
page
=
this
.
page
(
new
Query
<
RetailEntity
>().
getPage
(
params
),
retailEntityQueryWrapper
);
return
null
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/vo/request/RetailEntityVo.java
0 → 100644
View file @
7f4a0f1a
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.office.modules.manage.entity.page.PageParams
;
import
lombok.Data
;
import
java.util.Date
;
/**
*
* @description:
*
* @author wudi
* @date 17:58 2021/12/22
*/
@Data
public
class
RetailEntityVo
extends
PageParams
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
Integer
columnid
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
titleOld
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
Date
releasedate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
String
source
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
String
directpath
;
/**
* $column.comments
*/
private
String
pic
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
private
Integer
hits
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
Integer
classid
;
/**
* $column.comments
*/
private
Date
publicdate
;
/**
* $column.comments
*/
private
Date
startdate
;
/**
* $column.comments
*/
private
String
ishead
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
/**
* $column.comments
*/
private
String
showtime
;
/**
* $column.comments
*/
private
Date
checkdate
;
}
src/main/resources/application-dev.yml
View file @
7f4a0f1a
...
...
@@ -61,3 +61,4 @@ file:
prefix
:
http://81.68.189.225:9091/office/uploadFileResource/
ueditorSavePath
:
/uploadFileResource/
prefix_host
:
http://81.68.189.225:9091/office/
\ No newline at end of file
src/main/resources/logback-spring.xml
View file @
7f4a0f1a
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<logger
name=
"org.springframework.web"
level=
"INFO"
/>
<logger
name=
"org.springboot.sample"
level=
"TRACE"
/>
<!-- 开发、测试环境 -->
<springProfile
name=
"dev,test"
>
<logger
name=
"org.springframework.web"
level=
"INFO"
/>
<logger
name=
"org.springboot.sample"
level=
"INFO"
/>
<logger
name=
"io.office"
level=
"DEBUG"
/>
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,比如: 如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文档如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文档是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration
scan=
"true"
scanPeriod=
"10 seconds"
>
<contextName>
logback
</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
<property
name=
"log.path"
value=
"/my/log/gs1"
/>
<!--0. 日志格式和颜色渲染 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule
conversionWord=
"clr"
converterClass=
"org.springframework.boot.logging.logback.ColorConverter"
/>
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!--1. 输出到控制台-->
<appender
name=
"CONSOLE"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<Pattern>
${CONSOLE_LOG_PATTERN}
</Pattern>
<!-- 设置字符集 -->
<charset>
UTF-8
</charset>
</encoder>
</appender>
<!--2. 输出到文档-->
<!-- 2.1 level为 DEBUG 日志,时间滚动输出 -->
<appender
name=
"DEBUG_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文档的路径及文档名 -->
<file>
${log.path}/debug.log
</file>
<!--日志文档输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 日志归档 -->
<fileNamePattern>
${log.path}/debug-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录debug级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
debug
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 2.2 level为 INFO 日志,时间滚动输出 -->
<appender
name=
"INFO_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文档的路径及文档名 -->
<file>
${log.path}/info.log
</file>
<!--日志文档输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>
${log.path}/info-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录info级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
info
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 2.3 level为 WARN 日志,时间滚动输出 -->
<appender
name=
"WARN_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文档的路径及文档名 -->
<file>
${log.path}/warn.log
</file>
<!--日志文档输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/warn-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录warn级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
warn
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 2.4 level为 ERROR 日志,时间滚动输出 -->
<appender
name=
"ERROR_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文档的路径及文档名 -->
<file>
${log.path}/error.log
</file>
<!--日志文档输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/error-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 2.5 所有 除了DEBUG级别的其它高于DEBUG的 日志,记录到一个文件 -->
<appender
name=
"ALL_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文档的路径及文档名 -->
<file>
${log.path}/all.log
</file>
<!--日志文档输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/all-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文档记录除了DEBUG级别的其它高于DEBUG的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
DENY
</onMatch>
<onMismatch>
ACCEPT
</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender>。<logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特殊值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
<logger name="org.springframework.web" level="info"/>
<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>
-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
【logging.level.org.mybatis=debug logging.level.dao=debug】
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<!-- 4 最终的策略:
基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)-->
<springProfile
name=
"dev"
>
<root
level=
"info"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
<appender-ref
ref=
"WARN_FILE"
/>
<appender-ref
ref=
"ERROR_FILE"
/>
<appender-ref
ref=
"ALL_FILE"
/>
</root>
<logger
name=
"io.office.modules.manage.dao"
level=
"debug"
/>
<!-- 开发环境, 指定某包日志为debug级 -->
</springProfile>
<!-- 生产环境 -->
<springProfile
name=
"prod"
>
<logger
name=
"org.springframework.web"
level=
"ERROR"
/>
<logger
name=
"org.springboot.sample"
level=
"ERROR"
/>
<logger
name=
"io.office"
level=
"ERROR"
/>
<springProfile
name=
"test"
>
<root
level=
"info"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
<appender-ref
ref=
"WARN_FILE"
/>
<appender-ref
ref=
"ERROR_FILE"
/>
<appender-ref
ref=
"ALL_FILE"
/>
</root>
<logger
name=
"io.office.modules.manage.dao"
level=
"debug"
/>
<!-- 测试环境, 指定某包日志为info级 -->
</springProfile>
<springProfile
name=
"pro"
>
<root
level=
"info"
>
<!-- 生产环境最好不配置console写文件 -->
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
<appender-ref
ref=
"WARN_FILE"
/>
<appender-ref
ref=
"ERROR_FILE"
/>
<appender-ref
ref=
"ALL_FILE"
/>
</root>
<logger
name=
"io.office"
level=
"warn"
/>
<!-- 生产环境, 指定某包日志为warn级 -->
<logger
name=
"io.office"
level=
"info"
/>
<!-- 特定某个类打印info日志, 比如application启动成功后的提示语 -->
</springProfile>
</configuration>
src/main/resources/mapper/manage/RetailDao.xml
0 → 100644
View file @
7f4a0f1a
<?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=
"io.office.modules.manage.dao.RetailDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.RetailEntity"
id=
"retailMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"columnid"
column=
"columnid"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"titleOld"
column=
"title_old"
/>
<result
property=
"keyword"
column=
"keyword"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"releasedate"
column=
"releasedate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"source"
column=
"source"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"directpath"
column=
"directpath"
/>
<result
property=
"pic"
column=
"pic"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"hits"
column=
"hits"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"classid"
column=
"classid"
/>
<result
property=
"publicdate"
column=
"publicdate"
/>
<result
property=
"startdate"
column=
"startdate"
/>
<result
property=
"ishead"
column=
"ishead"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"showtime"
column=
"showtime"
/>
<result
property=
"checkdate"
column=
"checkdate"
/>
</resultMap>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment