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
64885d5c
Commit
64885d5c
authored
Jan 15, 2019
by
songxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大老板的紧急需求
parent
f89670d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
39 deletions
+85
-39
RoleCodeEnum.java
...in/java/com/pcloud/common/core/constant/RoleCodeEnum.java
+2
-1
ResultUtils.java
...on/src/main/java/com/pcloud/common/utils/ResultUtils.java
+58
-38
BaseVO.java
pcloud-common/src/main/java/com/pcloud/common/vo/BaseVO.java
+25
-0
No files found.
pcloud-common-core/src/main/java/com/pcloud/common/core/constant/RoleCodeEnum.java
View file @
64885d5c
...
@@ -14,7 +14,8 @@ public enum RoleCodeEnum {
...
@@ -14,7 +14,8 @@ public enum RoleCodeEnum {
merchant
(
"merchant"
),
// 商户
merchant
(
"merchant"
),
// 商户
channel
(
"channel"
),
// 渠道
channel
(
"channel"
),
// 渠道
agent
(
"agent"
),
// 代理
agent
(
"agent"
),
// 代理
adviser
(
"adviser"
);
// 顾问
adviser
(
"adviser"
),
// 顾问
platform
(
"platform"
);
// 平台
/**
/**
* 值
* 值
...
...
pcloud-common/src/main/java/com/pcloud/common/utils/ResultUtils.java
View file @
64885d5c
...
@@ -17,43 +17,63 @@ import com.pcloud.common.page.PageBeanNew;
...
@@ -17,43 +17,63 @@ import com.pcloud.common.page.PageBeanNew;
*/
*/
public
class
ResultUtils
{
public
class
ResultUtils
{
/**
/**
* 集合查询结果判断
* 单个对象实例化
*
*
* @param lists
* @param t
* @return
* @param clazz
*/
* @return
public
static
<
T
>
List
<
T
>
list
(
List
<
T
>
lists
)
{
* @author songx
if
(!
ListUtils
.
isEmpty
(
lists
))
{
* @date 2019年1月14日,下午7:32:35
return
lists
;
*/
}
public
static
<
T
>
T
object
(
T
t
,
Class
<
T
>
clazz
)
{
return
Lists
.
newArrayList
();
if
(
t
==
null
)
{
}
return
null
;
}
/**
try
{
* map查询结果判断
return
clazz
.
newInstance
();
*
}
catch
(
Exception
e
)
{
* @param lists
}
* @return
return
null
;
*/
}
public
static
<
K
,
V
>
Map
<
K
,
V
>
map
(
Map
<
K
,
V
>
map
)
{
if
(!
MapUtils
.
isEmpty
(
map
))
{
/**
return
map
;
* 集合查询结果判断
}
*
return
Maps
.
newHashMap
();
* @param lists
}
* @return
*/
/**
public
static
<
T
>
List
<
T
>
list
(
List
<
T
>
lists
)
{
* 分页查询结果判断
if
(!
ListUtils
.
isEmpty
(
lists
))
{
*
return
lists
;
* @param pageBeanNew
}
* @return
return
Lists
.
newArrayList
();
*/
}
public
static
<
T
>
PageBeanNew
<
T
>
pageBeanNew
(
PageBeanNew
<
T
>
pageBeanNew
,
Integer
currentPage
,
Integer
numPerPage
)
{
if
(
pageBeanNew
!=
null
)
{
/**
return
pageBeanNew
;
* map查询结果判断
}
*
return
new
PageBeanNew
<
T
>(
currentPage
,
numPerPage
,
0
,
Lists
.
newArrayList
());
* @param lists
}
* @return
*/
public
static
<
K
,
V
>
Map
<
K
,
V
>
map
(
Map
<
K
,
V
>
map
)
{
if
(!
MapUtils
.
isEmpty
(
map
))
{
return
map
;
}
return
Maps
.
newHashMap
();
}
/**
* 分页查询结果判断
*
* @param pageBeanNew
* @return
*/
public
static
<
T
>
PageBeanNew
<
T
>
pageBeanNew
(
PageBeanNew
<
T
>
pageBeanNew
,
Integer
currentPage
,
Integer
numPerPage
)
{
if
(
pageBeanNew
!=
null
)
{
return
pageBeanNew
;
}
return
new
PageBeanNew
<
T
>(
currentPage
,
numPerPage
,
0
,
Lists
.
newArrayList
());
}
}
}
pcloud-common/src/main/java/com/pcloud/common/vo/BaseVO.java
0 → 100644
View file @
64885d5c
/**
*
*/
package
com
.
pcloud
.
common
.
vo
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
/**
* VO父类
*
* @author:songx
* @date:2019年1月14日,下午8:53:01
*/
@JsonInclude
(
value
=
Include
.
NON_NULL
)
public
class
BaseVO
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
5943734920212204836L
;
}
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