修改排序

This commit is contained in:
YY
2025-08-06 10:57:51 +08:00
parent 0b74f15789
commit 3f4f8a2f21
5 changed files with 29 additions and 9 deletions

View File

@ -97,6 +97,9 @@
<if test="vo.answerTime != null ">
and answer_time = #{vo.answerTime}
</if>
<if test="vo.createBy != null ">
and create_by = #{vo.createBy}
</if>
<if test="vo.isAnswer != null ">
<if test="vo.isAnswer==0">
and is_answer = 0

View File

@ -79,6 +79,9 @@
<if test="vo.type != null and vo.type != ''">
and type = #{vo.type}
</if>
<if test="vo.createBy != null and vo.createBy != ''">
and create_by = #{vo.createBy}
</if>
<if test="vo.publishBy != null and vo.publishBy != ''">
and publish_by = #{vo.publishBy}
</if>

View File

@ -65,21 +65,22 @@
<where>
and del_flag = 'normal'
<if test="vo.name != null and vo.name != ''">
and vo.name like concat('%', #{name}, '%')
and name like concat('%', #{name}, '%')
</if>
<if test="vo.type != null ">
and vo.type = #{type}
and type = #{type}
</if>
<if test="vo.parentId != null and vo.parentId != ''">
and vo.parent_id = #{parentId}
and parent_id = #{parentId}
</if>
<if test="vo.orderBy != null ">
and vo.order_by = #{orderBy}
and order_by = #{orderBy}
</if>
<if test="vo.lastUpdateTime != null ">
and vo.last_update_time = #{lastUpdateTime}
and last_update_time = #{lastUpdateTime}
</if>
</where>
order by order_by asc
</select>

View File

@ -92,6 +92,7 @@
and cpl.last_update_time = #{vo.lastUpdateTime}
</if>
</where>
order by cpl.order_by asc
</select>
<select id="friendshipConnections"
@ -255,8 +256,8 @@
</foreach>
</update>
<select id="getLinksCount" resultType="com.chinaunicom.zyhy.ebtp.supplier.portals.vo.LinksCountVo">
select count(id) as totalCount,
count(case when status = '1' then 1 end) as publishCount
select count(id) as totalCount,
count(case when status = '1' then 1 end) as publishCount
from cosco_portals_links
where del_flag = 'normal'
</select>

View File

@ -2,12 +2,14 @@ package com.chinaunicom.zyhy.ebtp.supplier.portals.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.base.client.SystemClient;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.base.entity.SysUser;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsHelpcenterQandaMapper;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
@ -28,6 +30,8 @@ import java.util.List;
public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<CoscoPortalsHelpcenterQandaMapper, CoscoPortalsHelpcenterQanda> implements ICoscoPortalsHelpcenterQandaService {
@Autowired
private CoscoPortalsHelpcenterQandaMapper coscoPortalsHelpcenterQandaMapper;
@Autowired
private SystemClient systemClient;
/**
* 查询中远门户_帮助中心_问答
@ -125,7 +129,15 @@ public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<Cosc
public IPage<CoscoPortalsHelpcenterQanda> getPage(CoscoPortalsHelpcenterQanda coscoPortalsHelpcenterQanda) {
IPage<CoscoPortalsHelpcenterQanda> p = new Page<>(coscoPortalsHelpcenterQanda.getBasePageRequest().getPageNo(),
coscoPortalsHelpcenterQanda.getBasePageRequest().getPageSize());
return coscoPortalsHelpcenterQandaMapper.getPageList(p,coscoPortalsHelpcenterQanda);
IPage<CoscoPortalsHelpcenterQanda> pageList = coscoPortalsHelpcenterQandaMapper.getPageList(p, coscoPortalsHelpcenterQanda);
pageList.getRecords().forEach(q -> {
BaseResponse<SysUser> user =
systemClient.getUser(q.getCreateBy());
if(user!=null && user.getData()!=null){
q.setCreateBy(user.getData().getName());
}
});
return pageList;
}
@Override