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
a4de8c3e
Commit
a4de8c3e
authored
Jul 12, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
47dbb92c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
19 deletions
+21
-19
CmsNewsServiceImpl.java
...oft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
+6
-5
application-conf-dev.yml
src/main/resources/application-conf-dev.yml
+1
-1
CmsBannerMapper.xml
...rces/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
+1
-2
CmsNewsMapper.xml
...esources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
+11
-9
CmsVideoMapper.xml
...ources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
+2
-2
No files found.
src/main/java/org/rcisoft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
View file @
a4de8c3e
...
...
@@ -201,6 +201,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
if
(
ObjectUtil
.
isNotNull
(
check
)
&&
!
check
.
getBusinessId
().
equals
(
cmsNews
.
getBusinessId
()))
{
throw
new
CyServiceException
(
500
,
"权重已存在"
);
}
else
{
cmsNews
.
setUpdateDate
(
new
Date
());
int
line
=
baseMapper
.
updateById
(
cmsNews
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
cmsNews
.
getBusinessId
()
+
"的文章表信息"
);
return
new
CyPersistModel
(
line
);
...
...
@@ -324,8 +325,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
public
IPage
<
CmsNews
>
listMiniProgram
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsNews
cmsNews
)
{
//未登陆
if
(
CyUserUtil
.
getAuthenUsername
()
==
null
)
{
cmsNews
.
setIsTop
(
1
);
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
noLoginlistTop
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
noLoginlistTop
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
for
(
CmsNews
cmsNews1
:
records
)
{
if
(
cmsNews1
.
getPath
()
!=
null
)
{
cmsNews1
.
setPath
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getPath
());
...
...
@@ -334,7 +335,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
return
cmsNewsIPage
;
}
//登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的
if
(
"1"
.
equals
(
cmsNews
.
getSource
())){
if
(
"1"
.
equals
(
cmsNews
.
getSource
()))
{
//当前商家下的文章以及设置为推荐文章
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
listTopMerchants
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
...
...
@@ -457,7 +458,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
return
cmsVideoIPage
;
}
//登陆后
cmsVideo
.
setUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
cmsVideo
.
setUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
//校验是否包含商家信息
if
(
StringUtils
.
isEmpty
(
cmsVideo
.
getUnitId
()))
{
...
...
@@ -469,7 +470,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
if
(
cmsNews1
.
getPath
()
!=
null
)
{
cmsNews1
.
setPath
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getPath
());
}
//封面
//封面
if
(
cmsNews1
.
getDefaultUrl
()
!=
null
)
{
cmsNews1
.
setDefaultUrl
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getDefaultUrl
());
}
...
...
src/main/resources/application-conf-dev.yml
View file @
a4de8c3e
...
...
@@ -73,7 +73,7 @@ cy:
# 是否开启登录拦截
secure
:
false
# token存活时间(30分钟)
ttl
:
10
ttl
:
1
80
0
security
:
enable
:
true
permission
:
false
...
...
src/main/resources/mapper/business/cmsbanner/mapper/CmsBannerMapper.xml
View file @
a4de8c3e
...
...
@@ -141,11 +141,10 @@
FROM cms_banner cb
LEFT JOIN oss_info oi ON oi.business_id = cb.banner_picture
LEFT JOIN cms_banner_unit cbu on cbu.cms_banner_id = cb.business_id
LEFT JOIN sys_user_unit suu on suu.unit_id = cbu.sys_unit_id
WHERE 1 = 1
AND cb.del_flag = 0
AND cb.flag = 1
AND
suu.user_id = #{entity.user
Id}
AND
cbu.sys_unit_id = #{entity.unit
Id}
</select>
<select
id=
"visitorPagination"
resultType=
"org.rcisoft.business.cmsbanner.entity.CmsBanner"
>
SELECT oi.path AS url,
...
...
src/main/resources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
View file @
a4de8c3e
...
...
@@ -208,6 +208,7 @@
AND cn.flag = 1
and cpc.business_id IS NOT NULL
GROUP BY cn.business_id
ORDER BY cn.update_date DESC
</select>
<select
id=
"selectDictionaryControl"
resultType=
"java.lang.Integer"
>
SELECT dict_value
...
...
@@ -300,7 +301,7 @@
AND cv.home_display = #{entity.homeDisplay}
AND cv.del_flag = 0
GROUP BY cv.business_id
order by cv.
business_id
DESC
order by cv.
flag DESC, cv.update_date
DESC
</select>
<select
id=
"noLoginlistTop"
resultType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
SELECT cn.*,
...
...
@@ -311,15 +312,16 @@
LEFT JOIN sys_user su ON suu.user_id = su.business_id
LEFT JOIN oss_info oi ON cn.picture_id = oi.business_id
WHERE 1 = 1
AND cn.is_
top = #{entity.isTop}
AND cn.is_
recommended = 1
AND cn.del_flag = 0
AND cn.flag = 1
GROUP BY cn.business_id
ORDER BY cn.is_top DESC, cn.update_date DESC
</select>
<select
id=
"listTopMerchants"
resultType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
SELECT cn.*,
SUM(cpc.click_through_rate) AS readNum,
oi.path AS path
SUM(
DISTINCT
cpc.click_through_rate) AS readNum,
oi.path
AS path
FROM cms_news cn
LEFT JOIN cms_unit_new_video cunv ON cn.business_id = cunv.news_video_id AND cunv.type = 0
LEFT JOIN sys_user_unit suu ON cunv.unit_id = suu.unit_id
...
...
@@ -335,12 +337,13 @@
AND cn.flag = 1
# AND cn.is_recommended = 1
GROUP BY cn.business_id
ORDER BY cn.is_top DESC, cn.update_date DESC
</select>
<select
id=
"listByTopVideoHome"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
SELECT cv.*,
sum(cpc.click_through_rate) AS readNum,
oi1.path AS defaultUrl,
oi.path AS path
sum(
DISTINCT
cpc.click_through_rate) AS readNum,
oi1.path
AS defaultUrl,
oi.path
AS path
FROM cms_video cv
LEFT JOIN cms_unit_new_video cunv ON cv.business_id = cunv.news_video_id AND cunv.type = 1
LEFT JOIN sys_user_unit suu ON cunv.unit_id = suu.unit_id
...
...
@@ -355,8 +358,7 @@
WHERE 1 = 1
AND cunv.unit_id = #{entity.unitId}
AND cv.del_flag = 0
AND cv.flag = 1
GROUP BY cv.business_id
order by cv.
business_id
DESC
order by cv.
flag DESC, cv.update_date
DESC
</select>
</mapper>
src/main/resources/mapper/business/cmsvideo/mapper/CmsVideoMapper.xml
View file @
a4de8c3e
...
...
@@ -123,9 +123,9 @@
AND su.del_flag = 0
AND su.flag = 1
AND cv.del_flag = 0
AND cv.flag = 1
and cpc.business_id IS NOT NULL
GROUP BY cv.business_id
order by cv.create_date DESC
</select>
<select
id=
"superAdminPaginatedQuery"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
SELECT DISTINCT cv.*,
...
...
@@ -155,7 +155,7 @@
and release_time
<
= #{entity.endTime}
</if>
GROUP BY cv.business_id
ORDER BY cv.
business_id
DESC
ORDER BY cv.
update_date
DESC
</select>
<select
id=
"businessAdminsPaginatedQuery"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
SELECT DISTINCT cv.*,
...
...
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