Compare commits

...

3 Commits

@ -0,0 +1,30 @@
package com.shxy.xymanager_common.bean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.MultipartConfigElement;
@Slf4j
@Configuration
public class MultipartConfig {
@Value("${spring.servlet.multipart.location}")
private String fileTempDir;
@Bean
MultipartConfigElement multipartConfigElement() {
String os = System.getProperty("os.name");
// 兼容windows
if(os.toLowerCase().startsWith("win")){
fileTempDir = "C:" + fileTempDir;
}
log.info("fileTempDir:{}", fileTempDir);
MultipartConfigFactory factory = new MultipartConfigFactory();
factory.setLocation(fileTempDir);
return factory.createMultipartConfig();
}
}

@ -6,12 +6,13 @@ import java.io.Serializable;
@Data
public class TerminalApkInfoDto implements Serializable {
private Integer id;
private String name;
private String path;
private String version;
private static final long serialVersionUID = 1L;
}

@ -29,9 +29,6 @@ public class TerminalApkInfoListModel implements Serializable {
@Data
public static class ApkBean {
@ApiModelProperty(value = "APKid", example = "123456")
private Integer id;
@ApiModelProperty(value = "上传路径", example = "123456")
private String path;

@ -4,10 +4,9 @@
<resultMap id="ApkInfoMap" type="com.shxy.xymanager_common.dto.TerminalApkInfoDto">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="path" jdbcType="VARCHAR" property="path"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="version" jdbcType="VARCHAR" property="version"/>
</resultMap>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalUpload">
@ -17,7 +16,6 @@
<select id="selectAll" resultMap="ApkInfoMap">
select
id,
name,
path,
version

Loading…
Cancel
Save