| | |
| | | @ApiOperation(value = "getSessionById", notes = "")
|
| | | public R getSessionById(@RequestParam(name = "sessionid", defaultValue = " ") String sessionid) {
|
| | | List<THistoryEntity> list = thistoriesServices.getSessionId(sessionid);
|
| | | List<HashMap<Object, Object>> sList = new ArrayList<>();
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | THistoryEntity th = list.get(i);
|
| | | HashMap<Object, Object> hashMap = new HashMap<>();
|
| | | hashMap.put("id", th.getId());
|
| | | hashMap.put("human", th.getHuman());
|
| | | hashMap.put("ai", th.getAi());
|
| | | sList.add(hashMap);
|
| | | }
|
| | | PageUtils page = new PageUtils(sList,0,0,0);
|
| | | // List<HashMap<Object, Object>> sList = new ArrayList<>();
|
| | | // for (int i = 0; i < list.size(); i++) {
|
| | | // THistoryEntity th = list.get(i);
|
| | | // HashMap<Object, Object> hashMap = new HashMap<>();
|
| | | // hashMap.put("id", th.getId());
|
| | | // hashMap.put("human", th.getHuman());
|
| | | // hashMap.put("ai", th.getAi());
|
| | | // sList.add(hashMap);
|
| | | // }
|
| | | PageUtils page = new PageUtils(list,0,0,0);
|
| | | return R.ok() .put("page", page);
|
| | | }
|
| | |
|