Commit 93d6514f authored by shiyu's avatar shiyu

ai助手列表分页

parent 1c1012b2
......@@ -30,6 +30,11 @@ public class AiAssistantVo implements Entity {
*/
private Date createTime;
/**
* 简介
*/
private String profile;
/**
* 是否已有会话
*/
......
package com.wwdz.ch.wx.impl;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.AiAssistantDao;
import com.wwdz.ch.db.domain.AiAssistant;
......@@ -33,13 +35,14 @@ public class AiAssistantServiceImpl implements AiAssistantService {
try {
List<AiAssistantVo> aiAssistantVos = new ArrayList<>();
List<AiAssistant> aiAssistantList = aiAssistantDao.findList(dto);
PageInfo<AiAssistant> pageInfo = new PageInfo<>(aiAssistantList);
aiAssistantList.forEach(aiAssistant -> {
AiAssistantVo aiAssistantVo = new AiAssistantVo();
EntityMapper.copyAttribute(aiAssistant, aiAssistantVo);
aiAssistantVo.setIsHasChated(false);
aiAssistantVos.add(aiAssistantVo);
});
return Result.success(aiAssistantVos);
return Result.success(PageSearchResult.of(pageInfo, aiAssistantVos));
} catch (Exception e) {
logger.error("查询ai助手列表error : {}", e);
}
......
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