病历夹
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
package com.peanut.modules.common.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.common.utils.ShiroUtils;
|
||||
import com.peanut.modules.common.entity.AiRecordFolder;
|
||||
import com.peanut.modules.common.service.AiRecordFolderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController("commonAiRecordFolder")
|
||||
@RequestMapping("common/aiRecordFolder")
|
||||
public class AiRecordFolderController {
|
||||
|
||||
@Autowired
|
||||
private AiRecordFolderService aiRecordFolderService;
|
||||
|
||||
//病历夹列表
|
||||
@RequestMapping("/getRecordFolders")
|
||||
public R getRecordFolders(@RequestBody Map<String,Object> params){
|
||||
LambdaQueryWrapper<AiRecordFolder> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(AiRecordFolder::getUserId, ShiroUtils.getUId());
|
||||
if (StringUtils.isNotEmpty(params.get("title").toString())||StringUtils.isNotEmpty(params.get("patientName").toString())){
|
||||
wrapper.like(StringUtils.isNotEmpty(params.get("title").toString()),AiRecordFolder::getTitle,params.get("title"));
|
||||
wrapper.like(StringUtils.isNotEmpty(params.get("patientName").toString()),AiRecordFolder::getPatientName,params.get("patientName"));
|
||||
}else {
|
||||
wrapper.select(AiRecordFolder::getTitle);
|
||||
wrapper.groupBy(AiRecordFolder::getTitle);
|
||||
}
|
||||
wrapper.orderByDesc(AiRecordFolder::getCreateTime);
|
||||
return R.ok().put("list",aiRecordFolderService.list(wrapper));
|
||||
}
|
||||
|
||||
//将聊天记录加入病历夹
|
||||
@RequestMapping("/addRecordFolder")
|
||||
public R addRecordFolder(@RequestBody AiRecordFolder aiRecordFolder){
|
||||
aiRecordFolder.setUserId(ShiroUtils.getUId());
|
||||
aiRecordFolderService.save(aiRecordFolder) ;
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user