Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
Project
Project
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
曲欣亮
member-api
Commits
7475e1de
Commit
7475e1de
authored
Dec 11, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
fe40a7e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
FilmServiceImpl.java
...java/com/egolm/film/api/service/impl/FilmServiceImpl.java
+2
-1
ExceptionHandler.java
src/main/java/com/egolm/film/config/ExceptionHandler.java
+1
-1
XException.java
src/main/java/com/egolm/film/config/XException.java
+1
-1
XRException.java
src/main/java/com/egolm/film/config/XRException.java
+35
-0
No files found.
src/main/java/com/egolm/film/api/service/impl/FilmServiceImpl.java
View file @
7475e1de
...
@@ -35,6 +35,7 @@ import com.egolm.film.bean.Fc_member_film_show;
...
@@ -35,6 +35,7 @@ import com.egolm.film.bean.Fc_member_film_show;
import
com.egolm.film.bean.model.Fc_member_film_base_model
;
import
com.egolm.film.bean.model.Fc_member_film_base_model
;
import
com.egolm.film.config.WebMvcConfig
;
import
com.egolm.film.config.WebMvcConfig
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.config.XRException
;
import
com.egolm.film.util.SqlWhere
;
import
com.egolm.film.util.SqlWhere
;
...
@@ -602,7 +603,7 @@ public class FilmServiceImpl implements FilmService {
...
@@ -602,7 +603,7 @@ public class FilmServiceImpl implements FilmService {
str
=
"否决"
;
str
=
"否决"
;
}
}
int
state
=
film
.
getApply_state
().
intValue
();
int
state
=
film
.
getApply_state
().
intValue
();
throw
new
XException
(
"该片名已经在"
+
DateUtil
.
format
(
new
Date
(
passtime
*
1000
),
"yyyy年MM月dd日HH"
)
+
"时被管理员"
+
str
+
(
state
==
2
?
",通过的影片ID号为"
+
no
:
""
));
throw
new
X
R
Exception
(
"该片名已经在"
+
DateUtil
.
format
(
new
Date
(
passtime
*
1000
),
"yyyy年MM月dd日HH"
)
+
"时被管理员"
+
str
+
(
state
==
2
?
",通过的影片ID号为"
+
no
:
""
));
}
}
}
}
}
}
...
...
src/main/java/com/egolm/film/config/ExceptionHandler.java
View file @
7475e1de
...
@@ -28,7 +28,7 @@ public class ExceptionHandler implements HandlerExceptionResolver {
...
@@ -28,7 +28,7 @@ public class ExceptionHandler implements HandlerExceptionResolver {
if
(
rjx
.
getCode
()
==
200
)
{
if
(
rjx
.
getCode
()
==
200
)
{
displayInLog
=
false
;
displayInLog
=
false
;
}
}
if
(
rjx
.
getCode
()
==
300
)
{
if
(
rjx
.
getCode
()
==
300
||
ex
instanceof
XRException
)
{
displayInLog
=
false
;
displayInLog
=
false
;
logger
.
debug
(
ex
.
getMessage
());
logger
.
debug
(
ex
.
getMessage
());
}
}
...
...
src/main/java/com/egolm/film/config/XException.java
View file @
7475e1de
...
@@ -6,7 +6,7 @@ public class XException extends RuntimeException {
...
@@ -6,7 +6,7 @@ public class XException extends RuntimeException {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
pr
ivate
Rjx
rjx
=
Rjx
.
jsonErr
().
setCode
(
500
).
setMessage
(
"operation failed"
);
pr
otected
Rjx
rjx
=
Rjx
.
jsonErr
().
setCode
(
500
).
setMessage
(
"operation failed"
);
public
XException
(
String
msg
)
{
public
XException
(
String
msg
)
{
super
(
msg
);
super
(
msg
);
...
...
src/main/java/com/egolm/film/config/XRException.java
0 → 100644
View file @
7475e1de
package
com
.
egolm
.
film
.
config
;
import
com.egolm.common.bean.Rjx
;
public
class
XRException
extends
XException
{
private
static
final
long
serialVersionUID
=
1L
;
public
XRException
(
String
msg
)
{
super
(
msg
);
rjx
.
setMessage
(
msg
);
}
public
XRException
(
String
msg
,
Throwable
e
)
{
super
(
msg
,
e
);
rjx
.
setMessage
(
msg
);
}
public
XRException
(
String
msg
,
int
code
)
{
super
(
msg
);
rjx
.
setMessage
(
msg
);
rjx
.
setCode
(
code
);
}
public
XRException
(
String
msg
,
int
code
,
Throwable
e
)
{
super
(
msg
,
e
);
rjx
.
setMessage
(
msg
);
rjx
.
setCode
(
code
);
}
public
Rjx
getRjx
()
{
return
rjx
;
}
}
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