上传文件修改
This commit is contained in:
parent
53b0630c21
commit
49aea08b5d
|
|
@ -12,7 +12,6 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
@ -39,6 +38,11 @@ public class MinioUtil {
|
|||
|
||||
@Resource
|
||||
private MinioConfig minioConfig;
|
||||
|
||||
/**
|
||||
* i皖送,minio上传文件域名路径
|
||||
*/
|
||||
public String domain = "http://sgwpdm.ah.sgcc.com.cn/iws/ahjiju/";
|
||||
/**
|
||||
* 分片大小
|
||||
*/
|
||||
|
|
@ -105,10 +109,10 @@ public class MinioUtil {
|
|||
} else {
|
||||
uploadLargeFile(folderPath, file);
|
||||
}
|
||||
|
||||
String url = domain + folderPath;
|
||||
return SysFile.builder()
|
||||
.name(file.getOriginalFilename())
|
||||
.url(folderPath).build();
|
||||
.url(url).build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectRoleVo"/>
|
||||
where r.role_name=#{roleName} and r.del_flag = '0'
|
||||
<if test="companyId != null and companyId != 0">
|
||||
AND company_id = #{companyId}
|
||||
AND r.company_id = #{companyId}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
|
|
@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectRoleVo"/>
|
||||
where r.role_key=#{roleKey} and r.del_flag = '0'
|
||||
<if test="companyId != null and companyId != 0">
|
||||
AND company_id = #{companyId}
|
||||
AND r.company_id = #{companyId}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue