Commit 39b2156a authored by Mindfaker's avatar Mindfaker

fix

parent 71cb2e24
...@@ -28,11 +28,10 @@ public class StudentPointService { ...@@ -28,11 +28,10 @@ public class StudentPointService {
public Map selectPointByWeb( String studentName, String studentUniqueId, Integer classId, String startTime, String endTime, Integer page, Integer limit, String sort, String order) { public Map selectPointByWeb( String studentName, String studentUniqueId, Integer classId, String startTime, String endTime, Integer page, Integer limit, String sort, String order) {
List<Map> dataList = specialSqlMapper.selectPoint(studentName, studentUniqueId, classId, startTime, endTime, page, limit, sort, order); List<Map> dataList = specialSqlMapper.selectPoint(studentName, studentUniqueId, classId, startTime, endTime, page, limit, sort, order);
Map<String, String> countInfoData = specialSqlMapper.selectPointCount(studentName, studentUniqueId, classId, startTime, endTime); Map<String, String> countInfoData = specialSqlMapper.selectPointCount(studentName, studentUniqueId, classId, startTime, endTime);
Long countInfo = StringUtils.isEmpty(countInfoData.get("count_info")) ? 0L: Long.parseLong(countInfoData.get("count_info").toString());
List<Map> targetDataList = dataList.stream().map((Function<Map, Map>) Util::exchangeMapKeyName).collect(Collectors.toList()); List<Map> targetDataList = dataList.stream().map((Function<Map, Map>) Util::exchangeMapKeyName).collect(Collectors.toList());
return new HashMap() {{ return new HashMap() {{
put("items", targetDataList); put("items", targetDataList);
put("total", countInfo); put("total", StringUtils.isEmpty(countInfoData.get("count_info")) ? 0L: countInfoData.get("count_info"));
}}; }};
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment