Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_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
liyilin
intel_promotion_api
Commits
8c0ef2be
Commit
8c0ef2be
authored
Jun 03, 2024
by
lyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成
parent
b9489f68
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
2665 additions
and
0 deletions
+2665
-0
CmsNewsController.java
...cisoft/business/cmsnews/controller/CmsNewsController.java
+140
-0
CmsNewsRepository.java
...a/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
+29
-0
CmsNews.java
...ain/java/org/rcisoft/business/cmsnews/entity/CmsNews.java
+132
-0
CmsNewsService.java
.../org/rcisoft/business/cmsnews/service/CmsNewsService.java
+75
-0
CmsNewsServiceImpl.java
...oft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
+136
-0
CmsPriceClickController.java
...ess/cmspriceclick/controller/CmsPriceClickController.java
+140
-0
CmsPriceClickRepository.java
...t/business/cmspriceclick/dao/CmsPriceClickRepository.java
+29
-0
CmsPriceClick.java
.../rcisoft/business/cmspriceclick/entity/CmsPriceClick.java
+71
-0
CmsPriceClickService.java
.../business/cmspriceclick/service/CmsPriceClickService.java
+75
-0
CmsPriceClickServiceImpl.java
.../cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
+136
-0
CmsVideoController.java
...soft/business/cmsvideo/controller/CmsVideoController.java
+140
-0
CmsVideoRepository.java
...org/rcisoft/business/cmsvideo/dao/CmsVideoRepository.java
+29
-0
CmsVideo.java
...n/java/org/rcisoft/business/cmsvideo/entity/CmsVideo.java
+100
-0
CmsVideoService.java
...rg/rcisoft/business/cmsvideo/service/CmsVideoService.java
+75
-0
CmsVideoServiceImpl.java
...t/business/cmsvideo/service/impl/CmsVideoServiceImpl.java
+136
-0
SysUnitController.java
...cisoft/business/sysunit/controller/SysUnitController.java
+140
-0
SysUnitRepository.java
...a/org/rcisoft/business/sysunit/dao/SysUnitRepository.java
+29
-0
SysUnit.java
...ain/java/org/rcisoft/business/sysunit/entity/SysUnit.java
+63
-0
SysUnitService.java
.../org/rcisoft/business/sysunit/service/SysUnitService.java
+75
-0
SysUnitServiceImpl.java
...oft/business/sysunit/service/impl/SysUnitServiceImpl.java
+136
-0
SysUnitNewsController.java
...usiness/sysunitnews/controller/SysUnitNewsController.java
+127
-0
SysUnitNewsRepository.java
...isoft/business/sysunitnews/dao/SysUnitNewsRepository.java
+29
-0
SysUnitNews.java
.../org/rcisoft/business/sysunitnews/entity/SysUnitNews.java
+40
-0
SysUnitNewsService.java
...soft/business/sysunitnews/service/SysUnitNewsService.java
+68
-0
SysUnitNewsServiceImpl.java
...ness/sysunitnews/service/impl/SysUnitNewsServiceImpl.java
+121
-0
CmsNewsMapper.xml
...esources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
+119
-0
CmsPriceClickMapper.xml
...per/business/cmspriceclick/mapper/CmsPriceClickMapper.xml
+78
-0
CmsVideoMapper.xml
...ources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
+91
-0
SysUnitMapper.xml
...esources/mapper/business/sysunit/mapper/SysUnitMapper.xml
+71
-0
SysUnitNewsMapper.xml
.../mapper/business/sysunitnews/mapper/SysUnitNewsMapper.xml
+35
-0
No files found.
src/main/java/org/rcisoft/business/cmsnews/controller/CmsNewsController.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsnews
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.business.cmsnews.entity.CmsNews
;
import
org.rcisoft.business.cmsnews.service.CmsNewsService
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@RestController
@RequestMapping
(
"/cmsnews"
)
public
class
CmsNewsController
extends
CyPaginationController
<
CmsNews
>
{
@Autowired
private
CmsNewsService
cmsNewsServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:news:add')")
@CyOpeLogAnno
(
title
=
"system-文章表管理-新增文章表"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加文章表"
,
notes
=
"添加文章表"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
CmsNews
cmsNews
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
cmsNewsServiceImpl
.
persist
(
cmsNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNews
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:delete')")
@CyOpeLogAnno
(
title
=
"system-文章表管理-删除文章表"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"逻辑删除文章表"
,
notes
=
"逻辑删除文章表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
int
businessId
,
CmsNews
cmsNews
)
{
cmsNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNewsServiceImpl
.
removeLogical
(
cmsNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:delete')")
@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
int
businessId
,
CmsNews
cmsNews
)
{
cmsNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNewsServiceImpl
.
remove
(
cmsNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:update')")
@CyOpeLogAnno
(
title
=
"system-文章表管理-修改文章表"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改文章表"
,
notes
=
"修改文章表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
CmsNews
cmsNews
,
BindingResult
bindingResult
)
{
cmsNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNewsServiceImpl
.
merge
(
cmsNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNews
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:query')")
@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
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNewsServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:list')")
@CyOpeLogAnno
(
title
=
"system-文章表管理-查询文章表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询文章表集合"
,
notes
=
"查询文章表集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
CmsNews
cmsNews
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNewsServiceImpl
.
findAll
(
cmsNews
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:news:list')")
@CyOpeLogAnno
(
title
=
"system-文章表管理-查询文章表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询文章表集合"
,
notes
=
"分页查询文章表集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
CmsNews
cmsNews
)
{
cmsNewsServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsNews
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-文章表管理-查询文章表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出文章表信息"
,
notes
=
"导出文章表信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outCmsNews
(
HttpServletResponse
response
,
CmsNews
cmsNews
,
@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
<
CmsNews
>
cmsNewsList
=
cmsNewsServiceImpl
.
export
(
cmsNews
);
CyEpExcelUtil
.
exportExcel
(
cmsNewsList
,
"文章表信息"
,
"文章表信息"
,
CmsNews
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsnews
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.cmsnews.entity.CmsNews
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsNewsRepository
extends
CyBaseMapper
<
CmsNews
>
{
List
<
CmsNews
>
queryCmsNewss
(
@Param
(
"entity"
)
CmsNews
cmsNews
);
/**
* 分页查询 cmsNews
*
*/
IPage
<
CmsNews
>
queryCmsNewssPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
}
src/main/java/org/rcisoft/business/cmsnews/entity/CmsNews.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsnews
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
@Data
@TableName
(
"cms_news"
)
public
class
CmsNews
extends
CyIdIncreEntity
<
CmsNews
>
{
/**
* @desc 发布日期
* @column release_date
* @default
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"发布日期"
,
orderNum
=
"0"
,
width
=
20
,
format
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
releaseDate
;
/**
* @desc 板块
* @column plate
* @default
*/
@Excel
(
name
=
"板块"
,
orderNum
=
"1"
,
width
=
20
)
private
String
plate
;
/**
* @desc 标题
* @column title
* @default
*/
@Excel
(
name
=
"标题"
,
orderNum
=
"2"
,
width
=
20
)
private
String
title
;
/**
* @desc 内容
* @column details
* @default
*/
@Excel
(
name
=
"内容"
,
orderNum
=
"3"
,
width
=
20
)
private
String
details
;
/**
* @desc 排序
* @column weight
* @default
*/
@Excel
(
name
=
"排序"
,
orderNum
=
"4"
,
width
=
20
)
private
Integer
weight
;
/**
* @desc 封面
* @column picture_id
* @default
*/
@Excel
(
name
=
"封面"
,
orderNum
=
"5"
,
width
=
20
)
private
String
pictureId
;
/**
* @desc 是否为头条
* @column is_fornt_page
* @default
*/
@Excel
(
name
=
"是否为头条"
,
orderNum
=
"6"
,
width
=
20
)
private
Integer
isForntPage
;
/**
* @desc 是否为推荐
* @column is_recommended
* @default
*/
@Excel
(
name
=
"是否为推荐"
,
orderNum
=
"7"
,
width
=
20
)
private
Integer
isRecommended
;
/**
* @desc 是否为置顶
* @column is_top
* @default
*/
@Excel
(
name
=
"是否为置顶"
,
orderNum
=
"8"
,
width
=
20
)
private
Integer
isTop
;
/**
* @desc 文章来源(0:爬虫 1:超管自建 2:单位管理员自建)
* @column news_type
* @default
*/
@Excel
(
name
=
"文章来源(0:爬虫 1:超管自建 2:单位管理员自建)"
,
orderNum
=
"9"
,
width
=
20
)
private
String
newsType
;
/**
* @desc 房客id
* @column tenant
* @default
*/
@Excel
(
name
=
"房客id"
,
orderNum
=
"10"
,
width
=
20
)
private
Integer
tenant
;
/**
* 开始时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
beginTime
;
/**
* 结束时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
endTime
;
}
src/main/java/org/rcisoft/business/cmsnews/service/CmsNewsService.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsnews
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.cmsnews.entity.CmsNews
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsNewsService
{
/**
* 保存 文章表
* @param cmsNews
* @return
*/
CyPersistModel
persist
(
CmsNews
cmsNews
);
/**
* 删除 文章表
* @param cmsNews
* @return
*/
CyPersistModel
remove
(
CmsNews
cmsNews
);
/**
* 逻辑删除 文章表
* @param cmsNews
* @return
*/
CyPersistModel
removeLogical
(
CmsNews
cmsNews
);
/**
* 修改 文章表
* @param cmsNews
* @return
*/
CyPersistModel
merge
(
CmsNews
cmsNews
);
/**
* 根据id查询 文章表
* @param id
* @return
*/
CmsNews
findById
(
int
id
);
/**
* 分页查询 文章表
* @param cmsNews
* @return
*/
IPage
<
CmsNews
>
findAllByPagination
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsNews
cmsNews
);
/**
* 查询list 文章表
* @param cmsNews
* @return
*/
List
<
CmsNews
>
findAll
(
CmsNews
cmsNews
);
/**
* 导出文章表
* @return
*/
List
<
CmsNews
>
export
(
CmsNews
cmsNews
);
}
src/main/java/org/rcisoft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsnews
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.business.cmsnews.dao.CmsNewsRepository
;
import
org.rcisoft.business.cmsnews.entity.CmsNews
;
import
org.rcisoft.business.cmsnews.service.CmsNewsService
;
import
org.rcisoft.core.service.CyBaseService
;
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
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
CmsNewsServiceImpl
extends
ServiceImpl
<
CmsNewsRepository
,
CmsNews
>
implements
CmsNewsService
{
/**
* 保存 文章表
* @param cmsNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CmsNews
cmsNews
){
//增加操作
int
line
=
baseMapper
.
insert
(
cmsNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
cmsNews
.
getBusinessId
()+
"的文章表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 文章表
* @param cmsNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
CmsNews
cmsNews
){
int
line
=
baseMapper
.
realDelete
(
cmsNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
cmsNews
.
getBusinessId
()+
"的文章表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 文章表
* @param cmsNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
CmsNews
cmsNews
){
cmsNews
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
cmsNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
cmsNews
.
getBusinessId
()+
"的文章表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 文章表
* @param cmsNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CmsNews
cmsNews
){
int
line
=
baseMapper
.
updateById
(
cmsNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
cmsNews
.
getBusinessId
()+
"的文章表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 文章表
* @param id
* @return
*/
@Override
public
CmsNews
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询 文章表
* @param cmsNews
* @return
*/
@Override
public
IPage
<
CmsNews
>
findAllByPagination
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsNews
cmsNews
){
return
baseMapper
.
queryCmsNewssPaged
(
paginationUtility
,
cmsNews
);
}
/**
* 查询list 文章表
* @param cmsNews
* @return
*/
@Override
public
List
<
CmsNews
>
findAll
(
CmsNews
cmsNews
){
return
baseMapper
.
queryCmsNewss
(
cmsNews
);
}
/**
* 导出文章表
* @return
*/
@Override
public
List
<
CmsNews
>
export
(
CmsNews
cmsNews
)
{
List
<
CmsNews
>
cmsNewsList
=
baseMapper
.
queryCmsNewss
(
cmsNews
);
return
cmsNewsList
;
}
}
src/main/java/org/rcisoft/business/cmspriceclick/controller/CmsPriceClickController.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmspriceclick
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.business.cmspriceclick.entity.CmsPriceClick
;
import
org.rcisoft.business.cmspriceclick.service.CmsPriceClickService
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@RestController
@RequestMapping
(
"/cmspriceclick"
)
public
class
CmsPriceClickController
extends
CyPaginationController
<
CmsPriceClick
>
{
@Autowired
private
CmsPriceClickService
cmsPriceClickServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:add')")
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-新增文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加文章/视频单价点击量表"
,
notes
=
"添加文章/视频单价点击量表"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
CmsPriceClick
cmsPriceClick
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
cmsPriceClickServiceImpl
.
persist
(
cmsPriceClick
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsPriceClick
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:delete')")
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-删除文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"逻辑删除文章/视频单价点击量表"
,
notes
=
"逻辑删除文章/视频单价点击量表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
int
businessId
,
CmsPriceClick
cmsPriceClick
)
{
cmsPriceClick
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsPriceClickServiceImpl
.
removeLogical
(
cmsPriceClick
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:delete')")
@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
int
businessId
,
CmsPriceClick
cmsPriceClick
)
{
cmsPriceClick
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsPriceClickServiceImpl
.
remove
(
cmsPriceClick
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:update')")
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-修改文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改文章/视频单价点击量表"
,
notes
=
"修改文章/视频单价点击量表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
CmsPriceClick
cmsPriceClick
,
BindingResult
bindingResult
)
{
cmsPriceClick
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsPriceClickServiceImpl
.
merge
(
cmsPriceClick
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsPriceClick
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:query')")
@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
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsPriceClickServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:list')")
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-查询文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询文章/视频单价点击量表集合"
,
notes
=
"查询文章/视频单价点击量表集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
CmsPriceClick
cmsPriceClick
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsPriceClickServiceImpl
.
findAll
(
cmsPriceClick
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:priceClick:list')")
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-查询文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询文章/视频单价点击量表集合"
,
notes
=
"分页查询文章/视频单价点击量表集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
CmsPriceClick
cmsPriceClick
)
{
cmsPriceClickServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsPriceClick
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-文章/视频单价点击量表管理-查询文章/视频单价点击量表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出文章/视频单价点击量表信息"
,
notes
=
"导出文章/视频单价点击量表信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outCmsPriceClick
(
HttpServletResponse
response
,
CmsPriceClick
cmsPriceClick
,
@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
<
CmsPriceClick
>
cmsPriceClickList
=
cmsPriceClickServiceImpl
.
export
(
cmsPriceClick
);
CyEpExcelUtil
.
exportExcel
(
cmsPriceClickList
,
"文章/视频单价点击量表信息"
,
"文章/视频单价点击量表信息"
,
CmsPriceClick
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/cmspriceclick/dao/CmsPriceClickRepository.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmspriceclick
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.cmspriceclick.entity.CmsPriceClick
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsPriceClickRepository
extends
CyBaseMapper
<
CmsPriceClick
>
{
List
<
CmsPriceClick
>
queryCmsPriceClicks
(
@Param
(
"entity"
)
CmsPriceClick
cmsPriceClick
);
/**
* 分页查询 cmsPriceClick
*
*/
IPage
<
CmsPriceClick
>
queryCmsPriceClicksPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsPriceClick
cmsPriceClick
);
}
src/main/java/org/rcisoft/business/cmspriceclick/entity/CmsPriceClick.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmspriceclick
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
@Data
@TableName
(
"cms_price_click"
)
public
class
CmsPriceClick
extends
CyIdIncreEntity
<
CmsPriceClick
>
{
/**
* @desc 单位id
* @column unit_id
* @default
*/
@Excel
(
name
=
"单位id"
,
orderNum
=
"0"
,
width
=
20
)
private
Integer
unitId
;
/**
* @desc 用户id
* @column user_id
* @default
*/
@Excel
(
name
=
"用户id"
,
orderNum
=
"1"
,
width
=
20
)
private
Integer
userId
;
/**
* @desc 文章/视频id
* @column news_video_id
* @default
*/
@Excel
(
name
=
"文章/视频id"
,
orderNum
=
"2"
,
width
=
20
)
private
Integer
newsVideoId
;
/**
* @desc 来源(0:新闻 : 1 :视频)
* @column source
* @default
*/
@Excel
(
name
=
"来源(0:新闻 : 1 :视频) "
,
orderNum
=
"3"
,
width
=
20
)
private
String
source
;
/**
* @desc 价格
* @column price
* @default
*/
@Excel
(
name
=
"价格"
,
orderNum
=
"4"
,
width
=
20
)
private
BigDecimal
price
;
/**
* @desc 点击率
* @column click_through_rate
* @default
*/
@Excel
(
name
=
"点击率"
,
orderNum
=
"5"
,
width
=
20
)
private
Integer
clickThroughRate
;
}
src/main/java/org/rcisoft/business/cmspriceclick/service/CmsPriceClickService.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmspriceclick
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.cmspriceclick.entity.CmsPriceClick
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsPriceClickService
{
/**
* 保存 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
CyPersistModel
persist
(
CmsPriceClick
cmsPriceClick
);
/**
* 删除 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
CyPersistModel
remove
(
CmsPriceClick
cmsPriceClick
);
/**
* 逻辑删除 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
CyPersistModel
removeLogical
(
CmsPriceClick
cmsPriceClick
);
/**
* 修改 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
CyPersistModel
merge
(
CmsPriceClick
cmsPriceClick
);
/**
* 根据id查询 文章/视频单价点击量表
* @param id
* @return
*/
CmsPriceClick
findById
(
int
id
);
/**
* 分页查询 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
IPage
<
CmsPriceClick
>
findAllByPagination
(
CyPageInfo
<
CmsPriceClick
>
paginationUtility
,
CmsPriceClick
cmsPriceClick
);
/**
* 查询list 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
List
<
CmsPriceClick
>
findAll
(
CmsPriceClick
cmsPriceClick
);
/**
* 导出文章/视频单价点击量表
* @return
*/
List
<
CmsPriceClick
>
export
(
CmsPriceClick
cmsPriceClick
);
}
src/main/java/org/rcisoft/business/cmspriceclick/service/impl/CmsPriceClickServiceImpl.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmspriceclick
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.business.cmspriceclick.dao.CmsPriceClickRepository
;
import
org.rcisoft.business.cmspriceclick.entity.CmsPriceClick
;
import
org.rcisoft.business.cmspriceclick.service.CmsPriceClickService
;
import
org.rcisoft.core.service.CyBaseService
;
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
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
CmsPriceClickServiceImpl
extends
ServiceImpl
<
CmsPriceClickRepository
,
CmsPriceClick
>
implements
CmsPriceClickService
{
/**
* 保存 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CmsPriceClick
cmsPriceClick
){
//增加操作
int
line
=
baseMapper
.
insert
(
cmsPriceClick
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
cmsPriceClick
.
getBusinessId
()+
"的文章/视频单价点击量表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
CmsPriceClick
cmsPriceClick
){
int
line
=
baseMapper
.
realDelete
(
cmsPriceClick
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
cmsPriceClick
.
getBusinessId
()+
"的文章/视频单价点击量表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
CmsPriceClick
cmsPriceClick
){
cmsPriceClick
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
cmsPriceClick
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
cmsPriceClick
.
getBusinessId
()+
"的文章/视频单价点击量表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CmsPriceClick
cmsPriceClick
){
int
line
=
baseMapper
.
updateById
(
cmsPriceClick
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
cmsPriceClick
.
getBusinessId
()+
"的文章/视频单价点击量表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 文章/视频单价点击量表
* @param id
* @return
*/
@Override
public
CmsPriceClick
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Override
public
IPage
<
CmsPriceClick
>
findAllByPagination
(
CyPageInfo
<
CmsPriceClick
>
paginationUtility
,
CmsPriceClick
cmsPriceClick
){
return
baseMapper
.
queryCmsPriceClicksPaged
(
paginationUtility
,
cmsPriceClick
);
}
/**
* 查询list 文章/视频单价点击量表
* @param cmsPriceClick
* @return
*/
@Override
public
List
<
CmsPriceClick
>
findAll
(
CmsPriceClick
cmsPriceClick
){
return
baseMapper
.
queryCmsPriceClicks
(
cmsPriceClick
);
}
/**
* 导出文章/视频单价点击量表
* @return
*/
@Override
public
List
<
CmsPriceClick
>
export
(
CmsPriceClick
cmsPriceClick
)
{
List
<
CmsPriceClick
>
cmsPriceClickList
=
baseMapper
.
queryCmsPriceClicks
(
cmsPriceClick
);
return
cmsPriceClickList
;
}
}
src/main/java/org/rcisoft/business/cmsvideo/controller/CmsVideoController.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsvideo
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.rcisoft.business.cmsvideo.service.CmsVideoService
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@RestController
@RequestMapping
(
"/cmsvideo"
)
public
class
CmsVideoController
extends
CyPaginationController
<
CmsVideo
>
{
@Autowired
private
CmsVideoService
cmsVideoServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:video:add')")
@CyOpeLogAnno
(
title
=
"system-视频表管理-新增视频表"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加视频表"
,
notes
=
"添加视频表"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
CmsVideo
cmsVideo
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
cmsVideoServiceImpl
.
persist
(
cmsVideo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:delete')")
@CyOpeLogAnno
(
title
=
"system-视频表管理-删除视频表"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"逻辑删除视频表"
,
notes
=
"逻辑删除视频表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
int
businessId
,
CmsVideo
cmsVideo
)
{
cmsVideo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsVideoServiceImpl
.
removeLogical
(
cmsVideo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:delete')")
@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
int
businessId
,
CmsVideo
cmsVideo
)
{
cmsVideo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsVideoServiceImpl
.
remove
(
cmsVideo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:update')")
@CyOpeLogAnno
(
title
=
"system-视频表管理-修改视频表"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改视频表"
,
notes
=
"修改视频表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
CmsVideo
cmsVideo
,
BindingResult
bindingResult
)
{
cmsVideo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsVideoServiceImpl
.
merge
(
cmsVideo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:query')")
@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
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideoServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:list')")
@CyOpeLogAnno
(
title
=
"system-视频表管理-查询视频表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询视频表集合"
,
notes
=
"查询视频表集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
CmsVideo
cmsVideo
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideoServiceImpl
.
findAll
(
cmsVideo
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:video:list')")
@CyOpeLogAnno
(
title
=
"system-视频表管理-查询视频表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询视频表集合"
,
notes
=
"分页查询视频表集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
CmsVideo
cmsVideo
)
{
cmsVideoServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsVideo
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-视频表管理-查询视频表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出视频表信息"
,
notes
=
"导出视频表信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outCmsVideo
(
HttpServletResponse
response
,
CmsVideo
cmsVideo
,
@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
<
CmsVideo
>
cmsVideoList
=
cmsVideoServiceImpl
.
export
(
cmsVideo
);
CyEpExcelUtil
.
exportExcel
(
cmsVideoList
,
"视频表信息"
,
"视频表信息"
,
CmsVideo
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/cmsvideo/dao/CmsVideoRepository.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsvideo
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsVideoRepository
extends
CyBaseMapper
<
CmsVideo
>
{
List
<
CmsVideo
>
queryCmsVideos
(
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
/**
* 分页查询 cmsVideo
*
*/
IPage
<
CmsVideo
>
queryCmsVideosPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
}
src/main/java/org/rcisoft/business/cmsvideo/entity/CmsVideo.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsvideo
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
@Data
@TableName
(
"cms_video"
)
public
class
CmsVideo
extends
CyIdIncreEntity
<
CmsVideo
>
{
/**
* @desc 视频标题
* @column video_title
* @default
*/
@Excel
(
name
=
"视频标题"
,
orderNum
=
"0"
,
width
=
20
)
private
String
videoTitle
;
/**
* @desc 首页显示(0:不显示; 1: 显示)
* @column home_display
* @default
*/
@Excel
(
name
=
"首页显示(0:不显示; 1: 显示)"
,
orderNum
=
"1"
,
width
=
20
)
private
String
homeDisplay
;
/**
* @desc 默认封面图片url
* @column default_url
* @default
*/
@Excel
(
name
=
"默认封面图片url"
,
orderNum
=
"2"
,
width
=
20
)
private
String
defaultUrl
;
/**
* @desc 视频urlid
* @column video_url_id
* @default
*/
@Excel
(
name
=
"视频urlid"
,
orderNum
=
"3"
,
width
=
20
)
private
String
videoUrlId
;
/**
* @desc 发布时间
* @column release_time
* @default
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"发布时间"
,
orderNum
=
"4"
,
width
=
20
,
format
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
releaseTime
;
/**
* @desc 来源
* @column source
* @default
*/
@Excel
(
name
=
"来源"
,
orderNum
=
"5"
,
width
=
20
)
private
String
source
;
/**
* @desc 房客id
* @column tenant
* @default
*/
@Excel
(
name
=
"房客id"
,
orderNum
=
"6"
,
width
=
20
)
private
Integer
tenant
;
/**
* 开始时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
beginTime
;
/**
* 结束时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
endTime
;
}
src/main/java/org/rcisoft/business/cmsvideo/service/CmsVideoService.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsvideo
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
public
interface
CmsVideoService
{
/**
* 保存 视频表
* @param cmsVideo
* @return
*/
CyPersistModel
persist
(
CmsVideo
cmsVideo
);
/**
* 删除 视频表
* @param cmsVideo
* @return
*/
CyPersistModel
remove
(
CmsVideo
cmsVideo
);
/**
* 逻辑删除 视频表
* @param cmsVideo
* @return
*/
CyPersistModel
removeLogical
(
CmsVideo
cmsVideo
);
/**
* 修改 视频表
* @param cmsVideo
* @return
*/
CyPersistModel
merge
(
CmsVideo
cmsVideo
);
/**
* 根据id查询 视频表
* @param id
* @return
*/
CmsVideo
findById
(
int
id
);
/**
* 分页查询 视频表
* @param cmsVideo
* @return
*/
IPage
<
CmsVideo
>
findAllByPagination
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
CmsVideo
cmsVideo
);
/**
* 查询list 视频表
* @param cmsVideo
* @return
*/
List
<
CmsVideo
>
findAll
(
CmsVideo
cmsVideo
);
/**
* 导出视频表
* @return
*/
List
<
CmsVideo
>
export
(
CmsVideo
cmsVideo
);
}
src/main/java/org/rcisoft/business/cmsvideo/service/impl/CmsVideoServiceImpl.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
cmsvideo
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.business.cmsvideo.dao.CmsVideoRepository
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.rcisoft.business.cmsvideo.service.CmsVideoService
;
import
org.rcisoft.core.service.CyBaseService
;
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
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
CmsVideoServiceImpl
extends
ServiceImpl
<
CmsVideoRepository
,
CmsVideo
>
implements
CmsVideoService
{
/**
* 保存 视频表
* @param cmsVideo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CmsVideo
cmsVideo
){
//增加操作
int
line
=
baseMapper
.
insert
(
cmsVideo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
cmsVideo
.
getBusinessId
()+
"的视频表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 视频表
* @param cmsVideo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
CmsVideo
cmsVideo
){
int
line
=
baseMapper
.
realDelete
(
cmsVideo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
cmsVideo
.
getBusinessId
()+
"的视频表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 视频表
* @param cmsVideo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
CmsVideo
cmsVideo
){
cmsVideo
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
cmsVideo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
cmsVideo
.
getBusinessId
()+
"的视频表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 视频表
* @param cmsVideo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CmsVideo
cmsVideo
){
int
line
=
baseMapper
.
updateById
(
cmsVideo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
cmsVideo
.
getBusinessId
()+
"的视频表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 视频表
* @param id
* @return
*/
@Override
public
CmsVideo
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询 视频表
* @param cmsVideo
* @return
*/
@Override
public
IPage
<
CmsVideo
>
findAllByPagination
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
CmsVideo
cmsVideo
){
return
baseMapper
.
queryCmsVideosPaged
(
paginationUtility
,
cmsVideo
);
}
/**
* 查询list 视频表
* @param cmsVideo
* @return
*/
@Override
public
List
<
CmsVideo
>
findAll
(
CmsVideo
cmsVideo
){
return
baseMapper
.
queryCmsVideos
(
cmsVideo
);
}
/**
* 导出视频表
* @return
*/
@Override
public
List
<
CmsVideo
>
export
(
CmsVideo
cmsVideo
)
{
List
<
CmsVideo
>
cmsVideoList
=
baseMapper
.
queryCmsVideos
(
cmsVideo
);
return
cmsVideoList
;
}
}
src/main/java/org/rcisoft/business/sysunit/controller/SysUnitController.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunit
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.business.sysunit.entity.SysUnit
;
import
org.rcisoft.business.sysunit.service.SysUnitService
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@RestController
@RequestMapping
(
"/sysunit"
)
public
class
SysUnitController
extends
CyPaginationController
<
SysUnit
>
{
@Autowired
private
SysUnitService
sysUnitServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:add')")
@CyOpeLogAnno
(
title
=
"system-单位管理管理-新增单位管理"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加单位管理"
,
notes
=
"添加单位管理"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
SysUnit
sysUnit
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
sysUnitServiceImpl
.
persist
(
sysUnit
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnit
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:delete')")
@CyOpeLogAnno
(
title
=
"system-单位管理管理-删除单位管理"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"逻辑删除单位管理"
,
notes
=
"逻辑删除单位管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
int
businessId
,
SysUnit
sysUnit
)
{
sysUnit
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysUnitServiceImpl
.
removeLogical
(
sysUnit
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:delete')")
@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
int
businessId
,
SysUnit
sysUnit
)
{
sysUnit
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysUnitServiceImpl
.
remove
(
sysUnit
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:update')")
@CyOpeLogAnno
(
title
=
"system-单位管理管理-修改单位管理"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改单位管理"
,
notes
=
"修改单位管理"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
SysUnit
sysUnit
,
BindingResult
bindingResult
)
{
sysUnit
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysUnitServiceImpl
.
merge
(
sysUnit
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnit
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:query')")
@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
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:list')")
@CyOpeLogAnno
(
title
=
"system-单位管理管理-查询单位管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询单位管理集合"
,
notes
=
"查询单位管理集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
SysUnit
sysUnit
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitServiceImpl
.
findAll
(
sysUnit
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unit:list')")
@CyOpeLogAnno
(
title
=
"system-单位管理管理-查询单位管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询单位管理集合"
,
notes
=
"分页查询单位管理集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
SysUnit
sysUnit
)
{
sysUnitServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
sysUnit
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-单位管理管理-查询单位管理"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出单位管理信息"
,
notes
=
"导出单位管理信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outSysUnit
(
HttpServletResponse
response
,
SysUnit
sysUnit
,
@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
<
SysUnit
>
sysUnitList
=
sysUnitServiceImpl
.
export
(
sysUnit
);
CyEpExcelUtil
.
exportExcel
(
sysUnitList
,
"单位管理信息"
,
"单位管理信息"
,
SysUnit
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/sysunit/dao/SysUnitRepository.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunit
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.sysunit.entity.SysUnit
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
public
interface
SysUnitRepository
extends
CyBaseMapper
<
SysUnit
>
{
List
<
SysUnit
>
querySysUnits
(
@Param
(
"entity"
)
SysUnit
sysUnit
);
/**
* 分页查询 sysUnit
*
*/
IPage
<
SysUnit
>
querySysUnitsPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
SysUnit
sysUnit
);
}
src/main/java/org/rcisoft/business/sysunit/entity/SysUnit.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunit
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
@Data
@TableName
(
"sys_unit"
)
public
class
SysUnit
extends
CyIdIncreEntity
<
SysUnit
>
{
/**
* @desc 单位类型 0:企业 1:院校
* @column unit_type
* @default
*/
@Excel
(
name
=
"单位类型 0:企业 1:院校"
,
orderNum
=
"0"
,
width
=
20
)
private
String
unitType
;
/**
* @desc 单位名称
* @column unit_name
* @default
*/
@Excel
(
name
=
"单位名称"
,
orderNum
=
"1"
,
width
=
20
)
private
String
unitName
;
/**
* @desc 管理员账号
* @column unit_number
* @default
*/
@Excel
(
name
=
"管理员账号"
,
orderNum
=
"2"
,
width
=
20
)
private
String
unitNumber
;
/**
* @desc 出口id
* @column exit_id
* @default
*/
@Excel
(
name
=
"出口id"
,
orderNum
=
"3"
,
width
=
20
)
private
String
exitId
;
/**
* @desc 用户id
* @column user_id
* @default
*/
@Excel
(
name
=
"用户id"
,
orderNum
=
"4"
,
width
=
20
)
private
Integer
userId
;
}
src/main/java/org/rcisoft/business/sysunit/service/SysUnitService.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunit
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.sysunit.entity.SysUnit
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
public
interface
SysUnitService
{
/**
* 保存 单位管理
* @param sysUnit
* @return
*/
CyPersistModel
persist
(
SysUnit
sysUnit
);
/**
* 删除 单位管理
* @param sysUnit
* @return
*/
CyPersistModel
remove
(
SysUnit
sysUnit
);
/**
* 逻辑删除 单位管理
* @param sysUnit
* @return
*/
CyPersistModel
removeLogical
(
SysUnit
sysUnit
);
/**
* 修改 单位管理
* @param sysUnit
* @return
*/
CyPersistModel
merge
(
SysUnit
sysUnit
);
/**
* 根据id查询 单位管理
* @param id
* @return
*/
SysUnit
findById
(
int
id
);
/**
* 分页查询 单位管理
* @param sysUnit
* @return
*/
IPage
<
SysUnit
>
findAllByPagination
(
CyPageInfo
<
SysUnit
>
paginationUtility
,
SysUnit
sysUnit
);
/**
* 查询list 单位管理
* @param sysUnit
* @return
*/
List
<
SysUnit
>
findAll
(
SysUnit
sysUnit
);
/**
* 导出单位管理
* @return
*/
List
<
SysUnit
>
export
(
SysUnit
sysUnit
);
}
src/main/java/org/rcisoft/business/sysunit/service/impl/SysUnitServiceImpl.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunit
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.business.sysunit.dao.SysUnitRepository
;
import
org.rcisoft.business.sysunit.entity.SysUnit
;
import
org.rcisoft.business.sysunit.service.SysUnitService
;
import
org.rcisoft.core.service.CyBaseService
;
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
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
SysUnitServiceImpl
extends
ServiceImpl
<
SysUnitRepository
,
SysUnit
>
implements
SysUnitService
{
/**
* 保存 单位管理
* @param sysUnit
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
SysUnit
sysUnit
){
//增加操作
int
line
=
baseMapper
.
insert
(
sysUnit
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
sysUnit
.
getBusinessId
()+
"的单位管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 单位管理
* @param sysUnit
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
SysUnit
sysUnit
){
int
line
=
baseMapper
.
realDelete
(
sysUnit
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
sysUnit
.
getBusinessId
()+
"的单位管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 单位管理
* @param sysUnit
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
SysUnit
sysUnit
){
sysUnit
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
sysUnit
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
sysUnit
.
getBusinessId
()+
"的单位管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 单位管理
* @param sysUnit
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
SysUnit
sysUnit
){
int
line
=
baseMapper
.
updateById
(
sysUnit
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
sysUnit
.
getBusinessId
()+
"的单位管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 单位管理
* @param id
* @return
*/
@Override
public
SysUnit
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询 单位管理
* @param sysUnit
* @return
*/
@Override
public
IPage
<
SysUnit
>
findAllByPagination
(
CyPageInfo
<
SysUnit
>
paginationUtility
,
SysUnit
sysUnit
){
return
baseMapper
.
querySysUnitsPaged
(
paginationUtility
,
sysUnit
);
}
/**
* 查询list 单位管理
* @param sysUnit
* @return
*/
@Override
public
List
<
SysUnit
>
findAll
(
SysUnit
sysUnit
){
return
baseMapper
.
querySysUnits
(
sysUnit
);
}
/**
* 导出单位管理
* @return
*/
@Override
public
List
<
SysUnit
>
export
(
SysUnit
sysUnit
)
{
List
<
SysUnit
>
sysUnitList
=
baseMapper
.
querySysUnits
(
sysUnit
);
return
sysUnitList
;
}
}
src/main/java/org/rcisoft/business/sysunitnews/controller/SysUnitNewsController.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunitnews
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.business.sysunitnews.entity.SysUnitNews
;
import
org.rcisoft.business.sysunitnews.service.SysUnitNewsService
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@RestController
@RequestMapping
(
"/sysunitnews"
)
public
class
SysUnitNewsController
extends
CyPaginationController
<
SysUnitNews
>
{
@Autowired
private
SysUnitNewsService
sysUnitNewsServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:add')")
@CyOpeLogAnno
(
title
=
"system-文章和单位中间表管理-新增文章和单位中间表"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加文章和单位中间表"
,
notes
=
"添加文章和单位中间表"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
SysUnitNews
sysUnitNews
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
sysUnitNewsServiceImpl
.
persist
(
sysUnitNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitNews
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:delete')")
@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
int
businessId
,
SysUnitNews
sysUnitNews
)
{
sysUnitNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysUnitNewsServiceImpl
.
remove
(
sysUnitNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:update')")
@CyOpeLogAnno
(
title
=
"system-文章和单位中间表管理-修改文章和单位中间表"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改文章和单位中间表"
,
notes
=
"修改文章和单位中间表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
SysUnitNews
sysUnitNews
,
BindingResult
bindingResult
)
{
sysUnitNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysUnitNewsServiceImpl
.
merge
(
sysUnitNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitNews
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:query')")
@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
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitNewsServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:list')")
@CyOpeLogAnno
(
title
=
"system-文章和单位中间表管理-查询文章和单位中间表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询文章和单位中间表集合"
,
notes
=
"查询文章和单位中间表集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
SysUnitNews
sysUnitNews
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysUnitNewsServiceImpl
.
findAll
(
sysUnitNews
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:unitNews:list')")
@CyOpeLogAnno
(
title
=
"system-文章和单位中间表管理-查询文章和单位中间表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询文章和单位中间表集合"
,
notes
=
"分页查询文章和单位中间表集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
SysUnitNews
sysUnitNews
)
{
sysUnitNewsServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
sysUnitNews
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-文章和单位中间表管理-查询文章和单位中间表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出文章和单位中间表信息"
,
notes
=
"导出文章和单位中间表信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outSysUnitNews
(
HttpServletResponse
response
,
SysUnitNews
sysUnitNews
,
@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
<
SysUnitNews
>
sysUnitNewsList
=
sysUnitNewsServiceImpl
.
export
(
sysUnitNews
);
CyEpExcelUtil
.
exportExcel
(
sysUnitNewsList
,
"文章和单位中间表信息"
,
"文章和单位中间表信息"
,
SysUnitNews
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/sysunitnews/dao/SysUnitNewsRepository.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunitnews
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.sysunitnews.entity.SysUnitNews
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
public
interface
SysUnitNewsRepository
extends
CyBaseMapper
<
SysUnitNews
>
{
List
<
SysUnitNews
>
querySysUnitNewss
(
@Param
(
"entity"
)
SysUnitNews
sysUnitNews
);
/**
* 分页查询 sysUnitNews
*
*/
IPage
<
SysUnitNews
>
querySysUnitNewssPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
SysUnitNews
sysUnitNews
);
}
src/main/java/org/rcisoft/business/sysunitnews/entity/SysUnitNews.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunitnews
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
org.rcisoft.core.entity.CyIdNotDataEntity
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年6月3日 下午3:35:01.
*/
@Data
@TableName
(
"sys_unit_news"
)
public
class
SysUnitNews
extends
CyIdIncreEntity
<
SysUnitNews
>
{
/**
* @desc 单位id
* @column unit_id
* @default
*/
@Excel
(
name
=
"单位id"
,
orderNum
=
"0"
,
width
=
20
)
private
Integer
unitId
;
/**
* @desc 文章id
* @column news_id
* @default
*/
@Excel
(
name
=
"文章id"
,
orderNum
=
"1"
,
width
=
20
)
private
String
newsId
;
}
src/main/java/org/rcisoft/business/sysunitnews/service/SysUnitNewsService.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunitnews
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.sysunitnews.entity.SysUnitNews
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
public
interface
SysUnitNewsService
{
/**
* 保存 文章和单位中间表
* @param sysUnitNews
* @return
*/
CyPersistModel
persist
(
SysUnitNews
sysUnitNews
);
/**
* 删除 文章和单位中间表
* @param sysUnitNews
* @return
*/
CyPersistModel
remove
(
SysUnitNews
sysUnitNews
);
/**
* 修改 文章和单位中间表
* @param sysUnitNews
* @return
*/
CyPersistModel
merge
(
SysUnitNews
sysUnitNews
);
/**
* 根据id查询 文章和单位中间表
* @param id
* @return
*/
SysUnitNews
findById
(
int
id
);
/**
* 分页查询 文章和单位中间表
* @param sysUnitNews
* @return
*/
IPage
<
SysUnitNews
>
findAllByPagination
(
CyPageInfo
<
SysUnitNews
>
paginationUtility
,
SysUnitNews
sysUnitNews
);
/**
* 查询list 文章和单位中间表
* @param sysUnitNews
* @return
*/
List
<
SysUnitNews
>
findAll
(
SysUnitNews
sysUnitNews
);
/**
* 导出文章和单位中间表
* @return
*/
List
<
SysUnitNews
>
export
(
SysUnitNews
sysUnitNews
);
}
src/main/java/org/rcisoft/business/sysunitnews/service/impl/SysUnitNewsServiceImpl.java
0 → 100644
View file @
8c0ef2be
package
org
.
rcisoft
.
business
.
sysunitnews
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.business.sysunitnews.dao.SysUnitNewsRepository
;
import
org.rcisoft.business.sysunitnews.entity.SysUnitNews
;
import
org.rcisoft.business.sysunitnews.service.SysUnitNewsService
;
import
org.rcisoft.core.service.CyBaseService
;
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
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年6月3日 下午3:35:01.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
SysUnitNewsServiceImpl
extends
ServiceImpl
<
SysUnitNewsRepository
,
SysUnitNews
>
implements
SysUnitNewsService
{
/**
* 保存 文章和单位中间表
* @param sysUnitNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
SysUnitNews
sysUnitNews
){
//增加操作
int
line
=
baseMapper
.
insert
(
sysUnitNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
sysUnitNews
.
getBusinessId
()+
"的文章和单位中间表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 文章和单位中间表
* @param sysUnitNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
SysUnitNews
sysUnitNews
){
int
line
=
baseMapper
.
realDelete
(
sysUnitNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
sysUnitNews
.
getBusinessId
()+
"的文章和单位中间表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 文章和单位中间表
* @param sysUnitNews
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
SysUnitNews
sysUnitNews
){
int
line
=
baseMapper
.
updateById
(
sysUnitNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
sysUnitNews
.
getBusinessId
()+
"的文章和单位中间表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 文章和单位中间表
* @param id
* @return
*/
@Override
public
SysUnitNews
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询 文章和单位中间表
* @param sysUnitNews
* @return
*/
@Override
public
IPage
<
SysUnitNews
>
findAllByPagination
(
CyPageInfo
<
SysUnitNews
>
paginationUtility
,
SysUnitNews
sysUnitNews
){
return
baseMapper
.
querySysUnitNewssPaged
(
paginationUtility
,
sysUnitNews
);
}
/**
* 查询list 文章和单位中间表
* @param sysUnitNews
* @return
*/
@Override
public
List
<
SysUnitNews
>
findAll
(
SysUnitNews
sysUnitNews
){
return
baseMapper
.
querySysUnitNewss
(
sysUnitNews
);
}
/**
* 导出文章和单位中间表
* @return
*/
@Override
public
List
<
SysUnitNews
>
export
(
SysUnitNews
sysUnitNews
)
{
List
<
SysUnitNews
>
sysUnitNewsList
=
baseMapper
.
querySysUnitNewss
(
sysUnitNews
);
return
sysUnitNewsList
;
}
}
src/main/resources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
0 → 100644
View file @
8c0ef2be
<?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.cmsnews.dao.CmsNewsRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
<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=
"TIMESTAMP"
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=
"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"
/>
<result
column=
"news_type"
jdbcType=
"VARCHAR"
property=
"newsType"
/>
<result
column=
"tenant"
jdbcType=
"INTEGER"
property=
"tenant"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryCmsNewss"
resultMap=
"BaseResultMap"
>
select * from cms_news
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<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.title !=null and entity.title != '' "
>
and title like concat('%',#{entity.title},'%')
</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 = #{entity.weight}
</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>
<if
test=
"entity.newsType !=null and entity.newsType != '' "
>
and news_type like concat('%',#{entity.newsType},'%')
</if>
<if
test=
"entity.tenant !=null and entity.tenant != '' "
>
and tenant = #{entity.tenant}
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryCmsNewssPaged"
resultMap=
"BaseResultMap"
>
select * from cms_news
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<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.title !=null and entity.title != '' "
>
and title like concat('%',#{entity.title},'%')
</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 = #{entity.weight}
</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>
<if
test=
"entity.newsType !=null and entity.newsType != '' "
>
and news_type like concat('%',#{entity.newsType},'%')
</if>
<if
test=
"entity.tenant !=null and entity.tenant != '' "
>
and tenant = #{entity.tenant}
</if>
ORDER BY business_id DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/business/cmspriceclick/mapper/CmsPriceClickMapper.xml
0 → 100644
View file @
8c0ef2be
<?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.cmspriceclick.dao.CmsPriceClickRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmspriceclick.entity.CmsPriceClick"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"unit_id"
jdbcType=
"INTEGER"
property=
"unitId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"news_video_id"
jdbcType=
"INTEGER"
property=
"newsVideoId"
/>
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"price"
jdbcType=
"DECIMAL"
property=
"price"
/>
<result
column=
"click_through_rate"
jdbcType=
"INTEGER"
property=
"clickThroughRate"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryCmsPriceClicks"
resultMap=
"BaseResultMap"
>
select * from cms_price_click
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.unitId !=null and entity.unitId != '' "
>
and unit_id = #{entity.unitId}
</if>
<if
test=
"entity.userId !=null and entity.userId != '' "
>
and user_id = #{entity.userId}
</if>
<if
test=
"entity.newsVideoId !=null and entity.newsVideoId != '' "
>
and news_video_id = #{entity.newsVideoId}
</if>
<if
test=
"entity.source !=null and entity.source != '' "
>
and source like concat('%',#{entity.source},'%')
</if>
<if
test=
"entity.price !=null and entity.price != '' "
>
and price = #{entity.price}
</if>
<if
test=
"entity.clickThroughRate !=null and entity.clickThroughRate != '' "
>
and click_through_rate = #{entity.clickThroughRate}
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryCmsPriceClicksPaged"
resultMap=
"BaseResultMap"
>
select * from cms_price_click
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.unitId !=null and entity.unitId != '' "
>
and unit_id = #{entity.unitId}
</if>
<if
test=
"entity.userId !=null and entity.userId != '' "
>
and user_id = #{entity.userId}
</if>
<if
test=
"entity.newsVideoId !=null and entity.newsVideoId != '' "
>
and news_video_id = #{entity.newsVideoId}
</if>
<if
test=
"entity.source !=null and entity.source != '' "
>
and source like concat('%',#{entity.source},'%')
</if>
<if
test=
"entity.price !=null and entity.price != '' "
>
and price = #{entity.price}
</if>
<if
test=
"entity.clickThroughRate !=null and entity.clickThroughRate != '' "
>
and click_through_rate = #{entity.clickThroughRate}
</if>
ORDER BY business_id DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
0 → 100644
View file @
8c0ef2be
<?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.cmsvideo.dao.CmsVideoRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"video_title"
jdbcType=
"VARCHAR"
property=
"videoTitle"
/>
<result
column=
"home_display"
jdbcType=
"VARCHAR"
property=
"homeDisplay"
/>
<result
column=
"default_url"
jdbcType=
"VARCHAR"
property=
"defaultUrl"
/>
<result
column=
"video_url_id"
jdbcType=
"VARCHAR"
property=
"videoUrlId"
/>
<result
column=
"release_time"
jdbcType=
"TIMESTAMP"
property=
"releaseTime"
/>
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"tenant"
jdbcType=
"INTEGER"
property=
"tenant"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryCmsVideos"
resultMap=
"BaseResultMap"
>
select * from cms_video
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.videoTitle !=null and entity.videoTitle != '' "
>
and video_title like concat('%',#{entity.videoTitle},'%')
</if>
<if
test=
"entity.homeDisplay !=null and entity.homeDisplay != '' "
>
and home_display like concat('%',#{entity.homeDisplay},'%')
</if>
<if
test=
"entity.defaultUrl !=null and entity.defaultUrl != '' "
>
and default_url like concat('%',#{entity.defaultUrl},'%')
</if>
<if
test=
"entity.videoUrlId !=null and entity.videoUrlId != '' "
>
and video_url_id like concat('%',#{entity.videoUrlId},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and release_time
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and release_time
<
= #{entity.endTime}
</if>
<if
test=
"entity.source !=null and entity.source != '' "
>
and source like concat('%',#{entity.source},'%')
</if>
<if
test=
"entity.tenant !=null and entity.tenant != '' "
>
and tenant = #{entity.tenant}
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryCmsVideosPaged"
resultMap=
"BaseResultMap"
>
select * from cms_video
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.videoTitle !=null and entity.videoTitle != '' "
>
and video_title like concat('%',#{entity.videoTitle},'%')
</if>
<if
test=
"entity.homeDisplay !=null and entity.homeDisplay != '' "
>
and home_display like concat('%',#{entity.homeDisplay},'%')
</if>
<if
test=
"entity.defaultUrl !=null and entity.defaultUrl != '' "
>
and default_url like concat('%',#{entity.defaultUrl},'%')
</if>
<if
test=
"entity.videoUrlId !=null and entity.videoUrlId != '' "
>
and video_url_id like concat('%',#{entity.videoUrlId},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and release_time
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and release_time
<
= #{entity.endTime}
</if>
<if
test=
"entity.source !=null and entity.source != '' "
>
and source like concat('%',#{entity.source},'%')
</if>
<if
test=
"entity.tenant !=null and entity.tenant != '' "
>
and tenant = #{entity.tenant}
</if>
ORDER BY business_id DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/business/sysunit/mapper/SysUnitMapper.xml
0 → 100644
View file @
8c0ef2be
<?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.sysunit.dao.SysUnitRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.sysunit.entity.SysUnit"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<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=
"unit_type"
jdbcType=
"VARCHAR"
property=
"unitType"
/>
<result
column=
"unit_name"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"unit_number"
jdbcType=
"VARCHAR"
property=
"unitNumber"
/>
<result
column=
"exit_id"
jdbcType=
"VARCHAR"
property=
"exitId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"querySysUnits"
resultMap=
"BaseResultMap"
>
select * from sys_unit
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.unitType !=null and entity.unitType != '' "
>
and unit_type like concat('%',#{entity.unitType},'%')
</if>
<if
test=
"entity.unitName !=null and entity.unitName != '' "
>
and unit_name like concat('%',#{entity.unitName},'%')
</if>
<if
test=
"entity.unitNumber !=null and entity.unitNumber != '' "
>
and unit_number like concat('%',#{entity.unitNumber},'%')
</if>
<if
test=
"entity.exitId !=null and entity.exitId != '' "
>
and exit_id like concat('%',#{entity.exitId},'%')
</if>
<if
test=
"entity.userId !=null and entity.userId != '' "
>
and user_id = #{entity.userId}
</if>
ORDER BY business_id DESC
</select>
<select
id=
"querySysUnitsPaged"
resultMap=
"BaseResultMap"
>
select * from sys_unit
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.unitType !=null and entity.unitType != '' "
>
and unit_type like concat('%',#{entity.unitType},'%')
</if>
<if
test=
"entity.unitName !=null and entity.unitName != '' "
>
and unit_name like concat('%',#{entity.unitName},'%')
</if>
<if
test=
"entity.unitNumber !=null and entity.unitNumber != '' "
>
and unit_number like concat('%',#{entity.unitNumber},'%')
</if>
<if
test=
"entity.exitId !=null and entity.exitId != '' "
>
and exit_id like concat('%',#{entity.exitId},'%')
</if>
<if
test=
"entity.userId !=null and entity.userId != '' "
>
and user_id = #{entity.userId}
</if>
ORDER BY business_id DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/business/sysunitnews/mapper/SysUnitNewsMapper.xml
0 → 100644
View file @
8c0ef2be
<?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.sysunitnews.dao.SysUnitNewsRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.sysunitnews.entity.SysUnitNews"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"unit_id"
jdbcType=
"INTEGER"
property=
"unitId"
/>
<result
column=
"news_id"
jdbcType=
"VARCHAR"
property=
"newsId"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"querySysUnitNewss"
resultMap=
"BaseResultMap"
>
select * from sys_unit_news
where 1=1
<if
test=
"entity.unitId !=null and entity.unitId != '' "
>
and unit_id = #{entity.unitId}
</if>
<if
test=
"entity.newsId !=null and entity.newsId != '' "
>
and news_id like concat('%',#{entity.newsId},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"querySysUnitNewssPaged"
resultMap=
"BaseResultMap"
>
select * from sys_unit_news
where 1=1
<if
test=
"entity.unitId !=null and entity.unitId != '' "
>
and unit_id = #{entity.unitId}
</if>
<if
test=
"entity.newsId !=null and entity.newsId != '' "
>
and news_id like concat('%',#{entity.newsId},'%')
</if>
ORDER BY business_id DESC
</select>
</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