Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
292270fb
Commit
292270fb
authored
Mar 17, 2021
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持退出交易异常
parent
8bc6463e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
+23
-1
ExitTransactionException.java
...entation/noui/api/exception/ExitTransactionException.java
+16
-0
AbstractCommonController.java
...resentation/noui/controller/AbstractCommonController.java
+7
-1
No files found.
src/main/java/org/sss/presentation/noui/api/exception/ExitTransactionException.java
0 → 100644
View file @
292270fb
package
org
.
sss
.
presentation
.
noui
.
api
.
exception
;
public
class
ExitTransactionException
extends
RuntimeException
{
private
String
errorCode
;
public
ExitTransactionException
(
String
message
,
String
errorCode
)
{
super
(
message
);
this
.
errorCode
=
errorCode
;
}
public
String
getErrorCode
()
{
return
errorCode
;
}
}
src/main/java/org/sss/presentation/noui/controller/AbstractCommonController.java
View file @
292270fb
...
...
@@ -8,6 +8,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.sss.common.model.*
;
import
org.sss.presentation.noui.api.exception.ExitTransactionException
;
import
org.sss.presentation.noui.api.exception.NoUiException
;
import
org.sss.presentation.noui.api.model.Alias
;
import
org.sss.presentation.noui.api.request.NoUiRequest
;
...
...
@@ -181,7 +182,12 @@ public abstract class AbstractCommonController {
ret
=
ResultUtil
.
result
(
NoUiPresentationUtil
.
retCode
(
context
),
NoUiPresentationUtil
.
retMsg
(
context
),
afterReturnData
,
paginationData
,
NoUiPresentationUtil
.
handleErrorReturnData
(
context
,
alias
),
NoUiPresentationUtil
.
handleCodeTableReturnData
(
context
,
alias
),
noUiVersion
.
getVersion
());
}
catch
(
Throwable
e
)
{
}
catch
(
ExitTransactionException
exitTrans
)
{
ret
=
ResultUtil
.
result
(
exitTrans
.
getErrorCode
(),
exitTrans
.
getMessage
(),
"service error"
,
noUiVersion
.
getVersion
());
}
catch
(
Throwable
e
)
{
log
.
error
(
"OnClick command error"
,
e
);
ret
=
ResultUtil
.
result
(
ErrorCodes
.
ERROR
,
"hander error"
,
"service error"
,
noUiVersion
.
getVersion
());
TxInfo
.
recordException
(
e
);
...
...
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