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