修改--产品管理优化返回已购/未购资源位数量
This commit is contained in:
parent
4e41b95b61
commit
051814719f
@ -227,7 +227,7 @@ public class SysSourceController extends BaseController {
|
||||
List<SourceUseCountDto> seUserWorkCount = dailySysService.getSourceUserCount(startDate, endDate);
|
||||
|
||||
// 还要计数资源位数量--未使用资源位数量=资源位总数-已使用数量.
|
||||
int sourceCount = sysSourceService.selectSysSourceList(new SysSource()).size();
|
||||
Long sourceCount = sysSourceService.getSourceCountByCity(city);
|
||||
for(SourceUseCountDto sourceUseCountDto : seUserWorkCount){
|
||||
sourceUseCountDto.setUnUseCount(sourceCount-sourceUseCountDto.getUseCount());
|
||||
}
|
||||
|
||||
@ -88,4 +88,9 @@ public interface SysSourceMapper
|
||||
* 按xy坐标返回AR资源位图片
|
||||
* */
|
||||
public List<ShowSysSourceARListDto> getARSource(@Param("city") String city, @Param("scenic") String scenic, @Param("coordinates") List<Coordinate> coordinates);
|
||||
|
||||
/**
|
||||
* 根据城市获取资源位数量
|
||||
* */
|
||||
public Long getSourceCountByCity(@Param("city") String city);
|
||||
}
|
||||
|
||||
@ -99,4 +99,10 @@ public interface ISysSourceService
|
||||
* 按xy坐标返回AR资源位图片
|
||||
* */
|
||||
public List<ShowSysSourceARListDto> getARSource(String city, String scenic, List<Coordinate> coordinates);
|
||||
|
||||
|
||||
/**
|
||||
* 根据城市获取资源位数量
|
||||
* */
|
||||
public Long getSourceCountByCity(String city);
|
||||
}
|
||||
|
||||
@ -143,4 +143,12 @@ public class SysSourceServiceImpl implements ISysSourceService
|
||||
public List<ShowSysSourceARListDto> getARSource(String city, String scenic, List<Coordinate> coordinates){
|
||||
return sysSourceMapper.getARSource(city, scenic, coordinates);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据城市获取资源位数量
|
||||
* */
|
||||
@Override
|
||||
public Long getSourceCountByCity(String city){
|
||||
return sysSourceMapper.getSourceCountByCity(city);
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,7 +206,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getSourceCountByCity" resultType="java.lang.Long">
|
||||
select count(*) from sys_source where city = #{city}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertSysSource" parameterType="SysSource" useGeneratedKeys="true" keyProperty="sourceId">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user