|
|
@@ -15,6 +15,7 @@ import com.alibaba.dashscope.app.Application;
|
|
|
import com.alibaba.dashscope.app.ApplicationParam;
|
|
|
import com.alibaba.dashscope.app.ApplicationResult;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -67,7 +68,7 @@ public class ALiYunServiceImpl implements ALiYunService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<WxDoctorClinicRoomThumbnailVO> recognizeImage(MultipartFile file) throws Exception {
|
|
|
+ public List<WxDoctorClinicRoomThumbnailVO> recognizeImage(byte[] bytes) throws Exception {
|
|
|
List<WxDoctorClinicRoomThumbnailVO> result = new ArrayList<>();
|
|
|
List<BizDeptPO> deptList = deptRepository.selectList(new LambdaQueryWrapper<>());
|
|
|
|
|
|
@@ -87,13 +88,13 @@ public class ALiYunServiceImpl implements ALiYunService {
|
|
|
.collect(Collectors.toList())));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ String imageName="aiImage/"+ IdWorker.getIdStr()+".png";
|
|
|
String imageUrl;
|
|
|
SysStorageRecordDTO uploadResult = fileService.upload(
|
|
|
null,
|
|
|
null,
|
|
|
- file.getOriginalFilename(),
|
|
|
- file.getBytes(),
|
|
|
+ imageName,
|
|
|
+ bytes,
|
|
|
null);
|
|
|
|
|
|
imageUrl = uploadResult.getAbsolutePath();
|