Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
617316a5
提交
617316a5
authored
10月 16, 2023
作者:
liuhaiquan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v5.5_settlement_20231011' into v5.5_settlement_20231011
上级
396ba101
f0ec324d
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
305 行增加
和
133 行删除
+305
-133
IdTypeEnum.java
...i/src/main/java/com/clx/performance/enums/IdTypeEnum.java
+4
-1
OwnerCaseOutApproveParam.java
...om/clx/performance/param/pc/OwnerCaseOutApproveParam.java
+5
-0
PagePlatformPrepaidFreightAccountParam.java
...ance/param/pc/PagePlatformPrepaidFreightAccountParam.java
+3
-0
PlatformAccountTopUpParam.java
...m/clx/performance/param/pc/PlatformAccountTopUpParam.java
+32
-0
OwnerAccountRunningWaterRecordVO.java
...x/performance/vo/pc/OwnerAccountRunningWaterRecordVO.java
+89
-90
OwnerAccountVO.java
...c/main/java/com/clx/performance/vo/pc/OwnerAccountVO.java
+4
-3
CarrierAccountController.java
...mance/controller/pc/carrier/CarrierAccountController.java
+5
-3
OwnerAccountController.java
...rformance/controller/pc/owner/OwnerAccountController.java
+12
-3
OwnerAccountDao.java
...rc/main/java/com/clx/performance/dao/OwnerAccountDao.java
+3
-1
OwnerAccountDaoImpl.java
...ava/com/clx/performance/dao/impl/OwnerAccountDaoImpl.java
+7
-2
OwnerAccount.java
...src/main/java/com/clx/performance/model/OwnerAccount.java
+5
-6
OwnerCaseOut.java
...src/main/java/com/clx/performance/model/OwnerCaseOut.java
+6
-0
OwnerRunningWaterRecord.java
...va/com/clx/performance/model/OwnerRunningWaterRecord.java
+20
-7
OwnerAccountService.java
...java/com/clx/performance/service/OwnerAccountService.java
+8
-4
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+98
-11
OwnerAccountSqlProvider.java
.../clx/performance/sqlProvider/OwnerAccountSqlProvider.java
+1
-1
OwnerRunningWaterRecordSqlProvider.java
...mance/sqlProvider/OwnerRunningWaterRecordSqlProvider.java
+3
-1
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/IdTypeEnum.java
浏览文件 @
617316a5
...
...
@@ -13,7 +13,10 @@ public enum IdTypeEnum {
@AllArgsConstructor
public
enum
Type
{
TOP_UP
(
1L
,
"充值"
),
CASE_OUT
(
2L
,
"提现"
)
CASE_OUT
(
2L
,
"提现"
),
CASE_OUT_FROZEN
(
3L
,
"提现冻结"
),
CASE_OUT_SUCCESS
(
4L
,
"提现成功"
),
TOP_UP_SUCCESS
(
5L
,
"充值成功"
),
;
private
final
Long
code
;
private
final
String
msg
;
...
...
performance-api/src/main/java/com/clx/performance/param/pc/OwnerCaseOutApproveParam.java
浏览文件 @
617316a5
...
...
@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
lombok.ToString
;
import
java.math.BigDecimal
;
@ApiModel
(
description
=
"提现审批"
)
@Getter
@Setter
...
...
@@ -26,4 +28,7 @@ public class OwnerCaseOutApproveParam {
@ApiModelProperty
(
value
=
"付款凭证"
,
example
=
"a.png"
)
private
String
paymentProof
;
@ApiModelProperty
(
value
=
"平台付款金额"
,
example
=
"11.21"
)
private
BigDecimal
platformPayBalance
;
}
performance-api/src/main/java/com/clx/performance/param/pc/PagePlatformPrepaidFreightAccountParam.java
浏览文件 @
617316a5
...
...
@@ -17,6 +17,9 @@ import lombok.ToString;
@ToString
public
class
PagePlatformPrepaidFreightAccountParam
extends
PageParam
{
@ApiModelProperty
(
value
=
"货主编码"
,
example
=
"20145787812312312"
)
private
Long
ownerUserNo
;
@ApiModelProperty
(
value
=
"订单编号"
,
example
=
"201457878"
)
private
String
orderNo
;
...
...
performance-api/src/main/java/com/clx/performance/param/pc/PlatformAccountTopUpParam.java
0 → 100644
浏览文件 @
617316a5
package
com
.
clx
.
performance
.
param
.
pc
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
/**
* @Author huyufan
* @create 2023-09-19 13:33
*/
@Getter
@Setter
@NoArgsConstructor
@ToString
public
class
PlatformAccountTopUpParam
{
@ApiModelProperty
(
value
=
"货主编码"
,
example
=
"20145787812312312"
)
private
Long
ownerUserNo
;
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"账户类型"
,
example
=
"1:保证金 2:预付运费"
)
private
Integer
accountType
;
@ApiModelProperty
(
value
=
"审批拒绝原因"
)
private
String
turnDownContent
;
}
performance-api/src/main/java/com/clx/performance/vo/pc/OwnerAccountRunningWaterRecordVO.java
浏览文件 @
617316a5
package
com
.
clx
.
performance
.
vo
.
pc
;
import
com.msl.common.convertor.type.MoneyOutConvert
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
@Getter
...
...
@@ -14,96 +14,94 @@ import java.math.BigDecimal;
@NoArgsConstructor
public
class
OwnerAccountRunningWaterRecordVO
{
/**
* id
*/
@ApiModelProperty
(
"id"
)
private
Integer
id
;
@ApiModelProperty
(
"流水号"
)
private
Long
runningWaterNo
;
/**
* 货主编码
*/
@ApiModelProperty
(
"货主编码"
)
private
Long
ownerUserNo
;
/**
* 货主名称
*/
@ApiModelProperty
(
"货主名称"
)
private
String
ownerName
;
/**
* 联系电话
*/
@ApiModelProperty
(
"联系电话"
)
private
String
mobile
;
/**
* 账户类型
*/
@ApiModelProperty
(
"账户类型"
)
private
Integer
accountType
;
/**
* 关联数据主键ID
*/
@ApiModelProperty
(
"关联数据主键ID"
)
private
Integer
relationId
;
/**
* 流水类型
*/
@ApiModelProperty
(
"流水类型"
)
private
Integer
runningWaterType
;
/**
* 订单ID
*/
@ApiModelProperty
(
"订单ID"
)
private
Integer
orderId
;
/**
* 订单编号
*/
@ApiModelProperty
(
"订单编号"
)
private
String
orderNo
;
@ApiModelProperty
(
"货单编号"
)
private
String
orderGoodsNo
;
@ApiModelProperty
(
"货单状态"
)
private
Integer
orderGoodsStatus
;
@ApiModelProperty
(
"提取吨数"
)
private
BigDecimal
extractWeight
;
@ApiModelProperty
(
"剩余拉运吨数"
)
private
BigDecimal
residueTransportWeight
;
@ApiModelProperty
(
"已拉运吨数"
)
private
BigDecimal
alreadyTransportWeight
;
@ApiModelProperty
(
"发货地址ID"
)
private
Integer
sendAddressId
;
@ApiModelProperty
(
value
=
"发货地址全称"
)
private
String
sendAddressAll
;
@ApiModelProperty
(
"发货地址简称"
)
private
String
sendAddressShorter
;
@ApiModelProperty
(
"发货地址经度"
)
private
BigDecimal
sendLongitude
;
@ApiModelProperty
(
"发货地址纬度"
)
private
BigDecimal
sendLatitude
;
@ApiModelProperty
(
"收货地址ID"
)
private
Integer
receiveAddressId
;
@ApiModelProperty
(
value
=
"收货地址全称"
)
private
String
reveiveAddressAll
;
@ApiModelProperty
(
"收货地址简称"
)
private
String
receiveAddressShorter
;
@ApiModelProperty
(
"收货地址经度"
)
private
BigDecimal
receiveLongitude
;
@ApiModelProperty
(
"收货地址纬度"
)
private
BigDecimal
receiveLatitude
;
@ApiModelProperty
(
"货物ID"
)
private
Integer
goodsId
;
@ApiModelProperty
(
"货物名称"
)
private
String
goodsName
;
@ApiModelProperty
(
"挂单方式 1公开派单 2定向派单"
)
private
Integer
pendingOrderWay
;
@ApiModelProperty
(
"定向运单失效时间"
)
private
String
directionalExpireTime
;
@ApiModelProperty
(
"最晚到达货源地时间/运单的最晚装货时间"
)
private
String
lastArriveSendTime
;
@ApiModelProperty
(
"挂单时间"
)
private
String
pendingOrderTime
;
@ApiModelProperty
(
"提取方式 1提取全部 2提取部分"
)
private
Integer
extractWay
;
@ApiModelProperty
(
"需要车辆/辆"
)
private
Integer
needTruckNum
;
@ApiModelProperty
(
"高级物流经理id"
)
private
Integer
seniorLogisticsManagerId
;
@ApiModelProperty
(
"高级物流经理姓名"
)
private
String
seniorLogisticsManagerName
;
@ApiModelProperty
(
"挂单运费"
)
@MoneyOutConvert
private
BigDecimal
pendingOrderFreight
;
@ApiModelProperty
(
"创建人用户编号"
)
private
Long
userNo
;
@ApiModelProperty
(
"创建人姓名"
)
private
String
userName
;
@ApiModelProperty
(
"创建时间"
)
private
String
createTime
;
/**
* 运单ID
*/
@ApiModelProperty
(
"运单ID"
)
private
Integer
orderChildId
;
/**
* 运单编号
*/
@ApiModelProperty
(
"运单编号"
)
private
String
orderChildNo
;
/**
* 变动金额
*/
@ApiModelProperty
(
"变动金额"
)
private
BigDecimal
alterationBalance
;
/**
* 冻结金额
*/
@ApiModelProperty
(
"冻结金额"
)
private
BigDecimal
frozenBalance
;
/**
* 可用余额
*/
@ApiModelProperty
(
"可用余额"
)
private
BigDecimal
usableBalance
;
/**
* 账户余额
*/
@ApiModelProperty
(
"账户余额"
)
private
BigDecimal
accountBalance
;
/**
* 操作人
*/
@ApiModelProperty
(
"操作人"
)
private
String
createBy
;
/**
* 操作时间
*/
@ApiModelProperty
(
"操作时间"
)
private
LocalDateTime
createTime
;
}
\ No newline at end of file
performance-api/src/main/java/com/clx/performance/vo/pc/OwnerAccountVO.java
浏览文件 @
617316a5
...
...
@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
org.apache.poi.hpsf.Decimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
...
...
@@ -41,19 +42,19 @@ public class OwnerAccountVO {
*/
@ApiModelProperty
(
value
=
"账户余额"
)
@MoneyOutConvert
private
Decimal
accountBalance
;
private
Big
Decimal
accountBalance
;
/**
* 可用余额
*/
@ApiModelProperty
(
value
=
"可用余额"
)
@MoneyOutConvert
private
Decimal
usableBalance
;
private
Big
Decimal
usableBalance
;
/**
* 冻结金额
*/
@ApiModelProperty
(
value
=
"冻结金额"
)
@MoneyOutConvert
private
Decimal
frozenBalance
;
private
Big
Decimal
frozenBalance
;
/**
* 创建人
*/
...
...
performance-web/src/main/java/com/clx/performance/controller/pc/carrier/CarrierAccountController.java
浏览文件 @
617316a5
...
...
@@ -19,6 +19,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotBlank
;
@Slf4j
@RestController
...
...
@@ -61,9 +63,9 @@ public class CarrierAccountController {
@ApiOperation
(
value
=
"充值审批"
,
notes
=
"<br>By:胡宇帆"
)
@
Ge
tMapping
(
"/accountTopUpApprove"
)
public
void
accountTopUpApprove
(
@Request
Param
Integer
id
,
@RequestParam
String
turnDownContent
)
{
ownerAccountService
.
accountTopUpApprove
(
id
,
turnDownContent
);
@
Pos
tMapping
(
"/accountTopUpApprove"
)
public
void
accountTopUpApprove
(
@Request
Body
PlatformAccountTopUpParam
param
)
{
ownerAccountService
.
accountTopUpApprove
(
param
);
}
@ApiOperation
(
value
=
"提现审批"
,
notes
=
"<br>By:胡宇帆"
)
...
...
performance-web/src/main/java/com/clx/performance/controller/pc/owner/OwnerAccountController.java
浏览文件 @
617316a5
...
...
@@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@Slf4j
...
...
@@ -27,7 +28,7 @@ import java.util.List;
@RequestMapping
(
"/pc/owner"
)
@Validated
@AllArgsConstructor
@Api
(
tags
=
"PC-资金管理"
)
@Api
(
tags
=
"PC-
货主
资金管理"
)
public
class
OwnerAccountController
{
private
final
OwnerAccountService
ownerAccountService
;
...
...
@@ -41,8 +42,8 @@ public class OwnerAccountController {
@ApiOperation
(
value
=
"账户信息"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/accountInfo"
)
@UnitCovert
(
param
=
false
)
public
Result
<
List
<
OwnerAccountVO
>>
accountInfo
(
@RequestParam
String
own
erNo
)
{
List
<
OwnerAccountVO
>
accountVOList
=
ownerAccountService
.
accountInfo
(
ownerNo
);
public
Result
<
List
<
OwnerAccountVO
>>
accountInfo
(
@RequestParam
Long
ownerUs
erNo
)
{
List
<
OwnerAccountVO
>
accountVOList
=
ownerAccountService
.
accountInfo
(
owner
User
No
);
return
Result
.
ok
(
accountVOList
);
}
...
...
@@ -79,6 +80,14 @@ public class OwnerAccountController {
return
Result
.
ok
(
id
);
}
@ApiOperation
(
value
=
"货主付款确认"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/accountBalanceConfirm"
)
@UnitCovert
(
param
=
false
)
public
void
accountBalanceConfirm
(
@RequestParam
@NotNull
(
message
=
"编号不能为空"
)
Integer
id
)
{
ownerAccountService
.
accountBalanceConfirm
(
id
);
}
@ApiOperation
(
value
=
"货主账户流水列表"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/ownerAccountRunningWaterPageList"
)
@UnitCovert
(
param
=
false
)
...
...
performance-web/src/main/java/com/clx/performance/dao/OwnerAccountDao.java
浏览文件 @
617316a5
...
...
@@ -12,5 +12,7 @@ import java.util.List;
public
interface
OwnerAccountDao
extends
BaseDao
<
OwnerAccountMapper
,
OwnerAccount
,
Integer
>
{
IPage
<
OwnerAccountVO
>
pageList
(
PageOwnerAccountListParam
param
);
List
<
OwnerAccountVO
>
accountInfo
(
String
ownerNo
);
List
<
OwnerAccountVO
>
accountInfo
(
Long
ownerUserNo
);
OwnerAccount
getAccountByOwnerUserNoAndAccountType
(
Long
ownerUserNo
,
Integer
accountType
);
}
performance-web/src/main/java/com/clx/performance/dao/impl/OwnerAccountDaoImpl.java
浏览文件 @
617316a5
...
...
@@ -28,10 +28,15 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
}
@Override
public
List
<
OwnerAccountVO
>
accountInfo
(
String
own
erNo
)
{
List
<
OwnerAccount
>
list
=
baseMapper
.
selectList
(
lQrWrapper
().
eq
(
OwnerAccount:
:
getOwnerUserNo
,
ownerNo
));
public
List
<
OwnerAccountVO
>
accountInfo
(
Long
ownerUs
erNo
)
{
List
<
OwnerAccount
>
list
=
baseMapper
.
selectList
(
lQrWrapper
().
eq
(
OwnerAccount:
:
getOwnerUserNo
,
owner
User
No
));
return
ownerAccountStruct
.
convertList
(
list
);
}
@Override
public
OwnerAccount
getAccountByOwnerUserNoAndAccountType
(
Long
ownerUserNo
,
Integer
accountType
)
{
return
baseMapper
.
selectOne
(
lQrWrapper
().
eq
(
OwnerAccount:
:
getAccountType
,
accountType
).
eq
(
OwnerAccount:
:
getOwnerUserNo
,
ownerUserNo
));
}
}
performance-web/src/main/java/com/clx/performance/model/OwnerAccount.java
浏览文件 @
617316a5
...
...
@@ -7,11 +7,10 @@ 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
lombok.experimental.Accessors
;
import
org.apache.poi.hpsf.Decimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
...
...
@@ -34,7 +33,7 @@ public class OwnerAccount implements HasKey<Integer> {
* 货主编码
*/
@TableField
(
"owner_user_no"
)
private
Stri
ng
ownerUserNo
;
private
Lo
ng
ownerUserNo
;
/**
* 货主名称
*/
...
...
@@ -54,17 +53,17 @@ public class OwnerAccount implements HasKey<Integer> {
* 账户余额
*/
@TableField
(
"account_balance"
)
private
Decimal
accountBalance
;
private
Big
Decimal
accountBalance
;
/**
* 可用余额
*/
@TableField
(
"usable_balance"
)
private
Decimal
usableBalance
;
private
Big
Decimal
usableBalance
;
/**
* 冻结金额
*/
@TableField
(
"frozen_balance"
)
private
Decimal
frozenBalance
;
private
Big
Decimal
frozenBalance
;
/**
* 创建人
*/
...
...
performance-web/src/main/java/com/clx/performance/model/OwnerCaseOut.java
浏览文件 @
617316a5
...
...
@@ -86,6 +86,12 @@ public class OwnerCaseOut implements HasKey<Integer> {
*/
@TableField
(
"platform_payment_bank_number"
)
private
String
platformPaymentBankNumber
;
/**
* 平台付款金额
*/
@TableField
(
"platform_pay_balance"
)
private
BigDecimal
platformPayBalance
;
/**
* 付款人
*/
...
...
performance-web/src/main/java/com/clx/performance/model/OwnerRunningWaterRecord.java
浏览文件 @
617316a5
...
...
@@ -12,6 +12,7 @@ import lombok.Setter;
import
lombok.experimental.Accessors
;
import
org.apache.poi.hpsf.Decimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
...
...
@@ -29,11 +30,17 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 流水号
*/
@TableField
(
"running_water_no"
)
private
Long
runningWaterNo
;
/**
* 货主编码
*/
@TableField
(
"owner_no"
)
private
String
own
erNo
;
@TableField
(
"owner_
user_
no"
)
private
Long
ownerUs
erNo
;
/**
* 货主名称
*/
...
...
@@ -43,12 +50,18 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
* 联系电话
*/
@TableField
(
"mobile"
)
private
Integer
mobile
;
private
String
mobile
;
/**
* 账户类型
*/
@TableField
(
"account_type"
)
private
Integer
accountType
;
/**
* 关联数据编号
*/
@TableField
(
"relation_id"
)
private
Long
relationId
;
/**
* 流水类型
*/
...
...
@@ -78,22 +91,22 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
* 变动金额
*/
@TableField
(
"alteration_balance"
)
private
Double
alterationBalance
;
private
BigDecimal
alterationBalance
;
/**
* 冻结金额
*/
@TableField
(
"frozen_balance"
)
private
Decimal
frozenBalance
;
private
Big
Decimal
frozenBalance
;
/**
* 可用余额
*/
@TableField
(
"usable_balance"
)
private
Decimal
usableBalance
;
private
Big
Decimal
usableBalance
;
/**
* 账户余额
*/
@TableField
(
"account_balance"
)
private
Decimal
accountBalance
;
private
Big
Decimal
accountBalance
;
/**
* 操作人
*/
...
...
performance-web/src/main/java/com/clx/performance/service/OwnerAccountService.java
浏览文件 @
617316a5
...
...
@@ -14,7 +14,7 @@ public interface OwnerAccountService {
IPage
<
OwnerAccountRunningWaterRecordVO
>
prepaidFreightAccountPageList
(
PagePlatformPrepaidFreightAccountParam
param
);
List
<
OwnerAccountVO
>
accountInfo
(
String
own
erNo
);
List
<
OwnerAccountVO
>
accountInfo
(
Long
ownerUs
erNo
);
Long
accountTopUp
(
OwnerTopUpParam
param
);
...
...
@@ -22,14 +22,18 @@ public interface OwnerAccountService {
/**
* 充值审批
* @param id
* @param turnDownContent
*/
void
accountTopUpApprove
(
Integer
id
,
String
turnDownContent
);
void
accountTopUpApprove
(
PlatformAccountTopUpParam
param
);
/**
* 提现审批
* @param param
*/
void
accountCaseOutApprove
(
OwnerCaseOutApproveParam
param
);
/**
* 货主付款确认
* @param id
*/
void
accountBalanceConfirm
(
Integer
id
);
}
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
617316a5
...
...
@@ -8,6 +8,8 @@ import com.clx.performance.dao.OwnerRunningWaterRecordDao;
import
com.clx.performance.dao.OwnerTopUpDao
;
import
com.clx.performance.enums.IdTypeEnum
;
import
com.clx.performance.enums.OwnerAccountEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.model.OwnerAccount
;
import
com.clx.performance.model.OwnerCaseOut
;
import
com.clx.performance.model.OwnerRunningWaterRecord
;
import
com.clx.performance.model.OwnerTopUp
;
...
...
@@ -15,12 +17,15 @@ import com.clx.performance.param.pc.*;
import
com.clx.performance.service.OwnerAccountService
;
import
com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.exception.ServiceSystemException
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Slf4j
...
...
@@ -54,8 +59,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
@Override
public
List
<
OwnerAccountVO
>
accountInfo
(
String
own
erNo
)
{
return
ownerAccountDao
.
accountInfo
(
ownerNo
);
public
List
<
OwnerAccountVO
>
accountInfo
(
Long
ownerUs
erNo
)
{
return
ownerAccountDao
.
accountInfo
(
owner
User
No
);
}
@Override
...
...
@@ -76,6 +81,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
accountCaseOut
(
OwnerCaseOutParam
param
)
{
//提现记录
OwnerCaseOut
entity
=
new
OwnerCaseOut
();
...
...
@@ -88,32 +94,74 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity
.
setCaseOutBankNumber
(
param
.
getCaseOutBankNumber
());
ownerCaseOutDao
.
saveEntity
(
entity
);
//插入冻结流水
OwnerRunningWaterRecord
runningWaterRecord
=
new
OwnerRunningWaterRecord
();
BigDecimal
caseOutBalance
=
param
.
getCaseOutBalance
();
runningWaterRecord
.
setOwnerName
(
"测试"
);
runningWaterRecord
.
setMobile
(
"11111111111"
);
runningWaterRecord
.
setCreateBy
(
"操作人测试"
);
runningWaterRecord
.
setRelationId
(
entity
.
getCaseOutNo
());
runningWaterRecord
.
setAccountBalance
(
caseOutBalance
);
runningWaterRecord
.
setOwnerUserNo
(
param
.
getOwnerUserNo
());
runningWaterRecord
.
setAccountType
(
param
.
getAccountType
());
runningWaterRecord
.
setRunningWaterType
(
OwnerAccountEnum
.
RunningWaterStatus
.
FROZEN
.
getCode
());
runningWaterRecord
.
setRunningWaterNo
(
idGenerateSnowFlake
.
nextId
(
IdTypeEnum
.
Type
.
CASE_OUT_FROZEN
.
getCode
()));
ownerRunningWaterRecordDao
.
saveEntity
(
runningWaterRecord
);
//冻结账户可用金额
OwnerAccount
account
=
ownerAccountDao
.
getAccountByOwnerUserNoAndAccountType
(
param
.
getOwnerUserNo
(),
param
.
getAccountType
());
OwnerAccount
update
=
new
OwnerAccount
();
update
.
setUsableBalance
(
account
.
getUsableBalance
().
subtract
(
caseOutBalance
));
update
.
setFrozenBalance
(
account
.
getFrozenBalance
().
add
(
caseOutBalance
));
update
.
setId
(
account
.
getId
());
ownerAccountDao
.
updateEntityByKey
(
update
);
return
entity
.
getCaseOutNo
();
}
/**
* 充值审批
*
* @param id
* @param turnDownContent
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
accountTopUpApprove
(
Integer
id
,
String
turnDownContent
)
{
public
void
accountTopUpApprove
(
PlatformAccountTopUpParam
param
)
{
Optional
<
OwnerTopUp
>
optional
=
ownerTopUpDao
.
getEntityByKey
(
param
.
getId
());
if
(!
optional
.
isPresent
())
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"当前ID未查询到有效记录"
);
}
OwnerTopUp
ownerTopUp
=
optional
.
get
();
OwnerTopUp
entity
=
new
OwnerTopUp
();
if
(
StringUtils
.
isNotBlank
(
turnDownContent
))
{
entity
.
setId
(
id
);
entity
.
setApprovalTurnDown
(
turnDownContent
);
if
(
StringUtils
.
isNotBlank
(
param
.
getTurnDownContent
()
))
{
entity
.
setId
(
param
.
getId
()
);
entity
.
setApprovalTurnDown
(
param
.
getTurnDownContent
()
);
entity
.
setStatus
(
OwnerAccountEnum
.
TopUpStatus
.
APPROVAL_REJECTION
.
getCode
());
ownerTopUpDao
.
updateEntityByKey
(
entity
);
}
else
{
entity
.
setId
(
id
);
entity
.
setId
(
param
.
getId
()
);
entity
.
setStatus
(
OwnerAccountEnum
.
TopUpStatus
.
APPROVAL_APPROVE
.
getCode
());
ownerTopUpDao
.
updateEntityByKey
(
entity
);
//需要插入充值流水
OwnerRunningWaterRecord
runningWaterRecord
=
new
OwnerRunningWaterRecord
();
BigDecimal
topUpBalance
=
ownerTopUp
.
getTopUpBalance
();
runningWaterRecord
.
setOwnerName
(
"测试"
);
runningWaterRecord
.
setMobile
(
"11111111111"
);
runningWaterRecord
.
setCreateBy
(
"操作人测试"
);
runningWaterRecord
.
setRelationId
(
ownerTopUp
.
getTopUpNo
());
runningWaterRecord
.
setAccountBalance
(
topUpBalance
);
runningWaterRecord
.
setOwnerUserNo
(
param
.
getOwnerUserNo
());
runningWaterRecord
.
setAccountType
(
param
.
getAccountType
());
runningWaterRecord
.
setRunningWaterType
(
OwnerAccountEnum
.
RunningWaterStatus
.
TOP_UP
.
getCode
());
runningWaterRecord
.
setRunningWaterNo
(
idGenerateSnowFlake
.
nextId
(
IdTypeEnum
.
Type
.
TOP_UP_SUCCESS
.
getCode
()));
ownerRunningWaterRecordDao
.
saveEntity
(
runningWaterRecord
);
//给对应账户增加金额
OwnerAccount
account
=
ownerAccountDao
.
getAccountByOwnerUserNoAndAccountType
(
param
.
getOwnerUserNo
(),
param
.
getAccountType
());
OwnerAccount
update
=
new
OwnerAccount
();
update
.
setAccountBalance
(
account
.
getAccountBalance
().
add
(
topUpBalance
));
update
.
setUsableBalance
(
account
.
getUsableBalance
().
add
(
topUpBalance
));
update
.
setId
(
account
.
getId
());
ownerAccountDao
.
updateEntityByKey
(
update
);
}
}
...
...
@@ -128,6 +176,45 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity
.
setPaymentProof
(
param
.
getPaymentProof
());
entity
.
setPlatformPaymentBank
(
entity
.
getPlatformPaymentBank
());
entity
.
setPlatformPaymentBankNumber
(
param
.
getPlatformPaymentBankNumber
());
entity
.
setPlatformPayBalance
(
param
.
getPlatformPayBalance
());
entity
.
setStatus
(
OwnerAccountEnum
.
CaseOutStatus
.
TO_BE_CONFIRMED
.
getCode
());
ownerCaseOutDao
.
updateEntityByKey
(
entity
);
}
@Override
public
void
accountBalanceConfirm
(
Integer
id
)
{
Optional
<
OwnerCaseOut
>
optional
=
ownerCaseOutDao
.
getEntityByKey
(
id
);
if
(!
optional
.
isPresent
())
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"当前ID未查询到有效记录"
);
}
OwnerCaseOut
ownerCaseOut
=
optional
.
get
();
BigDecimal
caseOutBalance
=
ownerCaseOut
.
getCaseOutBalance
();
BigDecimal
platformPayBalance
=
ownerCaseOut
.
getPlatformPayBalance
();
if
(
platformPayBalance
.
compareTo
(
caseOutBalance
)
!=
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"货主提现金额和平台支付金额不一致"
);
}
//插入提现成功流水
OwnerRunningWaterRecord
runningWaterRecord
=
new
OwnerRunningWaterRecord
();
runningWaterRecord
.
setOwnerName
(
"测试"
);
runningWaterRecord
.
setMobile
(
"11111111111"
);
runningWaterRecord
.
setCreateBy
(
"操作人"
);
runningWaterRecord
.
setRelationId
(
ownerCaseOut
.
getCaseOutNo
());
runningWaterRecord
.
setAccountBalance
(
caseOutBalance
);
runningWaterRecord
.
setOwnerUserNo
(
ownerCaseOut
.
getOwnerUserNo
());
runningWaterRecord
.
setAccountType
(
ownerCaseOut
.
getAccountType
());
runningWaterRecord
.
setRunningWaterType
(
OwnerAccountEnum
.
RunningWaterStatus
.
CASE_OUT_SUCCESS
.
getCode
());
runningWaterRecord
.
setRunningWaterNo
(
idGenerateSnowFlake
.
nextId
(
IdTypeEnum
.
Type
.
CASE_OUT_SUCCESS
.
getCode
()));
ownerRunningWaterRecordDao
.
saveEntity
(
runningWaterRecord
);
//给对应账户减少金额
OwnerAccount
account
=
ownerAccountDao
.
getAccountByOwnerUserNoAndAccountType
(
ownerCaseOut
.
getOwnerUserNo
(),
ownerCaseOut
.
getAccountType
());
OwnerAccount
update
=
new
OwnerAccount
();
update
.
setAccountBalance
(
account
.
getAccountBalance
().
subtract
(
caseOutBalance
));
update
.
setUsableBalance
(
account
.
getUsableBalance
().
subtract
(
caseOutBalance
));
update
.
setFrozenBalance
(
account
.
getFrozenBalance
().
subtract
(
caseOutBalance
));
update
.
setId
(
account
.
getId
());
ownerAccountDao
.
updateEntityByKey
(
update
);
}
}
performance-web/src/main/java/com/clx/performance/sqlProvider/OwnerAccountSqlProvider.java
浏览文件 @
617316a5
...
...
@@ -23,7 +23,7 @@ public class OwnerAccountSqlProvider {
WHERE
(
"a.mobile = #{param.mobile}"
);
}
if
(
ObjectUtil
.
isNotNull
(
param
.
getAccountType
()))
{
WHERE
(
"a.account
T
ype = #{param.accountType}"
);
WHERE
(
"a.account
_t
ype = #{param.accountType}"
);
}
ORDER_BY
(
"a.create_time desc"
);
}}.
toString
();
...
...
performance-web/src/main/java/com/clx/performance/sqlProvider/OwnerRunningWaterRecordSqlProvider.java
浏览文件 @
617316a5
...
...
@@ -13,11 +13,12 @@ public class OwnerRunningWaterRecordSqlProvider {
public
String
marginAccountPageList
(
@Param
(
"param"
)
PagePlatformMarginAccountParam
param
)
{
String
sql
=
new
SQL
()
{{
SELECT
(
"a.id, a.owner_
code
,"
+
SELECT
(
"a.id, a.owner_
user_no
,"
+
" a.owner_name, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance,"
+
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time"
);
FROM
(
"owner_running_water_record a"
);
WHERE
(
"a.account_type ="
+
OwnerAccountEnum
.
AccountTypeStatus
.
MARGIN_ACCOUNT
.
getCode
());
WHERE
(
"a.owner_user_no = #{param.ownerUserNo}"
);
if
(
StringUtils
.
isNotBlank
(
param
.
getBeginTime
())
&&
StringUtils
.
isNotBlank
(
param
.
getEndTime
()))
{
WHERE
(
"a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}"
);
...
...
@@ -40,6 +41,7 @@ public class OwnerRunningWaterRecordSqlProvider {
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time"
);
FROM
(
"owner_running_water_record a"
);
WHERE
(
"a.account_type ="
+
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
());
WHERE
(
"a.owner_user_no = #{param.ownerUserNo}"
);
if
(
StringUtils
.
isNotBlank
(
param
.
getBeginTime
())
&&
StringUtils
.
isNotBlank
(
param
.
getEndTime
()))
{
WHERE
(
"a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论