Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f516cd77
authored
Oct 09, 2023
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
全局BusinessException异常处理:使用自定义
1 parent
d7c8078c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
22 deletions
platform-process/src/main/java/cn/com/glsx/Application.java
platform-process/src/main/java/cn/com/glsx/process/aop/CustomResponseResultBodyAdvice.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstService.java
platform-process/src/main/java/cn/com/glsx/process/util/SopTplParamHandler.java
platform-process/src/main/java/cn/com/glsx/Application.java
View file @
f516cd7
package
cn
.
com
.
glsx
;
package
cn
.
com
.
glsx
;
import
static
java
.
time
.
ZoneId
.
of
;
import
static
java
.
util
.
TimeZone
.
getTimeZone
;
import
java.util.TimeZone
;
import
javax.annotation.PostConstruct
;
import
cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil
;
import
com.glsx.plat.context.EnableRestAdmin
;
import
org.apache.dubbo.config.spring.context.annotation.EnableDubbo
;
import
org.apache.dubbo.config.spring.context.annotation.EnableDubbo
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
...
@@ -16,9 +12,11 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -16,9 +12,11 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
com.glsx.plat.context.EnableRestAdmin
;
import
javax.annotation.PostConstruct
;
import
java.util.TimeZone
;
import
cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil
;
import
static
java
.
time
.
ZoneId
.
of
;
import
static
java
.
util
.
TimeZone
.
getTimeZone
;
/**
/**
* @author payu
* @author payu
...
@@ -26,7 +24,7 @@ import cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil;
...
@@ -26,7 +24,7 @@ import cn.com.glsx.process.job.xxljob.core.SopXxlJobUtil;
@EnableDubbo
@EnableDubbo
@EnableRestAdmin
@EnableRestAdmin
@EnableDiscoveryClient
@EnableDiscoveryClient
@EnableFeignClients
(
basePackages
=
{
"cn.com.glsx.*.api"
,
"cn.com.glsx.process.modules.client"
})
@EnableFeignClients
(
basePackages
=
{
"cn.com.glsx.*.api"
})
@SpringBootApplication
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableAspectJAutoProxy
@EnableTransactionManagement
@EnableTransactionManagement
...
...
platform-process/src/main/java/cn/com/glsx/process/aop/CustomResponseResultBodyAdvice.java
0 → 100644
View file @
f516cd7
package
cn
.
com
.
glsx
.
process
.
aop
;
import
cn.hutool.json.JSONUtil
;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
com.glsx.plat.core.web.OpenApiResult
;
import
com.glsx.plat.core.web.R
;
import
com.glsx.plat.core.web.Result
;
import
com.glsx.plat.exception.BusinessException
;
import
com.glsx.plat.exception.OpenApiResultException
;
import
com.glsx.plat.exception.ResultException
;
import
com.glsx.plat.exception.ServiceException
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.annotation.AnnotatedElementUtils
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.server.ServerHttpRequest
;
import
org.springframework.http.server.ServerHttpResponse
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.context.request.WebRequest
;
import
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
;
import
org.springframework.web.util.WebUtils
;
import
java.lang.annotation.Annotation
;
@Slf4j
@RestControllerAdvice
public
class
CustomResponseResultBodyAdvice
implements
ResponseBodyAdvice
<
Object
>
{
private
static
final
Class
<?
extends
Annotation
>
ANNOTATION_TYPE
=
ResponseResultBody
.
class
;
/**
* 判断类或者方法是否使用了 @ResponseResultBody
*/
@Override
public
boolean
supports
(
MethodParameter
returnType
,
Class
<?
extends
HttpMessageConverter
<?>>
converterType
)
{
return
AnnotatedElementUtils
.
hasAnnotation
(
returnType
.
getContainingClass
(),
ANNOTATION_TYPE
)
||
returnType
.
hasMethodAnnotation
(
ANNOTATION_TYPE
);
}
/**
* 当类或者方法使用了 @ResponseResultBody 就会调用这个方法
*/
@Override
public
Object
beforeBodyWrite
(
Object
body
,
MethodParameter
returnType
,
MediaType
selectedContentType
,
Class
<?
extends
HttpMessageConverter
<?>>
selectedConverterType
,
ServerHttpRequest
request
,
ServerHttpResponse
response
)
{
if
(
body
instanceof
Result
)
{
return
body
;
}
if
(
body
instanceof
OpenApiResult
)
{
return
body
;
}
if
(
body
instanceof
String
)
{
return
JSONUtil
.
toJsonStr
(
Result
.
success
(
body
));
}
return
Result
.
success
(
body
);
}
/**
* 提供对标准Spring MVC异常的处理
*
* @param ex the target exception
* @param request the current request
*/
@ExceptionHandler
(
Exception
.
class
)
public
final
ResponseEntity
<
Result
<?>>
exceptionHandler
(
Exception
ex
,
WebRequest
request
)
{
log
.
error
(
"ExceptionHandler: {}"
,
ex
.
getMessage
());
ex
.
printStackTrace
();
HttpHeaders
headers
=
new
HttpHeaders
();
if
(
ex
instanceof
ResultException
)
{
return
this
.
handleResultException
((
ResultException
)
ex
,
headers
,
request
);
}
if
(
ex
instanceof
ServiceException
)
{
ServiceException
exception
=
(
ServiceException
)
ex
;
return
this
.
handleResultException
(
ResultException
.
create
(
exception
.
getCode
(),
exception
.
getMessage
()),
headers
,
request
);
}
if
(
ex
instanceof
BusinessException
)
{
BusinessException
exception
=
(
BusinessException
)
ex
;
return
this
.
handleBusinessException
(
exception
,
headers
,
request
);
}
return
this
.
handleException
(
ex
,
headers
,
request
);
}
@ExceptionHandler
(
OpenApiResultException
.
class
)
public
final
ResponseEntity
<
OpenApiResult
<?>>
openApiResultExceptionHandler
(
Exception
ex
,
WebRequest
request
)
{
log
.
error
(
"OpenApiResultExceptionHandler: {}"
,
ex
.
getMessage
());
ex
.
printStackTrace
();
return
this
.
handleResultException
((
OpenApiResultException
)
ex
,
new
HttpHeaders
(),
request
);
}
/**
* 对ResultException类返回返回结果的处理
*/
protected
ResponseEntity
<
Result
<?>>
handleResultException
(
ResultException
ex
,
HttpHeaders
headers
,
WebRequest
request
)
{
Result
<?>
body
=
ex
.
getResultEntity
();
return
this
.
handleResultExceptionInternal
(
ex
,
body
,
headers
,
HttpStatus
.
INTERNAL_SERVER_ERROR
,
request
);
}
/**
* 对 BusinessException 类返回返回结果的处理
*/
protected
ResponseEntity
<
Result
<?>>
handleBusinessException
(
BusinessException
ex
,
HttpHeaders
headers
,
WebRequest
request
)
{
R
resultEntity
=
ex
.
getResultEntity
();
int
status
=
resultEntity
.
getCode
();
Result
<?>
body
=
new
Result
(
status
,
resultEntity
.
getMessage
());
return
this
.
handleResultExceptionInternal
(
ex
,
body
,
headers
,
status
,
request
);
}
/**
* 对ResultException类返回返回结果的处理
*/
protected
ResponseEntity
<
OpenApiResult
<?>>
handleResultException
(
OpenApiResultException
ex
,
HttpHeaders
headers
,
WebRequest
request
)
{
OpenApiResult
<?>
body
=
ex
.
getResultEntity
();
return
this
.
handleOpenApiResultExceptionInternal
(
ex
,
body
,
headers
,
HttpStatus
.
INTERNAL_SERVER_ERROR
,
request
);
}
/**
* 异常类的统一处理
*/
protected
ResponseEntity
<
Result
<?>>
handleException
(
Exception
ex
,
HttpHeaders
headers
,
WebRequest
request
)
{
//返回异常消息
HttpStatus
status
=
HttpStatus
.
INTERNAL_SERVER_ERROR
;
Result
<?>
body
=
new
Result
(
status
.
value
(),
ex
.
getMessage
());
return
this
.
handleResultExceptionInternal
(
ex
,
body
,
headers
,
status
,
request
);
}
/**
* org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler#handleExceptionInternal(java.lang.Exception, java.lang.Object, org.springframework.http.HttpHeaders, org.springframework.http.HttpStatus, org.springframework.web.context.request.WebRequest)
* <p>
* A single place to customize the response body of all exception types.
* <p>The default implementation sets the {@link WebUtils#ERROR_EXCEPTION_ATTRIBUTE}
* request attribute and creates a {@link ResponseEntity} from the given
* body, headers, and status.
*/
protected
ResponseEntity
<
Result
<?>>
handleResultExceptionInternal
(
Exception
ex
,
Result
<?>
body
,
HttpHeaders
headers
,
HttpStatus
status
,
WebRequest
request
)
{
if
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
equals
(
status
))
{
request
.
setAttribute
(
WebUtils
.
ERROR_EXCEPTION_ATTRIBUTE
,
ex
,
WebRequest
.
SCOPE_REQUEST
);
}
return
new
ResponseEntity
<>(
body
,
headers
,
status
);
}
/**
* 使用自定义异常状态码
*
* @param ex
* @param body
* @param headers
* @param status
* @param request
* @return
*/
protected
ResponseEntity
<
Result
<?>>
handleResultExceptionInternal
(
Exception
ex
,
Result
<?>
body
,
HttpHeaders
headers
,
int
status
,
WebRequest
request
)
{
if
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
()
==
status
)
{
request
.
setAttribute
(
WebUtils
.
ERROR_EXCEPTION_ATTRIBUTE
,
ex
,
WebRequest
.
SCOPE_REQUEST
);
}
return
new
ResponseEntity
<>(
body
,
headers
,
status
);
}
protected
ResponseEntity
<
OpenApiResult
<?>>
handleOpenApiResultExceptionInternal
(
Exception
ex
,
OpenApiResult
<?>
body
,
HttpHeaders
headers
,
HttpStatus
status
,
WebRequest
request
)
{
if
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
equals
(
status
))
{
request
.
setAttribute
(
WebUtils
.
ERROR_EXCEPTION_ATTRIBUTE
,
ex
,
WebRequest
.
SCOPE_REQUEST
);
}
return
new
ResponseEntity
<>(
body
,
headers
,
status
);
}
}
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstService.java
View file @
f516cd7
...
@@ -17,7 +17,6 @@ import cn.com.glsx.process.modules.model.enums.SopInstNodeStatusEnum;
...
@@ -17,7 +17,6 @@ import cn.com.glsx.process.modules.model.enums.SopInstNodeStatusEnum;
import
cn.com.glsx.process.modules.model.enums.SopInstStatusEnum
;
import
cn.com.glsx.process.modules.model.enums.SopInstStatusEnum
;
import
cn.com.glsx.process.modules.model.enums.SopTplNodeSkipableEnum
;
import
cn.com.glsx.process.modules.model.enums.SopTplNodeSkipableEnum
;
import
cn.com.glsx.process.modules.rabbitmq.MsgProducer
;
import
cn.com.glsx.process.modules.rabbitmq.MsgProducer
;
import
cn.com.glsx.process.modules.rabbitmq.RabbitConfig
;
import
cn.com.glsx.process.modules.rabbitmq.RabbitMQConstants
;
import
cn.com.glsx.process.modules.rabbitmq.RabbitMQConstants
;
import
cn.com.glsx.process.util.FileUploadServerData
;
import
cn.com.glsx.process.util.FileUploadServerData
;
import
cn.com.glsx.process.util.FileUploadUtil
;
import
cn.com.glsx.process.util.FileUploadUtil
;
...
@@ -27,7 +26,7 @@ import com.github.pagehelper.PageHelper;
...
@@ -27,7 +26,7 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.plat.core.enums.SysConstants
;
import
com.glsx.plat.core.enums.SysConstants
;
import
com.glsx.plat.core.web.Result
;
import
com.glsx.plat.core.web.Result
;
import
com.glsx.plat.exception.
Result
Exception
;
import
com.glsx.plat.exception.
Business
Exception
;
import
com.glsx.plat.exception.SystemMessage
;
import
com.glsx.plat.exception.SystemMessage
;
import
com.glsx.plat.office.excel.EasyExcelUtils
;
import
com.glsx.plat.office.excel.EasyExcelUtils
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
...
@@ -276,13 +275,13 @@ public class SopInstService {
...
@@ -276,13 +275,13 @@ public class SopInstService {
List
<
SopTplGrant
>
sopTplGrants
=
sopInstDTO
.
getSopTplGrants
();
List
<
SopTplGrant
>
sopTplGrants
=
sopInstDTO
.
getSopTplGrants
();
if
(
CollectionUtils
.
isEmpty
(
sopTplGrants
))
{
if
(
CollectionUtils
.
isEmpty
(
sopTplGrants
))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"请选择门店"
);
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"请选择门店"
);
}
}
List
<
String
>
groupIds
=
sopTplGrants
.
stream
().
map
(
sopTplGrant
->
sopTplGrant
.
getGroupId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
groupIds
=
sopTplGrants
.
stream
().
map
(
sopTplGrant
->
sopTplGrant
.
getGroupId
()).
collect
(
Collectors
.
toList
());
List
<
SopTplGrant
>
grants
=
sopTplGrantMapper
.
selectInUseGrants
(
tplId
,
groupIds
);
List
<
SopTplGrant
>
grants
=
sopTplGrantMapper
.
selectInUseGrants
(
tplId
,
groupIds
);
if
(!
CollectionUtils
.
isEmpty
(
grants
))
{
if
(!
CollectionUtils
.
isEmpty
(
grants
))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
String
.
format
(
"%s已存在该旅程,请确认后重新操作"
,
grants
.
get
(
0
).
getGroupName
()));
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
String
.
format
(
"%s已存在该旅程,请确认后重新操作"
,
grants
.
get
(
0
).
getGroupName
()));
}
}
//新增派发门店记录
//新增派发门店记录
...
@@ -341,7 +340,7 @@ public class SopInstService {
...
@@ -341,7 +340,7 @@ public class SopInstService {
if
(!
Objects
.
isNull
(
sopInstNodeTemp
)
if
(!
Objects
.
isNull
(
sopInstNodeTemp
)
&&
sopInstNodeTemp
.
getNodeSkip
().
equals
(
SopInstNodeSkipEnum
.
TRUE
.
getValue
())
&&
sopInstNodeTemp
.
getNodeSkip
().
equals
(
SopInstNodeSkipEnum
.
TRUE
.
getValue
())
&&
sopTplNode
.
getNodeSkipable
().
equals
(
SopTplNodeSkipableEnum
.
NO
.
getValue
()))
{
&&
sopTplNode
.
getNodeSkipable
().
equals
(
SopTplNodeSkipableEnum
.
NO
.
getValue
()))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
String
.
format
(
"节点 %s 不可跳过"
,
sopInstNode
.
getNodeName
()));
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
String
.
format
(
"节点 %s 不可跳过"
,
sopInstNode
.
getNodeName
()));
}
}
sopInstNode
.
setNodeSkip
(!
Objects
.
isNull
(
sopInstNodeTemp
)
?
sopInstNodeTemp
.
getNodeSkip
()
:
SopInstNodeSkipEnum
.
FALSE
.
getValue
());
sopInstNode
.
setNodeSkip
(!
Objects
.
isNull
(
sopInstNodeTemp
)
?
sopInstNodeTemp
.
getNodeSkip
()
:
SopInstNodeSkipEnum
.
FALSE
.
getValue
());
...
@@ -361,7 +360,7 @@ public class SopInstService {
...
@@ -361,7 +360,7 @@ public class SopInstService {
String
sopJourneyId
=
search
.
getSopJourneyId
();
String
sopJourneyId
=
search
.
getSopJourneyId
();
SopInst
sopInst
=
sopInstMapper
.
selectByPrimaryKey
(
sopJourneyId
);
SopInst
sopInst
=
sopInstMapper
.
selectByPrimaryKey
(
sopJourneyId
);
if
(
Objects
.
isNull
(
sopInst
))
{
if
(
Objects
.
isNull
(
sopInst
))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"该模板实例不存在!"
);
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"该模板实例不存在!"
);
}
}
SopTplGrant
sopTplGrant
=
sopTplGrantMapper
.
selectByPrimaryKey
(
sopInst
.
getGrantId
());
SopTplGrant
sopTplGrant
=
sopTplGrantMapper
.
selectByPrimaryKey
(
sopInst
.
getGrantId
());
...
@@ -413,12 +412,12 @@ public class SopInstService {
...
@@ -413,12 +412,12 @@ public class SopInstService {
String
oneId
=
body
.
getOneId
();
String
oneId
=
body
.
getOneId
();
Result
<
CustomerSopJourneyDetailDTO
>
detail
=
customerSopJourneyFeignClient
.
detail
(
orgId
,
sopJourneyId
,
oneId
);
Result
<
CustomerSopJourneyDetailDTO
>
detail
=
customerSopJourneyFeignClient
.
detail
(
orgId
,
sopJourneyId
,
oneId
);
if
(!
SysConstants
.
ResultStatus
.
success
.
getCode
().
equals
(
detail
.
getCode
()))
{
if
(!
SysConstants
.
ResultStatus
.
success
.
getCode
().
equals
(
detail
.
getCode
()))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"查询客户信息异常"
);
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"查询客户信息异常"
);
}
}
CustomerSopJourneyDetailDTO
customerDetail
=
detail
.
getData
();
CustomerSopJourneyDetailDTO
customerDetail
=
detail
.
getData
();
if
(
Objects
.
isNull
(
customerDetail
))
{
if
(
Objects
.
isNull
(
customerDetail
))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"客户信息不存在"
);
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"客户信息不存在"
);
}
}
ModifySopJourneyStageRequest
request
=
new
ModifySopJourneyStageRequest
();
ModifySopJourneyStageRequest
request
=
new
ModifySopJourneyStageRequest
();
...
@@ -449,7 +448,7 @@ public class SopInstService {
...
@@ -449,7 +448,7 @@ public class SopInstService {
search
.
setPageSize
(
5000
);
search
.
setPageSize
(
5000
);
SopInst
sopInst
=
sopInstMapper
.
selectByPrimaryKey
(
search
.
getSopJourneyId
());
SopInst
sopInst
=
sopInstMapper
.
selectByPrimaryKey
(
search
.
getSopJourneyId
());
if
(
Objects
.
isNull
(
sopInst
))
{
if
(
Objects
.
isNull
(
sopInst
))
{
throw
Result
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"模板实例不存在"
);
throw
Business
Exception
.
create
(
SystemMessage
.
ARGS_ERROR
.
getCode
(),
"模板实例不存在"
);
}
}
List
<
SopCustomerExcelDTO
>
data
=
new
ArrayList
<>();
List
<
SopCustomerExcelDTO
>
data
=
new
ArrayList
<>();
...
@@ -481,14 +480,14 @@ public class SopInstService {
...
@@ -481,14 +480,14 @@ public class SopInstService {
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
String
.
format
(
"客户数据_%d"
,
now
.
getTime
()),
bytes
,
"xlsx"
);
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
String
.
format
(
"客户数据_%d"
,
now
.
getTime
()),
bytes
,
"xlsx"
);
return
fileUploadServerData
;
return
fileUploadServerData
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
Result
Exception
.
create
(
SystemMessage
.
DATA_HANDLE_ERROR
.
getCode
(),
"客户数据导出处理异常"
);
throw
Business
Exception
.
create
(
SystemMessage
.
DATA_HANDLE_ERROR
.
getCode
(),
"客户数据导出处理异常"
);
}
}
}
}
private
void
getCustomersForExcel
(
SopCustomerSearch
search
,
List
<
CustomerSopJourneyDTO
>
customerSopJourneyDTOList
)
{
private
void
getCustomersForExcel
(
SopCustomerSearch
search
,
List
<
CustomerSopJourneyDTO
>
customerSopJourneyDTOList
)
{
Result
<
PageInfo
<
CustomerSopJourneyDTO
>>
customersResult
=
customers
(
search
);
Result
<
PageInfo
<
CustomerSopJourneyDTO
>>
customersResult
=
customers
(
search
);
if
(!
SysConstants
.
ResultStatus
.
success
.
getCode
().
equals
(
customersResult
.
getCode
()))
{
if
(!
SysConstants
.
ResultStatus
.
success
.
getCode
().
equals
(
customersResult
.
getCode
()))
{
throw
Result
Exception
.
create
(
SystemMessage
.
MICROSERVICE_CALL_FAIL
.
getCode
(),
"查询客户数据接口异常"
);
throw
Business
Exception
.
create
(
SystemMessage
.
MICROSERVICE_CALL_FAIL
.
getCode
(),
"查询客户数据接口异常"
);
}
}
PageInfo
<
CustomerSopJourneyDTO
>
pageInfo
=
customersResult
.
getData
();
PageInfo
<
CustomerSopJourneyDTO
>
pageInfo
=
customersResult
.
getData
();
...
...
platform-process/src/main/java/cn/com/glsx/process/util/SopTplParamHandler.java
View file @
f516cd7
...
@@ -3,7 +3,7 @@ package cn.com.glsx.process.util;
...
@@ -3,7 +3,7 @@ package cn.com.glsx.process.util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.glsx.plat.exception.
Result
Exception
;
import
com.glsx.plat.exception.
Business
Exception
;
import
com.glsx.plat.exception.SystemMessage
;
import
com.glsx.plat.exception.SystemMessage
;
import
lombok.experimental.UtilityClass
;
import
lombok.experimental.UtilityClass
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -24,7 +24,7 @@ public class SopTplParamHandler {
...
@@ -24,7 +24,7 @@ public class SopTplParamHandler {
JsonNode
rootNode
=
objectMapper
.
readTree
(
tplParam
);
JsonNode
rootNode
=
objectMapper
.
readTree
(
tplParam
);
return
processNode
(
rootNode
);
return
processNode
(
rootNode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
Result
Exception
.
create
(
SystemMessage
.
DATA_HANDLE_ERROR
.
getCode
(),
"参数转json对象异常"
);
throw
Business
Exception
.
create
(
SystemMessage
.
DATA_HANDLE_ERROR
.
getCode
(),
"参数转json对象异常"
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment