修改--产品管理优化获取资源位榜单

This commit is contained in:
haotian 2025-04-15 11:22:41 +08:00
parent 051814719f
commit 3effe18114
3 changed files with 25 additions and 3 deletions

View File

@ -295,11 +295,12 @@ public class SysSourceController extends BaseController {
// List<HotSourceDto> hotSourceDtoList = new ArrayList<>();
// 获取前10
// 获取前6
List<HotSourceDto> sysSourceList = sysSourceService.getHotSource();
for(HotSourceDto sysSource : sysSourceList){
sysSource.setNumber(sysSource.getPart()+""+sysSource.getScale()+sysSource.getCoordinate());
sysSource.setNumber(sysSource.getPart()+sysSource.getScale()+String.format("%02d%02d", sysSource.getcX(), sysSource.getcY()));
}
return success(sysSourceList);
}

View File

@ -9,6 +9,8 @@ public class HotSourceDto {
private String scale;
private String number;
private String coordinate;
private int cX;
private int cY;
private Long bBought;
public Long getSourceId() {
@ -77,6 +79,23 @@ public class HotSourceDto {
this.coordinate = coordinate;
}
public int getcX() {
return cX;
}
public void setcX(int cX) {
this.cX = cX;
}
public int getcY() {
return cY;
}
public void setcY(int cY) {
this.cY = cY;
}

View File

@ -51,6 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="scale" column="scale"/>
<result property="bBought" column="b_bought"/>
<result property="coordinate" column="coordinate"/>
<result property="cX" column="c_x"/>
<result property="cY" column="c_y"/>
</resultMap>
@ -137,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getHotSource" resultMap="HotSourceDtoResult">
select city, scenic, part, source_id, scale, b_bought, coordinate
select city, scenic, part, source_id, scale, b_bought, coordinate, c_x, c_y
from sys_source
order by b_bought desc
limit 6