style: Change AttachmentType enum.

pull/755/head
ruibaby 2019-11-29 21:27:33 +08:00
parent ee6e5d52be
commit 537d28ba1c
8 changed files with 14 additions and 14 deletions

View File

@ -127,6 +127,6 @@ public class AliOssFileHandler implements FileHandler {
@Override @Override
public boolean supportType(AttachmentType type) { public boolean supportType(AttachmentType type) {
return AttachmentType.ALIYUN.equals(type); return AttachmentType.ALIOSS.equals(type);
} }
} }

View File

@ -129,6 +129,6 @@ public class BaiduBosFileHandler implements FileHandler {
@Override @Override
public boolean supportType(AttachmentType type) { public boolean supportType(AttachmentType type) {
return AttachmentType.BAIDUYUN.equals(type); return AttachmentType.BAIDUBOS.equals(type);
} }
} }

View File

@ -155,6 +155,6 @@ public class QiniuOssFileHandler implements FileHandler {
@Override @Override
public boolean supportType(AttachmentType type) { public boolean supportType(AttachmentType type) {
return AttachmentType.QNYUN.equals(type); return AttachmentType.QINIUOSS.equals(type);
} }
} }

View File

@ -142,6 +142,6 @@ public class TencentCosFileHandler implements FileHandler {
@Override @Override
public boolean supportType(AttachmentType type) { public boolean supportType(AttachmentType type) {
return AttachmentType.TENCENTYUN.equals(type); return AttachmentType.TENCENTCOS.equals(type);
} }
} }

View File

@ -125,6 +125,6 @@ public class UpOssFileHandler implements FileHandler {
@Override @Override
public boolean supportType(AttachmentType type) { public boolean supportType(AttachmentType type) {
return AttachmentType.UPYUN.equals(type); return AttachmentType.UPOSS.equals(type);
} }
} }

View File

@ -624,9 +624,9 @@ public class OldVersionMigrateHandler implements MigrateHandler {
// Set location // Set location
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString(); String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) { if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
attachment.setType(AttachmentType.QNYUN); attachment.setType(AttachmentType.QINIUOSS);
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) { } else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
attachment.setType(AttachmentType.UPYUN); attachment.setType(AttachmentType.UPOSS);
} else { } else {
attachment.setType(AttachmentType.LOCAL); attachment.setType(AttachmentType.LOCAL);
} }

View File

@ -16,12 +16,12 @@ public enum AttachmentType implements ValueEnum<Integer> {
/** /**
* *
*/ */
UPYUN(1), UPOSS(1),
/** /**
* *
*/ */
QNYUN(2), QINIUOSS(2),
/** /**
* sm.ms * sm.ms
@ -31,17 +31,17 @@ public enum AttachmentType implements ValueEnum<Integer> {
/** /**
* *
*/ */
ALIYUN(4), ALIOSS(4),
/** /**
* *
*/ */
BAIDUYUN(5), BAIDUBOS(5),
/** /**
* *
*/ */
TENCENTYUN(6); TENCENTCOS(6);
private Integer value; private Integer value;

View File

@ -634,9 +634,9 @@ public class RecoveryServiceImpl implements RecoveryService {
// Set location // Set location
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString(); String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) { if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
attachment.setType(AttachmentType.QNYUN); attachment.setType(AttachmentType.QINIUOSS);
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) { } else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {
attachment.setType(AttachmentType.UPYUN); attachment.setType(AttachmentType.UPOSS);
} else { } else {
attachment.setType(AttachmentType.LOCAL); attachment.setType(AttachmentType.LOCAL);
} }