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
e7285e0d
Commit
e7285e0d
authored
Jan 07, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加字段阅读量
parent
cca5d5e5
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
0 deletions
+79
-0
CmsNewsController.java
...cisoft/business/cmsnews/controller/CmsNewsController.java
+15
-0
CmsNewsRepository.java
...a/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
+2
-0
CmsNews.java
...ain/java/org/rcisoft/business/cmsnews/entity/CmsNews.java
+7
-0
CmsNewsService.java
.../org/rcisoft/business/cmsnews/service/CmsNewsService.java
+2
-0
CmsNewsServiceImpl.java
...oft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
+7
-0
CmsVideoController.java
...soft/business/cmsvideo/controller/CmsVideoController.java
+17
-0
CmsVideoRepository.java
...org/rcisoft/business/cmsvideo/dao/CmsVideoRepository.java
+2
-0
CmsVideo.java
...n/java/org/rcisoft/business/cmsvideo/entity/CmsVideo.java
+7
-0
CmsVideoService.java
...rg/rcisoft/business/cmsvideo/service/CmsVideoService.java
+2
-0
CmsVideoServiceImpl.java
...t/business/cmsvideo/service/impl/CmsVideoServiceImpl.java
+8
-0
CmsNewsMapper.xml
...esources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
+5
-0
CmsVideoMapper.xml
...ources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
+5
-0
No files found.
src/main/java/org/rcisoft/business/cmsnews/controller/CmsNewsController.java
View file @
e7285e0d
...
@@ -203,4 +203,19 @@ public class CmsNewsController extends CyPaginationController<CmsNews> {
...
@@ -203,4 +203,19 @@ public class CmsNewsController extends CyPaginationController<CmsNews> {
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNewsServiceImpl
.
listByClassification
(
getPaginationUtility
(),
cmsNews
));
cmsNewsServiceImpl
.
listByClassification
(
getPaginationUtility
(),
cmsNews
));
}
}
/**
* 增加阅读量
*/
@ApiOperation
(
value
=
"增加阅读量"
,
notes
=
"增加阅读量"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/miniProgram/read/{businessId:\\w+}"
)
public
CyResult
read
(
@PathVariable
int
businessId
,
@Valid
CmsNews
cmsNews
,
BindingResult
bindingResult
)
{
cmsNews
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsNewsServiceImpl
.
read
(
cmsNews
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsNews
);
}
}
}
src/main/java/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
View file @
e7285e0d
...
@@ -53,5 +53,7 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> {
...
@@ -53,5 +53,7 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> {
IPage
<
CmsNews
>
listByClassificationAdmin
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
listByClassificationAdmin
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
listByClassificationMerchants
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
listByClassificationMerchants
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
int
readById
(
@Param
(
"entity"
)
CmsNews
cmsNews
);
}
}
src/main/java/org/rcisoft/business/cmsnews/entity/CmsNews.java
View file @
e7285e0d
...
@@ -117,6 +117,13 @@ public class CmsNews extends CyIdIncreEntity<CmsNews> {
...
@@ -117,6 +117,13 @@ public class CmsNews extends CyIdIncreEntity<CmsNews> {
@Excel
(
name
=
"房客id"
,
orderNum
=
"10"
,
width
=
20
)
@Excel
(
name
=
"房客id"
,
orderNum
=
"10"
,
width
=
20
)
private
Integer
tenant
;
private
Integer
tenant
;
/**
* @desc 阅读数
* @column read_count
* @default
*/
private
Integer
readCount
;
/**
/**
* 开始时间
* 开始时间
*/
*/
...
...
src/main/java/org/rcisoft/business/cmsnews/service/CmsNewsService.java
View file @
e7285e0d
...
@@ -99,4 +99,6 @@ public interface CmsNewsService {
...
@@ -99,4 +99,6 @@ public interface CmsNewsService {
String
getNewsByTitleByTitle
(
String
title
);
String
getNewsByTitleByTitle
(
String
title
);
IPage
<
CmsVideo
>
listByTopVideo
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByTopVideo
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsVideo
cmsVideo
);
CyPersistModel
read
(
CmsNews
cmsNews
);
}
}
src/main/java/org/rcisoft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
View file @
e7285e0d
...
@@ -525,5 +525,12 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
...
@@ -525,5 +525,12 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
return
cmsVideoIPage
;
return
cmsVideoIPage
;
}
}
@Override
public
CyPersistModel
read
(
CmsNews
cmsNews
)
{
int
line
=
baseMapper
.
readById
(
cmsNews
);
return
new
CyPersistModel
(
line
);
}
}
}
src/main/java/org/rcisoft/business/cmsvideo/controller/CmsVideoController.java
View file @
e7285e0d
...
@@ -6,6 +6,7 @@ package org.rcisoft.business.cmsvideo.controller;
...
@@ -6,6 +6,7 @@ package org.rcisoft.business.cmsvideo.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.cmsnews.entity.CmsNews
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.rcisoft.business.cmsvideo.entity.CmsVideo
;
import
org.rcisoft.business.cmsvideo.service.CmsVideoService
;
import
org.rcisoft.business.cmsvideo.service.CmsVideoService
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
...
@@ -168,4 +169,20 @@ public class CmsVideoController extends CyPaginationController<CmsVideo> {
...
@@ -168,4 +169,20 @@ public class CmsVideoController extends CyPaginationController<CmsVideo> {
CyMessCons
.
MESSAGE_ALERT_ERROR
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideoServiceImpl
.
listByClassification
(
getPaginationUtility
(),
cmsVideo
));
cmsVideoServiceImpl
.
listByClassification
(
getPaginationUtility
(),
cmsVideo
));
}
}
/**
* 增加阅读量
*/
@ApiOperation
(
value
=
"增加阅读量"
,
notes
=
"增加阅读量"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/miniProgram/read/{businessId:\\w+}"
)
public
CyResult
read
(
@PathVariable
int
businessId
,
@Valid
CmsVideo
cmsVideo
,
BindingResult
bindingResult
)
{
cmsVideo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
cmsVideoServiceImpl
.
read
(
cmsVideo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
cmsVideo
);
}
}
}
src/main/java/org/rcisoft/business/cmsvideo/dao/CmsVideoRepository.java
View file @
e7285e0d
...
@@ -33,5 +33,7 @@ public interface CmsVideoRepository extends CyBaseMapper<CmsVideo> {
...
@@ -33,5 +33,7 @@ public interface CmsVideoRepository extends CyBaseMapper<CmsVideo> {
IPage
<
CmsVideo
>
listByClassificationAdmin
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByClassificationAdmin
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByClassificationMerchants
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByClassificationMerchants
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
int
readById
(
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
}
}
src/main/java/org/rcisoft/business/cmsvideo/entity/CmsVideo.java
View file @
e7285e0d
...
@@ -86,6 +86,13 @@ public class CmsVideo extends CyIdIncreEntity<CmsVideo> {
...
@@ -86,6 +86,13 @@ public class CmsVideo extends CyIdIncreEntity<CmsVideo> {
@Excel
(
name
=
"房客id"
,
orderNum
=
"6"
,
width
=
20
)
@Excel
(
name
=
"房客id"
,
orderNum
=
"6"
,
width
=
20
)
private
Integer
tenant
;
private
Integer
tenant
;
/**
* @desc 阅读数
* @column read_count
* @default
*/
private
Integer
readCount
;
/**
/**
* 开始时间
* 开始时间
*/
*/
...
...
src/main/java/org/rcisoft/business/cmsvideo/service/CmsVideoService.java
View file @
e7285e0d
...
@@ -82,4 +82,6 @@ public interface CmsVideoService {
...
@@ -82,4 +82,6 @@ public interface CmsVideoService {
CmsVideo
getVideoUrl
(
CmsVideo
cmsVideo
);
CmsVideo
getVideoUrl
(
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByClassification
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByClassification
(
CyPageInfo
<
CmsVideo
>
paginationUtility
,
CmsVideo
cmsVideo
);
CyPersistModel
read
(
CmsVideo
cmsVideo
);
}
}
src/main/java/org/rcisoft/business/cmsvideo/service/impl/CmsVideoServiceImpl.java
View file @
e7285e0d
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,6 +4,7 @@ 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.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.cmsnews.entity.CmsNews
;
import
org.rcisoft.business.cmspriceclick.dao.CmsPriceClickRepository
;
import
org.rcisoft.business.cmspriceclick.dao.CmsPriceClickRepository
;
import
org.rcisoft.business.cmsunitnewvideo.dao.CmsUnitNewVideoRepository
;
import
org.rcisoft.business.cmsunitnewvideo.dao.CmsUnitNewVideoRepository
;
import
org.rcisoft.business.cmsunitnewvideo.entity.CmsUnitNewVideo
;
import
org.rcisoft.business.cmsunitnewvideo.entity.CmsUnitNewVideo
;
...
@@ -310,4 +311,11 @@ public class CmsVideoServiceImpl extends ServiceImpl<CmsVideoRepository, CmsVide
...
@@ -310,4 +311,11 @@ public class CmsVideoServiceImpl extends ServiceImpl<CmsVideoRepository, CmsVide
return
page
;
return
page
;
}
}
@Override
public
CyPersistModel
read
(
CmsVideo
cmsVideo
)
{
int
line
=
baseMapper
.
readById
(
cmsVideo
);
return
new
CyPersistModel
(
line
);
}
}
}
src/main/resources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
View file @
e7285e0d
...
@@ -480,4 +480,9 @@
...
@@ -480,4 +480,9 @@
DESC, cn.update_date DESC) cn
DESC, cn.update_date DESC) cn
GROUP BY cn.business_id
GROUP BY cn.business_id
</select>
</select>
<update
id=
"readById"
parameterType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
UPDATE cms_news
SET read_count = read_count + 1
WHERE business_id = #{entity.businessId}
</update>
</mapper>
</mapper>
src/main/resources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
View file @
e7285e0d
...
@@ -239,4 +239,9 @@
...
@@ -239,4 +239,9 @@
order by cv.flag DESC, cv.update_date DESC) cv
order by cv.flag DESC, cv.update_date DESC) cv
GROUP BY cv.business_id
GROUP BY cv.business_id
</select>
</select>
<update
id=
"readById"
parameterType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
UPDATE cms_video
SET read_count = read_count + 1
WHERE business_id = #{entity.businessId}
</update>
</mapper>
</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