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
057f31a7
Commit
057f31a7
authored
Dec 31, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改动态
parent
4d1ba464
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
687 additions
and
1 deletion
+687
-1
opmArticleDTO.java
...va/org/rcisoft/business/memInfo/entity/opmArticleDTO.java
+1
-1
OpmArticleController.java
.../business/opmArticle/controller/OpmArticleController.java
+138
-0
OpmArticleRepository.java
...rcisoft/business/opmArticle/dao/OpmArticleRepository.java
+35
-0
ArticleCommentDTO.java
...rcisoft/business/opmArticle/entity/ArticleCommentDTO.java
+35
-0
OpmArticle.java
...va/org/rcisoft/business/opmArticle/entity/OpmArticle.java
+108
-0
OpmArticleService.java
...cisoft/business/opmArticle/service/OpmArticleService.java
+74
-0
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+147
-0
OpmArticleMapper.xml
...es/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
+149
-0
No files found.
src/main/java/org/rcisoft/business/memInfo/entity/opmArticleDTO.java
View file @
057f31a7
...
@@ -15,7 +15,7 @@ public class opmArticleDTO extends CyIdIncreEntity<opmArticleDTO> {
...
@@ -15,7 +15,7 @@ public class opmArticleDTO extends CyIdIncreEntity<opmArticleDTO> {
/**
/**
* 发布人
* 发布人
*/
*/
private
Integer
createUser
;
private
String
createUser
;
/**
/**
* 发布时间
* 发布时间
...
...
src/main/java/org/rcisoft/business/opmArticle/controller/OpmArticleController.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
controller
;
/*固定导入*/
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.Parameters
;
import
jakarta.servlet.http.HttpServletResponse
;
import
org.rcisoft.business.opmArticle.entity.OpmArticle
;
import
org.rcisoft.business.opmArticle.service.OpmArticleService
;
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.validation.Valid
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
@RestController
@RequestMapping
(
"/opmarticle"
)
public
class
OpmArticleController
extends
CyPaginationController
<
OpmArticle
>
{
@Autowired
private
OpmArticleService
opmArticleServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:increase')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-新增banner管理"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@Operation
(
summary
=
"添加banner管理"
,
description
=
"添加banner管理"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
OpmArticle
opmArticle
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
opmArticleServiceImpl
.
persist
(
opmArticle
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
opmArticle
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:removing')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-删除banner管理"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@Operation
(
summary
=
"逻辑删除banner管理"
,
description
=
"逻辑删除banner管理"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
deleteLogical
(
@PathVariable
String
businessId
,
OpmArticle
opmArticle
)
{
opmArticle
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
removeLogical
(
opmArticle
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:banner:delete')")
@CyOpeLogAnno
(
title
=
"system-banner管理管理-删除banner管理"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@Operation
(
summary
=
"删除banner管理"
,
description
=
"删除banner管理"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
String
businessId
,
OpmArticle
opmArticle
)
{
opmArticle
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
remove
(
opmArticle
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:modifications')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-修改banner管理"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@Operation
(
summary
=
"修改banner管理"
,
description
=
"修改banner管理"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
false
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
String
businessId
,
@Valid
OpmArticle
opmArticle
,
BindingResult
bindingResult
)
{
opmArticle
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
merge
(
opmArticle
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
opmArticle
);
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:singleSearch')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询单一banner管理"
,
description
=
"查询单一banner管理"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
String
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
opmArticleServiceImpl
.
findById
(
businessId
));
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:search')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询banner管理集合"
,
description
=
"查询banner管理集合"
)
@GetMapping
(
value
=
"/queryOpmArticle"
)
public
CyResult
queryCmsBanners
(
OpmArticle
opmArticle
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
opmArticleServiceImpl
.
findAll
(
opmArticle
));
}
// @PreAuthorize("@cyPerm.hasPerm('cms:banner:pageSearch')")
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"分页查询banner管理集合"
,
description
=
"分页查询banner管理集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
OpmArticle
opmArticle
)
{
opmArticleServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
opmArticle
);
return
getGridModelResponse
();
}
@PreAuthorize
(
"@cyPerm.hasPerm('cms:banner:derive')"
)
@CyOpeLogAnno
(
title
=
"system-banner管理管理-查询banner管理"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@Operation
(
summary
=
"导出banner管理信息"
,
description
=
"导出banner管理信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outCmsBanner
(
HttpServletResponse
response
,
OpmArticle
opmArticle
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
){
case
"0"
:
excelName
=
"banner管理信息.xls"
;
break
;
case
"1"
:
excelName
=
"banner管理信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"banner管理信息.csv"
;
break
;
}
List
<
OpmArticle
>
opmArticleList
=
opmArticleServiceImpl
.
export
(
opmArticle
);
CyEpExcelUtil
.
exportExcel
(
opmArticleList
,
"banner管理信息"
,
"banner管理信息"
,
OpmArticle
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/business/opmArticle/dao/OpmArticleRepository.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.cmsBanner.entity.CmsBanner
;
import
org.rcisoft.business.opmArticle.entity.ArticleCommentDTO
;
import
org.rcisoft.business.opmArticle.entity.OpmArticle
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created with cy on 2024年3月30日 下午1:51:15.
*/
public
interface
OpmArticleRepository
extends
CyBaseMapper
<
OpmArticle
>
{
List
<
OpmArticle
>
queryOpmArticle
(
@Param
(
"entity"
)
OpmArticle
cmsBanner
);
/**
* 分页查询 cmsBanner
*
*/
IPage
<
OpmArticle
>
queryOpmArticlePaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
OpmArticle
cmsBanner
);
OpmArticle
selectByIdWithUrl
(
String
id
);
List
<
ArticleCommentDTO
>
SelectArticleComment
(
Integer
businessId
);
}
src/main/java/org/rcisoft/business/opmArticle/entity/ArticleCommentDTO.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
entity
;
import
lombok.Data
;
@Data
public
class
ArticleCommentDTO
{
/**
* 业务Id
*/
Integer
businessId
;
/**
* 会员编号
*/
String
memCode
;
/**
* 评论内容
*/
String
content
;
/**
* 父级Id
*/
Integer
parentId
;
/**
* 用户头像
*/
String
path
;
}
src/main/java/org/rcisoft/business/opmArticle/entity/OpmArticle.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
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.JsonIgnore
;
import
lombok.Data
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
java.util.List
;
/**
* Created with cy on 2024年3月30日 下午1:51:15.
*/
@Data
@TableName
(
"opm_article"
)
public
class
OpmArticle
extends
CyIdIncreEntity
<
OpmArticle
>
{
/**
* @desc 图片
* @column picture_id
* @default
*/
private
Integer
pictureId
;
/**
* @desc 内容
* @column content
* @default
*/
private
String
content
;
/**
* @desc 评论数
* @column comment_count
* @default
*/
private
Integer
commentCount
;
/**
* @desc 点赞数
* @column like_count
* @default
*/
private
Integer
likeCount
;
/**
* @desc 审核状态
* @column exam_status
* @default
*/
private
String
examStatus
;
/**
* @desc 是否动态
* @column is_article
* @default
*/
private
String
isArticle
;
/**
* @desc 话题Id
* @column topic_id
* @default
*/
private
Integer
topicId
;
/**
* 图片地址
*/
@TableField
(
exist
=
false
)
private
String
path
;
/**
* 话题名称
*/
@TableField
(
exist
=
false
)
private
String
topic
;
/**
* 创建人会员号
*/
@TableField
(
exist
=
false
)
private
String
memCode
;
/**
* 开始时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
beginTime
;
/**
* 结束时间
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
String
endTime
;
/**
* 评论列表
*/
@TableField
(
exist
=
false
)
List
<
ArticleCommentDTO
>
articleCommentDTOList
;
}
src/main/java/org/rcisoft/business/opmArticle/service/OpmArticleService.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.rcisoft.business.cmsBanner.entity.CmsBanner
;
import
org.rcisoft.business.opmArticle.entity.OpmArticle
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
public
interface
OpmArticleService
{
/**
* 保存 opmArticle管理
* @param opmArticle
* @return
*/
CyPersistModel
persist
(
OpmArticle
opmArticle
);
/**
* 删除 opmArticle管理
* @param opmArticle
* @return
*/
CyPersistModel
remove
(
OpmArticle
opmArticle
);
/**
* 逻辑删除 opmArticle管理
* @param opmArticle
* @return
*/
CyPersistModel
removeLogical
(
OpmArticle
opmArticle
);
/**
* 修改 opmArticle管理
* @param opmArticle
* @return
*/
CyPersistModel
merge
(
OpmArticle
opmArticle
);
/**
* 根据id查询 opmArticle管理
* @param id
* @return
*/
OpmArticle
findById
(
String
id
);
/**
* 分页查询 opmArticle管理
* @param opmArticle
* @return
*/
IPage
<
OpmArticle
>
findAllByPagination
(
CyPageInfo
<
OpmArticle
>
paginationUtility
,
OpmArticle
opmArticle
);
/**
* 查询list opmArticle管理
* @param opmArticle
* @return
*/
List
<
OpmArticle
>
findAll
(
OpmArticle
opmArticle
);
/**
* 导出opmArticle管理
* @return
*/
List
<
OpmArticle
>
export
(
OpmArticle
opmArticle
);
}
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
0 → 100644
View file @
057f31a7
package
org
.
rcisoft
.
business
.
opmArticle
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.opmArticle.dao.OpmArticleRepository
;
import
org.rcisoft.business.opmArticle.entity.ArticleCommentDTO
;
import
org.rcisoft.business.opmArticle.entity.OpmArticle
;
import
org.rcisoft.business.opmArticle.service.OpmArticleService
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by cy on 2024年3月30日 下午1:51:15.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
OpmArticleServiceImpl
extends
ServiceImpl
<
OpmArticleRepository
,
OpmArticle
>
implements
OpmArticleService
{
@Autowired
private
Global
global
;
/**
* 保存 opmArticle管理
* @param opmArticle
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
OpmArticle
opmArticle
){
//增加操作
int
line
=
baseMapper
.
insert
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 opmArticle管理
* @param opmArticle
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
OpmArticle
opmArticle
){
int
line
=
baseMapper
.
realDelete
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除 opmArticle管理
* @param opmArticle
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
OpmArticle
opmArticle
){
opmArticle
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 opmArticle管理
* @param opmArticle
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
OpmArticle
opmArticle
){
int
line
=
baseMapper
.
updateById
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 opmArticle管理
* @param id
* @return
*/
@Override
public
OpmArticle
findById
(
String
id
){
OpmArticle
opmArticle
=
baseMapper
.
selectByIdWithUrl
(
id
);
if
(
opmArticle
.
getPath
()!=
null
){
opmArticle
.
setPath
(
global
.
getBase_Discovery
()+
opmArticle
.
getPath
());
}
List
<
ArticleCommentDTO
>
list
=
baseMapper
.
SelectArticleComment
(
opmArticle
.
getBusinessId
());
opmArticle
.
setArticleCommentDTOList
(
list
);
return
opmArticle
;
}
/**
* 分页查询 opmArticle管理
* @param opmArticle
* @return
*/
@Override
public
IPage
<
OpmArticle
>
findAllByPagination
(
CyPageInfo
<
OpmArticle
>
paginationUtility
,
OpmArticle
opmArticle
){
IPage
<
OpmArticle
>
result
=
baseMapper
.
queryOpmArticlePaged
(
paginationUtility
,
opmArticle
);
List
<
OpmArticle
>
opmArticleList
=
result
.
getRecords
();
for
(
OpmArticle
article
:
opmArticleList
){
if
(
article
.
getPath
()!=
null
){
article
.
setPath
(
global
.
getBase_Discovery
()+
article
.
getPath
());
}
}
return
result
;
}
/**
* 查询list opmArticle管理
* @param opmArticle
* @return
*/
@Override
public
List
<
OpmArticle
>
findAll
(
OpmArticle
opmArticle
){
return
baseMapper
.
queryOpmArticle
(
opmArticle
);
}
/**
* 导出opmArticle管理
* @return
*/
@Override
public
List
<
OpmArticle
>
export
(
OpmArticle
opmArticle
)
{
List
<
OpmArticle
>
opmArticleList
=
baseMapper
.
queryOpmArticle
(
opmArticle
);
return
opmArticleList
;
}
}
src/main/resources/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
0 → 100644
View file @
057f31a7
<?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.opmArticle.dao.OpmArticleRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.opmArticle.entity.OpmArticle"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"picture_id"
jdbcType=
"INTEGER"
property=
"pictureId"
/>
<result
column=
"comment_count"
jdbcType=
"VARCHAR"
property=
"commentCount"
/>
<result
column=
"like_count"
jdbcType=
"VARCHAR"
property=
"likeCount"
/>
<result
column=
"topic_id"
jdbcType=
"INTEGER"
property=
"topicId"
/>
<result
column=
"exam_status"
jdbcType=
"VARCHAR"
property=
"examStatus"
/>
<result
column=
"is_article"
jdbcType=
"VARCHAR"
property=
"isArticle"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryOpmArticle"
resultMap=
"BaseResultMap"
>
select opa.*,oi.path,sot.topic_name as topic,mi.mem_code as memCode
from opm_article opa
left join oss_info oi on opa.picture_id = oi.business_id
left join opm_topic sot on opa.topic_id = sot.business_id
left join mem_info mi on opa.create_by = mi.user_id
where 1=1
and opa.del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and opa.flag = #{entity.flag}
</if>
<if
test=
"entity.isArticle !=null and entity.isArticle != '' "
>
and opa.is_article = #{entity.isArticle}
</if>
<if
test=
"entity.topicId !=null and entity.topicId != '' "
>
and opa.topic_id = #{entity.topicId}
</if>
<if
test=
"entity.businessId !=null and entity.businessId != '' "
>
and opa.business_id = #{entity.businessId}
</if>
<if
test=
"entity.examStatus !=null and entity.examStatus != '' "
>
and opa.exam_status = #{entity.examStatus}
</if>
<if
test=
"entity.content !=null and entity.content != '' "
>
and opa.content like concat('%',#{entity.content},'%')
</if>
<if
test=
"entity.topic !=null and entity.topic != '' "
>
and sot.topic_name like concat('%',#{entity.topic},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and opa.picture_id = #{entity.pictureId}
</if>
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and opa.create_by = #{entity.createBy}
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and opa.create_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and opa.create_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and opa.update_by = #{entity.updateBy}
</if>
<if
test=
"entity.likeCount !=null and entity.likeCount != '' "
>
and opa.like_count
>
= #{entity.likeCount}
</if>
<if
test=
"entity.commentCount !=null and entity.commentCount != '' "
>
and opa.comment_count
>
= #{entity.commentCount}
</if>
ORDER BY opa.business_id DESC
</select>
<select
id=
"queryOpmArticlePaged"
resultMap=
"BaseResultMap"
>
select opa.*,oi.path,sot.topic_name as topic,mi.mem_code as memCode
from opm_article opa
left join oss_info oi on opa.picture_id = oi.business_id
left join opm_topic sot on opa.topic_id = sot.business_id
left join mem_info mi on opa.create_by = mi.user_id
where 1=1
and opa.del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and opa.flag = #{entity.flag}
</if>
<if
test=
"entity.isArticle !=null and entity.isArticle != '' "
>
and opa.is_article = #{entity.isArticle}
</if>
<if
test=
"entity.topicId !=null and entity.topicId != '' "
>
and opa.topic_id = #{entity.topicId}
</if>
<if
test=
"entity.businessId !=null and entity.businessId != '' "
>
and opa.business_id = #{entity.businessId}
</if>
<if
test=
"entity.examStatus !=null and entity.examStatus != '' "
>
and opa.exam_status = #{entity.examStatus}
</if>
<if
test=
"entity.content !=null and entity.content != '' "
>
and opa.content like concat('%',#{entity.content},'%')
</if>
<if
test=
"entity.topic !=null and entity.topic != '' "
>
and sot.topic_name like concat('%',#{entity.topic},'%')
</if>
<if
test=
"entity.pictureId !=null and entity.pictureId != '' "
>
and opa.picture_id = #{entity.pictureId}
</if>
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and opa.create_by = #{entity.createBy}
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and opa.create_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and opa.create_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and opa.update_by = #{entity.updateBy}
</if>
<if
test=
"entity.likeCount !=null and entity.likeCount != '' "
>
and opa.like_count
>
= #{entity.likeCount}
</if>
<if
test=
"entity.commentCount !=null and entity.commentCount != '' "
>
and opa.comment_count
>
= #{entity.commentCount}
</if>
ORDER BY opa.business_id DESC
</select>
<select
id=
"selectByIdWithUrl"
resultType=
"org.rcisoft.business.opmArticle.entity.OpmArticle"
>
SELECT opa.*,
oi.path
from opm_article opa
LEFT JOIN oss_info oi ON oi.business_id = opa.picture_id
where 1 = 1
and opa.del_flag = '0'
and opa.business_id = #{businessId}
</select>
<select
id=
"SelectArticleComment"
resultType=
"org.rcisoft.business.opmArticle.entity.ArticleCommentDTO"
>
SELECT opc.*,
mi.mem_code as memCode,
oi.url as path
FROM opm_article_comment opc
LEFT JOIN mem_info mi ON mi.user_id = opc.create_by
left join oss_info oi on oi.business_id = mi.avatar
WHERE 1 = 1
AND opc.del_flag = '0'
AND opc.article_id = #{articleId}
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment