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 dffa38b6
authored
Aug 16, 2021
by
wangnb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
账户体系账户类型名称重复校验--think.wang
1 parent
99d78530
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
src/main/java/cn/com/glsx/merchants/enums/BusinessExceptionEnum.java
src/main/java/cn/com/glsx/merchants/service/MerchantAccountTypeService.java
src/main/java/cn/com/glsx/merchants/enums/BusinessExceptionEnum.java
0 → 100644
View file @
dffa38b
package
cn
.
com
.
glsx
.
merchants
.
enums
;
import
cn.com.glsx.framework.core.enums.ErrorEnum
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 商户平台业务异常编码
*
* @author zhouhaibao
* @date 2021/7/12
*/
public
enum
BusinessExceptionEnum
implements
ErrorEnum
{
ACCOUNT_NAME_EXIT
(
"13120001"
,
"该名称已被使用,请修改"
),
;
private
String
value
;
private
String
displayName
;
static
Map
<
String
,
BusinessExceptionEnum
>
enumMap
=
new
HashMap
();
BusinessExceptionEnum
(
String
value
,
String
displayName
)
{
this
.
value
=
value
;
this
.
displayName
=
displayName
;
}
public
String
getValue
()
{
return
this
.
value
;
}
public
String
getDisplayName
()
{
return
this
.
displayName
;
}
public
static
BusinessExceptionEnum
getEnum
(
String
value
)
{
return
enumMap
.
get
(
value
);
}
static
{
BusinessExceptionEnum
[]
var0
=
values
();
int
var1
=
var0
.
length
;
for
(
int
var2
=
0
;
var2
<
var1
;
++
var2
)
{
BusinessExceptionEnum
code
=
var0
[
var2
];
enumMap
.
put
(
code
.
getValue
(),
code
);
}
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantAccountTypeService.java
View file @
dffa38b
...
@@ -6,6 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
...
@@ -6,6 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
cn.com.glsx.merchants.contants.Contants
;
import
cn.com.glsx.merchants.contants.Contants
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.enums.BusinessExceptionEnum
;
import
cn.com.glsx.merchants.enums.CommonStatusEnum
;
import
cn.com.glsx.merchants.enums.CommonStatusEnum
;
import
cn.com.glsx.merchants.model.request.AccountFunctionRelationRequest
;
import
cn.com.glsx.merchants.model.request.AccountFunctionRelationRequest
;
import
cn.com.glsx.merchants.model.request.MerchantAccountTypeRequest
;
import
cn.com.glsx.merchants.model.request.MerchantAccountTypeRequest
;
...
@@ -132,6 +133,13 @@ public class MerchantAccountTypeService {
...
@@ -132,6 +133,13 @@ public class MerchantAccountTypeService {
*/
*/
@SysLog
(
value
=
"保存账户类型数据"
,
action
=
OperateType
.
ADD
,
module
=
"账户类型管理"
)
@SysLog
(
value
=
"保存账户类型数据"
,
action
=
OperateType
.
ADD
,
module
=
"账户类型管理"
)
public
Boolean
insert
(
AccountTypeInsertRequest
request
)
{
public
Boolean
insert
(
AccountTypeInsertRequest
request
)
{
RpcResponse
<
List
<
MerchantAccountTypeResponse
>>
rpc
=
accountTypeRemote
.
getListByNameRemote
(
request
.
getAccounttypeName
());
if
(!
rpc
.
isSuccess
()){
throw
new
RpcServiceException
(
rpc
.
getException
().
getErrId
(),
rpc
.
getMessage
());
}
if
(
CollectionUtils
.
isNotEmpty
(
rpc
.
getResult
())){
throw
new
RpcServiceException
(
BusinessExceptionEnum
.
ACCOUNT_NAME_EXIT
);
}
MerchantAccountTypeRequest
typeRequest
=
new
MerchantAccountTypeRequest
();
MerchantAccountTypeRequest
typeRequest
=
new
MerchantAccountTypeRequest
();
dozerMapper
.
map
(
request
,
typeRequest
);
dozerMapper
.
map
(
request
,
typeRequest
);
this
.
dataTransfer
(
typeRequest
,
request
.
getRequestList
());
//数据转换
this
.
dataTransfer
(
typeRequest
,
request
.
getRequestList
());
//数据转换
...
...
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