Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
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
胡园园
yanxuan-qc-change-system
Commits
5ac447b9
Commit
5ac447b9
authored
Nov 14, 2022
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change: 返回结构兼容
parent
79664b19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
201 additions
and
41 deletions
+201
-41
AjaxResult.java
.../com/netease/mail/yanxuan/change/biz/meta/AjaxResult.java
+163
-39
AdminChangeConfigServiceImpl.java
...change/biz/service/impl/AdminChangeConfigServiceImpl.java
+2
-2
ChangeFlowController.java
...l/yanxuan/change/web/controller/ChangeFlowController.java
+31
-0
ChangeConfigVO.java
...mail/yanxuan/change/web/meta/model/vo/ChangeConfigVO.java
+5
-0
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/meta/AjaxResult.java
View file @
5ac447b9
package
com
.
netease
.
mail
.
yanxuan
.
change
.
biz
.
meta
;
import
java.util.LinkedHashMap
;
/**
* @author lwtang
*/
public
class
AjaxResult
extends
LinkedHashMap
<
String
,
Object
>
{
public
class
AjaxResult
<
T
>
{
private
static
final
long
serialVersionUID
=
5451316194035153776L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
code
;
private
String
msg
;
private
T
data
;
private
Exception
e
;
public
AjaxResult
()
{
setCode
(
ResponseCode
.
SUCCESS
);
public
Boolean
isSuccess
()
{
return
this
.
code
.
equals
(
ResponseCodeEnum
.
SUCCESS
.
getCode
());
}
public
Boolean
isFail
()
{
return
!
this
.
isSuccess
();
}
public
static
<
R
>
AjaxResult
<
R
>
success
()
{
return
of
(
ResponseCodeEnum
.
SUCCESS
);
}
public
static
<
R
>
AjaxResult
<
R
>
success
(
R
data
)
{
return
of
(
ResponseCodeEnum
.
SUCCESS
).
setData
(
data
);
}
public
static
<
R
>
AjaxResult
<
R
>
error
()
{
return
of
(
ResponseCodeEnum
.
INTERNAL_ERROR
);
}
public
static
<
R
>
AjaxResult
<
R
>
error
(
Exception
e
)
{
return
of
(
ResponseCodeEnum
.
INTERNAL_ERROR
).
setE
(
e
);
}
public
static
<
R
>
AjaxResult
<
R
>
badRequest
()
{
return
of
(
ResponseCodeEnum
.
BAD_REQUEST
);
}
public
AjaxResult
(
int
code
,
String
msg
)
{
setCodeInt
(
code
);
put
(
MSG
,
msg
);
public
static
<
R
>
AjaxResult
<
R
>
badRequest
(
String
msg
)
{
return
of
(
ResponseCodeEnum
.
BAD_REQUEST
).
setMsg
(
msg
);
}
public
AjaxResult
(
ResponseCode
responseCod
e
)
{
setCode
(
responseCod
e
);
public
static
<
R
>
AjaxResult
<
R
>
badRequest
(
Exception
e
)
{
return
of
(
ResponseCodeEnum
.
BAD_REQUEST
).
setE
(
e
);
}
public
AjaxResult
(
ResponseCode
responseCode
,
Object
result
)
{
setCode
(
responseCode
);
put
(
RESULT
,
result
);
public
static
<
R
>
AjaxResult
<
R
>
badRequest
(
String
msg
,
Exception
e
)
{
return
of
(
ResponseCodeEnum
.
BAD_REQUEST
).
setMsg
(
msg
).
setE
(
e
);
}
/**
* 响应code,默认<code>ResponseCode.SUCCESS</code>
*/
public
static
final
String
CODE
=
"code"
;
public
static
<
R
>
AjaxResult
<
R
>
of
(
ResponseCodeEnum
code
)
{
return
(
new
AjaxResult
()).
setCode
(
code
.
getCode
()).
setMsg
(
code
.
getMsg
());
}
/**
* 消息
*/
public
static
final
String
MSG
=
"msg"
;
public
static
<
R
>
AjaxResult
<
R
>
of
(
Integer
code
,
String
msg
)
{
return
(
new
AjaxResult
()).
setCode
(
code
).
setMsg
(
msg
);
}
/**
* 结果
*/
public
static
final
String
RESULT
=
"data"
;
public
static
<
R
>
AjaxResult
<
R
>
of
(
Integer
code
,
String
msg
,
R
data
)
{
return
of
(
code
,
msg
).
setData
(
data
);
}
public
static
<
R
>
AjaxResult
<
R
>
of
(
Integer
code
,
String
msg
,
R
data
,
Exception
e
)
{
return
of
(
code
,
msg
,
data
).
setE
(
e
);
}
public
boolean
equals
(
Object
o
)
{
if
(
o
==
this
)
{
return
true
;
}
else
if
(!(
o
instanceof
AjaxResult
))
{
return
false
;
}
else
{
AjaxResult
<?>
other
=
(
AjaxResult
)
o
;
if
(!
other
.
canEqual
(
this
))
{
return
false
;
}
else
if
(!
super
.
equals
(
o
))
{
return
false
;
}
else
{
label61:
{
Object
this
$code
=
this
.
getCode
();
Object
other$code
=
other
.
getCode
();
if
(
this
$code
==
null
)
{
if
(
other$code
==
null
)
{
break
label61
;
}
}
else
if
(
this
$code
.
equals
(
other$code
))
{
break
label61
;
}
return
false
;
}
label54:
{
Object
this
$msg
=
this
.
getMsg
();
Object
other$msg
=
other
.
getMsg
();
if
(
this
$msg
==
null
)
{
if
(
other$msg
==
null
)
{
break
label54
;
}
}
else
if
(
this
$msg
.
equals
(
other$msg
))
{
break
label54
;
}
return
false
;
}
Object
this
$data
=
this
.
getData
();
Object
other$data
=
other
.
getData
();
if
(
this
$data
==
null
)
{
if
(
other$data
!=
null
)
{
return
false
;
}
}
else
if
(!
this
$data
.
equals
(
other$data
))
{
return
false
;
}
Object
this
$e
=
this
.
getE
();
Object
other$e
=
other
.
getE
();
if
(
this
$e
==
null
)
{
if
(
other$e
!=
null
)
{
return
false
;
}
}
else
if
(!
this
$e
.
equals
(
other$e
))
{
return
false
;
}
return
true
;
}
}
}
protected
boolean
canEqual
(
Object
other
)
{
return
other
instanceof
AjaxResult
;
}
public
int
hashCode
()
{
int
PRIME
=
true
;
int
result
=
super
.
hashCode
();
Object
$code
=
this
.
getCode
();
result
=
result
*
59
+
(
$code
==
null
?
43
:
$code
.
hashCode
());
Object
$msg
=
this
.
getMsg
();
result
=
result
*
59
+
(
$msg
==
null
?
43
:
$msg
.
hashCode
());
Object
$data
=
this
.
getData
();
result
=
result
*
59
+
(
$data
==
null
?
43
:
$data
.
hashCode
());
Object
$e
=
this
.
getE
();
result
=
result
*
59
+
(
$e
==
null
?
43
:
$e
.
hashCode
());
return
result
;
}
public
AjaxResult
()
{
}
public
Integer
getCode
()
{
return
this
.
code
;
}
public
String
getMsg
()
{
return
this
.
msg
;
}
public
void
setCode
(
ResponseCode
code
)
{
put
(
CODE
,
code
.
getCode
())
;
public
T
getData
(
)
{
return
this
.
data
;
}
public
void
setMsg
(
String
msg
)
{
put
(
MSG
,
msg
)
;
public
Exception
getE
(
)
{
return
this
.
e
;
}
public
void
setCodeInt
(
int
code
)
{
put
(
CODE
,
code
);
public
AjaxResult
<
T
>
setCode
(
Integer
code
)
{
this
.
code
=
code
;
return
this
;
}
public
ResponseCode
getCode
()
{
return
(
ResponseCode
)
get
(
CODE
);
public
AjaxResult
<
T
>
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
return
this
;
}
public
Object
getResult
()
{
return
(
String
)
get
(
RESULT
);
public
AjaxResult
<
T
>
setData
(
T
data
)
{
this
.
data
=
data
;
return
this
;
}
public
void
setResult
(
Object
result
)
{
put
(
RESULT
,
result
);
public
AjaxResult
<
T
>
setE
(
Exception
e
)
{
this
.
e
=
e
;
return
this
;
}
public
static
AjaxResult
with
(
Object
result
)
{
return
new
AjaxResult
(
ResponseCode
.
SUCCESS
,
result
)
;
public
String
toString
(
)
{
return
"AjaxResult(code="
+
this
.
getCode
()
+
", msg="
+
this
.
getMsg
()
+
", data="
+
this
.
getData
()
+
", e="
+
this
.
getE
()
+
")"
;
}
}
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/service/impl/AdminChangeConfigServiceImpl.java
View file @
5ac447b9
...
...
@@ -18,7 +18,7 @@ public class AdminChangeConfigServiceImpl implements AdminChangeConfigService {
@Override
public
AjaxResult
queryChanges
(
ChangeConfigQueryReq
changeConfigQueryReq
)
{
if
(
changeConfigQueryReq
==
null
){
return
AjaxResult
.
with
(
ResponseCode
.
BAD_REQUEST
);
//
return AjaxResult.with(ResponseCode.BAD_REQUEST);
}
//BeanUtils.copyProperties() 参数转换器
return
null
;
...
...
@@ -27,7 +27,7 @@ public class AdminChangeConfigServiceImpl implements AdminChangeConfigService {
@Override
public
AjaxResult
queryDetail
(
Long
id
,
Long
sonChangeClassId
)
{
if
(
id
==
null
||
sonChangeClassId
==
null
){
return
AjaxResult
.
with
(
ResponseCode
.
BAD_REQUEST
);
//
return AjaxResult.with(ResponseCode.BAD_REQUEST);
}
//尝试从reids里面 获取 如果获取到了直接返回
...
...
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/ChangeFlowController.java
0 → 100644
View file @
5ac447b9
/**
* @(#)ChangeFlowController.java, 2022/11/14.
* <p/>
* Copyright 2022 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
web
.
controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.netease.mail.yanxuan.change.biz.meta.AjaxResult
;
/**
* @Author zcwang
* @Date 2022/11/14
*/
@RestController
@RequestMapping
(
"/change/flow"
)
public
class
ChangeFlowController
{
@GetMapping
(
"/detail"
)
public
AjaxResult
<
String
>
detail
()
{
}
public
AjaxResult
}
\ No newline at end of file
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/meta/model/vo/ChangeConfigVO.java
View file @
5ac447b9
...
...
@@ -5,10 +5,15 @@ import com.netease.mail.yanxuan.change.dal.meta.model.po.ChangeConfigPo;
import
java.util.List
;
import
lombok.Builder
;
import
lombok.Data
;
/**
* @author WangJiaXiang
* @date 2022/11/11/011$
*/
@Data
@Builder
public
class
ChangeConfigVO
{
/**
...
...
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