Commit 3a1536ee by 梅存智

首页精选资讯、新闻资讯按新需求优化

parent c10b2ef4
package com.yizhi.site.application.feign;
import com.baomidou.mybatisplus.plugins.Page;
import com.yizhi.site.application.vo.TrSitePageVO;
import com.yizhi.site.application.vo.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.TrSiteStudentVo;
import com.yizhi.site.application.vo.site.TrSitePageVO;
import com.yizhi.site.application.vo.site.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.site.TrSiteStudentVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
......
......@@ -6,6 +6,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p>
......@@ -59,6 +60,12 @@ public class DataClassificationVo {
@ApiModelProperty(value = "站点ID")
private Long siteId;
@ApiModelProperty(value = "层级")
private Integer level;
@ApiModelProperty(value = "子新闻分类")
private List<DataClassificationVo> childClassifyNews;
protected Serializable pkVal() {
return this.id;
......
......@@ -28,4 +28,10 @@ public class InfoVO extends ContextVO {
@ApiModelProperty(value = "轮播图所属栏目, MARKET:营销, TRAIN:培训, HOMEPAGE:首页, COURSE:课程, NEWS:新闻资讯")
private String bannerName;
@ApiModelProperty(value = "层级")
private Integer level;
@ApiModelProperty(value = "绑定的业务的ID")
private Long relationId;
}
......@@ -42,6 +42,9 @@ public class InformationStudentVO {
@ApiModelProperty(value = "类型名称")
private String name;
@ApiModelProperty(value = "作者")
private String author;
@ApiModelProperty(value = "当前信息在当前列表的索引")
private Integer listNo;
......
......@@ -28,4 +28,6 @@ public class PortalHomeOtherVO {
@ApiModelProperty(value = "列表各个区块显示状态信息")
private List<PortalBlockVO> portalBlockList;
@ApiModelProperty(value = "首页精彩资讯")
private List<InformationStudentVO> newsList;
}
package com.yizhi.site.application.vo;
package com.yizhi.site.application.vo.site;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
......
package com.yizhi.site.application.vo;
package com.yizhi.site.application.vo.site;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yizhi.site.application.vo;
package com.yizhi.site.application.vo.site;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
......
package com.fulan.application.controller;
package com.yizhi.site.application.controller;
import org.springframework.web.bind.annotation.RequestMapping;
......
......@@ -4,9 +4,9 @@ package com.yizhi.site.application.controller;
import com.baomidou.mybatisplus.plugins.Page;
import com.yizhi.site.application.service.ITrSiteStudentService;
import com.yizhi.site.application.service.PortalTerminalService;
import com.yizhi.site.application.vo.TrSitePageVO;
import com.yizhi.site.application.vo.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.TrSiteStudentVo;
import com.yizhi.site.application.vo.site.TrSitePageVO;
import com.yizhi.site.application.vo.site.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.site.TrSiteStudentVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
......
......@@ -46,7 +46,7 @@ public class Information extends Model<Information> {
@TableField(exist = false)
private String typeOneName;
@ApiModelProperty(value = "文章子类型")
@ApiModelProperty(value = "文章子类型(二级)")
@TableField("type_two")
private Long typeTwo;
......@@ -114,6 +114,10 @@ public class Information extends Model<Information> {
@TableField("pdf_file_name")
private String pdfFileName;
@ApiModelProperty(value = "文章子类型(三级)")
@TableField("type_three")
private Long typeThree;
@Override
protected Serializable pkVal() {
return this.id;
......
......@@ -71,6 +71,9 @@ public class SiteDic extends Model<SiteDic>{
@TableField(value = "update_time", fill = FieldFill.INSERT)
private Date updateTime;
@ApiModelProperty(value = "绑定的新闻资讯的ID")
@TableField(exist = false)
private Long relationId;
@Override
protected Serializable pkVal() {
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.yizhi.site.application.domain.DataClassification;
import org.apache.ibatis.annotations.Param;
import com.yizhi.site.application.vo.domain.DataClassificationVo;
import com.yizhi.site.application.vo.site.ClassificationVO;
/**
......@@ -29,4 +30,12 @@ public interface DataClassificationMapper extends BaseMapper<DataClassification>
* @return
*/
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);
}
......@@ -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> 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);
......@@ -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> informationIndexTopList(@Param("siteId") Long siteId);
}
\ No newline at end of file
......@@ -22,5 +22,12 @@ public interface SiteDicMapper extends BaseMapper<SiteDic> {
* @return
*/
List<SiteDic> getSiteDicListByCode(@Param("code") String code);
/**
* 获取新闻资讯一级栏目信息
* @param code
* @return
*/
List<SiteDic> getSiteNewsDicListByCode();
}
......@@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.mybatisplus.service.IService;
import com.yizhi.core.application.context.RequestContext;
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.IdTwoVO;
import com.yizhi.site.application.vo.site.RespVO;
......@@ -71,4 +72,12 @@ public interface DataClassificationService extends IService<DataClassification>
* @return
*/
List<DataClassification> getSubcategories(Long siteId, Long typeOne);
/**
* 获取根节点下所有分类
* @param siteComponyIdVO
* @param parentId
* @return
*/
List<DataClassificationVo> getAllClassification(SiteComponyIdVO siteComponyIdVO, Long parentId);
}
......@@ -3,9 +3,9 @@ package com.yizhi.site.application.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.yizhi.site.application.domain.TrSiteStudent;
import com.baomidou.mybatisplus.service.IService;
import com.yizhi.site.application.vo.TrSitePageVO;
import com.yizhi.site.application.vo.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.TrSiteStudentVo;
import com.yizhi.site.application.vo.site.TrSitePageVO;
import com.yizhi.site.application.vo.site.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.site.TrSiteStudentVo;
import java.util.List;
......
......@@ -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.ClassificationVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -207,4 +209,52 @@ public class DataClassificationServiceImpl extends ServiceImpl<DataClassificatio
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;
}
}
......@@ -277,7 +277,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if (vo.getTypeName().equals(SiteConstant.PCPORTALNEWS)) {
//如果是分类列表
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)) {
for (InformationStudentVO informationStudentVO : list) {
//添加列表序号,以便查找上/下一条
......@@ -456,14 +456,21 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
siteComponyIdVO.setOrgId(res.getOrgId());
siteComponyIdVO.setSiteId(res.getSiteId());
List<ClassificationVO> classificationVOList = dataClassificationService.getClassification(siteComponyIdVO);
Long typeOne = null;
List<ClassificationVO> classificationVOList = null;//dataClassificationService.getClassification(siteComponyIdVO);
//获取根节点下的所有分类
Long typeOne = vo.getRelationId();
if(typeOne == null){
typeOne = 0L;
}
List<DataClassificationVo> classifyNews = null;
Long typeTwo = vo.getTypeTwo();
//如果是新闻,查出所有新闻分页信息及其新闻分类列表
if (vo.getTypeName().equals(SiteConstant.PCPORTALNEWS)) {
//如果是分类列表
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)) {
for (InformationStudentVO informationStudentVO : list) {
//添加列表序号,以便查找上/下一条
......@@ -483,18 +490,11 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
infoVO.setPageTotal(page.getTotal());
}
} else {
//如果是全部列表
for (ClassificationVO classificationVO :
classificationVOList) {
if (SiteConstant.PORTALNEWS.equals(classificationVO.getName())) {
typeOne = classificationVO.getId();
log.info("typeOne值为:" + typeOne);
break;
}
}
if (null != pageNo && pageNo == 1) {
//如果是全部列表,查询所有的分类含根目录
classifyNews = dataClassificationService.getAllClassification(siteComponyIdVO, typeOne);
infoVO.setClassifyNews(classifyNews);
/* if (null != pageNo && pageNo == 1) {
//没有内容的二级分类需要筛除,重写sql
List<DataClassification> selectByMap = dataClassificationService.getSubcategories(siteId, typeOne);
List<DataClassificationVo> selectVoByMap=new ArrayList<>();
......@@ -503,8 +503,10 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
BeanUtils.copyProperties(d,entityVo);
selectVoByMap.add(entityVo);
}
infoVO.setClassifyNews(selectVoByMap);
}
}*/
//查询所有分类
list = informationMapper.informationPcPageList(SiteConstant.PORTALNEWS, siteId, typeOne, page);
if (CollectionUtils.isNotEmpty(list)) {
......@@ -570,6 +572,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
infoVO.setPageTotal(page.getTotal());
}
}
return infoVO;
}
......@@ -611,7 +614,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if (listNo == 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)) {
informationViewVO.setSuffixInformationId(list.get(0).getId());
informationViewVO.setSuffixInformationName(list.get(0).getFileName());
......@@ -625,7 +628,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
} else if (listNo.equals(total)) {
//如果是最后一页最后一条数据只查上一条
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)) {
informationViewVO.setPreInformationId(list.get(0).getId());
informationViewVO.setPreInformationName(list.get(0).getFileName());
......@@ -640,7 +643,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
} else {
//其他的都查上一条,下一条
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)) {
informationViewVO.setPreInformationId(list.get(0).getId());
informationViewVO.setPreInformationName(list.get(0).getFileName());
......@@ -654,7 +657,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
list.clear();
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)) {
informationViewVO.setSuffixInformationId(list.get(0).getId());
informationViewVO.setSuffixInformationName(list.get(0).getFileName());
......@@ -964,7 +967,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
}
if (selectById.getName().equals(SiteConstant.ANNOUNCEMENT) && selectById.getParentId() == 0) { //公告
list = informationMapper.informationFirstList(vo, page);
} else if (selectById.getName().equals(SiteConstant.PORTALNEWS) && selectById.getParentId() == 0) {//新闻所有列表
} else if (selectById.getParentId() == 0) {//新闻所有列表
list = informationMapper.informationFirstList(vo, page);
} else {
list = informationMapper.informationTwoList(vo, page);//新闻分类列表
......
......@@ -107,6 +107,9 @@ public class PortalNavigateServiceImpl extends ServiceImpl<PortalNavigateMapper,
if(StringUtils.isNotBlank(pn.getRelationFuncName().trim())){
logger.info("返回的名称:"+pn.getRelationFuncName());
String valueByKey = SiteEnum.getValueByKey(pn.getRelationFuncName().trim());
if(StringUtils.isEmpty(valueByKey)){
valueByKey = pn.getRelationFuncCode();
}
vo.setType(valueByKey);
vo.setCatname(pn.getRelationFuncName());
}
......
......@@ -1209,6 +1209,11 @@ public class PortalTerminalServiceImpl extends ServiceImpl<PortalTerminalMapper,
vo.setAnnouncementList(announcementList);
vo.setImageList(imageList);
vo.setContactList(contactList);
//首页精彩资讯
List<InformationStudentVO> newsList = informationMapper.informationIndexTopList(siteId);
vo.setNewsList(newsList);
return vo;
}
......
......@@ -39,7 +39,23 @@ public class SiteDicServiceImpl extends ServiceImpl<SiteDicMapper, SiteDic> impl
@Override
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
......
......@@ -12,9 +12,9 @@ import com.yizhi.core.application.task.TaskExecutor;
import com.yizhi.site.application.domain.TrSiteStudent;
import com.yizhi.site.application.mapper.TrSiteStudentMapper;
import com.yizhi.site.application.service.ITrSiteStudentService;
import com.yizhi.site.application.vo.TrSitePageVO;
import com.yizhi.site.application.vo.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.TrSiteStudentVo;
import com.yizhi.site.application.vo.site.TrSitePageVO;
import com.yizhi.site.application.vo.site.TrSiteStudentParamsVo;
import com.yizhi.site.application.vo.site.TrSiteStudentVo;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -71,4 +71,10 @@
GROUP BY
a.id
</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>
......@@ -94,7 +94,8 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
......@@ -127,7 +128,8 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
......@@ -158,7 +160,8 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_two = c.id
......@@ -222,7 +225,7 @@
c. NAME AS NAME,
a.id AS id,
a.file_Name AS fileName,
a.content as content,
<!-- a.content as content, -->
a.type_one AS typeOne,
a.release_time AS releaseTime,
a.link_url AS linkUrl,
......@@ -234,15 +237,19 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
WHERE
a.site_id = #{siteId}
and a.state=2
and c.name=#{typeName}
and a.type_one=#{typeOne}
<!-- and c.name=#{typeName} -->
<if test="typeOne != null and typeOne != 0">
and a.type_one=#{typeOne}
</if>
<!--and a.type_two in-->
<!--<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">-->
<!--#{item}-->
......@@ -256,7 +263,7 @@
SELECT
c. NAME AS NAME,
a.id AS id,
a.content as content,
<!-- a.content as content, -->
a.file_Name AS fileName,
a.type_one AS typeOne,
a.type_two AS typeTwo,
......@@ -270,15 +277,24 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
WHERE
a.site_id = #{siteId}
and a.state=2
and c.name=#{typeName}
and a.type_two=#{typeTwo}
<!-- and c.name=#{typeName} -->
<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
a.is_top DESC,
a.release_time DESC,
......@@ -346,7 +362,8 @@
tr_information_read_number rn
WHERE
rn.information_id = a.id
) number
) number,
a.author
FROM
information AS a
LEFT JOIN data_classification c ON a.type_one = c.id
......@@ -360,4 +377,35 @@
a.release_time DESC,
a.id
</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>
\ No newline at end of file
......@@ -26,19 +26,25 @@
case parent_id
when '82' then type
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
site_dic
WHERE
parent_id = ( SELECT ld.id FROM site_dic ld WHERE ld.`code` = #{code})
and status <![CDATA[ <> ]]> 0
<if test= "code == 'language'">
<if test= "code == 'language' or code == 'mb_navigate'">
order by sort,name
</if>
<if test= "code != 'language'">
<if test= "code != 'language' and code != 'mb_navigate'">
order by name
</if>
</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>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment