修改--产品管理优化获取资源位榜单
This commit is contained in:
parent
051814719f
commit
3effe18114
@ -295,11 +295,12 @@ public class SysSourceController extends BaseController {
|
|||||||
|
|
||||||
// List<HotSourceDto> hotSourceDtoList = new ArrayList<>();
|
// List<HotSourceDto> hotSourceDtoList = new ArrayList<>();
|
||||||
|
|
||||||
// 获取前10名
|
// 获取前6名
|
||||||
List<HotSourceDto> sysSourceList = sysSourceService.getHotSource();
|
List<HotSourceDto> sysSourceList = sysSourceService.getHotSource();
|
||||||
|
|
||||||
for(HotSourceDto sysSource : sysSourceList){
|
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);
|
return success(sysSourceList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,8 @@ public class HotSourceDto {
|
|||||||
private String scale;
|
private String scale;
|
||||||
private String number;
|
private String number;
|
||||||
private String coordinate;
|
private String coordinate;
|
||||||
|
private int cX;
|
||||||
|
private int cY;
|
||||||
private Long bBought;
|
private Long bBought;
|
||||||
|
|
||||||
public Long getSourceId() {
|
public Long getSourceId() {
|
||||||
@ -77,6 +79,23 @@ public class HotSourceDto {
|
|||||||
this.coordinate = coordinate;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="scale" column="scale"/>
|
<result property="scale" column="scale"/>
|
||||||
<result property="bBought" column="b_bought"/>
|
<result property="bBought" column="b_bought"/>
|
||||||
<result property="coordinate" column="coordinate"/>
|
<result property="coordinate" column="coordinate"/>
|
||||||
|
<result property="cX" column="c_x"/>
|
||||||
|
<result property="cY" column="c_y"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -137,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getHotSource" resultMap="HotSourceDtoResult">
|
<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
|
from sys_source
|
||||||
order by b_bought desc
|
order by b_bought desc
|
||||||
limit 6
|
limit 6
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user