Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
2f1af6e0
Commit
2f1af6e0
authored
Sep 03, 2018
by
songxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频课
parent
3b48cfc7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
ConvertEnum.java
...ain/java/com/pcloud/common/core/constant/ConvertEnum.java
+12
-4
AliyunConstant.java
.../main/java/com/pcloud/common/constant/AliyunConstant.java
+4
-0
AppTypeEnum.java
...on/src/main/java/com/pcloud/common/enums/AppTypeEnum.java
+3
-0
BeanNewUtils.java
...n/src/main/java/com/pcloud/common/utils/BeanNewUtils.java
+37
-3
No files found.
pcloud-common-core/src/main/java/com/pcloud/common/core/constant/ConvertEnum.java
View file @
2f1af6e0
...
@@ -4,10 +4,13 @@
...
@@ -4,10 +4,13 @@
package
com
.
pcloud
.
common
.
core
.
constant
;
package
com
.
pcloud
.
common
.
core
.
constant
;
/**
/**
* @描述:
*
*
* @作者:songx
*
* @创建时间:2017年2月27日,下午4:29:06 @版本:1.0
* @author:songx
* @date:2017年2月27日,下午4:29:06
*
* 使用RabbitMQ需要去MqQueueConstant中声明队列名称,枚举的第二个值将不再使用,第一个值正常使用
* modify by songx at 2018-08-22
*/
*/
public
enum
ConvertEnum
{
public
enum
ConvertEnum
{
...
@@ -74,7 +77,12 @@ public enum ConvertEnum {
...
@@ -74,7 +77,12 @@ public enum ConvertEnum {
/**
/**
* 直播工具
* 直播工具
*/
*/
LIVE_APP
(
"LIVE_APP"
,
"convert2LiveApp"
);
LIVE_APP
(
"LIVE_APP"
,
"convert2LiveApp"
),
/**
* 视频课
*/
VIDEO_LESSON
(
"VIDEO_LESSON"
,
"convert2VideoLesson"
);
/**
/**
* 值
* 值
...
...
pcloud-common/src/main/java/com/pcloud/common/constant/AliyunConstant.java
View file @
2f1af6e0
...
@@ -358,6 +358,9 @@ public class AliyunConstant {
...
@@ -358,6 +358,9 @@ public class AliyunConstant {
return
null
;
return
null
;
}
}
String
domainName
=
FileUtils
.
getDomainName
(
fileUrl
);
String
domainName
=
FileUtils
.
getDomainName
(
fileUrl
);
if
(
domainName
==
null
)
{
return
INPUT_BUCKET
;
}
switch
(
domainName
)
{
switch
(
domainName
)
{
case
"file.chubanyun.me"
:
case
"file.chubanyun.me"
:
return
DEV_BUCKET
;
return
DEV_BUCKET
;
...
@@ -371,6 +374,7 @@ public class AliyunConstant {
...
@@ -371,6 +374,7 @@ public class AliyunConstant {
case
"rays-adviser.chubanyun.me"
:
case
"rays-adviser.chubanyun.me"
:
return
IOS_TEST_BUCKET
;
return
IOS_TEST_BUCKET
;
case
"byfile.1wlshu.com"
:
case
"byfile.1wlshu.com"
:
case
"byfile.raysgo.com"
:
return
BY_BUCKET
;
return
BY_BUCKET
;
case
"file.5rs.me"
:
case
"file.5rs.me"
:
case
"oss.5rs.me"
:
case
"oss.5rs.me"
:
...
...
pcloud-common/src/main/java/com/pcloud/common/enums/AppTypeEnum.java
View file @
2f1af6e0
/**
*
*/
package
com
.
pcloud
.
common
.
enums
;
package
com
.
pcloud
.
common
.
enums
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
...
pcloud-common/src/main/java/com/pcloud/common/utils/BeanNewUtils.java
View file @
2f1af6e0
package
com
.
pcloud
.
common
.
utils
;
package
com
.
pcloud
.
common
.
utils
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
com.google.common.collect.Lists
;
/**
/**
*
*
*
*
...
@@ -10,6 +16,8 @@ import org.springframework.beans.BeanUtils;
...
@@ -10,6 +16,8 @@ import org.springframework.beans.BeanUtils;
*/
*/
public
class
BeanNewUtils
{
public
class
BeanNewUtils
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
BeanNewUtils
.
class
);
/**
/**
* 实体类之间的转换
* 实体类之间的转换
*
*
...
@@ -19,12 +27,38 @@ public class BeanNewUtils {
...
@@ -19,12 +27,38 @@ public class BeanNewUtils {
* 目标对象
* 目标对象
* @return
* @return
*/
*/
public
static
<
T
>
T
copyProperties
(
Object
source
,
T
t
)
{
public
static
<
T
>
T
copyProperties
(
Object
source
,
Class
<
T
>
clazz
)
{
if
(
source
==
null
||
t
==
null
)
{
if
(
source
==
null
)
{
return
t
;
return
null
;
}
T
t
=
null
;
try
{
t
=
clazz
.
newInstance
();
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"clazz newInstance is error:"
+
e
.
getMessage
(),
e
);
}
}
BeanUtils
.
copyProperties
(
source
,
t
);
BeanUtils
.
copyProperties
(
source
,
t
);
return
t
;
return
t
;
}
}
/**
* 实体类之间的转换
*
* @param sources
* 来源
* @param clazz
* 目标对象
* @return
*/
public
static
<
T
>
List
<
T
>
copyProperties
(
List
<?>
sources
,
Class
<
T
>
clazz
)
{
if
(
ListUtils
.
isEmpty
(
sources
))
{
return
null
;
}
List
<
T
>
results
=
Lists
.
newArrayList
();
for
(
Object
source
:
sources
)
{
results
.
add
(
copyProperties
(
source
,
clazz
));
}
return
results
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment