Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
李伟
cust-api
Commits
f22e2cf6
Commit
f22e2cf6
authored
Dec 17, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化
parent
0c3d6843
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
2982 additions
and
62 deletions
+2982
-62
pom.xml
pom.xml
+94
-23
readMe.md
readMe.md
+32
-39
CustApplication.java
src/main/java/org/rcisoft/CustApplication.java
+24
-0
CmsBannerController.java
...ft/business/cmsbanner/controller/CmsBannerController.java
+138
-0
CmsBannerRepository.java
...g/rcisoft/business/cmsbanner/dao/CmsBannerRepository.java
+31
-0
CmsBanner.java
...java/org/rcisoft/business/cmsbanner/entity/CmsBanner.java
+66
-0
CmsBannerService.java
.../rcisoft/business/cmsbanner/service/CmsBannerService.java
+73
-0
CmsBannerServiceImpl.java
...business/cmsbanner/service/impl/CmsBannerServiceImpl.java
+143
-0
SysContentNewsInformationController.java
...ation/controller/SysContentNewsInformationController.java
+147
-0
SysContentNewsInformationRepository.java
...sinformation/dao/SysContentNewsInformationRepository.java
+35
-0
SysContentNewsInformation.java
...tentnewsinformation/entity/SysContentNewsInformation.java
+110
-0
SysContentNewsInformationService.java
...information/service/SysContentNewsInformationService.java
+70
-0
SysContentNewsInformationServiceImpl.java
...on/service/impl/SysContentNewsInformationServiceImpl.java
+164
-0
Global.java
src/main/java/org/rcisoft/common/component/Global.java
+234
-0
OssGlobal.java
src/main/java/org/rcisoft/common/component/OssGlobal.java
+44
-0
application-common.yml
src/main/resources/application-common.yml
+333
-0
application-dev-conf.yml
src/main/resources/application-dev-conf.yml
+203
-0
application-kube-conf.yml
src/main/resources/application-kube-conf.yml
+173
-0
application-prod-conf.yml
src/main/resources/application-prod-conf.yml
+173
-0
application-spbt.yml
src/main/resources/application-spbt.yml
+130
-0
application-test-conf.yml
src/main/resources/application-test-conf.yml
+171
-0
application.yml
src/main/resources/application.yml
+8
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+138
-0
CmsBannerMapper.xml
...rces/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
+83
-0
SysContentNewsInformationMapper.xml
...ewsinformation.mapper/SysContentNewsInformationMapper.xml
+165
-0
No files found.
pom.xml
View file @
f22e2cf6
...
...
@@ -5,7 +5,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.rcisoft
</groupId>
<artifactId>
template
</artifactId>
<artifactId>
asset
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
cust_api
</name>
...
...
@@ -31,26 +31,7 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
3.2.0_WF_A_P_TEA_RES_beta28
</version>
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/src/main/resources/META-INF/services/spbt_v3.2.0.jar</systemPath>-->
<!-- <version>3.0.0_nlt.25</version>-->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
</dependency>
<!--OSS-->
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<version>
1.3.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
...
...
@@ -63,6 +44,13 @@
<artifactId>
spring-boot-starter-test
</artifactId>
</dependency>
<dependency>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
3.2.1_WF_A_beta4
</version>
<!-- <version>3.0.0_nlt.25</version>-->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
</dependency>
<dependency>
<groupId>
org.jetbrains
</groupId>
<artifactId>
annotations
</artifactId>
...
...
@@ -81,10 +69,93 @@
<version>
3.5.1
</version>
</dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
1.14.3
</version>
</dependency>
<dependency>
<groupId>
io.github.furstenheim
</groupId>
<artifactId>
copy_down
</artifactId>
<version>
1.0
</version>
</dependency>
<dependency>
<groupId>
org.commonmark
</groupId>
<artifactId>
commonmark
</artifactId>
<version>
0.19.0
</version>
</dependency>
<!-- OKHttp3依赖 -->
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
3.8.1
</version>
</dependency>
<!-- 工具包 -->
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.3.2
</version>
</dependency>
<!-- 工具包 -->
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.11.0
</version>
</dependency>
<!-- 工具包-->
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
<!-- EasyPoi -->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.1.0
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
<version>
4.1.0
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
<version>
4.1.0
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<!-- Apache POI -->
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
5.2.3
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
5.2.3
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
4.1.2
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
<dependency>
<groupId>
org.apache.xmlbeans
</groupId>
<artifactId>
xmlbeans
</artifactId>
<version>
5.1.1
</version>
<!-- 请检查最新版本并替换 -->
</dependency>
</dependencies>
<build>
<finalName>
tea_resource
_api
</finalName>
<finalName>
asset
_api
</finalName>
<resources>
<resource>
<directory>
src/main/resources
</directory>
...
...
@@ -109,7 +180,7 @@
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring-boot.version}
</version>
<configuration>
<mainClass>
org.rcisoft.
TeaResource
Application
</mainClass>
<mainClass>
org.rcisoft.
Cust
Application
</mainClass>
<fork>
true
</fork>
</configuration>
<executions>
...
...
README
.md
→
readMe
.md
View file @
f22e2cf6
...
...
@@ -11,49 +11,42 @@
## 版本管理
| 版本 | 维护人员 | 维护时间 | 主要内容 |
|--------|------|------------|---------------------------------------|
| v1.0 | 李丛阳 | 2018-12-14 | 基础结构搭建 |
| v2.0 | 李丛阳 | 2019-07-12 | springboot2.0.1升级 |
| v2.3 | 李丛阳 | 2021-04-01 | 多数据库,目录划分 |
| v3.0 | 李丛阳 | 2022-04-16 | jdk17升级,集成cxf,CICD |
| v3.1 | 李丛阳 | 2022-08-25 | mongodb支持,事务 |
| v3.2.0 | 李丛阳 | 2024-01-05 | 代码生成器升级,数据库适配升级,aj-captcha,脱敏序列化 |
| v3.2.1 | 李丛阳 | 2024-05-25 | login-sms_yuntongxun storage-minio/local |
| v3.3.0 | 高英玮 | 2024-10-17 | springboot3.0.5升级 |
| 版本 | 维护人员 | 维护时间 | 主要内容 |
|------| ------------ |------------|----------------------------------|
| v1.0 | 李丛阳 | 2018-12-14 | 基础结构搭建 |
| v2.0 | 李丛阳 | 2019-07-12 | springboot2.0.1升级 |
| v2.3 | 李丛阳 | 2021-04-01 | 多数据库,目录划分 |
| v3.0 | 李丛阳 | 2022-04-16 | jdk17升级,集成cxf,CICD |
| v3.1 | 李丛阳 | 2022-08-25 | mongodb支持,事务 |
| v3.2 | 李丛阳 | 2024-01-05 | 代码生成器升级,数据库适配升级,aj-captcha,脱敏序列化 |
## 项目组件清单
| 版本 | 组件 | 描述 | 维护人 |
|--------|--------------------|---------------------------------------------------------|-----|
| v1.0 | lombok | 简化冗余代码,连通编辑器和构建工具 | cy |
| v1.0 | ssm | springmvc+spring+mybatis+mybatis扩展 | cy |
| v1.0 | springboot | 简化spring配置 | cy |
| v1.0 | springfox-swagger2 | 在线api | cy |
| v1.0 | logback | 日志 | cy |
| v1.0 | jwt | json web token 身份验证 | cy |
| v1.0 | spring-security | 安全性框架 | cy |
| v2.0 | springboot | springboot2.0升级 | cy |
| v2.0 | activiti | 工作流框架 | cy |
| v2.1 | knife4j | swagger升级 | cy |
| v2.1 | hikariCP | 代替druid | cy |
| v2.2 | 安全性防御 | xss sm4的xss csrf 表单重复提交 | cy |
| v2.2 | 登录日志/操作日志 | @CyLog | cy |
| v2.3 | 权限 | 支持wbac模式和rbac模式 | cy |
| v2.3 | 数据库扩展 | 支持mysql5.7 oracle12c sqlserver2019 | cy |
| v3.0 | webservice | 使用cxf 发布webservice,测试调用 | cy |
| v3.0 | devops | 支持kubeSphere CICD | cy |
| v3.0 | jdk 17.0 | 接入jdk 17 | cy |
| v3.1 | mongodb4.2.x | 事务(需要服务自身支持) | cy |
| v3.2.0 | rdbms | 适配升级mysql8.0.30;oracle19c;postgreSQL9.6.24;sqlserver2019 | cy |
| v3.2.0 | 代码生成器 | 增加前端代码生成 .js .vue | cy |
| v3.2.0 | aj-captcha | 增加滑块,中文点选 | cy |
| v3.2.1 | sms | 登录/注册 手机验证码 yuntongxun | cy |
| v3.2.1 | 文件存储 | 支持local,minio | cy |
| v3.3.0 | mybatis-plus | 升级到3.5.5 | gyw |
| v3.3.0 | springdoc | 将springfox在线api文档切换成springdoc,swagger2.0切换OpenApi3.0 | gyw |
| v3.3.0 | logback | 升级到1.4.14 | gyw |
| 版本 | 组件 | 描述 | 维护人 |
|------|--------------------|----------------------------------------------------------|------------ |
| v1.0 | lombok | 简化冗余代码,连通编辑器和构建工具 | cy |
| v1.0 | ssm | springmvc+spring+mybatis+mybatis扩展 | cy |
| v1.0 | springboot | 简化spring配置 | cy |
| v1.0 | springfox-swagger2 | 在线api | cy |
| v1.0 | logback | 日志 | cy |
| v1.0 | jwt | json web token 身份验证 | cy |
| v1.0 | spring-security | 安全性框架 | cy |
| v2.0 | springboot | springboot2.0升级 | cy |
| v2.0 | activiti | 工作流框架 | cy |
| v2.1 | knife4j | swagger升级 | cy |
| v2.1 | hikariCP | 代替druid | cy |
| v2.2 | 安全性防御 | xss sm4的xss csrf 表单重复提交 | cy |
| v2.2 | 登录日志/操作日志 | @CyLog | cy |
| v2.3 | 权限 | 支持wbac模式和rbac模式 | cy |
| v2.3 | 数据库扩展 | 支持mysql5.7 oracle12c sqlserver2019 | cy |
| v3.0 | webservice | 使用cxf 发布webservice,测试调用 | cy |
| v3.0 | devops | 支持kubeSphere CICD | cy |
| v3.0 | jdk 17.0 | 接入jdk 17 | cy |
| v3.1 | mongodb4.2.x | 事务(需要服务自身支持) | cy |
| v3.2 | rdbms | 适配升级mysql8.0.30;oracle19c;postgreSQL9.6.24;sqlserver2019 | cy |
| v3.2 | 代码生成器 | 增加前端代码生成 .js .vue | cy |
| v3.2 | aj-captcha | 增加滑块,中文点选 | cy |
## 设计规范
...
...
src/main/java/org/rcisoft/CustApplication.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
@SpringBootApplication
@EnableTransactionManagement
@EnableAspectJAutoProxy
@EnableScheduling
@EnableAsync
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
@MapperScan
(
basePackages
=
{
"org.rcisoft.**.dao"
})
//扫描dao 不需要@repository
public
class
CustApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
CustApplication
.
class
,
args
);
}
}
src/main/java/org/rcisoft/business/cmsbanner/controller/CmsBannerController.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
cmsbanner
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.cmsbanner.entity.CmsBanner
;
import
org.rcisoft.business.cmsbanner.service.CmsBannerService
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
@RestController
@RequestMapping
(
"/cmsbanner"
)
public
class
CmsBannerController
extends
CyPaginationController
<
CmsBanner
>
{
@Autowired
private
CmsBannerService
cmsBannerServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:increase')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-新增banner管理"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加banner管理"
,
notes
=
"添加banner管理"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
CmsBanner
cmsBanner
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
cmsBannerServiceImpl
.
persist
(
cmsBanner
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsBanner
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:removing')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-删除banner管理"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"逻辑删除banner管理"
,
notes
=
"逻辑删除banner管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
String
businessId
,
CmsBanner
cmsBanner
)
{
cmsBanner
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
cmsBannerServiceImpl
.
removeLogical
(
cmsBanner
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:banner:delete')")
@CyOpeLogAnno
(
title
=
"system-banner管理管理-删除banner管理"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"删除banner管理"
,
notes
=
"删除banner管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
String
businessId
,
CmsBanner
cmsBanner
)
{
cmsBanner
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
cmsBannerServiceImpl
.
remove
(
cmsBanner
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:modifications')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-修改banner管理"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改banner管理"
,
notes
=
"修改banner管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
String
businessId
,
@Valid
CmsBanner
cmsBanner
,
BindingResult
bindingResult
)
{
cmsBanner
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
cmsBannerServiceImpl
.
merge
(
cmsBanner
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsBanner
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:singleSearch')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询单一banner管理"
,
notes
=
"查询单一banner管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
String
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsBannerServiceImpl
.
findById
(
businessId
));
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:search')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询banner管理集合"
,
notes
=
"查询banner管理集合"
)
@GetMapping
(
value
=
"/queryCmsBanners"
)
public
CyResult
queryCmsBanners
(
CmsBanner
cmsBanner
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsBannerServiceImpl
.
findAll
(
cmsBanner
));
}
// @PreAuthorize("@cyPerm.hasPerm('cms:banner:pageSearch')")
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询banner管理集合"
,
notes
=
"分页查询banner管理集合"
)
@GetMapping
(
value
=
"/queryCmsBannerByPagination"
)
public
CyGridModel
listByPagination
(
CmsBanner
cmsBanner
)
{
cmsBannerServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsBanner
);
return
getGridModelResponse
();
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:derive')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出banner管理信息"
,
notes
=
"导出banner管理信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outCmsBanner
(
HttpServletResponse
response
,
CmsBanner
cmsBanner
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
){
case
"0"
:
excelName
=
"banner管理信息.xls"
;
break
;
case
"1"
:
excelName
=
"banner管理信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"banner管理信息.csv"
;
break
;
}
List
<
CmsBanner
>
cmsBannerList
=
cmsBannerServiceImpl
.
export
(
cmsBanner
);
CyEpExcelUtil
.
exportExcel
(
cmsBannerList
,
"banner管理信息"
,
"banner管理信息"
,
CmsBanner
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/cmsbanner/dao/CmsBannerRepository.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
cmsbanner
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.cmsbanner.entity.CmsBanner
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created with cy on 2024年3月30日 下午1:51:15.
*/
public
interface
CmsBannerRepository
extends
CyBaseMapper
<
CmsBanner
>
{
List
<
CmsBanner
>
queryCmsBanners
(
@Param
(
"entity"
)
CmsBanner
cmsBanner
);
/**
* 分页查询 cmsBanner
*
*/
IPage
<
CmsBanner
>
queryCmsBannersPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsBanner
cmsBanner
);
CmsBanner
selectByIdWithUrl
(
String
id
);
}
src/main/java/org/rcisoft/business/cmsbanner/entity/CmsBanner.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
cmsbanner
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
/**
* Created with cy on 2024年3月30日 下午1:51:15.
*/
@Data
@TableName
(
"cms_banner"
)
public
class
CmsBanner
extends
CyIdIncreEntity
<
CmsBanner
>
{
/**
* @desc 图片
* @column banner_picture
* @default
*/
@Excel
(
name
=
"图片"
,
orderNum
=
"0"
,
width
=
20
)
private
String
bannerPicture
;
/**
* @desc banner名字
* @column banner_name
* @default
*/
@Excel
(
name
=
"banner名字"
,
orderNum
=
"1"
,
width
=
20
)
private
String
bannerName
;
/**
* @desc 类型
* @column type
* @default
*/
@Excel
(
name
=
"类型"
,
orderNum
=
"2"
,
width
=
20
)
private
String
type
;
/**
* @desc 排序号
* @column weight
* @default
*/
@Excel
(
name
=
"排序号"
,
orderNum
=
"3"
,
width
=
20
)
private
Integer
weight
;
/**
* @desc 链接地址
* @column link_url
* @default
*/
@Excel
(
name
=
"链接地址"
,
orderNum
=
"4"
,
width
=
20
)
private
String
linkUrl
;
/**
* 图片地址
*/
@TableField
(
exist
=
false
)
private
String
url
;
}
src/main/java/org/rcisoft/business/cmsbanner/service/CmsBannerService.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
cmsbanner
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.cmsbanner.entity.CmsBanner
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
public
interface
CmsBannerService
{
/**
* 保存 banner管理
* @param cmsBanner
* @return
*/
CyPersistModel
persist
(
CmsBanner
cmsBanner
);
/**
* 删除 banner管理
* @param cmsBanner
* @return
*/
CyPersistModel
remove
(
CmsBanner
cmsBanner
);
/**
* 逻辑删除 banner管理
* @param cmsBanner
* @return
*/
CyPersistModel
removeLogical
(
CmsBanner
cmsBanner
);
/**
* 修改 banner管理
* @param cmsBanner
* @return
*/
CyPersistModel
merge
(
CmsBanner
cmsBanner
);
/**
* 根据id查询 banner管理
* @param id
* @return
*/
CmsBanner
findById
(
String
id
);
/**
* 分页查询 banner管理
* @param cmsBanner
* @return
*/
IPage
<
CmsBanner
>
findAllByPagination
(
CyPageInfo
<
CmsBanner
>
paginationUtility
,
CmsBanner
cmsBanner
);
/**
* 查询list banner管理
* @param cmsBanner
* @return
*/
List
<
CmsBanner
>
findAll
(
CmsBanner
cmsBanner
);
/**
* 导出banner管理
* @return
*/
List
<
CmsBanner
>
export
(
CmsBanner
cmsBanner
);
}
src/main/java/org/rcisoft/business/cmsbanner/service/impl/CmsBannerServiceImpl.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
cmsbanner
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.cmsbanner.dao.CmsBannerRepository
;
import
org.rcisoft.business.cmsbanner.entity.CmsBanner
;
import
org.rcisoft.business.cmsbanner.service.CmsBannerService
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
CmsBannerServiceImpl
extends
ServiceImpl
<
CmsBannerRepository
,
CmsBanner
>
implements
CmsBannerService
{
@Autowired
private
Global
global
;
/**
* 保存 banner管理
* @param cmsBanner
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CmsBanner
cmsBanner
){
//增加操作
int
line
=
baseMapper
.
insert
(
cmsBanner
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
cmsBanner
.
getBusinessId
()+
"的banner管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 banner管理
* @param cmsBanner
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
CmsBanner
cmsBanner
){
int
line
=
baseMapper
.
realDelete
(
cmsBanner
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
cmsBanner
.
getBusinessId
()+
"的banner管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 banner管理
* @param cmsBanner
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
CmsBanner
cmsBanner
){
cmsBanner
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
cmsBanner
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
cmsBanner
.
getBusinessId
()+
"的banner管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 banner管理
* @param cmsBanner
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CmsBanner
cmsBanner
){
int
line
=
baseMapper
.
updateById
(
cmsBanner
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
cmsBanner
.
getBusinessId
()+
"的banner管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 banner管理
* @param id
* @return
*/
@Override
public
CmsBanner
findById
(
String
id
){
CmsBanner
banner
=
baseMapper
.
selectByIdWithUrl
(
id
);
if
(
banner
.
getUrl
()!=
null
){
banner
.
setUrl
(
global
.
getBase_Discovery
()+
banner
.
getUrl
());
}
return
banner
;
}
/**
* 分页查询 banner管理
* @param cmsBanner
* @return
*/
@Override
public
IPage
<
CmsBanner
>
findAllByPagination
(
CyPageInfo
<
CmsBanner
>
paginationUtility
,
CmsBanner
cmsBanner
){
IPage
<
CmsBanner
>
result
=
baseMapper
.
queryCmsBannersPaged
(
paginationUtility
,
cmsBanner
);
List
<
CmsBanner
>
cmsBannerList
=
result
.
getRecords
();
for
(
CmsBanner
banner
:
cmsBannerList
){
if
(
banner
.
getUrl
()!=
null
){
banner
.
setUrl
(
global
.
getBase_Discovery
()+
banner
.
getUrl
());
}
}
return
result
;
}
/**
* 查询list banner管理
* @param cmsBanner
* @return
*/
@Override
public
List
<
CmsBanner
>
findAll
(
CmsBanner
cmsBanner
){
return
baseMapper
.
queryCmsBanners
(
cmsBanner
);
}
/**
* 导出banner管理
* @return
*/
@Override
public
List
<
CmsBanner
>
export
(
CmsBanner
cmsBanner
)
{
List
<
CmsBanner
>
cmsBannerList
=
baseMapper
.
queryCmsBanners
(
cmsBanner
);
return
cmsBannerList
;
}
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/controller/SysContentNewsInformationController.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.business.syscontentnewsinformation.service.SysContentNewsInformationService
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@RestController
@RequestMapping
(
"/syscontentnewsinformation"
)
public
class
SysContentNewsInformationController
extends
CyPaginationController
<
SysContentNewsInformation
>
{
@Autowired
private
SysContentNewsInformationService
sysContentNewsInformationServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:increase')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-新增新闻资讯"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加新闻资讯"
,
notes
=
"添加新闻资讯"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
SysContentNewsInformation
sysContentNewsInformation
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
persist
(
sysContentNewsInformation
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:removing')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-删除新闻资讯"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"删除新闻资讯"
,
notes
=
"删除新闻资讯"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
Integer
businessId
,
SysContentNewsInformation
sysContentNewsInformation
)
{
sysContentNewsInformation
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
remove
(
sysContentNewsInformation
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:modifications')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-修改新闻资讯"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"修改新闻资讯"
,
notes
=
"修改新闻资讯"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PostMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
Integer
businessId
,
@Valid
SysContentNewsInformation
sysContentNewsInformation
,
BindingResult
bindingResult
)
{
sysContentNewsInformation
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
merge
(
sysContentNewsInformation
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
}
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:singleSearch')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询单一新闻资讯"
,
notes
=
"查询单一新闻资讯"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
Integer
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformationServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:contentNewsInformation:list')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询新闻资讯集合"
,
notes
=
"查询新闻资讯集合"
)
@GetMapping
(
value
=
"/querySysContentNewsInformations"
)
public
CyResult
querySysContentNewsInformations
(
SysContentNewsInformation
sysContentNewsInformation
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformationServiceImpl
.
findAll
(
sysContentNewsInformation
));
}
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:pageSearch')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询新闻资讯集合"
,
notes
=
"分页查询新闻资讯集合"
)
@GetMapping
(
value
=
"/querySysContentNewsInformationByPagination"
)
public
CyGridModel
listByPagination
(
SysContentNewsInformation
sysContentNewsInformation
)
{
sysContentNewsInformationServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
sysContentNewsInformation
);
return
getGridModelResponse
();
}
//修改状态
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:modificationsStatus')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-修改新闻资讯状态"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改新闻资讯状态"
,
notes
=
"修改新闻资讯状态"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
"/updateStatus/{businessId:\\w+}"
)
public
CyResult
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
)
{
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
updateStatus
(
sysContentNewsInformation
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:derive')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出新闻资讯信息"
,
notes
=
"导出新闻资讯信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outSysContentNewsInformation
(
HttpServletResponse
response
,
SysContentNewsInformation
sysContentNewsInformation
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
)
{
case
"0"
:
excelName
=
"新闻资讯信息.xls"
;
break
;
case
"1"
:
excelName
=
"新闻资讯信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"新闻资讯信息.csv"
;
break
;
}
List
<
SysContentNewsInformation
>
sysContentNewsInformationList
=
sysContentNewsInformationServiceImpl
.
export
(
sysContentNewsInformation
);
CyEpExcelUtil
.
exportExcel
(
sysContentNewsInformationList
,
"新闻资讯信息"
,
"新闻资讯信息"
,
SysContentNewsInformation
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/dao/SysContentNewsInformationRepository.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
* @author wangFeilong
*/
public
interface
SysContentNewsInformationRepository
extends
CyBaseMapper
<
SysContentNewsInformation
>
{
List
<
SysContentNewsInformation
>
querySysContentNewsInformations
(
@Param
(
"entity"
)
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 分页查询 sysContentNewsInformation
*
*/
IPage
<
SysContentNewsInformation
>
querySysContentNewsInformationsPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
SysContentNewsInformation
sysContentNewsInformation
);
//根据id逻辑删除
int
deleteSysContentNewsInformation
(
@Param
(
"businessId"
)
Integer
businessId
);
//修改状态
int
updateStatus
(
@Param
(
"entity"
)
SysContentNewsInformation
sysContentNewsInformation
);
SysContentNewsInformation
selectById
(
@Param
(
"businessId"
)
Integer
businessId
);
//权重验重
SysContentNewsInformation
checkWeight
(
@Param
(
"weight"
)
Integer
weight
);
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/entity/SysContentNewsInformation.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Data
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
*
* @author wangFeilong
*/
@Data
@TableName
(
"cms_news"
)
public
class
SysContentNewsInformation
extends
CyIdIncreEntity
<
SysContentNewsInformation
>
{
/**
* @desc 发布日期
* @column release_date
* @default
*/
@Excel
(
name
=
"发布日期"
,
orderNum
=
"1"
,
width
=
20
,
format
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
releaseDate
;
/**
* @desc 板块
* @column plate
* @default
*/
@Excel
(
name
=
"板块"
,
orderNum
=
"2"
,
width
=
20
)
private
String
plate
;
/**
* @desc 标题
* @column title
* @default
*/
@Excel
(
name
=
"标题"
,
orderNum
=
"9"
,
width
=
20
)
private
String
title
;
/**
* @desc 单位
* @column unit
* @default
*/
@Excel
(
name
=
"单位"
,
orderNum
=
"10"
,
width
=
20
)
private
String
unit
;
/**
* @desc 内容
* @column details
* @default
*/
@Excel
(
name
=
"内容"
,
orderNum
=
"11"
,
width
=
20
)
private
String
details
;
/**
* @desc 排序
* @column weight
* @default
*/
@Excel
(
name
=
"排序"
,
orderNum
=
"12"
,
width
=
20
)
private
Integer
weight
;
/**
* @desc 封面
* @column picture_id
* @default
*/
@Excel
(
name
=
"封面"
,
orderNum
=
"13"
,
width
=
20
)
private
String
pictureId
;
/**
* 开始时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
beginTime
;
/**
* 结束时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
endTime
;
@TableField
(
exist
=
false
)
private
String
nickName
;
@TableField
(
exist
=
false
)
private
String
path
;
//是否为头条新闻
private
Integer
isForntPage
;
//是否为推荐新闻
private
Integer
isRecommended
;
//是否为置顶新闻
private
Integer
isTop
;
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/service/SysContentNewsInformationService.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
java.util.List
;
/**
* Created by cy on 2024年3月25日 下午1:42:40.
*/
public
interface
SysContentNewsInformationService
{
/**
* 保存 新闻资讯
* @param sysContentNewsInformation
* @return
*/
CyPersistModel
persist
(
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 删除 新闻资讯
* @param sysContentNewsInformation
* @return
*/
CyPersistModel
remove
(
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 修改 新闻资讯
* @param sysContentNewsInformation
* @return
*/
CyPersistModel
merge
(
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 根据id查询 新闻资讯
* @param id
* @return
*/
SysContentNewsInformation
findById
(
Integer
id
);
/**
* 分页查询 新闻资讯
* @param sysContentNewsInformation
* @return
*/
IPage
<
SysContentNewsInformation
>
findAllByPagination
(
CyPageInfo
<
SysContentNewsInformation
>
paginationUtility
,
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 查询list 新闻资讯
* @param sysContentNewsInformation
* @return
*/
List
<
SysContentNewsInformation
>
findAll
(
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 导出新闻资讯
* @return
*/
List
<
SysContentNewsInformation
>
export
(
SysContentNewsInformation
sysContentNewsInformation
);
/**
* 修改状态
*/
CyPersistModel
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
);
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/service/impl/SysContentNewsInformationServiceImpl.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.syscontentnewsinformation.dao.SysContentNewsInformationRepository
;
import
org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.business.syscontentnewsinformation.service.SysContentNewsInformationService
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
SysContentNewsInformationServiceImpl
extends
ServiceImpl
<
SysContentNewsInformationRepository
,
SysContentNewsInformation
>
implements
SysContentNewsInformationService
{
@Autowired
private
Global
global
;
/**
* 保存 新闻资讯
*
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
SysContentNewsInformation
sysContentNewsInformation
)
{
//增加操作
sysContentNewsInformation
.
setDelFlag
(
"0"
);
//当图片字段没有时增加默认1
if
(
ObjectUtil
.
isNull
(
sysContentNewsInformation
.
getPictureId
()))
{
sysContentNewsInformation
.
setPictureId
(
global
.
getDEFAULT_NEWS_LOCATION
());
}
SysContentNewsInformation
check
=
baseMapper
.
checkWeight
(
sysContentNewsInformation
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
int
line
=
baseMapper
.
insert
(
sysContentNewsInformation
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
}
/**
* 删除 新闻资讯
*
* @param sysContentNewsInformation
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
SysContentNewsInformation
sysContentNewsInformation
)
{
int
line
=
baseMapper
.
deleteSysContentNewsInformation
(
sysContentNewsInformation
.
getBusinessId
());
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 新闻资讯
*
* @param sysContentNewsInformation
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
SysContentNewsInformation
sysContentNewsInformation
)
{
//修改文本中的#image
String
details
=
sysContentNewsInformation
.
getDetails
().
replace
(
"#image"
,
"data:image"
);
sysContentNewsInformation
.
setDetails
(
details
);
SysContentNewsInformation
check
=
baseMapper
.
checkWeight
(
sysContentNewsInformation
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
)
&&
!
check
.
getBusinessId
().
equals
(
sysContentNewsInformation
.
getBusinessId
()))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
int
line
=
baseMapper
.
updateById
(
sysContentNewsInformation
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
}
/**
* 根据id查询 新闻资讯
*
* @param id
* @return
*/
@Override
public
SysContentNewsInformation
findById
(
Integer
id
)
{
SysContentNewsInformation
newsInformation
=
baseMapper
.
selectById
(
id
);
if
(
newsInformation
.
getPath
()
!=
null
)
{
newsInformation
.
setPath
(
global
.
getBase_Discovery
()
+
newsInformation
.
getPath
());
}
return
newsInformation
;
}
/**
* 分页查询 新闻资讯
*
* @param sysContentNewsInformation
* @return
*/
@Override
public
IPage
<
SysContentNewsInformation
>
findAllByPagination
(
CyPageInfo
<
SysContentNewsInformation
>
paginationUtility
,
SysContentNewsInformation
sysContentNewsInformation
)
{
IPage
<
SysContentNewsInformation
>
sysContentNewsInformationIPage
=
baseMapper
.
querySysContentNewsInformationsPaged
(
paginationUtility
,
sysContentNewsInformation
);
List
<
SysContentNewsInformation
>
newsInformation
=
sysContentNewsInformationIPage
.
getRecords
();
for
(
SysContentNewsInformation
news
:
newsInformation
)
{
if
(
news
.
getPath
()
!=
null
)
{
news
.
setPath
(
global
.
getBase_Discovery
()
+
news
.
getPath
());
}
}
sysContentNewsInformationIPage
.
setRecords
(
newsInformation
);
return
sysContentNewsInformationIPage
;
}
/**
* 查询list 新闻资讯
*
* @param sysContentNewsInformation
* @return
*/
@Override
public
List
<
SysContentNewsInformation
>
findAll
(
SysContentNewsInformation
sysContentNewsInformation
)
{
return
baseMapper
.
querySysContentNewsInformations
(
sysContentNewsInformation
);
}
/**
* 导出新闻资讯
*
* @return
*/
@Override
public
List
<
SysContentNewsInformation
>
export
(
SysContentNewsInformation
sysContentNewsInformation
)
{
List
<
SysContentNewsInformation
>
sysContentNewsInformationList
=
baseMapper
.
querySysContentNewsInformations
(
sysContentNewsInformation
);
return
sysContentNewsInformationList
;
}
@Override
public
CyPersistModel
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
)
{
int
line
=
baseMapper
.
updateStatus
(
sysContentNewsInformation
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息状态"
);
return
new
CyPersistModel
(
line
);
}
}
src/main/java/org/rcisoft/common/component/Global.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
common
.
component
;
import
com.google.common.collect.Maps
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
/**
* Created with family.
* author: cy
* Date: 16/6/2
* Time: 下午3:50
* description: global config
*/
@Component
@Data
public
class
Global
{
/**
* 保存全局属性值
*/
static
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
/**
* 服务器文件保存基本位置
*/
@Value
(
"${global.path.base_upload_location}"
)
private
String
Base_Upload_Location
;
/**
* 服务器地址
*/
@Value
(
"${global.path.base_discovery}"
)
private
String
Base_Discovery
;
/*服务器地址*/
@Value
(
"${global.other.server_url}"
)
private
String
SERVER_URL
;
/*服务器保存图片路径*/
@Value
(
"${global.path.base_upload_server_location}"
)
private
String
BASE_UPLOAD_SERVER_LOCATION
;
/*容器外路径*/
@Value
(
"${global.path.physical_upload_server_location}"
)
private
String
PHYSICAL_UPLOAD_SERVER_LOCATION
;
/*课程相关文件路径*/
@Value
(
"${global.path.course_location}"
)
private
String
COURSE_LOCATION
;
/*lesson相关文件路径*/
@Value
(
"${global.path.lesson_location}"
)
private
String
LESSON_LOCATION
;
/*sl相关文件路径*/
@Value
(
"${global.path.sl_location}"
)
private
String
SL_LOCATION
;
/*服务器freemarker模板位置*/
@Value
(
"${global.path.freemarker_location}"
)
private
String
FREEMARKER_LOCATION
;
/*服务器上传路径*/
@Value
(
"${global.path.images_location}"
)
private
String
IMAGE_LOCATION
;
/*视频路径*/
@Value
(
"${global.path.video_location}"
)
private
String
VIDEO_LOCATION
;
/*旧视频路径*/
@Value
(
"${global.path.temp_location}"
)
private
String
TEMP_LOCATION
;
/*附件路径*/
@Value
(
"${global.path.file_location}"
)
private
String
FILE_LOCATION
;
/*ppt路径*/
@Value
(
"${global.path.ppt_location}"
)
private
String
PPT_LOCATION
;
/*pdf路径*/
@Value
(
"${global.path.pdf_location}"
)
private
String
PDF_LOCATION
;
/*切割pdf路径*/
@Value
(
"${global.path.cut_pdf_location}"
)
private
String
CUT_PDF_LOCATION
;
/*每次切割pdf的页数*/
@Value
(
"${global.other.cut_pdf_num}"
)
private
Integer
CUT_PDF_NUM
;
/*excel模板位置*/
@Value
(
"${global.path.excel_template_location}"
)
private
String
EXCEL_TEMPLATE_LOCATION
;
/*课程封面路径*/
@Value
(
"${global.path.cource_logo_location}"
)
private
String
COURSE_LOGO_LOCATION
;
/*课程代码路径*/
@Value
(
"${global.path.cource_code_location}"
)
private
String
COURSE_CODE_LOCATION
;
/*课程工程代码路径*/
@Value
(
"${global.path.cource_project_location}"
)
private
String
COURSE_PROJECT_LOCATION
;
/*图片路径*/
@Value
(
"${global.path.images_location}"
)
private
String
IMAGES_LOCATION
;
/*课程默认图片路径*/
@Value
(
"${global.default_location.course}"
)
private
String
DEFAULT_COURSE_LOCATION
;
/*新闻默认图片路径*/
@Value
(
"${global.default_location.news}"
)
private
String
DEFAULT_NEWS_LOCATION
;
/*默认学生头像路径*/
@Value
(
"${global.default_location.student}"
)
private
String
DEFAULT_STUDENT_LOCATION
;
/*默认教师头像路径*/
@Value
(
"${global.default_location.teacher}"
)
private
String
DEFAULT_TEACHER_LOCATION
;
/*默认轮播图路径*/
@Value
(
"${global.default_location.carousel}"
)
private
String
DEFAULT_CAROUSEL_LOCATION
;
/*开课封面路径*/
@Value
(
"${global.path.lanch_logo_location}"
)
private
String
LANCH_LOGO_LOCATION
;
/*mdtup*/
@Value
(
"${global.path.md_file_location}"
)
private
String
MD_FILE_LOCATION
;
// /*登录验证秘钥*/
// @Value("${jwt.login_secert_key}")
// private String LOGIN_SECERT_KEY;
@Value
(
"${jwt.header}"
)
private
String
JWT_HEADER
;
@Value
(
"${jwt.tokenHead}"
)
private
String
JWT_TOKEN_HEAD
;
/*是否是服务器(为1代表是服务器)*/
@Value
(
"${global.other.is_server_linux}"
)
private
String
IS_SERVER_LINUX
;
/*code长度限制*/
@Value
(
"${global.other.max_code_length}"
)
private
String
MAX_CODE_LENGTH
;
/*用户默认密码*/
@Value
(
"${global.password.default}"
)
private
String
DEFAULT_PASSWORD
;
/*password最小长度*/
@Value
(
"${global.password.min_password}"
)
private
String
PASSWORD_MIN_PASSWORD
;
/*password最大长度*/
@Value
(
"${global.password.max_password}"
)
private
String
PASSWORD_MAX_PASSWORD
;
/*che的配置模板路径*/
@Value
(
"${global.path.che_def_template_location}"
)
private
String
CHE_DEF_TEMPLATE_LOCATION
;
/*che初始化项目目录*/
@Value
(
"${global.path.che_project_init_location}"
)
private
String
CHE_PROJECT_INIT_LOCATION
;
/*管理员Code*/
@Value
(
"${global.code.admin}"
)
private
String
adminCode
;
/*教师Code*/
@Value
(
"${global.code.teacher}"
)
private
String
teacherCode
;
/*学生Code*/
@Value
(
"${global.code.student}"
)
private
String
studentCode
;
/*java 单文件*/
@Value
(
"${global.code.java_simple}"
)
private
String
javaSimple
;
/*java 工程*/
@Value
(
"${global.code.java_project}"
)
private
String
javaProject
;
/*html 单文件*/
@Value
(
"${global.code.html_simple}"
)
private
String
htmlSimple
;
/*html 工程*/
@Value
(
"${global.code.html_project}"
)
private
String
htmlProject
;
/*导出的学生作业暂存路径*/
@Value
(
"${global.path.student_code_location}"
)
private
String
STUDENT_CODE_LOCATION
;
/*openOffice安装路径*/
@Value
(
"${global.other.open_office_home}"
)
private
String
OPEN_OFFICE_HOME
;
/*redis缓存超时时间*/
@Value
(
"${spring.redis.timeout}"
)
private
Integer
REDIS_TIMEOUT
;
@Value
(
"${global.path.xml_location}"
)
private
String
XML_LOCATION
;
}
src/main/java/org/rcisoft/common/component/OssGlobal.java
0 → 100644
View file @
f22e2cf6
package
org
.
rcisoft
.
common
.
component
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
/**
* @author Liushuaiyang
*/
@Component
@Data
public
class
OssGlobal
{
// oss-request
@Value
(
"${oss.request}"
)
private
String
request
;
// oss-endpoint
@Value
(
"${oss.endpoint}"
)
private
String
endpoint
;
// oss-bucket
@Value
(
"${oss.bucket}"
)
private
String
bucket
;
// oss-regionId
@Value
(
"${oss.regionId}"
)
private
String
regionId
;
// oss-put-acess_key
@Value
(
"${oss.put.acess_key}"
)
private
String
putAcessKey
;
// oss-put-secret_key
@Value
(
"${oss.put.secret_key}"
)
private
String
putSecretKey
;
// oss-put-ran
@Value
(
"${oss.put.ram}"
)
private
String
putRam
;
// oss-read-acess_key
@Value
(
"${oss.read.acess_key}"
)
private
String
readAcessKey
;
// oss-read-secret_key
@Value
(
"${oss.read.secret_key}"
)
private
String
readSecretKey
;
// oss-read-read_time
@Value
(
"${oss.read.read_time}"
)
private
Integer
readTime
;
}
src/main/resources/application-common.yml
0 → 100644
View file @
f22e2cf6
This diff is collapsed.
Click to expand it.
src/main/resources/application-dev-conf.yml
0 → 100644
View file @
f22e2cf6
# 1. redis
cy_redis
:
ip
:
127.0.0.1
port
:
6379
password
:
123456
database
:
7
# 2. rabbitMq
cy_rabbitMq
:
ip
:
106.2.17.236
port
:
5677
username
:
mq
password
:
mq
# 3. rocketMq 使用 ; 分隔
cy_rocketMq
:
ns
:
106.3.97.198:9876;106.3.99.36:9876
# 4. mongodb
cy_mongodb
:
ip
:
127.0.0.1
port
:
27017
username
:
fox
password
:
fox
db
:
cy
authDb
:
cy
# 5. minio
cy_minio
:
endpoint
:
http://103.131.168.155:22038/
writeAccessKey
:
6bejbsayqGMfPA75nZr4
writeSecretKey
:
gMjb5EjYtB8CZrxXIUclyKgTfqAo7iMK59bJ0JHs
readAccessKey
:
xxxxxxxxxxxxxx
readSecretKey
:
xxxxxxxxxxxxxx
# 6.db
#cy_db:
# ip: ENC(vw6fzLP+xitWOx+5/+daH0du1HeO2mWXYKQ5+FQtLv2SvUfIWgqsYrzKRNKTfxLp)
# port: ENC(HebzQAlq/De7b7Ntq6ZHU9QLgFwk761DXuHAL8mg7PW1qkarc9LzIT5WH49UGfpa)
# username: ENC(oBZSjAdFD8wwGj3wheK6Jwbkuc+4SYI5p//m61C4G/2Ory7NutRUkOXzfvnS2aHy)
# password: ENC(v2dv818F45rL4ZCZQaEgV/+ruvGFPx65AMPV52sk56N7ZuJCMTo9lUGT9j4aDccy7FND4QHN1gyDZqG3cY8w8Q==)
# db: exam
#cy_db:
# ip: 127.0.0.1
# port: 3306
# username: root
# password: root
# db: 91_root
cy_db
:
ip
:
localhost
port
:
3306
username
:
root
password
:
123456
# port: 20072
# username: root
# password: root
db
:
cust
cy
:
model
:
swagger2Config
:
true
# sms
sms
:
enable
:
true
realSend
:
false
model
:
yuntongxun
# 1 "", 2 math, 3 char, 4 block,5 word
captchaType
:
1
# 是否开启短信登录拦截
secure
:
false
login
:
# 是否开启登录日志
log
:
true
# 1 "", 2 math, 3 char, 4 block,5 word
captcha
:
1
# 是否开启登录拦截
secure
:
false
security
:
enable
:
true
permission
:
false
defaultFilter
:
true
gateway
:
false
acAllowOrigin
:
'
*'
acAllowMethods
:
'
POST,
GET,
OPTIONS,
DELETE,PUT'
acAllowHeaders
:
'
*'
permit-all
:
permitUnStatic
:
-
"
/static/**"
-
"
/webjars/**"
-
"
/v2/**"
-
"
/swagger-resources/**"
-
"
/api-docs/**"
-
"
/auth/**"
-
"
/code/**/**"
-
"
/excelUtil/**"
-
"
/captcha/**"
#- "/cros/**"
-
"
/nlttest/add/**"
-
"
/common/getKSA"
-
"
/office/getFile"
-
"
/office/callback"
-
"
/**/**"
permitStatic
:
[
"
/"
,
"
/*.html"
,
"
/favicon.ico"
,
"
/**/*.html"
,
"
/**/*.js"
,
"
/**/*.css"
]
logoutSuccessUrl
:
"
/login"
loginPage
:
"
/login"
loginfailureUrl
:
"
/login-error.html"
# 注册
register
:
autoLogin
:
false
sms
:
false
# 登录拦截
login
:
# 1. 同一个登录名 密码 每天 / 每分钟 允许失败的次数
unameDayCount
:
5
unameMinCount
:
2
# 2. 同一手机号 每天 / 每分钟 允许失败的次数
phoneDayCount
:
5
phoneMinCount
:
5
# 3. 同一ip 每分钟 / 每天 允许失败的次数
ipMinCount
:
7
ipDayCount
:
7
# 4. 分钟锁定时间 基本单位是秒
lockTimeMin
:
60
# 5. 一天锁定时间 基本单位是秒
lockTimeDay
:
120
# 6. 分钟IP锁定时间 基本单位是秒
lockTimeIpMin
:
300
# 6. 一天IP锁定时间 基本单位是秒
lockTimeIpDay
:
300
# sms 发送安全拦截
sms
:
# 1. 通知类短信 同一 phone & template 每天 / 每分钟 最大数量
noticeMinCount
:
5
noticeDayCount
:
5
# 2. 图形验证码 同一 ip & template 每天 / 每分钟 最大数量
graphicIpMinCount
:
100
graphicIpDayCount
:
2000
# 3.短信验证码 同一 phone & template 每天 / 每分钟 最大数量
captchaTimeInterval
:
60
captchaDayCount
:
2
# 4.短信验证码 同一 ip & template 每天 / 每分钟 最大数量
ipMinCount
:
5
ipDayCount
:
5
# 6. 验证码存在时间 基本单位是秒
existTime
:
60
# 注册验证码模版
registerTemplateCaptchaId
:
2586438
# 登录验证码模版
loginCaptchaTemplateId
:
2586438
# 忘记密码验证码模板
forgotPasswordCaptchaTemplateId
:
2586438
# 容联云
yuntongxun
:
serverIp
:
app.cloopen.com
serverPort
:
8883
accountSId
:
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
accountToken
:
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
appId
:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
global
:
path
:
base_upload_location
:
E:\working\resource\eduServer\
# base_upload_location: /working/resource/eduServer/
base_discovery
:
'
http://192.168.1.12:8888/eduServer/'
fileUploadFormatRestrictions
:
"
.exe,.php,.asp,.jsp,.aspx"
code_generate_location
:
/code
video_location
:
/video
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
code
:
admin
:
ROLE_1001
resetPassword
:
123456
logging
:
level
:
root
:
info
com.alibaba.nacos
:
info
oss
:
request
:
"
https://"
endpoint
:
"
oss-cn-beijing.aliyuncs.com"
bucket
:
"
catarc-res"
regionId
:
"
cn-beijing"
put
:
acess_key
:
ENC(tbI3V/L3rXALTOW7DZByISDc68laCea8fsTyvgYbobWMsQ0TGkedn01SeAT1uXlQjr8EgqrM06Po6CRH0OCFBA==)
secret_key
:
ENC(nF9aH+p4P+ZQPal7mMh3aDgNJP1hwzwDrv+GGyjZUPRkt9gLsXGCOQ9Q77kIMDY/5WttzyqNQdX+bR6TACpBmw==)
ram
:
"
acs:ram::1372579886118191:role/catarc-put-role"
read
:
acess_key
:
ENC(WubSHSvpRIFL9U3T+ZIG+Kmo7ts4VKyROdA9idt5C8bqogJpYCQNz7sREwHCZ40EhvKMihcf8VYhwVR85HVSLg==)
secret_key
:
ENC(dvdFA7j1A2D6l9+2CUpYR0c3Us76nXyu/crr6s2mo7EDmKnCadWn9UFkYC9YYl9dUycFZsm+Wn0El4Kkau5+Xg==)
read_time
:
1800000
#读取超时时间
src/main/resources/application-kube-conf.yml
0 → 100644
View file @
f22e2cf6
# 1. redis
cy_redis
:
ip
:
127.0.0.1
port
:
6379
password
:
database
:
7
# 2. rabbitMq
cy_rabbitMq
:
ip
:
106.2.17.236
port
:
5677
username
:
mq
password
:
mq
# 3. rocketMq
cy_rocketMq
:
ns
:
106.3.97.198:9876,106.3.99.36:9876
# 4. mongodb
cy_mongodb
:
ip
:
127.0.0.1
port
:
27017
username
:
fox
password
:
fox
db
:
cy
authDb
:
cy
# 5. minio
cy_minio
:
endpoint
:
http://103.131.168.155:22038/
writeAccessKey
:
6bejbsayqGMfPA75nZr4
writeSecretKey
:
gMjb5EjYtB8CZrxXIUclyKgTfqAo7iMK59bJ0JHs
readAccessKey
:
xxxxxxxxxxxxxx
readSecretKey
:
xxxxxxxxxxxxxx
# 6.db
#cy_db:
# ip: ENC(vw6fzLP+xitWOx+5/+daH0du1HeO2mWXYKQ5+FQtLv2SvUfIWgqsYrzKRNKTfxLp)
# port: ENC(HebzQAlq/De7b7Ntq6ZHU9QLgFwk761DXuHAL8mg7PW1qkarc9LzIT5WH49UGfpa)
# username: ENC(oBZSjAdFD8wwGj3wheK6Jwbkuc+4SYI5p//m61C4G/2Ory7NutRUkOXzfvnS2aHy)
# password: ENC(v2dv818F45rL4ZCZQaEgV/+ruvGFPx65AMPV52sk56N7ZuJCMTo9lUGT9j4aDccy7FND4QHN1gyDZqG3cY8w8Q==)
# db: exam
cy_db
:
ip
:
106.3.99.36
port
:
20096
username
:
zt
password
:
zt
db
:
zt_db
cy
:
model
:
swagger2Config
:
true
sms
:
enable
:
true
realSend
:
true
model
:
yuntongxun
# 1 "", 2 math, 3 char, 4 block,5 word
captchaType
:
3
# 是否开启短信登录拦截
secure
:
true
login
:
# 是否开启登录日志
log
:
true
# 1 "", 2 math, 3 char, 4 block,5 word
captcha
:
3
# 是否开启登录拦截
secure
:
true
security
:
enable
:
true
permission
:
false
defaultFilter
:
true
gateway
:
false
acAllowOrigin
:
'
*'
acAllowMethods
:
'
POST,
GET,
OPTIONS,
DELETE,PUT'
acAllowHeaders
:
'
*'
permit-all
:
permitUnStatic
:
-
"
/static/**"
-
"
/webjars/**"
-
"
/v2/**"
-
"
/swagger-resources/**"
-
"
/api-docs/**"
-
"
/auth/**"
-
"
/code/**/**"
-
"
/captcha/***"
-
"
/excelUtil/**"
#- "/cros/**"
-
"
/office/getFile"
-
"
/office/callback"
-
"
/common/getKSA"
#- "/**/**"
permitStatic
:
[
"
/"
,
"
/*.html"
,
"
/favicon.ico"
,
"
/**/*.html"
,
"
/**/*.js"
,
"
/**/*.css"
]
logoutSuccessUrl
:
"
/login"
loginPage
:
"
/login"
loginfailureUrl
:
"
/login-error.html"
# 注册
register
:
autoLogin
:
false
sms
:
false
# 登录拦截
login
:
# 1. 同一个登录名 密码 每天 / 每分钟 允许失败的次数
unameDayCount
:
5
unameMinCount
:
2
# 2. 同一手机号 每天 / 每分钟 允许失败的次数
phoneDayCount
:
5
phoneMinCount
:
5
# 3. 同一ip 每分钟 / 每天 允许失败的次数
ipMinCount
:
7
ipDayCount
:
7
# 4. 分钟锁定时间 基本单位是秒
lockTimeMin
:
60
# 5. 一天锁定时间 基本单位是秒
lockTimeDay
:
120
# 6. 分钟IP锁定时间 基本单位是秒
lockTimeIpMin
:
300
# 6. 一天IP锁定时间 基本单位是秒
lockTimeIpDay
:
300
# sms 发送安全拦截
sms
:
# 1. 通知类短信 同一 phone & template 每天 / 每分钟 最大数量
noticeMinCount
:
5
noticeDayCount
:
5
# 2. 图形验证码 同一 ip & template 每天 / 每分钟 最大数量
graphicIpMinCount
:
100
graphicIpDayCount
:
2000
# 3.短信验证码 同一 phone & template 每天 / 每分钟 最大数量
captchaTimeInterval
:
60
captchaDayCount
:
2
# 4.短信验证码 同一 ip & template 每天 / 每分钟 最大数量
ipMinCount
:
5
ipDayCount
:
5
# 6. 验证码存在时间 基本单位是秒
existTime
:
60
# 注册验证码模版
registerTemplateCaptchaId
:
2586438
# 登录验证码模版
loginCaptchaTemplateId
:
2586438
# 忘记密码验证码模板
forgotPasswordCaptchaTemplateId
:
2586438
# 容联云
yuntongxun
:
serverIp
:
app.cloopen.com
serverPort
:
8883
accountSId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
accountToken
:
xxxxxxxxxxxxxxxxxxxxxxxx
appId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
global
:
path
:
# base_upload_location: E:\working\resource\eduServer\
base_upload_location
:
/working/resource/eduServer/
base_discovery
:
'
http://192.168.1.12:8888/eduServer/'
fileUploadFormatRestrictions
:
"
.exe,.php,.asp,.jsp,.aspx"
code_generate_location
:
/code
video_location
:
/video
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
code
:
admin
:
ROLE_1001
resetPassword
:
123456
logging
:
level
:
root
:
info
com.alibaba.nacos
:
info
src/main/resources/application-prod-conf.yml
0 → 100644
View file @
f22e2cf6
# 1. redis
cy_redis
:
ip
:
127.0.0.1
port
:
6379
password
:
database
:
7
# 2. rabbitMq
cy_rabbitMq
:
ip
:
106.2.17.236
port
:
5677
username
:
mq
password
:
mq
# 3. rocketMq
cy_rocketMq
:
ns
:
106.3.97.198:9876,106.3.99.36:9876
# 4. mongodb
cy_mongodb
:
ip
:
127.0.0.1
port
:
27017
username
:
fox
password
:
fox
db
:
cy
authDb
:
cy
# 5. minio
cy_minio
:
endpoint
:
http://103.131.168.155:22038/
writeAccessKey
:
6bejbsayqGMfPA75nZr4
writeSecretKey
:
gMjb5EjYtB8CZrxXIUclyKgTfqAo7iMK59bJ0JHs
readAccessKey
:
xxxxxxxxxxxxxx
readSecretKey
:
xxxxxxxxxxxxxx
# 6.db
#cy_db:
# ip: ENC(vw6fzLP+xitWOx+5/+daH0du1HeO2mWXYKQ5+FQtLv2SvUfIWgqsYrzKRNKTfxLp)
# port: ENC(HebzQAlq/De7b7Ntq6ZHU9QLgFwk761DXuHAL8mg7PW1qkarc9LzIT5WH49UGfpa)
# username: ENC(oBZSjAdFD8wwGj3wheK6Jwbkuc+4SYI5p//m61C4G/2Ory7NutRUkOXzfvnS2aHy)
# password: ENC(v2dv818F45rL4ZCZQaEgV/+ruvGFPx65AMPV52sk56N7ZuJCMTo9lUGT9j4aDccy7FND4QHN1gyDZqG3cY8w8Q==)
# db: exam
cy_db
:
ip
:
106.3.99.36
port
:
20096
username
:
zt
password
:
zt
db
:
zt_db
cy
:
model
:
swagger2Config
:
true
sms
:
enable
:
true
realSend
:
true
model
:
yuntongxun
# 1 "", 2 math, 3 char, 4 block,5 word
captchaType
:
3
# 是否开启短信登录拦截
secure
:
true
login
:
# 是否开启登录日志
log
:
true
# 1 "", 2 math, 3 char, 4 block,5 word
captcha
:
3
# 是否开启登录拦截
secure
:
true
security
:
enable
:
true
permission
:
false
defaultFilter
:
true
gateway
:
false
acAllowOrigin
:
'
*'
acAllowMethods
:
'
POST,
GET,
OPTIONS,
DELETE,PUT'
acAllowHeaders
:
'
*'
permit-all
:
permitUnStatic
:
-
"
/static/**"
-
"
/webjars/**"
-
"
/v2/**"
-
"
/swagger-resources/**"
-
"
/api-docs/**"
-
"
/auth/**"
-
"
/code/**/**"
-
"
/captcha/**"
-
"
/excelUtil/**"
-
"
/office/getFile"
-
"
/office/callback"
#- "/cros/**"
-
"
/common/getKSA"
permitStatic
:
[
"
/"
,
"
/*.html"
,
"
/favicon.ico"
,
"
/**/*.html"
,
"
/**/*.js"
,
"
/**/*.css"
]
logoutSuccessUrl
:
"
/login"
loginPage
:
"
/login"
loginfailureUrl
:
"
/login-error.html"
# 注册
register
:
autoLogin
:
false
sms
:
false
# 登录拦截
login
:
# 1. 同一个登录名 密码 每天 / 每分钟 允许失败的次数
unameDayCount
:
5
unameMinCount
:
2
# 2. 同一手机号 每天 / 每分钟 允许失败的次数
phoneDayCount
:
5
phoneMinCount
:
5
# 3. 同一ip 每分钟 / 每天 允许失败的次数
ipMinCount
:
7
ipDayCount
:
7
# 4. 分钟锁定时间 基本单位是秒
lockTimeMin
:
60
# 5. 一天锁定时间 基本单位是秒
lockTimeDay
:
120
# 6. 分钟IP锁定时间 基本单位是秒
lockTimeIpMin
:
300
# 6. 一天IP锁定时间 基本单位是秒
lockTimeIpDay
:
300
# 注册验证码模版
registerTemplateCaptchaId
:
2586438
# 登录验证码模版
loginCaptchaTemplateId
:
2586438
# 忘记密码验证码模板
forgotPasswordCaptchaTemplateId
:
2586438
# sms 发送安全拦截
sms
:
# 1. 通知类短信 同一 phone & template 每天 / 每分钟 最大数量
noticeMinCount
:
5
noticeDayCount
:
5
# 2. 图形验证码 同一 ip & template 每天 / 每分钟 最大数量
graphicIpMinCount
:
100
graphicIpDayCount
:
2000
# 3.短信验证码 同一 phone & template 每天 / 每分钟 最大数量
captchaTimeInterval
:
60
captchaDayCount
:
2
# 4.短信验证码 同一 ip & template 每天 / 每分钟 最大数量
ipMinCount
:
5
ipDayCount
:
5
# 6. 验证码存在时间 基本单位是秒
existTime
:
60
# 容联云
yuntongxun
:
serverIp
:
app.cloopen.com
serverPort
:
8883
accountSId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
accountToken
:
xxxxxxxxxxxxxxxxxxxxxxxx
appId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
global
:
path
:
# base_upload_location: E:\working\resource\eduServer\
base_upload_location
:
/working/resource/eduServer/
base_discovery
:
'
http://192.168.1.12:8888/eduServer/'
fileUploadFormatRestrictions
:
"
.exe,.php,.asp,.jsp,.aspx"
code_generate_location
:
/code
video_location
:
/video
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
code
:
admin
:
ROLE_1001
resetPassword
:
123456
logging
:
level
:
root
:
info
com.alibaba.nacos
:
info
src/main/resources/application-spbt.yml
0 → 100644
View file @
f22e2cf6
#---------------------自定义配置----------------------------
wx
:
appId
:
wx111xx
secret
:
506xxx
timeOut
:
3600
jwt
:
header
:
Authorization
secret
:
mySecret
expiration
:
604800
tokenHead
:
"
Bearer
"
route
:
authentication
:
path
:
"
/login"
refresh
:
"
/refresh"
register
:
"
/register"
cy
:
systemName
:
"
91isoft"
init
:
admin
:
-
"
1"
permission
:
-
"
44"
-
"
51"
-
"
52"
-
"
53"
password
:
111111
post_undelete
:
[
"
8492d7e67ca64809bb6ded8823659866"
]
user_undelete
:
[
"
admin"
,
"
333e421d32d9425ea99afce95b603902"
]
model
:
permission
:
rbac
schema
:
spbt
debug
:
false
rabbitMq
:
false
rocketMq
:
false
quartz
:
false
redis
:
false
mongodb
:
false
dbChange
:
true
redisCluster
:
false
entityParam
:
true
#token
token
:
mode
:
false
#过期超时时间
ttl
:
3600
# md5
decryptParam
:
false
decryptKey
:
cyKey
# sm4
decryptSm4Param
:
false
decryptSm4Secret
:
'
FFFAAA333777EEEB'
# 文件存储
fileStorage
:
model
:
local
fileTemplate
:
UUID
webService
:
enable
:
true
ssl
:
enable
:
false
opeLogDb
:
enable
:
true
ignorePackage
:
org.rcisoft.web.sys
schema
:
standalone
addressEnabled
:
true
activiti
:
enable
:
false
schemaUpdate
:
true
databaseType
:
mysql
code
:
enable
:
true
author
:
cy
dbType
:
sqlserver
database
:
rcisoft
basePackage
:
org.rcisoft.sys
rejectRepeatSubmit
:
enable
:
false
token
:
ft
expired
:
1800
xss
:
excludes
:
-
"
/static/*"
-
"
/swagger-resources/*"
-
"
/api-docs/*"
-
"
/webjars/*"
-
"
/office/*"
access-crl
:
enable
:
false
debug
:
true
storageModel
:
fail
whiteKeyRedis
:
AccessCrlWhite
blackKeyRedis
:
AccessCrlBlack
whiteList
:
-
"
192.168.2.51"
-
"
192.168.2.51"
blackList
:
pay
:
twoDiCode
:
apiServer
:
http://xxx.com
ali
:
enable
:
false
config
:
/working/resource/ali.properties
wx
:
enable
:
false
config
:
/working/resource/wx.properties
acp
:
enable
:
false
config
:
/working/resource/acp.properties
encryption
:
algorithm
:
PBEWithHmacSHA512AndAES_128
keyObtentionIterations
:
1000
poolSize
:
1
providerName
:
SunJCE
saltGeneratorClassName
:
org.jasypt.salt.RandomSaltGenerator
ivGeneratorClassName
:
org.jasypt.iv.RandomIvGenerator
stringOutputType
:
base644
global
:
path
:
# base_upload_location: C:\software\nginx-1.26.2\html\upload
# base_discovery: 'http://192.168.1.112:8023/upload/'
base_upload_location
:
D:\tool\nginx-1.26.2\html\upload
base_discovery
:
'
http://192.168.0.173/upload/'
zsp_location
:
/zsp
code_generate_location
:
/code
video_location
:
/video
temp_location
:
/tempg
file_location
:
/file
images_location
:
/images
code
:
admin
:
ROLE_1001
resetPassword
:
123456
src/main/resources/application-test-conf.yml
0 → 100644
View file @
f22e2cf6
# 1. redis
cy_redis
:
ip
:
127.0.0.1
port
:
6379
password
:
database
:
7
# 2. rabbitMq
cy_rabbitMq
:
ip
:
106.2.17.236
port
:
5677
username
:
mq
password
:
mq
# 3. rocketMq
cy_rocketMq
:
ns
:
106.3.97.198:9876,106.3.99.36:9876
# 4. mongodb
cy_mongodb
:
ip
:
127.0.0.1
port
:
27017
username
:
fox
password
:
fox
db
:
cy
authDb
:
cy
# 5. minio
cy_minio
:
endpoint
:
http://103.131.168.155:22038/
writeAccessKey
:
6bejbsayqGMfPA75nZr4
writeSecretKey
:
gMjb5EjYtB8CZrxXIUclyKgTfqAo7iMK59bJ0JHs
readAccessKey
:
xxxxxxxxxxxxxx
readSecretKey
:
xxxxxxxxxxxxxx
# 6.db
#cy_db:
# ip: ENC(vw6fzLP+xitWOx+5/+daH0du1HeO2mWXYKQ5+FQtLv2SvUfIWgqsYrzKRNKTfxLp)
# port: ENC(HebzQAlq/De7b7Ntq6ZHU9QLgFwk761DXuHAL8mg7PW1qkarc9LzIT5WH49UGfpa)
# username: ENC(oBZSjAdFD8wwGj3wheK6Jwbkuc+4SYI5p//m61C4G/2Ory7NutRUkOXzfvnS2aHy)
# password: ENC(v2dv818F45rL4ZCZQaEgV/+ruvGFPx65AMPV52sk56N7ZuJCMTo9lUGT9j4aDccy7FND4QHN1gyDZqG3cY8w8Q==)
# db: exam
cy_db
:
ip
:
106.3.99.36
port
:
20096
username
:
zt
password
:
zt
db
:
zt_db
cy
:
model
:
swagger2Config
:
true
sms
:
enable
:
false
realSend
:
true
model
:
yuntongxun
# 1 "", 2 math, 3 char, 4 block,5 word
captchaType
:
1
# 是否开启短信登录拦截
secure
:
false
login
:
# 是否开启登录日志
log
:
true
# 1 "", 2 math, 3 char, 4 block,5 word
captcha
:
1
# 是否开启登录拦截
secure
:
false
security
:
enable
:
true
permission
:
false
defaultFilter
:
true
gateway
:
false
acAllowOrigin
:
'
*'
acAllowMethods
:
'
POST,
GET,
OPTIONS,
DELETE,PUT'
acAllowHeaders
:
'
*'
permit-all
:
permitUnStatic
:
-
"
/static/**"
-
"
/webjars/**"
-
"
/v2/**"
-
"
/swagger-resources/**"
-
"
/api-docs/**"
-
"
/auth/**"
-
"
/code/**/**"
-
"
/excelUtil/**"
-
"
/captcha/**"
-
"
/office/getFile"
-
"
/office/callback"
#- "/cros/**"
-
"
/common/getKSA"
permitStatic
:
[
"
/"
,
"
/*.html"
,
"
/favicon.ico"
,
"
/**/*.html"
,
"
/**/*.js"
,
"
/**/*.css"
]
logoutSuccessUrl
:
"
/login"
loginPage
:
"
/login"
loginfailureUrl
:
"
/login-error.html"
# 注册
register
:
autoLogin
:
false
sms
:
false
# 登录拦截
login
:
# 1. 同一个登录名 密码 每天 / 每分钟 允许失败的次数
unameDayCount
:
5
unameMinCount
:
2
# 2. 同一手机号 每天 / 每分钟 允许失败的次数
phoneDayCount
:
5
phoneMinCount
:
5
# 3. 同一ip 每分钟 / 每天 允许失败的次数
ipMinCount
:
7
ipDayCount
:
7
# 4. 分钟锁定时间 基本单位是秒
lockTimeMin
:
60
# 5. 一天锁定时间 基本单位是秒
lockTimeDay
:
120
# 6. 分钟IP锁定时间 基本单位是秒
lockTimeIpMin
:
300
# 6. 一天IP锁定时间 基本单位是秒
lockTimeIpDay
:
300
# sms 发送安全拦截
sms
:
# 1. 通知类短信 同一 phone & template 每天 / 每分钟 最大数量
noticeMinCount
:
5
noticeDayCount
:
5
# 2. 图形验证码 同一 ip & template 每天 / 每分钟 最大数量
graphicIpMinCount
:
100
graphicIpDayCount
:
2000
# 3.短信验证码 同一 phone & template 每天 / 每分钟 最大数量
captchaTimeInterval
:
60
captchaDayCount
:
2
# 4.短信验证码 同一 ip & template 每天 / 每分钟 最大数量
ipMinCount
:
5
ipDayCount
:
5
# 6. 验证码存在时间 基本单位是秒
existTime
:
60
# 注册验证码模版
registerTemplateCaptchaId
:
2586438
# 登录验证码模版
loginCaptchaTemplateId
:
2586438
# 忘记密码验证码模板
forgotPasswordCaptchaTemplateId
:
2586438
# 容联云
yuntongxun
:
serverIp
:
app.cloopen.com
serverPort
:
8883
accountSId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
accountToken
:
xxxxxxxxxxxxxxxxxxxxxxxx
appId
:
xxxxxxxxxxxxxxxxxxxxxxxxxx
global
:
path
:
# base_upload_location: E:\working\resource\eduServer\
base_upload_location
:
/working/resource/eduServer/
base_discovery
:
'
http://192.168.1.12:8888/eduServer/'
code_generate_location
:
/code
video_location
:
/video
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
code
:
admin
:
ROLE_1001
resetPassword
:
123456
logging
:
level
:
root
:
info
com.alibaba.nacos
:
info
src/main/resources/application.yml
0 → 100644
View file @
f22e2cf6
spring
:
profiles
:
active
:
dev
group
:
dev
:
dev-conf,common,spbt
prod
:
prod-conf,common,spbt
kube
:
kube-conf,common,spbt
test
:
test-conf,common,spbt
\ No newline at end of file
src/main/resources/logback-spring.xml
0 → 100644
View file @
f22e2cf6
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender
name=
"consoleLog"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<pattern>
%white(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level)
%boldMagenta(%logger{10}.%M.%L) - %cyan(%msg%n)
</pattern>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<!--<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>-->
</layout>
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>-->
</appender>
<appender
name=
"fileInfoLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
DENY
</onMatch>
<onMismatch>
ACCEPT
</onMismatch>
</filter>
<encoder>
<pattern>
%date %-5level [%thread] %logger{43}\(%L\) : %msg
</pattern>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
/working/test/info.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- <fileNamePattern>/Users/lyl/Downloads/tea_resource/info.%d{yyyy-MM-dd}.log</fileNamePattern>-->
</rollingPolicy>
</appender>
<!--https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx50601fe1a9207d84&redirect_uri=http://gwf.natapp4.cc/sell/weixin/auth&response_type=code&scope=snsapi_userinfo&state=gwf#wechat_redirect-->
<appender
name=
"fileErrorLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!--
临界值过滤器,过滤掉低于指定临界值的日志。当日志级别等于或高于临界值时,过滤器返回NEUTRAL;当日志级别低于临界值时,日志会被拒绝
-->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
ERROR
</level>
</filter>
<encoder>
<pattern>
%date %-5level [%thread] %logger{43}\(%L\) : %msg
</pattern>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
/working/test/error.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- <fileNamePattern>/Users/lyl/Downloads/tea_resource/error.%d{yyyy-MM-dd}.log</fileNamePattern>-->
</rollingPolicy>
</appender>
<!--logstash配置-->
<appender
name=
"logStash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<destination>
101.36.228.171:4560
</destination>
<!-- 日志输出编码 -->
<encoder
charset=
"UTF-8"
class=
"net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"
>
<providers>
<timestamp>
<timeZone>
UTC
</timeZone>
</timestamp>
<pattern>
<pattern>
{
"logLevel": "%level",
"serviceName": "${springAppName:-}",
"pid": "${PID:-}",
"thread": "%thread",
"class": "%logger{40}",
"rest": "%message"
}
</pattern>
</pattern>
</providers>
</encoder>
<!--<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>-->
</appender>
<!--指定对应包名 -->
<logger
name=
"com.minlia"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.data.mybatis"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.aop.aspectj"
level=
"ERROR"
/>
<!--mybatis log configure-->
<!--
<logger name="com.apache.ibatis" level="TRACE"/>
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
-->
<!-- 日志输出级别 -->
<!--
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
</root>
-->
<springProfile
name=
"dev"
>
<root
level=
"info"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
<springProfile
name=
"prod"
>
<root
level=
"debug"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
<springProfile
name=
"test"
>
<root
level=
"debug"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
</configuration>
src/main/resources/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
0 → 100644
View file @
f22e2cf6
<?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=
"org.rcisoft.business.cmsbanner.dao.CmsBannerRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsbanner.entity.CmsBanner"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"banner_picture"
jdbcType=
"VARCHAR"
property=
"bannerPicture"
/>
<result
column=
"banner_name"
jdbcType=
"VARCHAR"
property=
"bannerName"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"weight"
jdbcType=
"INTEGER"
property=
"weight"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"link_url"
jdbcType=
"VARCHAR"
property=
"linkUrl"
/>
<result
column=
"url"
jdbcType=
"VARCHAR"
property=
"url"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryCmsBanners"
resultMap=
"BaseResultMap"
>
select * from cms_banner
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.bannerPicture !=null and entity.bannerPicture != '' "
>
and banner_picture like concat('%',#{entity.bannerPicture},'%')
</if>
<if
test=
"entity.bannerName !=null and entity.bannerName != '' "
>
and banner_name like concat('%',#{entity.bannerName},'%')
</if>
<if
test=
"entity.type !=null and entity.type != '' "
>
and type like concat('%',#{entity.type},'%')
</if>
<if
test=
"entity.weight !=null and entity.weight != '' "
>
and weight = #{entity.weight}
</if>
<if
test=
"entity.linkUrl !=null and entity.linkUrl != '' "
>
and link_url like concat('%',#{entity.linkUrl},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryCmsBannersPaged"
resultMap=
"BaseResultMap"
>
select smb.*,oi.url from cms_banner smb
left join oss_info oi on smb.banner_picture = oi.business_id
where 1=1
and smb.del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and smb.flag = #{entity.flag}
</if>
<if
test=
"entity.bannerPicture !=null and entity.bannerPicture != '' "
>
and smb.banner_picture like concat('%',#{entity.bannerPicture},'%')
</if>
<if
test=
"entity.bannerName !=null and entity.bannerName != '' "
>
and smb.banner_name like concat('%',#{entity.bannerName},'%')
</if>
<if
test=
"entity.type !=null and entity.type != '' "
>
and smb.type like concat('%',#{entity.type},'%')
</if>
<if
test=
"entity.weight !=null and entity.weight != '' "
>
and smb.weight = #{entity.weight}
</if>
<if
test=
"entity.linkUrl !=null and entity.linkUrl != '' "
>
and smb.link_url like concat('%',#{entity.linkUrl},'%')
</if>
ORDER BY smb.weight DESC
</select>
<select
id=
"selectByIdWithUrl"
resultType=
"org.rcisoft.business.cmsbanner.entity.CmsBanner"
>
SELECT smb.*,
oi.url
FROM cms_banner smb
LEFT JOIN oss_info oi ON oi.business_id = smb.banner_picture
where 1 = 1
and smb.del_flag = '0'
and smb.business_id = #{businessId}
</select>
</mapper>
src/main/resources/mapper/business/syscontentnewsinformation.mapper/SysContentNewsInformationMapper.xml
0 → 100644
View file @
f22e2cf6
<?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=
"org.rcisoft.business.syscontentnewsinformation.dao.SysContentNewsInformationRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"release_date"
jdbcType=
"DATE"
property=
"releaseDate"
/>
<result
column=
"plate"
jdbcType=
"VARCHAR"
property=
"plate"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"DATE"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"unit"
jdbcType=
"VARCHAR"
property=
"unit"
/>
<result
column=
"details"
jdbcType=
"VARCHAR"
property=
"details"
/>
<result
column=
"weight"
jdbcType=
"INTEGER"
property=
"weight"
/>
<result
column=
"picture_id"
jdbcType=
"VARCHAR"
property=
"pictureId"
/>
<result
column=
"is_fornt_page"
jdbcType=
"INTEGER"
property=
"isForntPage"
/>
<result
column=
"is_recommended"
jdbcType=
"INTEGER"
property=
"isRecommended"
/>
<result
column=
"is_top"
jdbcType=
"INTEGER"
property=
"isTop"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"querySysContentNewsInformations"
resultMap=
"BaseResultMap"
>
select * from cms_news
where 1=1
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and release_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and release_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.plate !=null and entity.plate != '' "
>
and plate like concat('%',#{entity.plate},'%')
</if>
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and create_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and create_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and update_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and update_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.title !=null and entity.title != '' "
>
and title like concat('%',#{entity.title},'%')
</if>
<if
test=
"entity.unit !=null and entity.unit != '' "
>
and unit like concat('%',#{entity.unit},'%')
</if>
<if
test=
"entity.details !=null and entity.details != '' "
>
and details like concat('%',#{entity.details},'%')
</if>
<if
test=
"entity.weight !=null and entity.weight != '' "
>
and weight like concat('%',#{entity.weight},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and picture_id like concat('%',#{entity.pictureId},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"querySysContentNewsInformationsPaged"
resultMap=
"BaseResultMap"
>
SELECT cn.business_id,
cn.release_date,
cn.plate,
cn.create_by,
cn.create_date,
cn.update_by,
cn.del_flag,
cn.flag,
cn.remarks,
cn.title,
cn.unit,
cn.weight,
cn.picture_id,
cn.is_fornt_page,
cn.is_recommended,
cn.is_top,
su.nick_name as nickName,
oi.path
FROM cms_news cn
LEFT JOIN oss_info oi on oi.business_id = cn.picture_id
LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0'
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and release_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and release_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.flag!=null and entity.flag != '' "
>
and cn.flag = #{entity.flag}
</if>
<if
test=
"entity.plate !=null and entity.plate != '' "
>
and plate like concat('%',#{entity.plate},'%')
</if>
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if
test=
"entity.beginTime !=null "
>
and cn.release_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null "
>
and cn.release_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if
test=
"entity.title !=null and entity.title != '' "
>
and title like concat('%',#{entity.title},'%')
</if>
<if
test=
"entity.unit !=null and entity.unit != '' "
>
and unit like concat('%',#{entity.unit},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and picture_id like concat('%',#{entity.pictureId},'%')
</if>
<if
test=
"entity.isForntPage !=null and entity.isForntPage != '' "
>
and is_fornt_page = #{entity.isForntPage}
</if>
<if
test=
"entity.isRecommended !=null and entity.isRecommended != '' "
>
and is_recommended = #{entity.isRecommended}
</if>
<if
test=
"entity.isTop !=null and entity.isTop != '' "
>
and is_top = #{entity.isTop}
</if>
ORDER BY cn.release_date DESC
</select>
<update
id=
"deleteSysContentNewsInformation"
parameterType=
"java.lang.Integer"
>
update cms_news
set del_flag = '1'
where business_id = #{businessId}
</update>
<update
id=
"updateStatus"
parameterType=
"org.rcisoft.business.syscontentnewsinformation.entity.SysContentNewsInformation"
>
update cms_news
set flag = #{ entity.flag}
where business_id = #{entity.businessId}
</update>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select cn.*,
oi.path
from cms_news cn
left join oss_info oi on oi.business_id = cn.picture_id
where cn.business_id = #{businessId}
</select>
<select
id=
"checkWeight"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select * from cms_news
where 1=1
and del_flag = '0'
and weight = #{weight}
</select>
</mapper>
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