Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
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 d157091a
authored
Jul 22, 2021
by
wangnb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
账户体系方法命名规范化--think.wang
1 parent
8b5aedf0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
src/main/java/cn/com/glsx/merchants/convert/ConvertRequest.java
src/main/java/cn/com/glsx/merchants/service/MerchantDictDataService.java
src/main/java/cn/com/glsx/merchants/service/MerchantDictTypeService.java
src/main/java/cn/com/glsx/merchants/service/MerchantFileService.java
src/main/java/cn/com/glsx/merchants/service/MerchantFunctionService.java
src/main/java/cn/com/glsx/merchants/service/MerchantLogService.java
src/main/java/cn/com/glsx/merchants/service/MerchantMenuService.java
src/main/java/cn/com/glsx/merchants/service/MerchantProductService.java
src/main/java/cn/com/glsx/merchants/convert/ConvertRequest.java
View file @
d157091
...
@@ -14,26 +14,26 @@ public class ConvertRequest {
...
@@ -14,26 +14,26 @@ public class ConvertRequest {
/**
/**
* 转化请求参数
* 转化请求参数
*
*
* @param re 原入参
* @param re
原入参
* @param new
ob
转后后的参数
* @param new
Obj
转后后的参数
* @param <T> 泛型
* @param <T>
泛型
* @return
* @return
*/
*/
public
static
<
T
>
T
conver
Request
(
Object
re
,
T
newob
)
{
public
static
<
T
>
T
conver
tRequest
(
Object
re
,
T
newObj
)
{
BeanUtils
.
copyProperties
(
re
,
new
ob
);
BeanUtils
.
copyProperties
(
re
,
new
Obj
);
return
new
ob
;
return
new
Obj
;
}
}
/**
/**
* 分页对象转化参数
* 分页对象转化参数
*
*
* @param old 原入参
* @param old 原入参
* @param t 转化后的参数
* @param t
转化后的参数
* @param <T> 泛型
* @param <T> 泛型
* @return
* @return
*/
*/
public
static
<
T
>
RpcPagination
<
T
>
convertPage
(
Object
old
,
T
t
){
public
static
<
T
>
RpcPagination
<
T
>
convertPage
(
Object
old
,
T
t
)
{
RpcPagination
rpcPagination
=
new
RpcPagination
();
RpcPagination
rpcPagination
=
new
RpcPagination
();
BeanUtils
.
copyProperties
(
old
,
rpcPagination
);
BeanUtils
.
copyProperties
(
old
,
rpcPagination
);
BeanUtils
.
copyProperties
(
old
,
t
);
BeanUtils
.
copyProperties
(
old
,
t
);
rpcPagination
.
setCondition
(
t
);
rpcPagination
.
setCondition
(
t
);
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantDictDataService.java
View file @
d157091
...
@@ -34,14 +34,14 @@ public class MerchantDictDataService {
...
@@ -34,14 +34,14 @@ public class MerchantDictDataService {
private
MerchantUserService
merchantUserService
;
private
MerchantUserService
merchantUserService
;
public
void
saveDictData
(
DictDataSaveRequest
dictDataSaveRequest
)
{
public
void
saveDictData
(
DictDataSaveRequest
dictDataSaveRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
saveMerchantDictDataRemote
(
ConvertRequest
.
converRequest
(
dictDataSaveRequest
,
new
MerchantDictDataRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
saveMerchantDictDataRemote
(
ConvertRequest
.
conver
t
Request
(
dictDataSaveRequest
,
new
MerchantDictDataRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
}
}
public
void
updateDictData
(
DictDataUpdateRequest
DictDataUpdateRequest
)
{
public
void
updateDictData
(
DictDataUpdateRequest
DictDataUpdateRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
updateMerchantDictDataRemote
(
ConvertRequest
.
converRequest
(
DictDataUpdateRequest
,
new
MerchantDictDataRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
updateMerchantDictDataRemote
(
ConvertRequest
.
conver
t
Request
(
DictDataUpdateRequest
,
new
MerchantDictDataRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
@@ -56,14 +56,14 @@ public class MerchantDictDataService {
...
@@ -56,14 +56,14 @@ public class MerchantDictDataService {
}
}
public
void
deleteDictData
(
DictDataDeleteRequest
DictDataDeleteRequest
)
{
public
void
deleteDictData
(
DictDataDeleteRequest
DictDataDeleteRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
deleteMerchantDictDataRemote
(
ConvertRequest
.
converRequest
(
DictDataDeleteRequest
,
new
MerchantDictDataRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictDataRemote
.
deleteMerchantDictDataRemote
(
ConvertRequest
.
conver
t
Request
(
DictDataDeleteRequest
,
new
MerchantDictDataRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
}
}
public
List
<
DictDataResponse
>
findAllDictData
(
DictDataSearchRequest
dictDataSearchRequest
)
{
public
List
<
DictDataResponse
>
findAllDictData
(
DictDataSearchRequest
dictDataSearchRequest
)
{
RpcResponse
<
List
<
MerchantDictDataResponse
>>
merProductByPageRemote
=
merchantDictDataRemote
.
findAllRemote
(
ConvertRequest
.
converRequest
(
dictDataSearchRequest
,
new
MerchantDictDataRequest
()));
RpcResponse
<
List
<
MerchantDictDataResponse
>>
merProductByPageRemote
=
merchantDictDataRemote
.
findAllRemote
(
ConvertRequest
.
conver
t
Request
(
dictDataSearchRequest
,
new
MerchantDictDataRequest
()));
if
(
merProductByPageRemote
.
isSuccess
())
{
if
(
merProductByPageRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
merProductByPageRemote
.
getResult
(),
DictDataResponse
.
class
);
return
ConvertResponse
.
convertList
(
merProductByPageRemote
.
getResult
(),
DictDataResponse
.
class
);
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantDictTypeService.java
View file @
d157091
...
@@ -39,14 +39,14 @@ public class MerchantDictTypeService {
...
@@ -39,14 +39,14 @@ public class MerchantDictTypeService {
@SysLog
(
value
=
"新增字典类型"
,
action
=
OperateType
.
ADD
,
module
=
"字典类型管理"
)
@SysLog
(
value
=
"新增字典类型"
,
action
=
OperateType
.
ADD
,
module
=
"字典类型管理"
)
public
void
saveDictType
(
DictTypeSaveRequest
dictTypeSaveRequest
)
{
public
void
saveDictType
(
DictTypeSaveRequest
dictTypeSaveRequest
)
{
merchantUserService
.
setUser
(
dictTypeSaveRequest
);
merchantUserService
.
setUser
(
dictTypeSaveRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
saveMerchantDictTypeRemote
(
ConvertRequest
.
converRequest
(
dictTypeSaveRequest
,
new
MerchantDictTypeRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
saveMerchantDictTypeRemote
(
ConvertRequest
.
conver
t
Request
(
dictTypeSaveRequest
,
new
MerchantDictTypeRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
}
}
public
void
updateDictType
(
DictTypeUpdateRequest
dictTypeUpdateRequest
)
{
public
void
updateDictType
(
DictTypeUpdateRequest
dictTypeUpdateRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
updateMerchantDictTypeRemote
(
ConvertRequest
.
converRequest
(
dictTypeUpdateRequest
,
new
MerchantDictTypeRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
updateMerchantDictTypeRemote
(
ConvertRequest
.
conver
t
Request
(
dictTypeUpdateRequest
,
new
MerchantDictTypeRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
@@ -61,7 +61,7 @@ public class MerchantDictTypeService {
...
@@ -61,7 +61,7 @@ public class MerchantDictTypeService {
}
}
public
void
deleteDictType
(
DictTypeDeleteRequest
dictTypeDeleteRequest
)
{
public
void
deleteDictType
(
DictTypeDeleteRequest
dictTypeDeleteRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
deleteMerchantDictTypeRemote
(
ConvertRequest
.
converRequest
(
dictTypeDeleteRequest
,
new
MerchantDictTypeRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantDictTypeRemote
.
deleteMerchantDictTypeRemote
(
ConvertRequest
.
conver
t
Request
(
dictTypeDeleteRequest
,
new
MerchantDictTypeRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantFileService.java
View file @
d157091
...
@@ -30,7 +30,7 @@ public class MerchantFileService {
...
@@ -30,7 +30,7 @@ public class MerchantFileService {
public
List
<
FileResponse
>
findMerchantFile
(
FileSearchRequest
fileSearchRequest
){
public
List
<
FileResponse
>
findMerchantFile
(
FileSearchRequest
fileSearchRequest
){
//入参集合转化
//入参集合转化
RpcResponse
<
List
<
MerchantFileResponse
>>
merchantFileRemoteRpc
=
RpcResponse
<
List
<
MerchantFileResponse
>>
merchantFileRemoteRpc
=
merchantFileRemote
.
findMerchantFileRemote
(
ConvertRequest
.
converRequest
(
fileSearchRequest
,
new
MerchantFileRequest
()));
merchantFileRemote
.
findMerchantFileRemote
(
ConvertRequest
.
conver
t
Request
(
fileSearchRequest
,
new
MerchantFileRequest
()));
//判断调用远程是否成功
//判断调用远程是否成功
if
(
merchantFileRemoteRpc
.
isSuccess
())
{
if
(
merchantFileRemoteRpc
.
isSuccess
())
{
//出参集合转化
//出参集合转化
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantFunctionService.java
View file @
d157091
...
@@ -34,14 +34,14 @@ public class MerchantFunctionService {
...
@@ -34,14 +34,14 @@ public class MerchantFunctionService {
private
MerchantProductFunctionRemote
merchantProductFunctionRemote
;
private
MerchantProductFunctionRemote
merchantProductFunctionRemote
;
public
void
saveMerchantFunction
(
FunctionSaveRequest
functionSaveRequest
)
{
public
void
saveMerchantFunction
(
FunctionSaveRequest
functionSaveRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductFunctionRemote
.
saveMerchantProductFunctionRemote
(
ConvertRequest
.
converRequest
(
functionSaveRequest
,
new
MerchantProductFunctionRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductFunctionRemote
.
saveMerchantProductFunctionRemote
(
ConvertRequest
.
conver
t
Request
(
functionSaveRequest
,
new
MerchantProductFunctionRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
}
}
public
void
updateMerchantFunction
(
FunctionUpdateRequest
functionUpdateRequest
)
{
public
void
updateMerchantFunction
(
FunctionUpdateRequest
functionUpdateRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductFunctionRemote
.
updateMerchantProductFunctionRemote
(
ConvertRequest
.
converRequest
(
functionUpdateRequest
,
new
MerchantProductFunctionRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductFunctionRemote
.
updateMerchantProductFunctionRemote
(
ConvertRequest
.
conver
t
Request
(
functionUpdateRequest
,
new
MerchantProductFunctionRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantLogService.java
View file @
d157091
...
@@ -30,7 +30,7 @@ public class MerchantLogService {
...
@@ -30,7 +30,7 @@ public class MerchantLogService {
private
MerchantLogRemote
merchantLogRemote
;
private
MerchantLogRemote
merchantLogRemote
;
public
MerchantLogResponse
saveMerchantLog
(
LogRequest
logRequest
)
{
public
MerchantLogResponse
saveMerchantLog
(
LogRequest
logRequest
)
{
RpcResponse
<
MerchantLogResponse
>
booleanRpcResponse
=
merchantLogRemote
.
saveMerchantLogRemote
(
ConvertRequest
.
converRequest
(
logRequest
,
new
MerchantLogRequest
()));
RpcResponse
<
MerchantLogResponse
>
booleanRpcResponse
=
merchantLogRemote
.
saveMerchantLogRemote
(
ConvertRequest
.
conver
t
Request
(
logRequest
,
new
MerchantLogRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
else
{
}
else
{
...
@@ -39,7 +39,7 @@ public class MerchantLogService {
...
@@ -39,7 +39,7 @@ public class MerchantLogService {
}
}
public
void
updateMerchantLog
(
LogRequest
logRequest
)
{
public
void
updateMerchantLog
(
LogRequest
logRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantLogRemote
.
updateMerchantLogRemote
(
ConvertRequest
.
converRequest
(
logRequest
,
new
MerchantLogRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantLogRemote
.
updateMerchantLogRemote
(
ConvertRequest
.
conver
t
Request
(
logRequest
,
new
MerchantLogRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantMenuService.java
View file @
d157091
...
@@ -34,7 +34,7 @@ public class MerchantMenuService {
...
@@ -34,7 +34,7 @@ public class MerchantMenuService {
private
MerchantProductMenuRemote
merchantProductMenuRemote
;
private
MerchantProductMenuRemote
merchantProductMenuRemote
;
public
List
<
MenuResponse
>
findMerProMenuTreeRemote
(
MenuSearchRequest
menuSearchRequest
)
{
public
List
<
MenuResponse
>
findMerProMenuTreeRemote
(
MenuSearchRequest
menuSearchRequest
)
{
RpcResponse
<
List
<
MerchantProductMenuResponse
>>
merProMenuTreeRemote
=
merchantProductMenuRemote
.
findMerProMenuTreeRemote
(
ConvertRequest
.
converRequest
(
menuSearchRequest
,
new
MerchantProductMenuRequest
()));
RpcResponse
<
List
<
MerchantProductMenuResponse
>>
merProMenuTreeRemote
=
merchantProductMenuRemote
.
findMerProMenuTreeRemote
(
ConvertRequest
.
conver
t
Request
(
menuSearchRequest
,
new
MerchantProductMenuRequest
()));
if
(
merProMenuTreeRemote
.
isSuccess
())
{
if
(
merProMenuTreeRemote
.
isSuccess
())
{
List
<
MenuResponse
>
menuResponseList
=
ConvertResponse
.
convertList
(
merProMenuTreeRemote
.
getResult
(),
MenuResponse
.
class
);
List
<
MenuResponse
>
menuResponseList
=
ConvertResponse
.
convertList
(
merProMenuTreeRemote
.
getResult
(),
MenuResponse
.
class
);
return
menuResponseList
;
return
menuResponseList
;
...
@@ -43,7 +43,7 @@ public class MerchantMenuService {
...
@@ -43,7 +43,7 @@ public class MerchantMenuService {
}
}
public
void
saveMerchantProductMenuRemote
(
MenuSaveRequest
menuSaveRequest
)
{
public
void
saveMerchantProductMenuRemote
(
MenuSaveRequest
menuSaveRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductMenuRemote
.
saveMerchantProductMenuRemote
(
ConvertRequest
.
converRequest
(
menuSaveRequest
,
new
MerchantProductMenuRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductMenuRemote
.
saveMerchantProductMenuRemote
(
ConvertRequest
.
conver
t
Request
(
menuSaveRequest
,
new
MerchantProductMenuRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
@@ -58,7 +58,7 @@ public class MerchantMenuService {
...
@@ -58,7 +58,7 @@ public class MerchantMenuService {
}
}
public
void
updateMerchantProductMenuRemote
(
MenuUpdateRequest
menuUpdateRequest
)
{
public
void
updateMerchantProductMenuRemote
(
MenuUpdateRequest
menuUpdateRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductMenuRemote
.
updateMerchantProductMenuRemote
(
ConvertRequest
.
converRequest
(
menuUpdateRequest
,
new
MerchantProductMenuRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductMenuRemote
.
updateMerchantProductMenuRemote
(
ConvertRequest
.
conver
t
Request
(
menuUpdateRequest
,
new
MerchantProductMenuRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantProductService.java
View file @
d157091
...
@@ -42,7 +42,7 @@ public class MerchantProductService {
...
@@ -42,7 +42,7 @@ public class MerchantProductService {
}
}
public
void
saveProduct
(
ProductSaveRequest
productSearchRequest
)
{
public
void
saveProduct
(
ProductSaveRequest
productSearchRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductRemote
.
saveMerchantProductRemote
(
ConvertRequest
.
converRequest
(
productSearchRequest
,
new
MerchantProductRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductRemote
.
saveMerchantProductRemote
(
ConvertRequest
.
conver
t
Request
(
productSearchRequest
,
new
MerchantProductRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
@@ -57,7 +57,7 @@ public class MerchantProductService {
...
@@ -57,7 +57,7 @@ public class MerchantProductService {
}
}
public
void
updateProduct
(
ProductUpdateRequest
productUpdateRequest
)
{
public
void
updateProduct
(
ProductUpdateRequest
productUpdateRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductRemote
.
updateProductRemote
(
ConvertRequest
.
converRequest
(
productUpdateRequest
,
new
MerchantProductRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantProductRemote
.
updateProductRemote
(
ConvertRequest
.
conver
t
Request
(
productUpdateRequest
,
new
MerchantProductRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
...
...
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