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
74da8c69
Commit
74da8c69
authored
Dec 17, 2024
by
冷玲鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改(新建):banner管理、活动管理、公告管理
parent
f22e2cf6
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1020 additions
and
95 deletions
+1020
-95
CmsActivityController.java
...usiness/cmsActivity/controller/CmsActivityController.java
+29
-29
CmsActivityRepository.java
...isoft/business/cmsActivity/dao/CmsActivityRepository.java
+35
-0
CmsActivity.java
.../org/rcisoft/business/cmsActivity/entity/CmsActivity.java
+3
-3
CmsActivityService.java
...soft/business/cmsActivity/service/CmsActivityService.java
+70
-0
CmsActivityServiceImpl.java
...ness/cmsActivity/service/impl/CmsActivityServiceImpl.java
+164
-0
CmsBannerController.java
...ft/business/cmsBanner/controller/CmsBannerController.java
+3
-3
CmsBannerRepository.java
...g/rcisoft/business/cmsBanner/dao/CmsBannerRepository.java
+2
-2
CmsBanner.java
...java/org/rcisoft/business/cmsBanner/entity/CmsBanner.java
+1
-1
CmsBannerService.java
.../rcisoft/business/cmsBanner/service/CmsBannerService.java
+2
-2
CmsBannerServiceImpl.java
...business/cmsBanner/service/impl/CmsBannerServiceImpl.java
+4
-4
CmsNoticeController.java
...ft/business/cmsNotice/controller/CmsNoticeController.java
+147
-0
CmsNoticeRepository.java
...g/rcisoft/business/cmsNotice/dao/CmsNoticeRepository.java
+35
-0
CmsNotice.java
...java/org/rcisoft/business/cmsNotice/entity/CmsNotice.java
+110
-0
CmsNoticeService.java
.../rcisoft/business/cmsNotice/service/CmsNoticeService.java
+70
-0
CmsNoticeServiceImpl.java
...business/cmsNotice/service/impl/CmsNoticeServiceImpl.java
+164
-0
SysContentNewsInformationRepository.java
...sinformation/dao/SysContentNewsInformationRepository.java
+0
-35
application-dev-conf.yml
src/main/resources/application-dev-conf.yml
+1
-1
CmsActivityMapper.xml
.../mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
+165
-0
CmsNoticeMapper.xml
...rces/mapper/business/cmsNotice.mapper/CmsNoticeMapper.xml
+12
-12
CmsBannerMapper.xml
...r/business/cmsbanner/cmsBanner.mapper/CmsBannerMapper.xml
+3
-3
No files found.
src/main/java/org/rcisoft/business/
syscontentnewsinformation/controller/SysContentNewsInformation
Controller.java
→
src/main/java/org/rcisoft/business/
cmsActivity/controller/CmsActivity
Controller.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
controller
;
package
org
.
rcisoft
.
business
.
cmsActivity
.
controller
;
/*固定导入*/
/*固定导入*/
...
@@ -6,8 +6,8 @@ package org.rcisoft.business.syscontentnewsinformation.controller;
...
@@ -6,8 +6,8 @@ package org.rcisoft.business.syscontentnewsinformation.controller;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.
syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.business.
cmsActivity.entity.CmsActivity
;
import
org.rcisoft.business.
syscontentnewsinformation.service.SysContentNewsInformation
Service
;
import
org.rcisoft.business.
cmsActivity.service.CmsActivity
Service
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.controller.CyPaginationController
;
...
@@ -31,23 +31,23 @@ import java.util.List;
...
@@ -31,23 +31,23 @@ import java.util.List;
* @date 2024年3月25日 下午1:42:40
* @date 2024年3月25日 下午1:42:40
*/
*/
@RestController
@RestController
@RequestMapping
(
"/
syscontentnewsinformation
"
)
@RequestMapping
(
"/
cmsActivity
"
)
public
class
SysContentNewsInformationController
extends
CyPaginationController
<
SysContentNewsInformation
>
{
public
class
CmsActivityController
extends
CyPaginationController
<
CmsActivity
>
{
@Autowired
@Autowired
private
SysContentNewsInformationService
sysContentNewsInformation
ServiceImpl
;
private
CmsActivityService
cmsActivity
ServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:increase')"
)
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:increase')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-新增新闻资讯"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-新增新闻资讯"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加新闻资讯"
,
notes
=
"添加新闻资讯"
)
@ApiOperation
(
value
=
"添加新闻资讯"
,
notes
=
"添加新闻资讯"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
SysContentNewsInformation
sysContentNewsInformation
,
BindingResult
bindingResult
)
{
public
CyResult
add
(
@Valid
CmsActivity
cmsActivity
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
persist
(
sysContentNewsInformation
);
CyPersistModel
data
=
cmsActivityServiceImpl
.
persist
(
cmsActivity
);
return
CyResultGenUtil
.
builder
(
data
,
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
cmsActivity
);
}
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:removing')"
)
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:removing')"
)
...
@@ -55,9 +55,9 @@ public class SysContentNewsInformationController extends CyPaginationController<
...
@@ -55,9 +55,9 @@ public class SysContentNewsInformationController extends CyPaginationController<
@ApiOperation
(
value
=
"删除新闻资讯"
,
notes
=
"删除新闻资讯"
)
@ApiOperation
(
value
=
"删除新闻资讯"
,
notes
=
"删除新闻资讯"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
Integer
businessId
,
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyResult
delete
(
@PathVariable
Integer
businessId
,
CmsActivity
cmsActivity
)
{
sysContentNewsInformation
.
setBusinessId
(
businessId
);
cmsActivity
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
remove
(
sysContentNewsInformation
);
CyPersistModel
data
=
cmsActivityServiceImpl
.
remove
(
cmsActivity
);
return
CyResultGenUtil
.
builder
(
data
,
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
...
@@ -69,13 +69,13 @@ public class SysContentNewsInformationController extends CyPaginationController<
...
@@ -69,13 +69,13 @@ public class SysContentNewsInformationController extends CyPaginationController<
@ApiOperation
(
value
=
"修改新闻资讯"
,
notes
=
"修改新闻资讯"
)
@ApiOperation
(
value
=
"修改新闻资讯"
,
notes
=
"修改新闻资讯"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PostMapping
(
"/update/{businessId:\\w+}"
)
@PostMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
Integer
businessId
,
@Valid
SysContentNewsInformation
sysContentNewsInformation
,
BindingResult
bindingResult
)
{
public
CyResult
update
(
@PathVariable
Integer
businessId
,
@Valid
CmsActivity
cmsActivity
,
BindingResult
bindingResult
)
{
sysContentNewsInformation
.
setBusinessId
(
businessId
);
cmsActivity
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
merge
(
sysContentNewsInformation
);
CyPersistModel
data
=
cmsActivityServiceImpl
.
merge
(
cmsActivity
);
return
CyResultGenUtil
.
builder
(
data
,
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
cmsActivity
);
}
}
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:singleSearch')")
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:singleSearch')")
...
@@ -87,27 +87,27 @@ public class SysContentNewsInformationController extends CyPaginationController<
...
@@ -87,27 +87,27 @@ public class SysContentNewsInformationController extends CyPaginationController<
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
ServiceImpl
.
findById
(
businessId
));
cmsActivity
ServiceImpl
.
findById
(
businessId
));
}
}
//@PreAuthorize("@cyPerm.hasPerm('sys:contentNewsInformation:list')")
//@PreAuthorize("@cyPerm.hasPerm('sys:contentNewsInformation:list')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询新闻资讯集合"
,
notes
=
"查询新闻资讯集合"
)
@ApiOperation
(
value
=
"查询新闻资讯集合"
,
notes
=
"查询新闻资讯集合"
)
@GetMapping
(
value
=
"/query
SysContentNewsInformations
"
)
@GetMapping
(
value
=
"/query
CmsActivity
"
)
public
CyResult
querySysContentNewsInformations
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyResult
querySysContentNewsInformations
(
CmsActivity
cmsActivity
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformationServiceImpl
.
findAll
(
sysContentNewsInformation
));
cmsActivityServiceImpl
.
findAll
(
cmsActivity
));
}
}
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:pageSearch')")
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:pageSearch')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询新闻资讯集合"
,
notes
=
"分页查询新闻资讯集合"
)
@ApiOperation
(
value
=
"分页查询新闻资讯集合"
,
notes
=
"分页查询新闻资讯集合"
)
@GetMapping
(
value
=
"/query
SysContentNewsInformation
ByPagination"
)
@GetMapping
(
value
=
"/query
CmsActivity
ByPagination"
)
public
CyGridModel
listByPagination
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyGridModel
listByPagination
(
CmsActivity
cmsActivity
)
{
sysContentNewsInformationServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
sysContentNewsInformation
);
cmsActivityServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsActivity
);
return
getGridModelResponse
();
return
getGridModelResponse
();
}
}
...
@@ -117,18 +117,18 @@ public class SysContentNewsInformationController extends CyPaginationController<
...
@@ -117,18 +117,18 @@ public class SysContentNewsInformationController extends CyPaginationController<
@ApiOperation
(
value
=
"修改新闻资讯状态"
,
notes
=
"修改新闻资讯状态"
)
@ApiOperation
(
value
=
"修改新闻资讯状态"
,
notes
=
"修改新闻资讯状态"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
"/updateStatus/{businessId:\\w+}"
)
@PostMapping
(
"/updateStatus/{businessId:\\w+}"
)
public
CyResult
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyResult
updateStatus
(
CmsActivity
cmsActivity
)
{
CyPersistModel
data
=
sysContentNewsInformationServiceImpl
.
updateStatus
(
sysContentNewsInformation
);
CyPersistModel
data
=
cmsActivityServiceImpl
.
updateStatus
(
cmsActivity
);
return
CyResultGenUtil
.
builder
(
data
,
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
sysContentNewsInformation
);
cmsActivity
);
}
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:derive')"
)
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:derive')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出新闻资讯信息"
,
notes
=
"导出新闻资讯信息"
)
@ApiOperation
(
value
=
"导出新闻资讯信息"
,
notes
=
"导出新闻资讯信息"
)
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
public
void
outSysContentNewsInformation
(
HttpServletResponse
response
,
SysContentNewsInformation
sysContentNewsInformation
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
public
void
outSysContentNewsInformation
(
HttpServletResponse
response
,
CmsActivity
cmsActivity
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
String
excelName
=
""
;
switch
(
excelId
)
{
switch
(
excelId
)
{
case
"0"
:
case
"0"
:
...
@@ -141,7 +141,7 @@ public class SysContentNewsInformationController extends CyPaginationController<
...
@@ -141,7 +141,7 @@ public class SysContentNewsInformationController extends CyPaginationController<
excelName
=
"新闻资讯信息.csv"
;
excelName
=
"新闻资讯信息.csv"
;
break
;
break
;
}
}
List
<
SysContentNewsInformation
>
sysContentNewsInformationList
=
sysContentNewsInformationServiceImpl
.
export
(
sysContentNewsInformation
);
List
<
CmsActivity
>
cmsActivityList
=
cmsActivityServiceImpl
.
export
(
cmsActivity
);
CyEpExcelUtil
.
exportExcel
(
sysContentNewsInformationList
,
"新闻资讯信息"
,
"新闻资讯信息"
,
SysContentNewsInformation
.
class
,
excelName
,
response
);
CyEpExcelUtil
.
exportExcel
(
cmsActivityList
,
"新闻资讯信息"
,
"新闻资讯信息"
,
CmsActivity
.
class
,
excelName
,
response
);
}
}
}
}
src/main/java/org/rcisoft/business/cmsActivity/dao/CmsActivityRepository.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsActivity
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.cmsActivity.entity.CmsActivity
;
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
CmsActivityRepository
extends
CyBaseMapper
<
CmsActivity
>
{
List
<
CmsActivity
>
queryCmsActivity
(
@Param
(
"entity"
)
CmsActivity
cmsActivity
);
/**
* 分页查询 cmsActivity
*
*/
IPage
<
CmsActivity
>
queryCmsActivityPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsActivity
cmsActivity
);
//根据id逻辑删除
int
deleteCmsActivity
(
@Param
(
"businessId"
)
Integer
businessId
);
//修改状态
int
updateStatus
(
@Param
(
"entity"
)
CmsActivity
cmsActivity
);
CmsActivity
selectById
(
@Param
(
"businessId"
)
Integer
businessId
);
//权重验重
CmsActivity
checkWeight
(
@Param
(
"weight"
)
Integer
weight
);
}
src/main/java/org/rcisoft/business/
syscontentnewsinformation/entity/SysContentNewsInformation
.java
→
src/main/java/org/rcisoft/business/
cmsActivity/entity/CmsActivity
.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
entity
;
package
org
.
rcisoft
.
business
.
cmsActivity
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
...
@@ -17,8 +17,8 @@ import java.util.Date;
...
@@ -17,8 +17,8 @@ import java.util.Date;
* @author wangFeilong
* @author wangFeilong
*/
*/
@Data
@Data
@TableName
(
"cms_
news
"
)
@TableName
(
"cms_
activity
"
)
public
class
SysContentNewsInformation
extends
CyIdIncreEntity
<
SysContentNewsInformation
>
{
public
class
CmsActivity
extends
CyIdIncreEntity
<
CmsActivity
>
{
/**
/**
...
...
src/main/java/org/rcisoft/business/
syscontentnewsinformation/service/SysContentNewsInformation
Service.java
→
src/main/java/org/rcisoft/business/
cmsActivity/service/CmsActivity
Service.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
service
;
package
org
.
rcisoft
.
business
.
cmsActivity
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.
syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.business.
cmsActivity.entity.CmsActivity
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.model.CyPersistModel
;
...
@@ -10,61 +10,61 @@ import java.util.List;
...
@@ -10,61 +10,61 @@ import java.util.List;
/**
/**
* Created by cy on 2024年3月25日 下午1:42:40.
* Created by cy on 2024年3月25日 下午1:42:40.
*/
*/
public
interface
SysContentNewsInformation
Service
{
public
interface
CmsActivity
Service
{
/**
/**
* 保存 新闻资讯
* 保存 新闻资讯
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
CyPersistModel
persist
(
SysContentNewsInformation
sysContentNewsInformation
);
CyPersistModel
persist
(
CmsActivity
cmsActivity
);
/**
/**
* 删除 新闻资讯
* 删除 新闻资讯
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
CyPersistModel
remove
(
SysContentNewsInformation
sysContentNewsInformation
);
CyPersistModel
remove
(
CmsActivity
cmsActivity
);
/**
/**
* 修改 新闻资讯
* 修改 新闻资讯
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
CyPersistModel
merge
(
SysContentNewsInformation
sysContentNewsInformation
);
CyPersistModel
merge
(
CmsActivity
cmsActivity
);
/**
/**
* 根据id查询 新闻资讯
* 根据id查询 新闻资讯
* @param id
* @param id
* @return
* @return
*/
*/
SysContentNewsInformation
findById
(
Integer
id
);
CmsActivity
findById
(
Integer
id
);
/**
/**
* 分页查询 新闻资讯
* 分页查询 新闻资讯
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
IPage
<
SysContentNewsInformation
>
findAllByPagination
(
CyPageInfo
<
SysContentNewsInformation
>
paginationUtility
,
IPage
<
CmsActivity
>
findAllByPagination
(
CyPageInfo
<
CmsActivity
>
paginationUtility
,
SysContentNewsInformation
sysContentNewsInformation
);
CmsActivity
cmsActivity
);
/**
/**
* 查询list 新闻资讯
* 查询list 新闻资讯
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
List
<
SysContentNewsInformation
>
findAll
(
SysContentNewsInformation
sysContentNewsInformation
);
List
<
CmsActivity
>
findAll
(
CmsActivity
cmsActivity
);
/**
/**
* 导出新闻资讯
* 导出新闻资讯
* @return
* @return
*/
*/
List
<
SysContentNewsInformation
>
export
(
SysContentNewsInformation
sysContentNewsInformation
);
List
<
CmsActivity
>
export
(
CmsActivity
cmsActivity
);
/**
/**
* 修改状态
* 修改状态
*/
*/
CyPersistModel
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
);
CyPersistModel
updateStatus
(
CmsActivity
cmsActivity
);
}
}
src/main/java/org/rcisoft/business/
syscontentnewsinformation/service/impl/SysContentNewsInformation
ServiceImpl.java
→
src/main/java/org/rcisoft/business/
cmsActivity/service/impl/CmsActivity
ServiceImpl.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
syscontentnewsinformation
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
cmsActivity
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.
syscontentnewsinformation.dao.SysContentNewsInformation
Repository
;
import
org.rcisoft.business.
cmsActivity.dao.CmsActivity
Repository
;
import
org.rcisoft.business.
syscontentnewsinformation.entity.SysContentNewsInformation
;
import
org.rcisoft.business.
cmsActivity.entity.CmsActivity
;
import
org.rcisoft.business.
syscontentnewsinformation.service.SysContentNewsInformation
Service
;
import
org.rcisoft.business.
cmsActivity.service.CmsActivity
Service
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
...
@@ -27,7 +27,7 @@ import java.util.List;
...
@@ -27,7 +27,7 @@ import java.util.List;
@Service
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
@Slf4j
public
class
SysContentNewsInformationServiceImpl
extends
ServiceImpl
<
SysContentNewsInformationRepository
,
SysContentNewsInformation
>
implements
SysContentNewsInformation
Service
{
public
class
CmsActivityServiceImpl
extends
ServiceImpl
<
CmsActivityRepository
,
CmsActivity
>
implements
CmsActivity
Service
{
@Autowired
@Autowired
private
Global
global
;
private
Global
global
;
...
@@ -40,20 +40,20 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
...
@@ -40,20 +40,20 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
persist
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyPersistModel
persist
(
CmsActivity
cmsActivity
)
{
//增加操作
//增加操作
sysContentNewsInformation
.
setDelFlag
(
"0"
);
cmsActivity
.
setDelFlag
(
"0"
);
//当图片字段没有时增加默认1
//当图片字段没有时增加默认1
if
(
ObjectUtil
.
isNull
(
sysContentNewsInformation
.
getPictureId
()))
{
if
(
ObjectUtil
.
isNull
(
cmsActivity
.
getPictureId
()))
{
sysContentNewsInformation
.
setPictureId
(
global
.
getDEFAULT_NEWS_LOCATION
());
cmsActivity
.
setPictureId
(
global
.
getDEFAULT_NEWS_LOCATION
());
}
}
SysContentNewsInformation
check
=
baseMapper
.
checkWeight
(
sysContentNewsInformation
.
getWeight
());
CmsActivity
check
=
baseMapper
.
checkWeight
(
cmsActivity
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
))
{
if
(
ObjectUtil
.
isNotNull
(
check
))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
}
else
{
int
line
=
baseMapper
.
insert
(
sysContentNewsInformation
);
int
line
=
baseMapper
.
insert
(
cmsActivity
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
cmsActivity
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
}
}
...
@@ -61,36 +61,36 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
...
@@ -61,36 +61,36 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
/**
/**
* 删除 新闻资讯
* 删除 新闻资讯
*
*
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
remove
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyPersistModel
remove
(
CmsActivity
cmsActivity
)
{
int
line
=
baseMapper
.
delete
SysContentNewsInformation
(
sysContentNewsInformation
.
getBusinessId
());
int
line
=
baseMapper
.
delete
CmsActivity
(
cmsActivity
.
getBusinessId
());
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
cmsActivity
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
/**
/**
* 修改 新闻资讯
* 修改 新闻资讯
*
*
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
merge
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyPersistModel
merge
(
CmsActivity
cmsActivity
)
{
//修改文本中的#image
//修改文本中的#image
String
details
=
sysContentNewsInformation
.
getDetails
().
replace
(
"#image"
,
"data:image"
);
String
details
=
cmsActivity
.
getDetails
().
replace
(
"#image"
,
"data:image"
);
sysContentNewsInformation
.
setDetails
(
details
);
cmsActivity
.
setDetails
(
details
);
SysContentNewsInformation
check
=
baseMapper
.
checkWeight
(
sysContentNewsInformation
.
getWeight
());
CmsActivity
check
=
baseMapper
.
checkWeight
(
cmsActivity
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
)
&&
!
check
.
getBusinessId
().
equals
(
sysContentNewsInformation
.
getBusinessId
()))
{
if
(
ObjectUtil
.
isNotNull
(
check
)
&&
!
check
.
getBusinessId
().
equals
(
cmsActivity
.
getBusinessId
()))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
}
else
{
int
line
=
baseMapper
.
updateById
(
sysContentNewsInformation
);
int
line
=
baseMapper
.
updateById
(
cmsActivity
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息"
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
cmsActivity
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
}
}
...
@@ -102,8 +102,8 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
...
@@ -102,8 +102,8 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
* @return
* @return
*/
*/
@Override
@Override
public
SysContentNewsInformation
findById
(
Integer
id
)
{
public
CmsActivity
findById
(
Integer
id
)
{
SysContentNewsInformation
newsInformation
=
baseMapper
.
selectById
(
id
);
CmsActivity
newsInformation
=
baseMapper
.
selectById
(
id
);
if
(
newsInformation
.
getPath
()
!=
null
)
{
if
(
newsInformation
.
getPath
()
!=
null
)
{
newsInformation
.
setPath
(
global
.
getBase_Discovery
()
+
newsInformation
.
getPath
());
newsInformation
.
setPath
(
global
.
getBase_Discovery
()
+
newsInformation
.
getPath
());
}
}
...
@@ -113,33 +113,33 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
...
@@ -113,33 +113,33 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
/**
/**
* 分页查询 新闻资讯
* 分页查询 新闻资讯
*
*
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
@Override
@Override
public
IPage
<
SysContentNewsInformation
>
findAllByPagination
(
CyPageInfo
<
SysContentNewsInformation
>
paginationUtility
,
public
IPage
<
CmsActivity
>
findAllByPagination
(
CyPageInfo
<
CmsActivity
>
paginationUtility
,
SysContentNewsInformation
sysContentNewsInformation
)
{
CmsActivity
cmsActivity
)
{
IPage
<
SysContentNewsInformation
>
sysContentNewsInformationIPage
=
baseMapper
.
querySysContentNewsInformationsPaged
(
paginationUtility
,
sysContentNewsInformation
);
IPage
<
CmsActivity
>
cmsActivityIPage
=
baseMapper
.
queryCmsActivityPaged
(
paginationUtility
,
cmsActivity
);
List
<
SysContentNewsInformation
>
newsInformation
=
sysContentNewsInformation
IPage
.
getRecords
();
List
<
CmsActivity
>
newsInformation
=
cmsActivity
IPage
.
getRecords
();
for
(
SysContentNewsInformation
news
:
newsInformation
)
{
for
(
CmsActivity
news
:
newsInformation
)
{
if
(
news
.
getPath
()
!=
null
)
{
if
(
news
.
getPath
()
!=
null
)
{
news
.
setPath
(
global
.
getBase_Discovery
()
+
news
.
getPath
());
news
.
setPath
(
global
.
getBase_Discovery
()
+
news
.
getPath
());
}
}
}
}
sysContentNewsInformation
IPage
.
setRecords
(
newsInformation
);
cmsActivity
IPage
.
setRecords
(
newsInformation
);
return
sysContentNewsInformation
IPage
;
return
cmsActivity
IPage
;
}
}
/**
/**
* 查询list 新闻资讯
* 查询list 新闻资讯
*
*
* @param
sysContentNewsInformation
* @param
cmsActivity
* @return
* @return
*/
*/
@Override
@Override
public
List
<
SysContentNewsInformation
>
findAll
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
List
<
CmsActivity
>
findAll
(
CmsActivity
cmsActivity
)
{
return
baseMapper
.
query
SysContentNewsInformations
(
sysContentNewsInformation
);
return
baseMapper
.
query
CmsActivity
(
cmsActivity
);
}
}
...
@@ -149,15 +149,15 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
...
@@ -149,15 +149,15 @@ public class SysContentNewsInformationServiceImpl extends ServiceImpl<SysContent
* @return
* @return
*/
*/
@Override
@Override
public
List
<
SysContentNewsInformation
>
export
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
List
<
CmsActivity
>
export
(
CmsActivity
cmsActivity
)
{
List
<
SysContentNewsInformation
>
sysContentNewsInformationList
=
baseMapper
.
querySysContentNewsInformations
(
sysContentNewsInformation
);
List
<
CmsActivity
>
cmsActivityList
=
baseMapper
.
queryCmsActivity
(
cmsActivity
);
return
sysContentNewsInformation
List
;
return
cmsActivity
List
;
}
}
@Override
@Override
public
CyPersistModel
updateStatus
(
SysContentNewsInformation
sysContentNewsInformation
)
{
public
CyPersistModel
updateStatus
(
CmsActivity
cmsActivity
)
{
int
line
=
baseMapper
.
updateStatus
(
sysContentNewsInformation
);
int
line
=
baseMapper
.
updateStatus
(
cmsActivity
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
sysContentNewsInformation
.
getBusinessId
()
+
"的新闻资讯信息状态"
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
cmsActivity
.
getBusinessId
()
+
"的新闻资讯信息状态"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
...
...
src/main/java/org/rcisoft/business/cms
b
anner/controller/CmsBannerController.java
→
src/main/java/org/rcisoft/business/cms
B
anner/controller/CmsBannerController.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cms
b
anner
.
controller
;
package
org
.
rcisoft
.
business
.
cms
B
anner
.
controller
;
/*固定导入*/
/*固定导入*/
...
@@ -6,8 +6,8 @@ package org.rcisoft.business.cmsbanner.controller;
...
@@ -6,8 +6,8 @@ package org.rcisoft.business.cmsbanner.controller;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.cms
b
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
B
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
b
anner.service.CmsBannerService
;
import
org.rcisoft.business.cms
B
anner.service.CmsBannerService
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.controller.CyPaginationController
;
...
...
src/main/java/org/rcisoft/business/cms
b
anner/dao/CmsBannerRepository.java
→
src/main/java/org/rcisoft/business/cms
B
anner/dao/CmsBannerRepository.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cms
b
anner
.
dao
;
package
org
.
rcisoft
.
business
.
cms
B
anner
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.cms
b
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
B
anner.entity.CmsBanner
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
...
...
src/main/java/org/rcisoft/business/cms
b
anner/entity/CmsBanner.java
→
src/main/java/org/rcisoft/business/cms
B
anner/entity/CmsBanner.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cms
b
anner
.
entity
;
package
org
.
rcisoft
.
business
.
cms
B
anner
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
...
...
src/main/java/org/rcisoft/business/cms
b
anner/service/CmsBannerService.java
→
src/main/java/org/rcisoft/business/cms
B
anner/service/CmsBannerService.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cms
b
anner
.
service
;
package
org
.
rcisoft
.
business
.
cms
B
anner
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.cms
b
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
B
anner.entity.CmsBanner
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.model.CyPersistModel
;
...
...
src/main/java/org/rcisoft/business/cms
b
anner/service/impl/CmsBannerServiceImpl.java
→
src/main/java/org/rcisoft/business/cms
B
anner/service/impl/CmsBannerServiceImpl.java
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cms
b
anner
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
cms
B
anner
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.cms
b
anner.dao.CmsBannerRepository
;
import
org.rcisoft.business.cms
B
anner.dao.CmsBannerRepository
;
import
org.rcisoft.business.cms
b
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
B
anner.entity.CmsBanner
;
import
org.rcisoft.business.cms
b
anner.service.CmsBannerService
;
import
org.rcisoft.business.cms
B
anner.service.CmsBannerService
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.model.CyPersistModel
;
...
...
src/main/java/org/rcisoft/business/cmsNotice/controller/CmsNoticeController.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsNotice
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.cmsNotice.entity.CmsNotice
;
import
org.rcisoft.business.cmsNotice.service.CmsNoticeService
;
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
(
"/cmsNotice"
)
public
class
CmsNoticeController
extends
CyPaginationController
<
CmsNotice
>
{
@Autowired
private
CmsNoticeService
cmsNoticeServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:increase')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-新增新闻资讯"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加新闻资讯"
,
notes
=
"添加新闻资讯"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
CmsNotice
cmsNotice
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
cmsNoticeServiceImpl
.
persist
(
cmsNotice
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNotice
);
}
@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
,
CmsNotice
cmsNotice
)
{
cmsNotice
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNoticeServiceImpl
.
remove
(
cmsNotice
);
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
CmsNotice
cmsNotice
,
BindingResult
bindingResult
)
{
cmsNotice
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNoticeServiceImpl
.
merge
(
cmsNotice
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNotice
);
}
// @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
,
cmsNoticeServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:contentNewsInformation:list')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询新闻资讯集合"
,
notes
=
"查询新闻资讯集合"
)
@GetMapping
(
value
=
"/queryCmsNotice"
)
public
CyResult
querySysContentNewsInformations
(
CmsNotice
cmsNotice
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNoticeServiceImpl
.
findAll
(
cmsNotice
));
}
// @PreAuthorize("@cyPerm.hasPerm('cms:newsmanagement:pageSearch')")
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询新闻资讯集合"
,
notes
=
"分页查询新闻资讯集合"
)
@GetMapping
(
value
=
"/queryCmsNoticeByPagination"
)
public
CyGridModel
listByPagination
(
CmsNotice
cmsNotice
)
{
cmsNoticeServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsNotice
);
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
(
CmsNotice
cmsNotice
)
{
CyPersistModel
data
=
cmsNoticeServiceImpl
.
updateStatus
(
cmsNotice
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNotice
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:newsmanagement:derive')"
)
@CyOpeLogAnno
(
title
=
"system-新闻资讯管理-查询新闻资讯"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出新闻资讯信息"
,
notes
=
"导出新闻资讯信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outSysContentNewsInformation
(
HttpServletResponse
response
,
CmsNotice
cmsNotice
,
@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
<
CmsNotice
>
cmsNoticeList
=
cmsNoticeServiceImpl
.
export
(
cmsNotice
);
CyEpExcelUtil
.
exportExcel
(
cmsNoticeList
,
"新闻资讯信息"
,
"新闻资讯信息"
,
CmsNotice
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/cmsNotice/dao/CmsNoticeRepository.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsNotice
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.cmsNotice.entity.CmsNotice
;
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
CmsNoticeRepository
extends
CyBaseMapper
<
CmsNotice
>
{
List
<
CmsNotice
>
queryCmsNotice
(
@Param
(
"entity"
)
CmsNotice
cmsNotice
);
/**
* 分页查询 cmsActivity
*
*/
IPage
<
CmsNotice
>
queryCmsNoticePaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsNotice
cmsActivity
);
//根据id逻辑删除
int
deleteCmsNotice
(
@Param
(
"businessId"
)
Integer
businessId
);
//修改状态
int
updateStatus
(
@Param
(
"entity"
)
CmsNotice
cmsActivity
);
CmsNotice
selectById
(
@Param
(
"businessId"
)
Integer
businessId
);
//权重验重
CmsNotice
checkWeight
(
@Param
(
"weight"
)
Integer
weight
);
}
src/main/java/org/rcisoft/business/cmsNotice/entity/CmsNotice.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsNotice
.
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_notice"
)
public
class
CmsNotice
extends
CyIdIncreEntity
<
CmsNotice
>
{
/**
* @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/cmsNotice/service/CmsNoticeService.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsNotice
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.cmsNotice.entity.CmsNotice
;
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
CmsNoticeService
{
/**
* 保存 新闻资讯
* @param cmsNotice
* @return
*/
CyPersistModel
persist
(
CmsNotice
cmsNotice
);
/**
* 删除 新闻资讯
* @param cmsNotice
* @return
*/
CyPersistModel
remove
(
CmsNotice
cmsNotice
);
/**
* 修改 新闻资讯
* @param cmsNotice
* @return
*/
CyPersistModel
merge
(
CmsNotice
cmsNotice
);
/**
* 根据id查询 新闻资讯
* @param id
* @return
*/
CmsNotice
findById
(
Integer
id
);
/**
* 分页查询 新闻资讯
* @param cmsNotice
* @return
*/
IPage
<
CmsNotice
>
findAllByPagination
(
CyPageInfo
<
CmsNotice
>
paginationUtility
,
CmsNotice
cmsNotice
);
/**
* 查询list 新闻资讯
* @param cmsNotice
* @return
*/
List
<
CmsNotice
>
findAll
(
CmsNotice
cmsNotice
);
/**
* 导出新闻资讯
* @return
*/
List
<
CmsNotice
>
export
(
CmsNotice
cmsNotice
);
/**
* 修改状态
*/
CyPersistModel
updateStatus
(
CmsNotice
cmsNotice
);
}
src/main/java/org/rcisoft/business/cmsNotice/service/impl/CmsNoticeServiceImpl.java
0 → 100644
View file @
74da8c69
package
org
.
rcisoft
.
business
.
cmsNotice
.
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.cmsNotice.dao.CmsNoticeRepository
;
import
org.rcisoft.business.cmsNotice.entity.CmsNotice
;
import
org.rcisoft.business.cmsNotice.service.CmsNoticeService
;
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
CmsNoticeServiceImpl
extends
ServiceImpl
<
CmsNoticeRepository
,
CmsNotice
>
implements
CmsNoticeService
{
@Autowired
private
Global
global
;
/**
* 保存 新闻资讯
*
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CmsNotice
cmsNotice
)
{
//增加操作
cmsNotice
.
setDelFlag
(
"0"
);
//当图片字段没有时增加默认1
if
(
ObjectUtil
.
isNull
(
cmsNotice
.
getPictureId
()))
{
cmsNotice
.
setPictureId
(
global
.
getDEFAULT_NEWS_LOCATION
());
}
CmsNotice
check
=
baseMapper
.
checkWeight
(
cmsNotice
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
int
line
=
baseMapper
.
insert
(
cmsNotice
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
cmsNotice
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
}
/**
* 删除 新闻资讯
*
* @param cmsNotice
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
CmsNotice
cmsNotice
)
{
int
line
=
baseMapper
.
deleteCmsNotice
(
cmsNotice
.
getBusinessId
());
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
cmsNotice
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 新闻资讯
*
* @param cmsNotice
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CmsNotice
cmsNotice
)
{
//修改文本中的#image
String
details
=
cmsNotice
.
getDetails
().
replace
(
"#image"
,
"data:image"
);
cmsNotice
.
setDetails
(
details
);
CmsNotice
check
=
baseMapper
.
checkWeight
(
cmsNotice
.
getWeight
());
if
(
ObjectUtil
.
isNotNull
(
check
)
&&
!
check
.
getBusinessId
().
equals
(
cmsNotice
.
getBusinessId
()))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
int
line
=
baseMapper
.
updateById
(
cmsNotice
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
cmsNotice
.
getBusinessId
()
+
"的新闻资讯信息"
);
return
new
CyPersistModel
(
line
);
}
}
/**
* 根据id查询 新闻资讯
*
* @param id
* @return
*/
@Override
public
CmsNotice
findById
(
Integer
id
)
{
CmsNotice
newsInformation
=
baseMapper
.
selectById
(
id
);
if
(
newsInformation
.
getPath
()
!=
null
)
{
newsInformation
.
setPath
(
global
.
getBase_Discovery
()
+
newsInformation
.
getPath
());
}
return
newsInformation
;
}
/**
* 分页查询 新闻资讯
*
* @param cmsNotice
* @return
*/
@Override
public
IPage
<
CmsNotice
>
findAllByPagination
(
CyPageInfo
<
CmsNotice
>
paginationUtility
,
CmsNotice
cmsNotice
)
{
IPage
<
CmsNotice
>
cmsNoticeIPage
=
baseMapper
.
queryCmsNoticePaged
(
paginationUtility
,
cmsNotice
);
List
<
CmsNotice
>
newsInformation
=
cmsNoticeIPage
.
getRecords
();
for
(
CmsNotice
news
:
newsInformation
)
{
if
(
news
.
getPath
()
!=
null
)
{
news
.
setPath
(
global
.
getBase_Discovery
()
+
news
.
getPath
());
}
}
cmsNoticeIPage
.
setRecords
(
newsInformation
);
return
cmsNoticeIPage
;
}
/**
* 查询list 新闻资讯
*
* @param cmsNotice
* @return
*/
@Override
public
List
<
CmsNotice
>
findAll
(
CmsNotice
cmsNotice
)
{
return
baseMapper
.
queryCmsNotice
(
cmsNotice
);
}
/**
* 导出新闻资讯
*
* @return
*/
@Override
public
List
<
CmsNotice
>
export
(
CmsNotice
cmsNotice
)
{
List
<
CmsNotice
>
cmsNoticeList
=
baseMapper
.
queryCmsNotice
(
cmsNotice
);
return
cmsNoticeList
;
}
@Override
public
CyPersistModel
updateStatus
(
CmsNotice
cmsNotice
)
{
int
line
=
baseMapper
.
updateStatus
(
cmsNotice
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
cmsNotice
.
getBusinessId
()
+
"的新闻资讯信息状态"
);
return
new
CyPersistModel
(
line
);
}
}
src/main/java/org/rcisoft/business/syscontentnewsinformation/dao/SysContentNewsInformationRepository.java
deleted
100644 → 0
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/resources/application-dev-conf.yml
View file @
74da8c69
...
@@ -56,7 +56,7 @@ cy_db:
...
@@ -56,7 +56,7 @@ cy_db:
# port: 20072
# port: 20072
# username: root
# username: root
# password: root
# password: root
db
:
c
ust
db
:
c
y
cy
:
cy
:
...
...
src/main/resources/mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
0 → 100644
View file @
74da8c69
<?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.cmsActivity.dao.CmsActivityRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cmsActivity.entity.CmsActivity"
>
<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=
"queryCmsActivity"
resultMap=
"BaseResultMap"
>
select * from cms_activity
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=
"queryCmsActivityPaged"
resultMap=
"BaseResultMap"
>
SELECT ca.business_id,
ca.release_date,
ca.plate,
ca.create_by,
ca.create_date,
ca.update_by,
ca.del_flag,
ca.flag,
ca.remarks,
ca.title,
ca.unit,
ca.weight,
ca.picture_id,
ca.is_fornt_page,
ca.is_recommended,
ca.is_top,
su.nick_name as nickName,
oi.path
FROM cms_activity ca
LEFT JOIN oss_info oi on oi.business_id = ca.picture_id
LEFT JOIN sys_user su on su.business_id = ca.create_by
where ca.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 ca.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 ca.release_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null "
>
and ca.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 ca.release_date DESC
</select>
<update
id=
"deleteCmsActivity"
parameterType=
"java.lang.Integer"
>
update cms_activity
set del_flag = '1'
where business_id = #{businessId}
</update>
<update
id=
"updateStatus"
parameterType=
"org.rcisoft.business.cmsActivity.entity.CmsActivity"
>
update cms_activity
set flag = #{ entity.flag}
where business_id = #{entity.businessId}
</update>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select ca.*,
oi.path
from cms_activity ca
left join oss_info oi on oi.business_id = ca.picture_id
where ca.business_id = #{businessId}
</select>
<select
id=
"checkWeight"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select * from cms_activity
where 1=1
and del_flag = '0'
and weight = #{weight}
</select>
</mapper>
src/main/resources/mapper/business/
syscontentnewsinformation.mapper/SysContentNewsInformation
Mapper.xml
→
src/main/resources/mapper/business/
cmsNotice.mapper/CmsNotice
Mapper.xml
View file @
74da8c69
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!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.SysContentNewsInformation
Repository"
>
<mapper
namespace=
"org.rcisoft.business.
cmsNotice.dao.CmsNotice
Repository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.
syscontentnewsinformation.entity.SysContentNewsInformation
"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.
cmsNotice.entity.CmsNotice
"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"release_date"
jdbcType=
"DATE"
property=
"releaseDate"
/>
<result
column=
"release_date"
jdbcType=
"DATE"
property=
"releaseDate"
/>
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
</resultMap>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"query
SysContentNewsInformations
"
resultMap=
"BaseResultMap"
>
<select
id=
"query
CmsNotice
"
resultMap=
"BaseResultMap"
>
select * from cms_n
ews
select * from cms_n
otice
where 1=1
where 1=1
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and release_date
>
= #{entity.beginTime}
and release_date
>
= #{entity.beginTime}
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
ORDER BY business_id DESC
ORDER BY business_id DESC
</select>
</select>
<select
id=
"query
SysContentNewsInformations
Paged"
resultMap=
"BaseResultMap"
>
<select
id=
"query
CmsNotice
Paged"
resultMap=
"BaseResultMap"
>
SELECT cn.business_id,
SELECT cn.business_id,
cn.release_date,
cn.release_date,
cn.plate,
cn.plate,
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
cn.is_top,
cn.is_top,
su.nick_name as nickName,
su.nick_name as nickName,
oi.path
oi.path
FROM cms_n
ews
cn
FROM cms_n
otice
cn
LEFT JOIN oss_info oi on oi.business_id = cn.picture_id
LEFT JOIN oss_info oi on oi.business_id = cn.picture_id
LEFT JOIN sys_user su on su.business_id = cn.create_by
LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0'
where cn.del_flag='0'
...
@@ -138,26 +138,26 @@
...
@@ -138,26 +138,26 @@
</if>
</if>
ORDER BY cn.release_date DESC
ORDER BY cn.release_date DESC
</select>
</select>
<update
id=
"delete
SysContentNewsInformation
"
parameterType=
"java.lang.Integer"
>
<update
id=
"delete
CmsNotice
"
parameterType=
"java.lang.Integer"
>
update cms_n
ews
update cms_n
otice
set del_flag = '1'
set del_flag = '1'
where business_id = #{businessId}
where business_id = #{businessId}
</update>
</update>
<update
id=
"updateStatus"
parameterType=
"org.rcisoft.business.
syscontentnewsinformation.entity.SysContentNewsInformation
"
>
<update
id=
"updateStatus"
parameterType=
"org.rcisoft.business.
cmsNotice.entity.CmsNotice
"
>
update cms_n
ews
update cms_n
otice
set flag = #{ entity.flag}
set flag = #{ entity.flag}
where business_id = #{entity.businessId}
where business_id = #{entity.businessId}
</update>
</update>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select cn.*,
select cn.*,
oi.path
oi.path
from cms_n
ews
cn
from cms_n
otice
cn
left join oss_info oi on oi.business_id = cn.picture_id
left join oss_info oi on oi.business_id = cn.picture_id
where cn.business_id = #{businessId}
where cn.business_id = #{businessId}
</select>
</select>
<select
id=
"checkWeight"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
<select
id=
"checkWeight"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select * from cms_n
ews
select * from cms_n
otice
where 1=1
where 1=1
and del_flag = '0'
and del_flag = '0'
and weight = #{weight}
and weight = #{weight}
...
...
src/main/resources/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
→
src/main/resources/mapper/business/cmsbanner/
cmsBanner.
mapper/CmsBannerMapper.xml
View file @
74da8c69
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.rcisoft.business.cms
b
anner.dao.CmsBannerRepository"
>
<mapper
namespace=
"org.rcisoft.business.cms
B
anner.dao.CmsBannerRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cms
b
anner.entity.CmsBanner"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.cms
B
anner.entity.CmsBanner"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"banner_picture"
jdbcType=
"VARCHAR"
property=
"bannerPicture"
/>
<result
column=
"banner_picture"
jdbcType=
"VARCHAR"
property=
"bannerPicture"
/>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</if>
</if>
ORDER BY smb.weight DESC
ORDER BY smb.weight DESC
</select>
</select>
<select
id=
"selectByIdWithUrl"
resultType=
"org.rcisoft.business.cms
b
anner.entity.CmsBanner"
>
<select
id=
"selectByIdWithUrl"
resultType=
"org.rcisoft.business.cms
B
anner.entity.CmsBanner"
>
SELECT smb.*,
SELECT smb.*,
oi.url
oi.url
FROM cms_banner smb
FROM cms_banner smb
...
...
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