Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
a9afea14
提交
a9afea14
authored
1月 25, 2024
作者:
jiangwenye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
平台账户配置
上级
5db01ee2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
45 行增加
和
0 行删除
+45
-0
PerformanceResultEnum.java
...java/com/clx/performance/enums/PerformanceResultEnum.java
+2
-0
PlatformAccountConfigDao.java
...ava/com/clx/performance/dao/PlatformAccountConfigDao.java
+4
-0
PlatformAccountConfigImpl.java
...m/clx/performance/dao/impl/PlatformAccountConfigImpl.java
+16
-0
PlatformAccountConfigServiceImpl.java
...rmance/service/impl/PlatformAccountConfigServiceImpl.java
+23
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/PerformanceResultEnum.java
浏览文件 @
a9afea14
...
...
@@ -113,6 +113,8 @@ public enum PerformanceResultEnum implements ResultEnum {
SLIDER_CHECK_FAIL
(
1911
,
"滑块验证错误"
),
ORDER_CHILD_SYNC_ERROR
(
1912
,
"承运同步网络货运异常"
),
PLATFORM_ACCOUNT_CONFIG_ONLY
(
1913
,
"当前配置已存在"
),
;
private
final
int
code
;
private
final
String
msg
;
...
...
performance-web/src/main/java/com/clx/performance/dao/PlatformAccountConfigDao.java
浏览文件 @
a9afea14
...
...
@@ -6,6 +6,8 @@ import com.clx.performance.model.PlatformAccountConfig;
import
com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam
;
import
com.msl.common.dao.BaseDao
;
import
java.util.List
;
public
interface
PlatformAccountConfigDao
extends
BaseDao
<
PlatformAccountConfigMapper
,
PlatformAccountConfig
,
Integer
>
{
...
...
@@ -15,4 +17,6 @@ public interface PlatformAccountConfigDao extends BaseDao<PlatformAccountConfigM
boolean
updatePlatformAccountConfig
(
PlatformAccountConfig
platformAccountConfig
);
List
<
PlatformAccountConfig
>
checkPlatformAccountConfigOnly
(
PlatformAccountConfig
config
);
}
performance-web/src/main/java/com/clx/performance/dao/impl/PlatformAccountConfigImpl.java
浏览文件 @
a9afea14
...
...
@@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.order.enums.DeleteStatusEnum
;
import
com.clx.performance.dao.PlatformAccountConfigDao
;
import
com.clx.performance.enums.PlatformAccountConfigEnum
;
import
com.clx.performance.mapper.PlatformAccountConfigMapper
;
import
com.clx.performance.model.PlatformAccountConfig
;
import
com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Objects
;
/**
...
...
@@ -61,4 +63,18 @@ public class PlatformAccountConfigImpl extends BaseDaoImpl<PlatformAccountConfig
.
set
(
PlatformAccountConfig:
:
getBankCardNo
,
config
.
getBankCardNo
())
);
}
@Override
public
List
<
PlatformAccountConfig
>
checkPlatformAccountConfigOnly
(
PlatformAccountConfig
config
)
{
LambdaQueryWrapper
<
PlatformAccountConfig
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
PlatformAccountConfig
::
getDeleteStatus
,
DeleteStatusEnum
.
YES
.
getCode
());
query
.
eq
(
PlatformAccountConfig
::
getBusinessType
,
config
.
getBusinessType
());
query
.
eq
(
PlatformAccountConfig
::
getOwnerType
,
config
.
getOwnerType
());
query
.
eq
(
PlatformAccountConfig
::
getInvoiceCompanyId
,
config
.
getInvoiceCompanyId
());
query
.
eq
(
PlatformAccountConfig
::
getConfigRange
,
config
.
getConfigRange
());
if
(
Objects
.
equals
(
config
.
getBusinessType
(),
PlatformAccountConfigEnum
.
BusinessType
.
SETTLE
.
getCode
())){
query
.
eq
(
PlatformAccountConfig
::
getInvoiceType
,
config
.
getInvoiceType
());
}
return
baseMapper
.
selectList
(
query
);
}
}
performance-web/src/main/java/com/clx/performance/service/impl/PlatformAccountConfigServiceImpl.java
浏览文件 @
a9afea14
...
...
@@ -11,11 +11,14 @@ import com.clx.performance.param.pc.carrier.SavePlatformAccountConfigParam;
import
com.clx.performance.service.PlatformAccountConfigService
;
import
com.clx.performance.struct.PlatformAccountConfigStruct
;
import
com.clx.performance.vo.pc.carrier.settle.*
;
import
com.msl.common.exception.ServiceSystemException
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author jiangwenye
...
...
@@ -53,6 +56,7 @@ public class PlatformAccountConfigServiceImpl implements PlatformAccountConfigSe
@Override
public
void
updatePlatformAccountConfig
(
SavePlatformAccountConfigParam
param
)
{
PlatformAccountConfig
config
=
new
PlatformAccountConfig
();
config
.
setId
(
param
.
getId
());
config
.
setBusinessType
(
param
.
getBusinessType
());
...
...
@@ -66,6 +70,9 @@ public class PlatformAccountConfigServiceImpl implements PlatformAccountConfigSe
config
.
setOpenBank
(
param
.
getOpenBank
());
config
.
setBankCode
(
param
.
getBankCode
());
config
.
setBankCardNo
(
param
.
getBankCardNo
());
if
(!
checkConfigOnly
(
config
)){
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
PLATFORM_ACCOUNT_CONFIG_ONLY
);
}
platformAccountConfigDao
.
updatePlatformAccountConfig
(
config
);
}
...
...
@@ -84,8 +91,24 @@ public class PlatformAccountConfigServiceImpl implements PlatformAccountConfigSe
config
.
setBankCode
(
param
.
getBankCode
());
config
.
setBankCardNo
(
param
.
getBankCardNo
());
config
.
setDeleteStatus
(
DeleteStatusEnum
.
YES
.
getCode
());
if
(!
checkConfigOnly
(
config
)){
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
PLATFORM_ACCOUNT_CONFIG_ONLY
);
}
platformAccountConfigDao
.
saveEntity
(
config
);
}
public
boolean
checkConfigOnly
(
PlatformAccountConfig
config
){
List
<
PlatformAccountConfig
>
checkList
=
platformAccountConfigDao
.
checkPlatformAccountConfigOnly
(
config
);
if
(
CollectionUtils
.
isNotEmpty
(
checkList
)){
if
(
checkList
.
size
()
>
1
){
return
false
;
}
PlatformAccountConfig
check
=
checkList
.
get
(
0
);
if
(!
Objects
.
equals
(
check
.
getId
(),
config
.
getId
())){
return
false
;
}
}
return
true
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论