Commit 140516f5 by wangnb

账户体系账户类型名称重复校验--think.wang

1 parent dffa38b6
......@@ -180,6 +180,16 @@ public class MerchantAccountTypeService {
*/
@SysLog(value = "更新账户类型数据", action = OperateType.EDIT, module = "账户类型管理")
public Boolean update(AccountTypeUpdateRequest request) {
RpcResponse<List<MerchantAccountTypeResponse>> rpcAccountList = accountTypeRemote.getListByNameRemote(request.getAccounttypeName());
if(!rpcAccountList.isSuccess()){
throw new RpcServiceException(rpcAccountList.getException().getErrId(),rpcAccountList.getMessage());
}
List<MerchantAccountTypeResponse> list = rpcAccountList.getResult();
if(CollectionUtils.isNotEmpty(list)){
if(list.size() > 1 || !(list.get(0).getId().equals(request.getId()))){
throw new RpcServiceException(BusinessExceptionEnum.ACCOUNT_NAME_EXIT);
}
}
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
dozerMapper.map(request, typeRequest);
this.dataTransfer(typeRequest, request.getRequestList()); //数据转换
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!