package com.fs.app.controller;

import com.fs.aiChat.domain.DoctorAiChatMsg;
import com.fs.aiChat.vo.DoctorAiVO;
import com.fs.common.core.domain.R;
import com.fs.his.service.IHisDoctorAiChatSessionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value="/app/aiDoctor")
@Api(tags = "AI医生")
public class AiDoctorController {
    @Autowired
    private IHisDoctorAiChatSessionService doctorAiChatSessionService;
    @ApiOperation(value = "历史会话")
    @PostMapping("/chatListByUser")
    public R chatListByUser(DoctorAiVO doctorAiVO) {
        List<DoctorAiChatMsg> doctorAiChatMsgs = doctorAiChatSessionService.selectDoctorAiChatSessionListByUser(doctorAiVO);
        return R.ok().put("data", doctorAiChatMsgs);
    }

//    @ApiOperation(value = "AI医生列表")
//    @PostMapping("/doctorList")
//    public R chatByUser(DoctorAiVO doctorAiVO) {
//        String chat = doctorAiChatSessionService.chatByUser(doctorAiVO);
//        return R.ok().put("data", chat);
//    }
}
