修改 design single功能
This commit is contained in:
@@ -3,7 +3,7 @@ package com.ai.da.common.enums;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum GenerateTypeEnum {
|
||||
public enum GenerateModeEnum {
|
||||
|
||||
/**
|
||||
* 通过文本生成
|
||||
@@ -23,7 +23,7 @@ public enum GenerateTypeEnum {
|
||||
private Integer code;
|
||||
private String value;
|
||||
|
||||
GenerateTypeEnum(int code,String value) {
|
||||
GenerateModeEnum(int code, String value) {
|
||||
this.code = code;
|
||||
this.value = value;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ai.da.common.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -70,4 +71,21 @@ public enum SysFileLevel2TypeEnum {
|
||||
public static List<String> ofPythonPath(){
|
||||
return Stream.of(BLOUSE,DRESS,OUTWEAR,SKIRT,TROUSERS).map(SysFileLevel2TypeEnum::getUploadPathName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static final List<String> ACCESSORIES_LIST = Arrays.asList(
|
||||
SysFileLevel2TypeEnum.BAG.getRealName(),
|
||||
SysFileLevel2TypeEnum.EARRINGS.getRealName(),
|
||||
SysFileLevel2TypeEnum.HAIRSTYLE.getRealName(),
|
||||
SysFileLevel2TypeEnum.SHOES.getRealName(),
|
||||
SysFileLevel2TypeEnum.BODY.getRealName()
|
||||
);
|
||||
|
||||
public static final List<String> IMAGES_LIST = Arrays.asList(
|
||||
SysFileLevel2TypeEnum.BLOUSE.getRealName(),
|
||||
SysFileLevel2TypeEnum.DRESS.getRealName(),
|
||||
SysFileLevel2TypeEnum.OUTWEAR.getRealName(),
|
||||
SysFileLevel2TypeEnum.SKIRT.getRealName(),
|
||||
SysFileLevel2TypeEnum.TROUSERS.getRealName()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -74,6 +74,16 @@ public class MD5Utils {
|
||||
return md5;
|
||||
}
|
||||
|
||||
public static String encryptFile(InputStream inputStream) {
|
||||
String md5 = null;
|
||||
try {
|
||||
md5 = DigestUtils.md5DigestAsHex(inputStream);
|
||||
} catch (IOException ioException) {
|
||||
log.error("文件InputStream md5加密异常ioException##{}", ExceptionUtil.getThrowableList(ioException));
|
||||
}
|
||||
return md5;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws FileNotFoundException, IOException {
|
||||
File file1 = new File("/Users/yanglei/Documents/阳磊日报2019-04-23.numbers");
|
||||
File file2 = new File("/Users/yanglei/Documents/7777.numbers");
|
||||
|
||||
Reference in New Issue
Block a user