package org.springblade.plugin.workflow.chat.service.impl;

import org.springblade.plugin.workflow.chat.mapper.WfChatAssistantMapper;
import org.springblade.plugin.workflow.chat.pojo.entity.WfChatAssistantEntity;
import org.springblade.plugin.workflow.chat.pojo.vo.WfChatAssistantVO;
import org.springblade.plugin.workflow.chat.excel.WfChatAssistantExcel;
import org.springblade.plugin.workflow.chat.service.IWfChatAssistantService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;

/**
 * dify - 智能助理 服务实现类
 *
 * @author ssc
 */
@Service
public class WfChatAssistantServiceImpl extends BaseServiceImpl<WfChatAssistantMapper, WfChatAssistantEntity> implements IWfChatAssistantService {

	@Override
	public IPage<WfChatAssistantVO> selectAssistantPage(IPage<WfChatAssistantVO> page, WfChatAssistantVO chatAssistantVO) {
		return page.setRecords(baseMapper.selectAssistantPage(page, chatAssistantVO));
	}


	@Override
	public List<WfChatAssistantExcel> exportAssistant(Wrapper<WfChatAssistantEntity> queryWrapper) {
		List<WfChatAssistantExcel> assistantList = baseMapper.exportAssistant(queryWrapper);
		//assistantList.forEach(assistant -> {
		//	assistant.setTypeName(DictCache.getValue(DictEnum.YES_NO, Assistant.getType()));
		//});
		return assistantList;
	}

}
