0.5.1 更新首页
This commit is contained in:
parent
44953fbaf3
commit
0c21bcabf9
|
@ -37,4 +37,7 @@ public class ProjectVO extends Project{
|
|||
|
||||
@ApiModelProperty("项目成员列表(需组装)")
|
||||
private List<SysUserNameVO> memberList;
|
||||
|
||||
@ApiModelProperty("排序分数")
|
||||
private Integer sortScore;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="attaches" column="attaches" typeHandler="com.ruoyi.common.mapper.typehandler.FileNameJsonTypeHandler"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 排序分数 -->
|
||||
<sql id="sortScore">
|
||||
case
|
||||
when bp.status = 'DEVELOPMENT_OVERDUE' then 3
|
||||
when bp.status = 'IN_PROGRESS' then 2
|
||||
else 1
|
||||
end
|
||||
</sql>
|
||||
|
||||
<sql id="selectProjectVo">
|
||||
select
|
||||
bp.id,
|
||||
|
@ -33,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bp.accept_time,
|
||||
bp.dev_overdue,
|
||||
bp.member_ids,
|
||||
<include refid="sortScore"/> as sort_score,
|
||||
su.nick_name as owner_name,
|
||||
sf.nick_name as follow_name,
|
||||
sc.nick_name as create_name,
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.bst.project.domain.Project;
|
||||
import com.ruoyi.bst.project.domain.ProjectQuery;
|
||||
import com.ruoyi.bst.project.domain.ProjectVO;
|
||||
|
@ -60,6 +61,7 @@ public class ProjectController extends BaseController
|
|||
public TableDataInfo list(ProjectQuery query)
|
||||
{
|
||||
startPage();
|
||||
PageHelper.orderBy("sort_score desc, create_time desc");
|
||||
startOrderBy();
|
||||
query.setScope(true);
|
||||
List<ProjectVO> list = projectService.selectProjectList(query);
|
||||
|
|
Loading…
Reference in New Issue
Block a user