Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
site-project
Commits
b5c56c6f
Commit
b5c56c6f
authored
Oct 31, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'dev' and 'master' of
http://git.biandejun.com/hqzhdj/site-project
parents
b859bad5
3a1536ee
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
252 additions
and
57 deletions
+252
-57
cloud-site-api/src/main/java/com/yizhi/site/application/feign/TrSiteStudentFeignClients.java
+3
-3
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/DataClassificationVo.java
+7
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InfoVO.java
+6
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InformationStudentVO.java
+3
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PortalHomeOtherVO.java
+2
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSitePageVO.java
+1
-1
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSiteStudentParamsVo.java
+1
-1
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSiteStudentVo.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/controller/InternationalKeyController.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/controller/TrSiteStudentController.java
+3
-3
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
+5
-1
cloud-site-service/src/main/java/com/yizhi/site/application/domain/SiteDic.java
+3
-0
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/DataClassificationMapper.java
+9
-0
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/InformationMapper.java
+7
-1
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/SiteDicMapper.java
+7
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/DataClassificationService.java
+9
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/ITrSiteStudentService.java
+3
-3
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/DataClassificationServiceImpl.java
+50
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
+26
-23
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PortalNavigateServiceImpl.java
+3
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PortalTerminalServiceImpl.java
+5
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SiteDicServiceImpl.java
+17
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/TrSiteStudentServiceImpl.java
+3
-3
cloud-site-service/src/main/resources/mapper/DataClassificationMapper.xml
+6
-0
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
+61
-12
cloud-site-service/src/main/resources/mapper/SiteDicMapper.xml
+10
-3
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/TrSiteStudentFeignClients.java
View file @
b5c56c6f
package
com
.
yizhi
.
site
.
application
.
feign
;
package
com
.
yizhi
.
site
.
application
.
feign
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.site.application.vo.TrSitePageVO
;
import
com.yizhi.site.application.vo.
site.
TrSitePageVO
;
import
com.yizhi.site.application.vo.TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.TrSiteStudentVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentVo
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/DataClassificationVo.java
View file @
b5c56c6f
...
@@ -6,6 +6,7 @@ import lombok.Data;
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -59,6 +60,12 @@ public class DataClassificationVo {
...
@@ -59,6 +60,12 @@ public class DataClassificationVo {
@ApiModelProperty
(
value
=
"站点ID"
)
@ApiModelProperty
(
value
=
"站点ID"
)
private
Long
siteId
;
private
Long
siteId
;
@ApiModelProperty
(
value
=
"层级"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"子新闻分类"
)
private
List
<
DataClassificationVo
>
childClassifyNews
;
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InfoVO.java
View file @
b5c56c6f
...
@@ -28,4 +28,10 @@ public class InfoVO extends ContextVO {
...
@@ -28,4 +28,10 @@ public class InfoVO extends ContextVO {
@ApiModelProperty
(
value
=
"轮播图所属栏目, MARKET:营销, TRAIN:培训, HOMEPAGE:首页, COURSE:课程, NEWS:新闻资讯"
)
@ApiModelProperty
(
value
=
"轮播图所属栏目, MARKET:营销, TRAIN:培训, HOMEPAGE:首页, COURSE:课程, NEWS:新闻资讯"
)
private
String
bannerName
;
private
String
bannerName
;
@ApiModelProperty
(
value
=
"层级"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"绑定的业务的ID"
)
private
Long
relationId
;
}
}
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InformationStudentVO.java
View file @
b5c56c6f
...
@@ -42,6 +42,9 @@ public class InformationStudentVO {
...
@@ -42,6 +42,9 @@ public class InformationStudentVO {
@ApiModelProperty
(
value
=
"类型名称"
)
@ApiModelProperty
(
value
=
"类型名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"作者"
)
private
String
author
;
@ApiModelProperty
(
value
=
"当前信息在当前列表的索引"
)
@ApiModelProperty
(
value
=
"当前信息在当前列表的索引"
)
private
Integer
listNo
;
private
Integer
listNo
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PortalHomeOtherVO.java
View file @
b5c56c6f
...
@@ -28,4 +28,6 @@ public class PortalHomeOtherVO {
...
@@ -28,4 +28,6 @@ public class PortalHomeOtherVO {
@ApiModelProperty
(
value
=
"列表各个区块显示状态信息"
)
@ApiModelProperty
(
value
=
"列表各个区块显示状态信息"
)
private
List
<
PortalBlockVO
>
portalBlockList
;
private
List
<
PortalBlockVO
>
portalBlockList
;
@ApiModelProperty
(
value
=
"首页精彩资讯"
)
private
List
<
InformationStudentVO
>
newsList
;
}
}
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSitePageVO.java
View file @
b5c56c6f
package
com
.
yizhi
.
site
.
application
.
vo
;
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSiteStudentParamsVo.java
View file @
b5c56c6f
package
com
.
yizhi
.
site
.
application
.
vo
;
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/TrSiteStudentVo.java
View file @
b5c56c6f
package
com
.
yizhi
.
site
.
application
.
vo
;
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.annotations.TableName
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/controller/InternationalKeyController.java
View file @
b5c56c6f
package
com
.
fulan
.
application
.
controller
;
package
com
.
yizhi
.
site
.
application
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/controller/TrSiteStudentController.java
View file @
b5c56c6f
...
@@ -4,9 +4,9 @@ package com.yizhi.site.application.controller;
...
@@ -4,9 +4,9 @@ package com.yizhi.site.application.controller;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.site.application.service.ITrSiteStudentService
;
import
com.yizhi.site.application.service.ITrSiteStudentService
;
import
com.yizhi.site.application.service.PortalTerminalService
;
import
com.yizhi.site.application.service.PortalTerminalService
;
import
com.yizhi.site.application.vo.TrSitePageVO
;
import
com.yizhi.site.application.vo.
site.
TrSitePageVO
;
import
com.yizhi.site.application.vo.TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.TrSiteStudentVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentVo
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
View file @
b5c56c6f
...
@@ -46,7 +46,7 @@ public class Information extends Model<Information> {
...
@@ -46,7 +46,7 @@ public class Information extends Model<Information> {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
typeOneName
;
private
String
typeOneName
;
@ApiModelProperty
(
value
=
"文章子类型"
)
@ApiModelProperty
(
value
=
"文章子类型
(二级)
"
)
@TableField
(
"type_two"
)
@TableField
(
"type_two"
)
private
Long
typeTwo
;
private
Long
typeTwo
;
...
@@ -114,6 +114,10 @@ public class Information extends Model<Information> {
...
@@ -114,6 +114,10 @@ public class Information extends Model<Information> {
@TableField
(
"pdf_file_name"
)
@TableField
(
"pdf_file_name"
)
private
String
pdfFileName
;
private
String
pdfFileName
;
@ApiModelProperty
(
value
=
"文章子类型(三级)"
)
@TableField
(
"type_three"
)
private
Long
typeThree
;
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/domain/SiteDic.java
View file @
b5c56c6f
...
@@ -71,6 +71,9 @@ public class SiteDic extends Model<SiteDic>{
...
@@ -71,6 +71,9 @@ public class SiteDic extends Model<SiteDic>{
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"绑定的新闻资讯的ID"
)
@TableField
(
exist
=
false
)
private
Long
relationId
;
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/DataClassificationMapper.java
View file @
b5c56c6f
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
import
com.yizhi.site.application.domain.DataClassification
;
import
com.yizhi.site.application.domain.DataClassification
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
com.yizhi.site.application.vo.domain.DataClassificationVo
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
/**
/**
...
@@ -29,4 +30,12 @@ public interface DataClassificationMapper extends BaseMapper<DataClassification>
...
@@ -29,4 +30,12 @@ public interface DataClassificationMapper extends BaseMapper<DataClassification>
* @return
* @return
*/
*/
List
<
DataClassification
>
getSubcategories
(
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
);
List
<
DataClassification
>
getSubcategories
(
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
);
/**
* 获取新闻的分类
* @param siteId
* @param parentId
* @return
*/
List
<
DataClassificationVo
>
selectClassification
(
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"parentId"
)
Long
parentId
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/InformationMapper.java
View file @
b5c56c6f
...
@@ -62,7 +62,7 @@ public interface InformationMapper extends BaseMapper<Information> {
...
@@ -62,7 +62,7 @@ public interface InformationMapper extends BaseMapper<Information> {
List
<
InformationStudentVO
>
informationPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
,
Page
<
InformationStudentVO
>
page
);
List
<
InformationStudentVO
>
informationPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
,
Page
<
InformationStudentVO
>
page
);
List
<
InformationStudentVO
>
informationClassifyPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeTwo"
)
Long
typeTwo
,
Page
<
InformationStudentVO
>
page
);
List
<
InformationStudentVO
>
informationClassifyPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeTwo"
)
Long
typeTwo
,
@Param
(
"level"
)
Integer
level
,
Page
<
InformationStudentVO
>
page
);
Long
informationRelationGetInformationIds
(
@Param
(
"terminalId"
)
Long
terminalId
);
Long
informationRelationGetInformationIds
(
@Param
(
"terminalId"
)
Long
terminalId
);
...
@@ -84,4 +84,9 @@ public interface InformationMapper extends BaseMapper<Information> {
...
@@ -84,4 +84,9 @@ public interface InformationMapper extends BaseMapper<Information> {
* 获取置顶的公告
* 获取置顶的公告
*/
*/
List
<
InformationStudentVO
>
informationTopList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
);
List
<
InformationStudentVO
>
informationTopList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
);
/**
* 获取首页置顶新闻
*/
List
<
InformationStudentVO
>
informationIndexTopList
(
@Param
(
"siteId"
)
Long
siteId
);
}
}
\ No newline at end of file
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/SiteDicMapper.java
View file @
b5c56c6f
...
@@ -22,5 +22,12 @@ public interface SiteDicMapper extends BaseMapper<SiteDic> {
...
@@ -22,5 +22,12 @@ public interface SiteDicMapper extends BaseMapper<SiteDic> {
* @return
* @return
*/
*/
List
<
SiteDic
>
getSiteDicListByCode
(
@Param
(
"code"
)
String
code
);
List
<
SiteDic
>
getSiteDicListByCode
(
@Param
(
"code"
)
String
code
);
/**
* 获取新闻资讯一级栏目信息
* @param code
* @return
*/
List
<
SiteDic
>
getSiteNewsDicListByCode
();
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/DataClassificationService.java
View file @
b5c56c6f
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.service.IService
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.site.application.domain.DataClassification
;
import
com.yizhi.site.application.domain.DataClassification
;
import
com.yizhi.site.application.vo.domain.DataClassificationVo
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
import
com.yizhi.site.application.vo.site.IdTwoVO
;
import
com.yizhi.site.application.vo.site.IdTwoVO
;
import
com.yizhi.site.application.vo.site.RespVO
;
import
com.yizhi.site.application.vo.site.RespVO
;
...
@@ -71,4 +72,12 @@ public interface DataClassificationService extends IService<DataClassification>
...
@@ -71,4 +72,12 @@ public interface DataClassificationService extends IService<DataClassification>
* @return
* @return
*/
*/
List
<
DataClassification
>
getSubcategories
(
Long
siteId
,
Long
typeOne
);
List
<
DataClassification
>
getSubcategories
(
Long
siteId
,
Long
typeOne
);
/**
* 获取根节点下所有分类
* @param siteComponyIdVO
* @param parentId
* @return
*/
List
<
DataClassificationVo
>
getAllClassification
(
SiteComponyIdVO
siteComponyIdVO
,
Long
parentId
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/ITrSiteStudentService.java
View file @
b5c56c6f
...
@@ -3,9 +3,9 @@ package com.yizhi.site.application.service;
...
@@ -3,9 +3,9 @@ package com.yizhi.site.application.service;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.site.application.domain.TrSiteStudent
;
import
com.yizhi.site.application.domain.TrSiteStudent
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.yizhi.site.application.vo.TrSitePageVO
;
import
com.yizhi.site.application.vo.
site.
TrSitePageVO
;
import
com.yizhi.site.application.vo.TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.TrSiteStudentVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentVo
;
import
java.util.List
;
import
java.util.List
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/DataClassificationServiceImpl.java
View file @
b5c56c6f
...
@@ -17,6 +17,8 @@ import com.yizhi.site.application.vo.site.RespVO;
...
@@ -17,6 +17,8 @@ import com.yizhi.site.application.vo.site.RespVO;
import
com.yizhi.site.application.vo.site.SiteComponyIdVO
;
import
com.yizhi.site.application.vo.site.SiteComponyIdVO
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
import
com.yizhi.site.application.vo.site.ClassificationVO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -207,4 +209,52 @@ public class DataClassificationServiceImpl extends ServiceImpl<DataClassificatio
...
@@ -207,4 +209,52 @@ public class DataClassificationServiceImpl extends ServiceImpl<DataClassificatio
return
dataClassificationMapper
.
getSubcategories
(
siteId
,
typeOne
);
return
dataClassificationMapper
.
getSubcategories
(
siteId
,
typeOne
);
}
}
@Override
public
List
<
DataClassificationVo
>
getAllClassification
(
SiteComponyIdVO
siteComponyIdVO
,
Long
parentId
)
{
Long
siteId
=
siteComponyIdVO
.
getSiteId
();
log
.
info
(
"查询的站点id:{}"
,
siteId
);
Long
createById
=
siteComponyIdVO
.
getCreateById
();
String
createByName
=
siteComponyIdVO
.
getCreateByName
();
ClassificationVO
classificationVO
=
null
;
Date
date
=
new
Date
();
int
level
=
0
;
if
(
parentId
==
0
){
level
=
0
;
}
else
{
level
=
1
;
}
//获取根节点下的所有节点,只遍历二级
List
<
DataClassificationVo
>
rootList
=
dataClassificationMapper
.
selectClassification
(
siteId
,
parentId
);
if
(
CollectionUtils
.
isNotEmpty
(
rootList
))
{
Long
childParentId
=
null
;
//遍历根节点
for
(
DataClassificationVo
root
:
rootList
){
//获取子节点(一级)
childParentId
=
root
.
getId
();
List
<
DataClassificationVo
>
childListOne
=
dataClassificationMapper
.
selectClassification
(
siteId
,
childParentId
);
if
(
CollectionUtils
.
isNotEmpty
(
childListOne
))
{
//遍历一级节点
for
(
DataClassificationVo
rootOne
:
childListOne
){
//获取子节点(二级)
childParentId
=
rootOne
.
getId
();
List
<
DataClassificationVo
>
childListTwo
=
dataClassificationMapper
.
selectClassification
(
siteId
,
childParentId
);
if
(
CollectionUtils
.
isNotEmpty
(
childListTwo
))
{
rootOne
.
setChildClassifyNews
(
childListTwo
);
for
(
DataClassificationVo
rootTwo
:
childListTwo
){
rootTwo
.
setLevel
(
level
+
3
);
}
}
rootOne
.
setLevel
(
level
+
2
);
}
root
.
setChildClassifyNews
(
childListOne
);
}
root
.
setLevel
(
level
+
1
);
}
}
return
rootList
;
}
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
View file @
b5c56c6f
...
@@ -277,7 +277,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -277,7 +277,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
vo
.
getTypeName
().
equals
(
SiteConstant
.
PCPORTALNEWS
))
{
if
(
vo
.
getTypeName
().
equals
(
SiteConstant
.
PCPORTALNEWS
))
{
//如果是分类列表
//如果是分类列表
if
(
null
!=
typeTwo
)
{
if
(
null
!=
typeTwo
)
{
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeTwo
,
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeTwo
,
vo
.
getLevel
(),
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
InformationStudentVO
informationStudentVO
:
list
)
{
for
(
InformationStudentVO
informationStudentVO
:
list
)
{
//添加列表序号,以便查找上/下一条
//添加列表序号,以便查找上/下一条
...
@@ -456,14 +456,21 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -456,14 +456,21 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
siteComponyIdVO
.
setOrgId
(
res
.
getOrgId
());
siteComponyIdVO
.
setOrgId
(
res
.
getOrgId
());
siteComponyIdVO
.
setSiteId
(
res
.
getSiteId
());
siteComponyIdVO
.
setSiteId
(
res
.
getSiteId
());
List
<
ClassificationVO
>
classificationVOList
=
dataClassificationService
.
getClassification
(
siteComponyIdVO
);
List
<
ClassificationVO
>
classificationVOList
=
null
;
//dataClassificationService.getClassification(siteComponyIdVO);
Long
typeOne
=
null
;
//获取根节点下的所有分类
Long
typeOne
=
vo
.
getRelationId
();
if
(
typeOne
==
null
){
typeOne
=
0L
;
}
List
<
DataClassificationVo
>
classifyNews
=
null
;
Long
typeTwo
=
vo
.
getTypeTwo
();
Long
typeTwo
=
vo
.
getTypeTwo
();
//如果是新闻,查出所有新闻分页信息及其新闻分类列表
//如果是新闻,查出所有新闻分页信息及其新闻分类列表
if
(
vo
.
getTypeName
().
equals
(
SiteConstant
.
PCPORTALNEWS
))
{
if
(
vo
.
getTypeName
().
equals
(
SiteConstant
.
PCPORTALNEWS
))
{
//如果是分类列表
//如果是分类列表
if
(
null
!=
typeTwo
)
{
if
(
null
!=
typeTwo
)
{
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeTwo
,
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeTwo
,
vo
.
getLevel
(),
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
InformationStudentVO
informationStudentVO
:
list
)
{
for
(
InformationStudentVO
informationStudentVO
:
list
)
{
//添加列表序号,以便查找上/下一条
//添加列表序号,以便查找上/下一条
...
@@ -483,18 +490,11 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -483,18 +490,11 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
infoVO
.
setPageTotal
(
page
.
getTotal
());
infoVO
.
setPageTotal
(
page
.
getTotal
());
}
}
}
else
{
}
else
{
//如果是全部列表
//如果是全部列表,查询所有的分类含根目录
for
(
ClassificationVO
classificationVO
:
classifyNews
=
dataClassificationService
.
getAllClassification
(
siteComponyIdVO
,
typeOne
);
classificationVOList
)
{
infoVO
.
setClassifyNews
(
classifyNews
);
if
(
SiteConstant
.
PORTALNEWS
.
equals
(
classificationVO
.
getName
()))
{
typeOne
=
classificationVO
.
getId
();
/* if (null != pageNo && pageNo == 1) {
log
.
info
(
"typeOne值为:"
+
typeOne
);
break
;
}
}
if
(
null
!=
pageNo
&&
pageNo
==
1
)
{
//没有内容的二级分类需要筛除,重写sql
//没有内容的二级分类需要筛除,重写sql
List<DataClassification> selectByMap = dataClassificationService.getSubcategories(siteId, typeOne);
List<DataClassification> selectByMap = dataClassificationService.getSubcategories(siteId, typeOne);
List<DataClassificationVo> selectVoByMap=new ArrayList<>();
List<DataClassificationVo> selectVoByMap=new ArrayList<>();
...
@@ -503,8 +503,10 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -503,8 +503,10 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
BeanUtils.copyProperties(d,entityVo);
BeanUtils.copyProperties(d,entityVo);
selectVoByMap.add(entityVo);
selectVoByMap.add(entityVo);
}
}
infoVO
.
setClassifyNews
(
selectVoByMap
);
}
}*/
//查询所有分类
list
=
informationMapper
.
informationPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeOne
,
page
);
list
=
informationMapper
.
informationPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
typeOne
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
...
@@ -570,6 +572,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -570,6 +572,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
infoVO
.
setPageTotal
(
page
.
getTotal
());
infoVO
.
setPageTotal
(
page
.
getTotal
());
}
}
}
}
return
infoVO
;
return
infoVO
;
}
}
...
@@ -611,7 +614,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -611,7 +614,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
listNo
==
1
)
{
if
(
listNo
==
1
)
{
//将每条信息分成一页
//将每条信息分成一页
page
=
new
Page
<>(
2
,
1
);
page
=
new
Page
<>(
2
,
1
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
null
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
informationViewVO
.
setSuffixInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setSuffixInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setSuffixInformationName
(
list
.
get
(
0
).
getFileName
());
informationViewVO
.
setSuffixInformationName
(
list
.
get
(
0
).
getFileName
());
...
@@ -625,7 +628,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -625,7 +628,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
else
if
(
listNo
.
equals
(
total
))
{
}
else
if
(
listNo
.
equals
(
total
))
{
//如果是最后一页最后一条数据只查上一条
//如果是最后一页最后一条数据只查上一条
page
=
new
Page
<>(
listNo
-
1
,
1
);
page
=
new
Page
<>(
listNo
-
1
,
1
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
null
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
informationViewVO
.
setPreInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setPreInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setPreInformationName
(
list
.
get
(
0
).
getFileName
());
informationViewVO
.
setPreInformationName
(
list
.
get
(
0
).
getFileName
());
...
@@ -640,7 +643,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -640,7 +643,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
else
{
}
else
{
//其他的都查上一条,下一条
//其他的都查上一条,下一条
page
=
new
Page
<>(
listNo
-
1
,
1
);
page
=
new
Page
<>(
listNo
-
1
,
1
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
null
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
informationViewVO
.
setPreInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setPreInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setPreInformationName
(
list
.
get
(
0
).
getFileName
());
informationViewVO
.
setPreInformationName
(
list
.
get
(
0
).
getFileName
());
...
@@ -654,7 +657,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -654,7 +657,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
}
list
.
clear
();
list
.
clear
();
page
=
new
Page
<>(
listNo
+
1
,
1
);
page
=
new
Page
<>(
listNo
+
1
,
1
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
page
);
list
=
informationMapper
.
informationClassifyPcPageList
(
SiteConstant
.
PORTALNEWS
,
siteId
,
idOneVO
.
getTypeTwo
(),
null
,
page
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
null
!=
list
.
get
(
0
))
{
informationViewVO
.
setSuffixInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setSuffixInformationId
(
list
.
get
(
0
).
getId
());
informationViewVO
.
setSuffixInformationName
(
list
.
get
(
0
).
getFileName
());
informationViewVO
.
setSuffixInformationName
(
list
.
get
(
0
).
getFileName
());
...
@@ -964,7 +967,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
...
@@ -964,7 +967,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
}
if
(
selectById
.
getName
().
equals
(
SiteConstant
.
ANNOUNCEMENT
)
&&
selectById
.
getParentId
()
==
0
)
{
//公告
if
(
selectById
.
getName
().
equals
(
SiteConstant
.
ANNOUNCEMENT
)
&&
selectById
.
getParentId
()
==
0
)
{
//公告
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
}
else
if
(
selectById
.
get
Name
().
equals
(
SiteConstant
.
PORTALNEWS
)
&&
selectById
.
get
ParentId
()
==
0
)
{
//新闻所有列表
}
else
if
(
selectById
.
getParentId
()
==
0
)
{
//新闻所有列表
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
list
=
informationMapper
.
informationFirstList
(
vo
,
page
);
}
else
{
}
else
{
list
=
informationMapper
.
informationTwoList
(
vo
,
page
);
//新闻分类列表
list
=
informationMapper
.
informationTwoList
(
vo
,
page
);
//新闻分类列表
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PortalNavigateServiceImpl.java
View file @
b5c56c6f
...
@@ -107,6 +107,9 @@ public class PortalNavigateServiceImpl extends ServiceImpl<PortalNavigateMapper,
...
@@ -107,6 +107,9 @@ public class PortalNavigateServiceImpl extends ServiceImpl<PortalNavigateMapper,
if
(
StringUtils
.
isNotBlank
(
pn
.
getRelationFuncName
().
trim
())){
if
(
StringUtils
.
isNotBlank
(
pn
.
getRelationFuncName
().
trim
())){
logger
.
info
(
"返回的名称:"
+
pn
.
getRelationFuncName
());
logger
.
info
(
"返回的名称:"
+
pn
.
getRelationFuncName
());
String
valueByKey
=
SiteEnum
.
getValueByKey
(
pn
.
getRelationFuncName
().
trim
());
String
valueByKey
=
SiteEnum
.
getValueByKey
(
pn
.
getRelationFuncName
().
trim
());
if
(
StringUtils
.
isEmpty
(
valueByKey
)){
valueByKey
=
pn
.
getRelationFuncCode
();
}
vo
.
setType
(
valueByKey
);
vo
.
setType
(
valueByKey
);
vo
.
setCatname
(
pn
.
getRelationFuncName
());
vo
.
setCatname
(
pn
.
getRelationFuncName
());
}
}
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PortalTerminalServiceImpl.java
View file @
b5c56c6f
...
@@ -1209,6 +1209,11 @@ public class PortalTerminalServiceImpl extends ServiceImpl<PortalTerminalMapper,
...
@@ -1209,6 +1209,11 @@ public class PortalTerminalServiceImpl extends ServiceImpl<PortalTerminalMapper,
vo
.
setAnnouncementList
(
announcementList
);
vo
.
setAnnouncementList
(
announcementList
);
vo
.
setImageList
(
imageList
);
vo
.
setImageList
(
imageList
);
vo
.
setContactList
(
contactList
);
vo
.
setContactList
(
contactList
);
//首页精彩资讯
List
<
InformationStudentVO
>
newsList
=
informationMapper
.
informationIndexTopList
(
siteId
);
vo
.
setNewsList
(
newsList
);
return
vo
;
return
vo
;
}
}
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/SiteDicServiceImpl.java
View file @
b5c56c6f
...
@@ -39,7 +39,23 @@ public class SiteDicServiceImpl extends ServiceImpl<SiteDicMapper, SiteDic> impl
...
@@ -39,7 +39,23 @@ public class SiteDicServiceImpl extends ServiceImpl<SiteDicMapper, SiteDic> impl
@Override
@Override
public
List
<
SiteDic
>
getSiteDicListByCode
(
String
code
)
{
public
List
<
SiteDic
>
getSiteDicListByCode
(
String
code
)
{
return
this
.
baseMapper
.
getSiteDicListByCode
(
code
);
//从新闻资讯获取栏目
List
<
SiteDic
>
dics
=
this
.
baseMapper
.
getSiteNewsDicListByCode
();
//从字典表中获取栏目
List
<
SiteDic
>
siteDics
=
this
.
baseMapper
.
getSiteDicListByCode
(
code
);
if
(
CollectionUtils
.
isNotEmpty
(
dics
)
&&
CollectionUtils
.
isNotEmpty
(
siteDics
))
{
//重新对字典表中取出的栏目Sort,放在新闻资讯栏目后面
int
len
=
dics
.
size
();
for
(
SiteDic
item
:
siteDics
)
{
if
(
item
.
getSort
()
==
null
){
item
.
setSort
(
0
);
}
item
.
setSort
(
item
.
getSort
()
+
len
);
}
dics
.
addAll
(
siteDics
);
}
return
dics
;
}
}
@Override
@Override
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/TrSiteStudentServiceImpl.java
View file @
b5c56c6f
...
@@ -12,9 +12,9 @@ import com.yizhi.core.application.task.TaskExecutor;
...
@@ -12,9 +12,9 @@ import com.yizhi.core.application.task.TaskExecutor;
import
com.yizhi.site.application.domain.TrSiteStudent
;
import
com.yizhi.site.application.domain.TrSiteStudent
;
import
com.yizhi.site.application.mapper.TrSiteStudentMapper
;
import
com.yizhi.site.application.mapper.TrSiteStudentMapper
;
import
com.yizhi.site.application.service.ITrSiteStudentService
;
import
com.yizhi.site.application.service.ITrSiteStudentService
;
import
com.yizhi.site.application.vo.TrSitePageVO
;
import
com.yizhi.site.application.vo.
site.
TrSitePageVO
;
import
com.yizhi.site.application.vo.TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentParamsVo
;
import
com.yizhi.site.application.vo.TrSiteStudentVo
;
import
com.yizhi.site.application.vo.
site.
TrSiteStudentVo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
cloud-site-service/src/main/resources/mapper/DataClassificationMapper.xml
View file @
b5c56c6f
...
@@ -71,4 +71,10 @@
...
@@ -71,4 +71,10 @@
GROUP BY
GROUP BY
a.id
a.id
</select>
</select>
<select
id=
"selectClassification"
resultType=
"com.yizhi.site.application.vo.domain.DataClassificationVo"
>
select id, name, create_time as createTime
from data_classification where parent_id=#{parentId} and site_id=#{siteId}
order by sort
</select>
</mapper>
</mapper>
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
View file @
b5c56c6f
...
@@ -94,7 +94,8 @@
...
@@ -94,7 +94,8 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
LEFT JOIN data_classification c ON a.type_one = c.id
...
@@ -127,7 +128,8 @@
...
@@ -127,7 +128,8 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
LEFT JOIN data_classification c ON a.type_one = c.id
...
@@ -158,7 +160,8 @@
...
@@ -158,7 +160,8 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_two = c.id
LEFT JOIN data_classification c ON a.type_two = c.id
...
@@ -222,7 +225,7 @@
...
@@ -222,7 +225,7 @@
c. NAME AS NAME,
c. NAME AS NAME,
a.id AS id,
a.id AS id,
a.file_Name AS fileName,
a.file_Name AS fileName,
a.content as content,
<!-- a.content as content, -->
a.type_one AS typeOne,
a.type_one AS typeOne,
a.release_time AS releaseTime,
a.release_time AS releaseTime,
a.link_url AS linkUrl,
a.link_url AS linkUrl,
...
@@ -234,15 +237,19 @@
...
@@ -234,15 +237,19 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
LEFT JOIN data_classification c ON a.type_one = c.id
WHERE
WHERE
a.site_id = #{siteId}
a.site_id = #{siteId}
and a.state=2
and a.state=2
and c.name=#{typeName}
<!-- and c.name=#{typeName} -->
and a.type_one=#{typeOne}
<if
test=
"typeOne != null and typeOne != 0"
>
and a.type_one=#{typeOne}
</if>
<!--and a.type_two in-->
<!--and a.type_two in-->
<!--<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">-->
<!--<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">-->
<!--#{item}-->
<!--#{item}-->
...
@@ -256,7 +263,7 @@
...
@@ -256,7 +263,7 @@
SELECT
SELECT
c. NAME AS NAME,
c. NAME AS NAME,
a.id AS id,
a.id AS id,
a.content as content,
<!-- a.content as content, -->
a.file_Name AS fileName,
a.file_Name AS fileName,
a.type_one AS typeOne,
a.type_one AS typeOne,
a.type_two AS typeTwo,
a.type_two AS typeTwo,
...
@@ -270,15 +277,24 @@
...
@@ -270,15 +277,24 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
LEFT JOIN data_classification c ON a.type_one = c.id
WHERE
WHERE
a.site_id = #{siteId}
a.site_id = #{siteId}
and a.state=2
and a.state=2
and c.name=#{typeName}
<!-- and c.name=#{typeName} -->
and a.type_two=#{typeTwo}
<if
test=
"level == null or level == 1"
>
and a.type_one=#{typeTwo}
</if>
<if
test=
"level != null and level == 2"
>
and a.type_two=#{typeTwo}
</if>
<if
test=
"level != null and level == 3"
>
and a.type_three=#{typeTwo}
</if>
ORDER BY
ORDER BY
a.is_top DESC,
a.is_top DESC,
a.release_time DESC,
a.release_time DESC,
...
@@ -346,7 +362,8 @@
...
@@ -346,7 +362,8 @@
tr_information_read_number rn
tr_information_read_number rn
WHERE
WHERE
rn.information_id = a.id
rn.information_id = a.id
) number
) number,
a.author
FROM
FROM
information AS a
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
LEFT JOIN data_classification c ON a.type_one = c.id
...
@@ -360,4 +377,35 @@
...
@@ -360,4 +377,35 @@
a.release_time DESC,
a.release_time DESC,
a.id
a.id
</select>
</select>
<select
id=
"informationIndexTopList"
resultType=
"com.yizhi.site.application.vo.site.InformationStudentVO"
>
SELECT
c. NAME AS NAME,
a.id AS id,
a.file_Name AS fileName,
a.type_one AS typeOne,
a.release_time AS releaseTime,
a.link_url AS linkUrl,
a.logo_path as logoPath,
(
SELECT
COUNT(1)
FROM
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
WHERE
a.is_top = 1
and a.state=2
and a.site_id = #{siteId}
ORDER BY
a.release_time DESC,
a.id
</select>
</mapper>
</mapper>
\ No newline at end of file
cloud-site-service/src/main/resources/mapper/SiteDicMapper.xml
View file @
b5c56c6f
...
@@ -26,19 +26,25 @@
...
@@ -26,19 +26,25 @@
case parent_id
case parent_id
when '82' then type
when '82' then type
ELSE name end as name
ELSE name end as name
, code, des, status, type, create_time, update_time,img_url
, code, des, status, type, create_time, update_time,img_url
,sort
FROM
FROM
site_dic
site_dic
WHERE
WHERE
parent_id = ( SELECT ld.id FROM site_dic ld WHERE ld.`code` = #{code})
parent_id = ( SELECT ld.id FROM site_dic ld WHERE ld.`code` = #{code})
and status
<![CDATA[ <> ]]>
0
and status
<![CDATA[ <> ]]>
0
<if
test=
"code == 'language'"
>
<if
test=
"code == 'language'
or code == 'mb_navigate'
"
>
order by sort,name
order by sort,name
</if>
</if>
<if
test=
"code != 'language'"
>
<if
test=
"code != 'language'
and code != 'mb_navigate'
"
>
order by name
order by name
</if>
</if>
</select>
</select>
<select
id=
"getSiteNewsDicListByCode"
resultType=
"com.yizhi.site.application.domain.SiteDic"
>
SELECT a.id,a.id AS relationId,a.parent_id,a.name,'news' AS code,a.description AS des,a.state AS status,0 AS type,a.create_time,a.update_time,a.sort
FROM data_classification a
WHERE a.parent_id=0
ORDER BY a.sort
</select>
</mapper>
</mapper>
\ No newline at end of file
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