|
|
@@ -28,6 +28,7 @@ import java.time.format.DateTimeFormatter;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
import java.util.Optional;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Tag(name = "微信-展商")
|
|
|
@RequestMapping("/people")
|
|
|
@@ -60,12 +61,11 @@ public class ExhibitorAction extends BaseAction {
|
|
|
@ResponseBody
|
|
|
public ResultData invitationSummary() {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- // 总人数
|
|
|
- peopleExhibitorBiz.getDao().summary(PeopleUtil.getPeopleBean().getPeopleId());
|
|
|
- // map.put("total", summary);
|
|
|
- // map.put("register", summary);
|
|
|
- // // TODO 已到场
|
|
|
- // map.put("arrived", null);
|
|
|
+ Map<String, Long> m = peopleExhibitorBiz.getDao().summary(PeopleUtil.getPeopleBean().getPeopleId())
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toMap(row -> row.get("type").toString(), row -> (Long) row.get("num")));
|
|
|
+ map.put("total", m.values().stream().mapToLong(a -> a).sum());
|
|
|
+ map.put("summary", m);
|
|
|
return ResultData.build().success(map);
|
|
|
}
|
|
|
|