|
@ -1,16 +1,35 @@ |
|
|
package org.dromara.productManagement.controller; |
|
|
package org.dromara.productManagement.controller; |
|
|
|
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaIgnore; |
|
|
|
|
|
import cn.dev33.satoken.secure.BCrypt; |
|
|
|
|
|
import cn.dev33.satoken.stp.SaLoginModel; |
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil; |
|
|
|
|
|
import cn.dev33.satoken.util.SaResult; |
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.core.domain.R; |
|
|
|
|
|
import org.dromara.common.core.domain.model.LoginUser; |
|
|
|
|
|
import org.dromara.common.core.domain.model.PasswordLoginBody; |
|
|
|
|
|
import org.dromara.common.core.enums.LoginType; |
|
|
|
|
|
import org.dromara.common.core.enums.UserStatus; |
|
|
|
|
|
import org.dromara.common.core.exception.user.UserException; |
|
|
|
|
|
import org.dromara.common.core.utils.ValidatorUtils; |
|
|
|
|
|
import org.dromara.common.json.utils.JsonUtils; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
|
|
import org.dromara.common.tenant.helper.TenantHelper; |
|
|
import org.dromara.productManagement.service.IDocAiService; |
|
|
import org.dromara.productManagement.service.IDocAiService; |
|
|
|
|
|
import org.dromara.system.domain.SysUser; |
|
|
|
|
|
import org.dromara.system.domain.vo.SysUserVo; |
|
|
|
|
|
import org.dromara.system.mapper.SysUserMapper; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* DocAiController类,处理与文档AI相关的HTTP请求。 |
|
|
* DocAiController类,处理与文档AI相关的HTTP请求。 |
|
@ -22,8 +41,7 @@ import java.io.IOException; |
|
|
public class DocAiController { |
|
|
public class DocAiController { |
|
|
|
|
|
|
|
|
private final IDocAiService docAiService; |
|
|
private final IDocAiService docAiService; |
|
|
|
|
|
private final SysUserMapper userMapper; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* SSE调用接口 |
|
|
* SSE调用接口 |
|
|
* @param originalFilename 原始文件名 |
|
|
* @param originalFilename 原始文件名 |
|
@ -130,4 +148,6 @@ public class DocAiController { |
|
|
public R<String> uploadFile(@RequestPart(name = "fileInfo") MultipartFile file, @RequestPart(name = "originalFilename") String originalFilename) throws IOException, InterruptedException { |
|
|
public R<String> uploadFile(@RequestPart(name = "fileInfo") MultipartFile file, @RequestPart(name = "originalFilename") String originalFilename) throws IOException, InterruptedException { |
|
|
return docAiService.uploadFile(file, originalFilename); |
|
|
return docAiService.uploadFile(file, originalFilename); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|