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
63876cde
Commit
63876cde
authored
Jul 31, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超级管理员商家管理员展示
parent
150d4d6a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
13 deletions
+90
-13
pom.xml
pom.xml
+1
-1
CmsNewsRepository.java
...a/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
+5
-1
CmsNewsServiceImpl.java
...oft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
+30
-10
CmsPriceClickController.java
...ess/cmspriceclick/controller/CmsPriceClickController.java
+1
-1
PromotionalTemplates.xls
src/main/resources/excel-template/PromotionalTemplates.xls
+0
-0
PromotionalTemplates.xlsx
src/main/resources/excel-template/PromotionalTemplates.xlsx
+0
-0
CmsNewsMapper.xml
...esources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
+53
-0
No files found.
pom.xml
View file @
63876cde
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<dependency>
<dependency>
<groupId>
org.91isoft
</groupId>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
3.2.0_WF_A_P_
TEA_RES_beta26
</version>
<version>
3.2.0_WF_A_P_
IPA_beta1
</version>
<!-- <version>3.0.0_nlt.25</version>-->
<!-- <version>3.0.0_nlt.25</version>-->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
</dependency>
</dependency>
...
...
src/main/java/org/rcisoft/business/cmsnews/dao/CmsNewsRepository.java
View file @
63876cde
...
@@ -40,10 +40,14 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> {
...
@@ -40,10 +40,14 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> {
IPage
<
CmsVideo
>
listByTopVideo
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByTopVideo
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsNews
>
noLoginlistTop
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
noLoginlistTop
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
listTopMerchants
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsNews
>
listTopMerchants
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsNews
cmsNews
);
IPage
<
CmsVideo
>
listByTopVideoHome
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsVideo
>
listByTopVideoHome
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
@Param
(
"entity"
)
CmsVideo
cmsVideo
);
IPage
<
CmsNews
>
listTopAdmin
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsNews
cmsNews
);
IPage
<
CmsVideo
>
listTopVideoAdmin
(
CyPageInfo
<
CmsNews
>
paginationUtility
,
CmsVideo
cmsVideo
);
}
}
src/main/java/org/rcisoft/business/cmsnews/service/impl/CmsNewsServiceImpl.java
View file @
63876cde
...
@@ -334,6 +334,19 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
...
@@ -334,6 +334,19 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
}
}
//登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的
//登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的
if
(
"1"
.
equals
(
cmsNews
.
getSource
()))
{
if
(
"1"
.
equals
(
cmsNews
.
getSource
()))
{
//超级管理员
if
(
CyUserUtil
.
getAuthenRoleIds
().
equals
(
cyInitComp
.
admin
[
0
]))
{
//超级管理员
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
listTopAdmin
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
for
(
CmsNews
cmsNews1
:
records
)
{
if
(
cmsNews1
.
getPath
()
!=
null
)
{
cmsNews1
.
setPath
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getPath
());
}
}
return
cmsNewsIPage
;
}
//当前商家下的文章以及设置为推荐文章
//当前商家下的文章以及设置为推荐文章
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
listTopMerchants
(
paginationUtility
,
cmsNews
);
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
listTopMerchants
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
...
@@ -344,16 +357,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
...
@@ -344,16 +357,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
}
}
return
cmsNewsIPage
;
return
cmsNewsIPage
;
}
}
//2分类或者是我的
cmsNews
.
setUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
return
null
;
IPage
<
CmsNews
>
cmsNewsIPage
=
baseMapper
.
listTop
(
paginationUtility
,
cmsNews
);
List
<
CmsNews
>
records
=
cmsNewsIPage
.
getRecords
();
for
(
CmsNews
cmsNews1
:
records
)
{
if
(
cmsNews1
.
getPath
()
!=
null
)
{
cmsNews1
.
setPath
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getPath
());
}
}
return
cmsNewsIPage
;
}
}
@Override
@Override
...
@@ -455,6 +460,21 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
...
@@ -455,6 +460,21 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
}
}
return
cmsVideoIPage
;
return
cmsVideoIPage
;
}
}
//超级管理员
//超级管理员
if
(
CyUserUtil
.
getAuthenRoleIds
().
equals
(
cyInitComp
.
admin
[
0
]))
{
//超级管理员
IPage
<
CmsVideo
>
cmsVideoIPage
=
baseMapper
.
listTopVideoAdmin
(
paginationUtility
,
cmsVideo
);
List
<
CmsVideo
>
videoRecords
=
cmsVideoIPage
.
getRecords
();
for
(
CmsVideo
cmsNews1
:
videoRecords
)
{
if
(
cmsNews1
.
getPath
()
!=
null
)
{
cmsNews1
.
setPath
(
global
.
getBase_Discovery
()
+
cmsNews1
.
getPath
());
}
}
return
cmsVideoIPage
;
}
//登陆后
//登陆后
cmsVideo
.
setUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
cmsVideo
.
setUserId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
//校验是否包含商家信息
//校验是否包含商家信息
...
...
src/main/java/org/rcisoft/business/cmspriceclick/controller/CmsPriceClickController.java
View file @
63876cde
...
@@ -44,7 +44,7 @@ import java.util.List;
...
@@ -44,7 +44,7 @@ import java.util.List;
@RestController
@RestController
@RequestMapping
(
"/cmspriceclick"
)
@RequestMapping
(
"/cmspriceclick"
)
public
class
CmsPriceClickController
extends
CyPaginationController
<
CmsPriceClick
>
{
public
class
CmsPriceClickController
extends
CyPaginationController
<
CmsPriceClick
>
{
private
static
final
String
PRICE_CLICK_IMPORT_TEMPLATE_NAME
=
"PromotionalTemplates.xls
x
"
;
private
static
final
String
PRICE_CLICK_IMPORT_TEMPLATE_NAME
=
"PromotionalTemplates.xls"
;
@Autowired
@Autowired
private
Global
global
;
private
Global
global
;
@Autowired
@Autowired
...
...
src/main/resources/excel-template/PromotionalTemplates.xls
0 → 100644
View file @
63876cde
File added
src/main/resources/excel-template/PromotionalTemplates.xlsx
deleted
100644 → 0
View file @
150d4d6a
File deleted
src/main/resources/mapper/business/cmsnews/mapper/CmsNewsMapper.xml
View file @
63876cde
...
@@ -188,6 +188,7 @@
...
@@ -188,6 +188,7 @@
AND cn.del_flag = 0
AND cn.del_flag = 0
AND cn.flag = 1
AND cn.flag = 1
GROUP BY cn.business_id, cpc.business_id) cn
GROUP BY cn.business_id, cpc.business_id) cn
GROUP BY cn.business_id
</select>
</select>
<select
id=
"listByClassification"
resultType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
<select
id=
"listByClassification"
resultType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
SELECT cn.*,
SELECT cn.*,
...
@@ -213,6 +214,7 @@
...
@@ -213,6 +214,7 @@
and cpc.business_id IS NOT NULL
and cpc.business_id IS NOT NULL
GROUP BY cn.business_id, cpc.business_id
GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.update_date DESC) cn
ORDER BY cn.update_date DESC) cn
GROUP BY cn.business_id
</select>
</select>
<select
id=
"selectDictionaryControl"
resultType=
"java.lang.Integer"
>
<select
id=
"selectDictionaryControl"
resultType=
"java.lang.Integer"
>
SELECT dict_value
SELECT dict_value
...
@@ -346,6 +348,7 @@
...
@@ -346,6 +348,7 @@
GROUP BY cn.business_id, cpc.business_id
GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.is_top
ORDER BY cn.is_top
DESC, cn.update_date DESC) cn
DESC, cn.update_date DESC) cn
GROUP BY cn.business_id
</select>
</select>
<select
id=
"listByTopVideoHome"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
<select
id=
"listByTopVideoHome"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
SELECT cv.*,
SELECT cv.*,
...
@@ -370,5 +373,55 @@
...
@@ -370,5 +373,55 @@
AND cv.del_flag = 0
AND cv.del_flag = 0
GROUP BY cv.business_id, cpc.business_id
GROUP BY cv.business_id, cpc.business_id
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
</select>
<select
id=
"listTopAdmin"
resultType=
"org.rcisoft.business.cmsnews.entity.CmsNews"
>
SELECT cn.*,
SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*,
cpc.click_through_rate AS click_through_rate,
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
LEFT JOIN sys_user su ON suu.user_id = su.business_id
LEFT JOIN oss_info oi ON cn.picture_id = oi.business_id
LEFT JOIN cms_price_click cpc
ON cpc.news_video_id = cn.business_id AND cpc.del_flag = 0 AND cpc.type = 0
AND cpc.user_id = su.business_id
WHERE 1 = 1
AND cn.del_flag = 0
AND cn.flag = 1
# AND cn.is_recommended = 1
GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.is_top
DESC, cn.update_date DESC) cn
GROUP BY cn.business_id
</select>
<select
id=
"listTopVideoAdmin"
resultType=
"org.rcisoft.business.cmsvideo.entity.CmsVideo"
>
SELECT cv.*,
SUM(cv.click_through_rate) AS readNum
FROM (SELECT cv.*,
cpc.click_through_rate AS click_through_rate,
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
LEFT JOIN sys_user su ON suu.user_id = su.business_id
AND su.del_flag = 0
AND su.flag = 1
LEFT JOIN cms_price_click cpc
ON cpc.news_video_id = cv.business_id AND cpc.del_flag = 0 AND cpc.type = 1
LEFT JOIN oss_info oi ON cv.video_url_id = oi.business_id
LEFT JOIN oss_info oi1 ON cv.default_url = oi1.business_id
WHERE 1 = 1
AND cv.del_flag = 0
GROUP BY cv.business_id, cpc.business_id
order by cv.flag DESC, cv.update_date DESC) cv
GROUP BY cv.business_id
</select>
</select>
</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