Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
eda1c89a
提交
eda1c89a
authored
6月 18, 2024
作者:
杨启发
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'refs/heads/v17.5_order_child_sync_broker_20240617' into dev
上级
b0e8768f
1694108c
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
340 行增加
和
0 行删除
+340
-0
PlatformServiceFeeConfigEnum.java
...m/clx/performance/enums/PlatformServiceFeeConfigEnum.java
+36
-0
SavePlatformServiceFeeConfigParam.java
...e/param/pc/carrier/SavePlatformServiceFeeConfigParam.java
+25
-0
CarrierPagePlatformServiceFeeConfigVO.java
...carrier/settle/CarrierPagePlatformServiceFeeConfigVO.java
+29
-0
PlatformServiceFeeConfigController.java
...roller/pc/carrier/PlatformServiceFeeConfigController.java
+51
-0
PlatformServiceFeeConfigDao.java
.../com/clx/performance/dao/PlatformServiceFeeConfigDao.java
+17
-0
PlatformServiceFeeConfigImpl.java
...lx/performance/dao/impl/PlatformServiceFeeConfigImpl.java
+30
-0
PlatformServiceFeeConfigMapper.java
...lx/performance/mapper/PlatformServiceFeeConfigMapper.java
+11
-0
PlatformServiceFeeConfig.java
...a/com/clx/performance/model/PlatformServiceFeeConfig.java
+58
-0
PlatformServiceFeeConfigService.java
.../performance/service/PlatformServiceFeeConfigService.java
+17
-0
PlatformServiceFeeConfigServiceImpl.java
...nce/service/impl/PlatformServiceFeeConfigServiceImpl.java
+48
-0
PlatformServiceFeeConfigStruct.java
...lx/performance/struct/PlatformServiceFeeConfigStruct.java
+18
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/PlatformServiceFeeConfigEnum.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.Objects
;
import
java.util.Optional
;
/**
* @author yangqifa
*/
@Getter
@AllArgsConstructor
public
enum
PlatformServiceFeeConfigEnum
{
/**
* 未税
*/
TAX_EXCLUDED
(
1
,
"未税"
),
/**
* 含税
*/
TAX_INCLUDED
(
2
,
"含税"
);
private
final
Integer
code
;
private
final
String
msg
;
public
static
Optional
<
PlatformServiceFeeConfigEnum
>
getByCode
(
int
code
)
{
return
Arrays
.
stream
(
values
()).
filter
(
e
->
Objects
.
equals
(
e
.
getCode
(),
code
)).
findFirst
();
}
public
static
String
getMsgByCode
(
int
code
)
{
return
getByCode
(
code
).
map
(
PlatformServiceFeeConfigEnum:
:
getMsg
).
orElse
(
null
);
}
}
performance-api/src/main/java/com/clx/performance/param/pc/carrier/SavePlatformServiceFeeConfigParam.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
param
.
pc
.
carrier
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
/**
* @author yangqifa
*/
@Getter
@Setter
public
class
SavePlatformServiceFeeConfigParam
{
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"订单报价方式,1:未税,2:含税"
)
private
Integer
orderQuotationType
;
@ApiModelProperty
(
value
=
"接单保证金,最多保留两位小数"
)
private
BigDecimal
deposit
;
@ApiModelProperty
(
value
=
"平台服务费费率"
)
private
BigDecimal
serviceFeeRate
;
}
performance-api/src/main/java/com/clx/performance/vo/pc/carrier/settle/CarrierPagePlatformServiceFeeConfigVO.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
vo
.
pc
.
carrier
.
settle
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
java.math.BigDecimal
;
/**
* @author yangqifa
*/
@Getter
@Setter
@ToString
public
class
CarrierPagePlatformServiceFeeConfigVO
{
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"订单报价方式,1:未税,2:含税"
)
private
Integer
orderQuotationType
;
@ApiModelProperty
(
value
=
"订单报价方式"
)
private
String
orderQuotationTypeMsg
;
@ApiModelProperty
(
value
=
"接单保证金,最多保留两位小数"
)
private
BigDecimal
deposit
;
@ApiModelProperty
(
value
=
"平台服务费费率"
)
private
BigDecimal
serviceFeeRate
;
}
performance-web/src/main/java/com/clx/performance/controller/pc/carrier/PlatformServiceFeeConfigController.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
controller
.
pc
.
carrier
;
import
com.clx.performance.param.pc.carrier.SavePlatformServiceFeeConfigParam
;
import
com.clx.performance.service.PlatformServiceFeeConfigService
;
import
com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformServiceFeeConfigVO
;
import
com.msl.common.convertor.aspect.UnitCovert
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotNull
;
/**
* @author yangqifa
*/
@Slf4j
@RestController
@RequestMapping
(
value
=
"/pc/carrier/platformServiceFeeConfig"
)
@Validated
@Api
(
tags
=
"承运端-平台费率配置"
)
@AllArgsConstructor
public
class
PlatformServiceFeeConfigController
{
private
final
PlatformServiceFeeConfigService
platformServiceFeeConfigService
;
@ApiOperation
(
value
=
"平台费率配置列表"
,
notes
=
"<br>By:杨启发"
)
@GetMapping
(
"/listPlatformServiceFeeConfig"
)
@UnitCovert
(
param
=
false
)
public
Result
<
CarrierPagePlatformServiceFeeConfigVO
>
listPlatformServiceFeeConfig
()
{
return
Result
.
ok
(
platformServiceFeeConfigService
.
listPlatformServiceFeeConfig
());
}
@ApiOperation
(
value
=
"平台费率配置详情"
,
notes
=
"<br>By:杨启发"
)
@GetMapping
(
"/getPlatformServiceFeeConfigDetail"
)
@UnitCovert
(
param
=
false
)
public
Result
<
CarrierPagePlatformServiceFeeConfigVO
>
getPlatformServiceFeeConfigDetail
(
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
return
Result
.
ok
(
platformServiceFeeConfigService
.
getPlatformServiceFeeConfigDetail
(
id
));
}
@ApiOperation
(
value
=
"编辑平台费率配置"
,
notes
=
"<br>By:杨启发"
)
@PostMapping
(
"/updatePlatformServiceFeeConfig"
)
public
Result
updatePlatformServiceFeeConfig
(
@RequestBody
@Validated
SavePlatformServiceFeeConfigParam
param
)
{
platformServiceFeeConfigService
.
updatePlatformServiceFeeConfig
(
param
);
return
Result
.
ok
();
}
}
performance-web/src/main/java/com/clx/performance/dao/PlatformServiceFeeConfigDao.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
dao
;
import
com.clx.performance.mapper.PlatformServiceFeeConfigMapper
;
import
com.clx.performance.model.PlatformServiceFeeConfig
;
import
com.msl.common.dao.BaseDao
;
/**
* @author yangqifa
*/
public
interface
PlatformServiceFeeConfigDao
extends
BaseDao
<
PlatformServiceFeeConfigMapper
,
PlatformServiceFeeConfig
,
Integer
>
{
PlatformServiceFeeConfig
listPlatformServiceFeeConfig
();
boolean
updatePlatformServiceFeeConfig
(
PlatformServiceFeeConfig
config
);
}
performance-web/src/main/java/com/clx/performance/dao/impl/PlatformServiceFeeConfigImpl.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
dao
.
impl
;
import
com.clx.performance.dao.PlatformServiceFeeConfigDao
;
import
com.clx.performance.mapper.PlatformServiceFeeConfigMapper
;
import
com.clx.performance.model.PlatformServiceFeeConfig
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
/**
* @author yangqifa
*/
@Repository
public
class
PlatformServiceFeeConfigImpl
extends
BaseDaoImpl
<
PlatformServiceFeeConfigMapper
,
PlatformServiceFeeConfig
,
Integer
>
implements
PlatformServiceFeeConfigDao
{
@Override
public
PlatformServiceFeeConfig
listPlatformServiceFeeConfig
()
{
return
list
().
get
(
0
);
}
@Override
public
boolean
updatePlatformServiceFeeConfig
(
PlatformServiceFeeConfig
config
)
{
return
update
(
lUdWrapper
()
.
eq
(
PlatformServiceFeeConfig:
:
getId
,
config
.
getId
())
.
set
(
PlatformServiceFeeConfig:
:
getOrderQuotationType
,
config
.
getOrderQuotationType
())
.
set
(
PlatformServiceFeeConfig:
:
getDeposit
,
config
.
getDeposit
())
.
set
(
PlatformServiceFeeConfig:
:
getServiceFeeRate
,
config
.
getServiceFeeRate
())
);
}
}
performance-web/src/main/java/com/clx/performance/mapper/PlatformServiceFeeConfigMapper.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.clx.performance.model.PlatformServiceFeeConfig
;
/**
* @author yangqifa
*/
public
interface
PlatformServiceFeeConfigMapper
extends
BaseMapper
<
PlatformServiceFeeConfig
>
{
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/model/PlatformServiceFeeConfig.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.msl.common.config.KeyColumn
;
import
com.msl.common.model.HasKey
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 平台服务费配置表
*
* @author yangqifa
*/
@Setter
@Getter
public
class
PlatformServiceFeeConfig
implements
HasKey
<
Integer
>
{
/**
* 主键ID
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 订单报价方式,1:未税,2:含税
*/
private
Integer
orderQuotationType
;
/**
* 接单保证金,最多保留两位小数
*/
private
BigDecimal
deposit
;
/**
* 平台服务费费率
*/
private
BigDecimal
serviceFeeRate
;
/**
* 创建时间
*/
private
Date
createdTime
;
/**
* 更新时间
*/
private
Date
modifiedTime
;
@KeyColumn
(
"id"
)
@Override
public
Integer
gainKey
()
{
return
id
;
}
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/service/PlatformServiceFeeConfigService.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
service
;
import
com.clx.performance.param.pc.carrier.SavePlatformServiceFeeConfigParam
;
import
com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformServiceFeeConfigVO
;
/**
* @author yangqifa
*/
public
interface
PlatformServiceFeeConfigService
{
CarrierPagePlatformServiceFeeConfigVO
listPlatformServiceFeeConfig
();
CarrierPagePlatformServiceFeeConfigVO
getPlatformServiceFeeConfigDetail
(
int
id
);
void
updatePlatformServiceFeeConfig
(
SavePlatformServiceFeeConfigParam
config
);
}
performance-web/src/main/java/com/clx/performance/service/impl/PlatformServiceFeeConfigServiceImpl.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
service
.
impl
;
import
com.clx.performance.dao.PlatformServiceFeeConfigDao
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.model.PlatformServiceFeeConfig
;
import
com.clx.performance.param.pc.carrier.SavePlatformServiceFeeConfigParam
;
import
com.clx.performance.service.PlatformServiceFeeConfigService
;
import
com.clx.performance.struct.PlatformServiceFeeConfigStruct
;
import
com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformServiceFeeConfigVO
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
/**
* @author yangqifa
*/
@Slf4j
@Service
@AllArgsConstructor
public
class
PlatformServiceFeeConfigServiceImpl
implements
PlatformServiceFeeConfigService
{
private
final
PlatformServiceFeeConfigDao
platformServiceFeeConfigDao
;
private
final
PlatformServiceFeeConfigStruct
platformServiceFeeConfigStruct
;
@Override
public
CarrierPagePlatformServiceFeeConfigVO
listPlatformServiceFeeConfig
()
{
PlatformServiceFeeConfig
config
=
platformServiceFeeConfigDao
.
listPlatformServiceFeeConfig
();
return
platformServiceFeeConfigStruct
.
convertToDetail
(
config
);
}
@Override
public
CarrierPagePlatformServiceFeeConfigVO
getPlatformServiceFeeConfigDetail
(
int
id
)
{
PlatformServiceFeeConfig
config
=
platformServiceFeeConfigDao
.
getEntityByKey
(
id
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
return
platformServiceFeeConfigStruct
.
convertToDetail
(
config
);
}
@Override
public
void
updatePlatformServiceFeeConfig
(
SavePlatformServiceFeeConfigParam
param
)
{
PlatformServiceFeeConfig
config
=
new
PlatformServiceFeeConfig
();
config
.
setId
(
param
.
getId
());
config
.
setOrderQuotationType
(
param
.
getOrderQuotationType
());
config
.
setDeposit
(
param
.
getDeposit
());
config
.
setServiceFeeRate
(
param
.
getServiceFeeRate
());
platformServiceFeeConfigDao
.
updatePlatformServiceFeeConfig
(
config
);
}
}
performance-web/src/main/java/com/clx/performance/struct/PlatformServiceFeeConfigStruct.java
0 → 100644
浏览文件 @
eda1c89a
package
com
.
clx
.
performance
.
struct
;
import
com.clx.performance.enums.PlatformServiceFeeConfigEnum
;
import
com.clx.performance.model.PlatformServiceFeeConfig
;
import
com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformServiceFeeConfigVO
;
import
com.msl.common.utils.DateStructUtil
;
import
com.msl.common.utils.DateUtils
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapping
;
import
java.util.Objects
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
DateStructUtil
.
class
,
imports
=
{
PlatformServiceFeeConfigEnum
.
class
,
Objects
.
class
,
DateUtils
.
class
})
public
interface
PlatformServiceFeeConfigStruct
{
@Mapping
(
target
=
"orderQuotationTypeMsg"
,
expression
=
"java(Objects.isNull(config.getOrderQuotationType()) ? null : PlatformServiceFeeConfigEnum.getMsgByCode(config.getOrderQuotationType()))"
)
CarrierPagePlatformServiceFeeConfigVO
convertToDetail
(
PlatformServiceFeeConfig
config
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论