|
@@ -7,8 +7,10 @@ import javax.persistence.*;
|
|
|
import cn.rankin.common.utils.enums.BaseStatusEnum;
|
|
|
import cn.rankin.data.api.resource.entity.Resource;
|
|
|
import cn.rankin.common.utils.constant.ResourceType;
|
|
|
+import cn.rankin.resourceservice.controller.ResourceController;
|
|
|
import lombok.Data;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
@Data
|
|
|
public class ResourceRemote implements Serializable {
|
|
@@ -42,6 +44,10 @@ public class ResourceRemote implements Serializable {
|
|
|
@Transient
|
|
|
private Set<ResourceAudio> audios = new HashSet<ResourceAudio>();
|
|
|
|
|
|
+ @Value("${resource.video.domain}")
|
|
|
+ @Transient
|
|
|
+ private String videoDomain;
|
|
|
+
|
|
|
public List<Resource> toNativeResource() {
|
|
|
if (type == null) {
|
|
|
return new ArrayList<>();
|
|
@@ -66,8 +72,8 @@ public class ResourceRemote implements Serializable {
|
|
|
resource.setType(type);
|
|
|
if(StringUtils.isNotBlank(v.getFullPath())){
|
|
|
resource.setUrl(v.getFullPath()
|
|
|
- .replace("http://efunvideo.ai160.com","https://efunvideo.ai160.com")
|
|
|
- .replace("http://ljvideo.ai160.com","https://efunvideo.ai160.com"));
|
|
|
+ .replace(ResourceController.HTTP_VIDEO_DOMAIN, videoDomain)
|
|
|
+ .replace(ResourceController.LJ_VIDEO_DOMAIN, videoDomain));
|
|
|
}else{
|
|
|
resource.setUrl(v.getFullPath());
|
|
|
}
|