Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
e0cc1ebf
提交
e0cc1ebf
authored
11月 06, 2023
作者:
aiqingguo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
积分配置
上级
f762b882
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
366 行增加
和
1 行删除
+366
-1
IntegralRuleUpdateParam.java
...rformance/param/app/integral/IntegralRuleUpdateParam.java
+33
-0
AppIntegralRuleVO.java
...om/clx/performance/vo/app/integral/AppIntegralRuleVO.java
+119
-0
IntegralRuleController.java
...mance/controller/app/integral/IntegralRuleController.java
+44
-0
IntegralTruckRuleController.java
.../controller/app/integral/IntegralTruckRuleController.java
+1
-1
IntegralRuleDaoImpl.java
...lx/performance/dao/impl/integral/IntegralRuleDaoImpl.java
+30
-0
IntegralRuleDao.java
...ava/com/clx/performance/dao/integral/IntegralRuleDao.java
+17
-0
IntegralRuleMapper.java
...m/clx/performance/mapper/integral/IntegralRuleMapper.java
+19
-0
IntegralRule.java
...java/com/clx/performance/model/integral/IntegralRule.java
+44
-0
IntegralRuleServiceImpl.java
...rmance/service/impl/integral/IntegralRuleServiceImpl.java
+47
-0
IntegralRuleService.java
...clx/performance/service/integral/IntegralRuleService.java
+12
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/app/integral/IntegralRuleUpdateParam.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
param
.
app
.
integral
;
import
com.clx.performance.vo.app.integral.AppIntegralRuleVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
/**
* @Author: aiqingguo
* @Description: 新增积分
* @Date: 2023-10-11 17:30:57
* @Version: 1.0
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
public
class
IntegralRuleUpdateParam
{
@ApiModelProperty
(
value
=
"运单完成积分规则"
)
private
AppIntegralRuleVO
.
OrderChildCompleteRule
orderChildCompleteRule
;
@ApiModelProperty
(
value
=
"货单奖励积分规则"
)
private
AppIntegralRuleVO
.
OrderAwardRule
orderAwardRule
;
@ApiModelProperty
(
value
=
"货单扣减积分规则"
)
private
AppIntegralRuleVO
.
OrderDiscountRule
orderDiscountRule
;
@ApiModelProperty
(
value
=
"运单超时扣减规则"
)
private
AppIntegralRuleVO
.
OrderChildTimeoutRule
orderChildTimeoutRule
;
@ApiModelProperty
(
value
=
"平台补偿积分规则"
)
private
AppIntegralRuleVO
.
PlatformCompensationRule
platformCompensationRule
;
}
performance-api/src/main/java/com/clx/performance/vo/app/integral/AppIntegralRuleVO.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
vo
.
app
.
integral
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
/**
* @Author: aiqinguo
* @Description: 车辆积分规则
* @Date: 2023/11/06 14:12:53
* @Version: 1.0
*/
@ApiModel
(
description
=
"积分规则"
)
@Getter
@Setter
@ToString
@NoArgsConstructor
public
class
AppIntegralRuleVO
{
@ApiModelProperty
(
value
=
"运单完成积分规则"
)
private
OrderChildCompleteRule
orderChildCompleteRule
;
@ApiModelProperty
(
value
=
"货单奖励积分规则"
)
private
OrderAwardRule
orderAwardRule
;
@ApiModelProperty
(
value
=
"货单扣减积分规则"
)
private
OrderDiscountRule
orderDiscountRule
;
@ApiModelProperty
(
value
=
"运单超时扣减规则"
)
private
OrderChildTimeoutRule
orderChildTimeoutRule
;
@ApiModelProperty
(
value
=
"平台补偿积分规则"
)
private
PlatformCompensationRule
platformCompensationRule
;
@Getter
@Setter
@ToString
@NoArgsConstructor
public
static
class
OrderChildCompleteRule
{
@ApiModelProperty
(
value
=
"当日完成第1笔运单积分x"
)
private
Integer
integer1
;
@ApiModelProperty
(
value
=
"当日完成第2笔运单积分x"
)
private
Integer
integer2
;
@ApiModelProperty
(
value
=
"当日完成第3笔运单积分x"
)
private
Integer
integer3
;
@ApiModelProperty
(
value
=
"当日完成第4笔运单积分x"
)
private
Integer
integer4
;
@ApiModelProperty
(
value
=
"当日完成第5笔运单积分x"
)
private
Integer
integer5
;
}
@Getter
@Setter
@ToString
@NoArgsConstructor
public
static
class
OrderAwardRule
{
@ApiModelProperty
(
value
=
"完成流水单每单附加积分x"
)
private
Integer
integerWater
;
@ApiModelProperty
(
value
=
"当日流水单奖励次数上限x"
)
private
Integer
countWaterLimit
;
@ApiModelProperty
(
value
=
"完成支援单每单附加积分x"
)
private
Integer
integerSupport
;
@ApiModelProperty
(
value
=
"当日支援单奖励次数上限x"
)
private
Integer
countSupportLimit
;
}
@Getter
@Setter
@ToString
@NoArgsConstructor
public
static
class
OrderDiscountRule
{
@ApiModelProperty
(
value
=
"自行取消运单每单扣减积分x"
)
private
Integer
integralCancel
;
@ApiModelProperty
(
value
=
"自行取消流水单每单另扣积分x"
)
private
Integer
integralWaterCancel
;
@ApiModelProperty
(
value
=
"自行取消支援单每单另扣积分x"
)
private
Integer
integralSupportCancel
;
}
@Getter
@Setter
@ToString
@NoArgsConstructor
public
static
class
OrderChildTimeoutRule
{
@ApiModelProperty
(
value
=
"超时未到达货源地扣积分x"
)
private
Integer
integralSendAddressTimeout
;
@ApiModelProperty
(
value
=
"超时未到达目的地扣积分x"
)
private
Integer
integralReceiveAddressTimeout
;
@ApiModelProperty
(
value
=
"接单超时扣积分x"
)
private
Integer
integralTakeOrderTimeout
;
}
@Getter
@Setter
@ToString
@NoArgsConstructor
public
static
class
PlatformCompensationRule
{
@ApiModelProperty
(
value
=
"平台取消运单补偿积分x"
)
private
Integer
integralCancel
;
@ApiModelProperty
(
value
=
"当日平台补偿积分上限x"
)
private
Integer
integralCancelLimit
;
@ApiModelProperty
(
value
=
"规定时间不能装车补偿x"
)
private
Integer
integralLoad
;
@ApiModelProperty
(
value
=
"规定时间不能卸车补偿x"
)
private
Integer
integralUnload
;
}
@ApiModelProperty
(
value
=
"运单完成积分规则"
,
example
=
""
,
hidden
=
true
)
private
OrderChildCompleteRule
orderChildCompleteRuleJson
;
@ApiModelProperty
(
value
=
"货单奖励积分规则"
,
example
=
""
,
hidden
=
true
)
private
OrderAwardRule
orderAwardRuleJson
;
@ApiModelProperty
(
value
=
"货单扣减积分规则"
,
example
=
""
,
hidden
=
true
)
private
OrderDiscountRule
orderDiscountRuleJson
;
@ApiModelProperty
(
value
=
"运单超时扣减规则"
,
example
=
""
,
hidden
=
true
)
private
OrderChildTimeoutRule
orderChildTimeoutRuleJson
;
@ApiModelProperty
(
value
=
"平台补偿积分规则"
,
example
=
""
,
hidden
=
true
)
private
PlatformCompensationRule
platformCompensationRuleJson
;
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/controller/app/integral/IntegralRuleController.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
controller
.
app
.
integral
;
import
com.clx.performance.param.app.integral.IntegralRuleUpdateParam
;
import
com.clx.performance.service.integral.IntegralRuleService
;
import
com.clx.performance.vo.app.integral.AppIntegralRuleVO
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
@Slf4j
@RestController
@RequestMapping
(
value
=
"/app/driver/integral/rule"
)
@Validated
@Api
(
tags
=
"司机APP-积分记录"
)
@AllArgsConstructor
public
class
IntegralRuleController
{
@Autowired
private
IntegralRuleService
integralRuleService
;
@ApiOperation
(
value
=
"更新车辆层级配置"
,
notes
=
"<br>By:艾庆国"
)
@PostMapping
(
"/updateRule"
)
@UnitCovert
public
Result
<
Void
>
updateRule
(
@RequestBody
@Validated
IntegralRuleUpdateParam
param
)
{
integralRuleService
.
updateRule
(
param
);
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"查询车辆层级配置信息"
,
notes
=
"<br>By:艾庆国"
)
@GetMapping
(
value
=
"getRuleInfo"
)
@UnitCovert
(
param
=
false
)
public
Result
<
AppIntegralRuleVO
>
getRuleInfo
()
{
return
Result
.
ok
(
integralRuleService
.
getRuleInfo
());
}
}
performance-web/src/main/java/com/clx/performance/controller/app/integral/IntegralTruckRuleController.java
浏览文件 @
e0cc1ebf
...
@@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
...
@@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
value
=
"/app/driver/integral/rule"
)
@RequestMapping
(
value
=
"/app/driver/integral/rule
/truck
"
)
@Validated
@Validated
@Api
(
tags
=
"司机APP-积分记录"
)
@Api
(
tags
=
"司机APP-积分记录"
)
@AllArgsConstructor
@AllArgsConstructor
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/integral/IntegralRuleDaoImpl.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
dao
.
impl
.
integral
;
import
com.clx.performance.dao.integral.IntegralRuleDao
;
import
com.clx.performance.mapper.integral.IntegralRuleMapper
;
import
com.clx.performance.model.integral.IntegralRule
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
/**
* @Author: aiqinguo
* @Description: 积分规则
* @Date: 2023-10-9 12:00:54
* @Version: 1.0
*/
@Repository
public
class
IntegralRuleDaoImpl
extends
BaseDaoImpl
<
IntegralRuleMapper
,
IntegralRule
,
Integer
>
implements
IntegralRuleDao
{
@Override
public
boolean
update
(
IntegralRule
item
)
{
return
update
(
lUdWrapper
()
.
eq
(
IntegralRule:
:
getId
,
item
.
getId
())
.
set
(
IntegralRule:
:
getOrderChildCompleteRuleJson
,
item
.
getOrderChildCompleteRuleJson
())
.
set
(
IntegralRule:
:
getOrderAwardRuleJson
,
item
.
getOrderAwardRuleJson
())
.
set
(
IntegralRule:
:
getOrderDiscountRuleJson
,
item
.
getOrderDiscountRuleJson
())
.
set
(
IntegralRule:
:
getOrderChildTimeoutRuleJson
,
item
.
getOrderChildTimeoutRuleJson
())
.
set
(
IntegralRule:
:
getPlatformCompensationRuleJson
,
item
.
getPlatformCompensationRuleJson
())
);
}
}
performance-web/src/main/java/com/clx/performance/dao/integral/IntegralRuleDao.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
dao
.
integral
;
import
com.clx.performance.mapper.integral.IntegralRuleMapper
;
import
com.clx.performance.model.integral.IntegralRule
;
import
com.msl.common.dao.BaseDao
;
/**
* @Author: aiqinguo
* @Description: 积分规则
* @Date: 2023-10-9 11:55:36
* @Version: 1.0
*/
public
interface
IntegralRuleDao
extends
BaseDao
<
IntegralRuleMapper
,
IntegralRule
,
Integer
>
{
boolean
update
(
IntegralRule
item
);
}
performance-web/src/main/java/com/clx/performance/mapper/integral/IntegralRuleMapper.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
mapper
.
integral
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.clx.performance.model.integral.IntegralRule
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @Author: aiqinguo
* @Description: 积分规则
* @Date: 2023-10-9 11:52:22
* @Version: 1.0
*/
@Mapper
public
interface
IntegralRuleMapper
extends
BaseMapper
<
IntegralRule
>
{
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/model/integral/IntegralRule.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
model
.
integral
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.msl.common.config.KeyColumn
;
import
com.msl.common.model.HasKey
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.time.LocalDateTime
;
/**
* @Author: aiqinguo
* @Description: 积分规则
* @Date: 2023/11/06 16:14:44
* @Version: 1.0
*/
@Getter
@Setter
@NoArgsConstructor
@TableName
(
autoResultMap
=
true
)
public
class
IntegralRule
implements
HasKey
<
Integer
>
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
//id
private
String
orderChildCompleteRuleJson
;
//运单完成积分规则
private
String
orderAwardRuleJson
;
//货单奖励积分规则
private
String
orderDiscountRuleJson
;
//货单扣减积分规则
private
String
orderChildTimeoutRuleJson
;
//运单超时扣减规则
private
String
platformCompensationRuleJson
;
//平台补偿积分规则
private
LocalDateTime
createTime
;
//创建时间
private
LocalDateTime
modifiedTime
;
//修改时间
@KeyColumn
(
"id"
)
@Override
public
Integer
gainKey
()
{
return
id
;
}
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/service/impl/integral/IntegralRuleServiceImpl.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
service
.
impl
.
integral
;
import
com.alibaba.fastjson.JSON
;
import
com.clx.performance.dao.integral.IntegralRuleDao
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.model.integral.IntegralRule
;
import
com.clx.performance.param.app.integral.IntegralRuleUpdateParam
;
import
com.clx.performance.service.integral.IntegralRuleService
;
import
com.clx.performance.vo.app.integral.AppIntegralRuleVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Slf4j
@Service
public
class
IntegralRuleServiceImpl
implements
IntegralRuleService
{
@Autowired
private
IntegralRuleDao
integralRuleDao
;
@Override
public
void
updateRule
(
IntegralRuleUpdateParam
param
)
{
IntegralRule
rule
=
integralRuleDao
.
getEntityByKey
(
1
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
rule
.
setOrderChildCompleteRuleJson
(
JSON
.
toJSONString
(
param
.
getOrderChildCompleteRule
()));
rule
.
setOrderAwardRuleJson
(
JSON
.
toJSONString
(
param
.
getOrderAwardRule
()));
rule
.
setOrderDiscountRuleJson
(
JSON
.
toJSONString
(
param
.
getOrderDiscountRule
()));
rule
.
setOrderChildTimeoutRuleJson
(
JSON
.
toJSONString
(
param
.
getOrderChildTimeoutRule
()));
rule
.
setPlatformCompensationRuleJson
(
JSON
.
toJSONString
(
param
.
getPlatformCompensationRule
()));
integralRuleDao
.
update
(
rule
);
}
@Override
public
AppIntegralRuleVO
getRuleInfo
()
{
IntegralRule
rule
=
integralRuleDao
.
getEntityByKey
(
1
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
AppIntegralRuleVO
vo
=
new
AppIntegralRuleVO
();
vo
.
setOrderChildCompleteRule
(
JSON
.
parseObject
(
rule
.
getOrderChildCompleteRuleJson
(),
AppIntegralRuleVO
.
OrderChildCompleteRule
.
class
));
vo
.
setOrderAwardRule
(
JSON
.
parseObject
(
rule
.
getOrderAwardRuleJson
(),
AppIntegralRuleVO
.
OrderAwardRule
.
class
));
vo
.
setOrderDiscountRule
(
JSON
.
parseObject
(
rule
.
getOrderDiscountRuleJson
(),
AppIntegralRuleVO
.
OrderDiscountRule
.
class
));
vo
.
setOrderChildTimeoutRule
(
JSON
.
parseObject
(
rule
.
getOrderChildTimeoutRuleJson
(),
AppIntegralRuleVO
.
OrderChildTimeoutRule
.
class
));
vo
.
setPlatformCompensationRule
(
JSON
.
parseObject
(
rule
.
getPlatformCompensationRuleJson
(),
AppIntegralRuleVO
.
PlatformCompensationRule
.
class
));
return
vo
;
}
}
performance-web/src/main/java/com/clx/performance/service/integral/IntegralRuleService.java
0 → 100644
浏览文件 @
e0cc1ebf
package
com
.
clx
.
performance
.
service
.
integral
;
import
com.clx.performance.param.app.integral.IntegralRuleUpdateParam
;
import
com.clx.performance.vo.app.integral.AppIntegralRuleVO
;
public
interface
IntegralRuleService
{
void
updateRule
(
IntegralRuleUpdateParam
param
);
AppIntegralRuleVO
getRuleInfo
();
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论