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