Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
f5f2adbc
提交
f5f2adbc
authored
2月 22, 2024
作者:
liuhaiquan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v10.7_borrowing_and_repayment_20240118'…
Merge remote-tracking branch 'origin/v10.7_borrowing_and_repayment_20240118' into v10.7_borrowing_and_repayment_20240118
上级
b566ef40
f21a8bf1
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
168 行增加
和
11 行删除
+168
-11
OwnerRePaymentEnum.java
...va/com/clx/performance/enums/loan/OwnerRePaymentEnum.java
+3
-2
OrderChildLoanComponent.java
...om/clx/performance/component/OrderChildLoanComponent.java
+22
-2
ClxMessageConfig.java
...ain/java/com/clx/performance/config/ClxMessageConfig.java
+9
-0
CarrierOwnerLoanRecordController.java
...ler/pc/loan/carrier/CarrierOwnerLoanRecordController.java
+9
-0
OwnerRepaymentController.java
...ce/controller/pc/loan/owner/OwnerRepaymentController.java
+8
-1
OwnerRepaymentDaoImpl.java
.../clx/performance/dao/impl/loan/OwnerRepaymentDaoImpl.java
+9
-0
OwnerRepaymentDao.java
.../java/com/clx/performance/dao/loan/OwnerRepaymentDao.java
+9
-0
EventListenerComponent.java
...ava/com/clx/performance/event/EventListenerComponent.java
+14
-1
OwnerRepaymentUpdateEvent.java
.../com/clx/performance/event/OwnerRepaymentUpdateEvent.java
+33
-0
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+1
-1
OwnerLoanRecordServiceImpl.java
...ormance/service/impl/loan/OwnerLoanRecordServiceImpl.java
+23
-0
OwnerRepaymentServiceImpl.java
...formance/service/impl/loan/OwnerRepaymentServiceImpl.java
+24
-4
OwnerLoanRecordService.java
.../clx/performance/service/loan/OwnerLoanRecordService.java
+2
-0
OwnerRepaymentService.java
...m/clx/performance/service/loan/OwnerRepaymentService.java
+2
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/loan/OwnerRePaymentEnum.java
浏览文件 @
f5f2adbc
...
@@ -16,8 +16,9 @@ public enum OwnerRePaymentEnum {
...
@@ -16,8 +16,9 @@ public enum OwnerRePaymentEnum {
public
enum
Status
{
public
enum
Status
{
PAY_WAIT
(
10
,
"待付款"
),
PAY_WAIT
(
10
,
"待付款"
),
PAYING
(
40
,
"付款中"
),
PAYING
(
40
,
"付款中"
),
PAY_SUCCESS
(
50
,
"付款成功"
),
PAY_FAIL
(
50
,
"付款失败"
),
PAY_FAIL
(
60
,
"付款失败"
),
PAY_SUCCESS
(
60
,
"付款成功"
),
;
;
private
final
Integer
code
;
private
final
Integer
code
;
...
...
performance-web/src/main/java/com/clx/performance/component/OrderChildLoanComponent.java
浏览文件 @
f5f2adbc
...
@@ -21,6 +21,8 @@ import com.clx.performance.enums.loan.OwnerLoanRecordEnum;
...
@@ -21,6 +21,8 @@ import com.clx.performance.enums.loan.OwnerLoanRecordEnum;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.enums.settle.SettlementOwnerEnum
;
import
com.clx.performance.enums.settle.SettlementOwnerEnum
;
import
com.clx.performance.enums.settle.SettlementWayEnum
;
import
com.clx.performance.enums.settle.SettlementWayEnum
;
import
com.clx.performance.event.OwnerRepaymentUpdateEvent
;
import
com.clx.performance.event.SettlementUpdateEvent
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OwnerRunningWaterRecord
;
import
com.clx.performance.model.OwnerRunningWaterRecord
;
...
@@ -37,6 +39,7 @@ import lombok.AllArgsConstructor;
...
@@ -37,6 +39,7 @@ import lombok.AllArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -70,6 +73,8 @@ public class OrderChildLoanComponent {
...
@@ -70,6 +73,8 @@ public class OrderChildLoanComponent {
private
final
RedissonClient
redissonClient
;
private
final
RedissonClient
redissonClient
;
private
final
ApplicationEventPublisher
applicationEventPublisher
;
/**
/**
* 接单校验判断
* 接单校验判断
*
*
...
@@ -150,8 +155,8 @@ public class OrderChildLoanComponent {
...
@@ -150,8 +155,8 @@ public class OrderChildLoanComponent {
}
}
//借款账户钱够,判断是否逾期
//借款账户钱够,判断是否逾期
log
.
info
(
"10.借款账户钱够,判断是否逾期"
);
log
.
info
(
"10.借款账户钱够,判断是否逾期"
);
Optional
<
OwnerRepayment
>
optional
=
ownerRepaymentDao
.
getLimitOneByField
(
OwnerRepayment:
:
getBeOverdue
,
OwnerRePaymentEnum
.
BeOverdue
.
YES
.
getCode
());
boolean
beOverdue
=
this
.
beOverdue
(
ownerInfoFeignVO
.
getUserNo
());
if
(
optional
.
isPresent
()
)
{
if
(
beOverdue
)
{
//逾期:不允许
//逾期:不允许
log
.
info
(
"11.当前货主存在逾期借款"
);
log
.
info
(
"11.当前货主存在逾期借款"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_CHILD_SAVE_FAIL
,
"货主已欠款"
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_CHILD_SAVE_FAIL
,
"货主已欠款"
);
...
@@ -406,6 +411,21 @@ public class OrderChildLoanComponent {
...
@@ -406,6 +411,21 @@ public class OrderChildLoanComponent {
}
}
}
}
private
boolean
beOverdue
(
Long
ownerUserNo
)
{
//查询未付款成功还款单
List
<
OwnerRepayment
>
ownerRepaymentList
=
ownerRepaymentDao
.
selectListByStatusAndOwnerUserNo
(
OwnerRePaymentEnum
.
Status
.
PAY_SUCCESS
.
getCode
(),
ownerUserNo
);
for
(
OwnerRepayment
ownerRepayment
:
ownerRepaymentList
)
{
if
(
OwnerRePaymentEnum
.
BeOverdue
.
YES
.
getCode
().
equals
(
ownerRepayment
.
getBeOverdue
()))
{
return
true
;
}
else
{
if
(
ownerRepayment
.
getLoanRepaymentTime
().
equals
(
LocalDateTime
.
now
())
||
ownerRepayment
.
getLoanRepaymentTime
().
isBefore
(
LocalDateTime
.
now
()))
{
applicationEventPublisher
.
publishEvent
(
new
OwnerRepaymentUpdateEvent
(
this
,
ownerRepayment
.
getId
()));
}
}
}
return
false
;
}
/**
/**
* 抵扣金额
* 抵扣金额
...
...
performance-web/src/main/java/com/clx/performance/config/ClxMessageConfig.java
浏览文件 @
f5f2adbc
...
@@ -20,4 +20,13 @@ public class ClxMessageConfig {
...
@@ -20,4 +20,13 @@ public class ClxMessageConfig {
//短信验证码模板
//短信验证码模板
private
String
captchaTemplateCode
;
private
String
captchaTemplateCode
;
//订单支付短信模板
private
String
orderPayTemplateCode
;
//转账支付-借款单短信模板
private
String
borrowTemplateCode
;
//转账支付-还款单短信模板
private
String
repaymentTemplateCode
;
}
}
performance-web/src/main/java/com/clx/performance/controller/pc/loan/carrier/CarrierOwnerLoanRecordController.java
浏览文件 @
f5f2adbc
...
@@ -124,4 +124,13 @@ public class CarrierOwnerLoanRecordController {
...
@@ -124,4 +124,13 @@ public class CarrierOwnerLoanRecordController {
return
Result
.
ok
();
return
Result
.
ok
();
}
}
@ApiOperation
(
value
=
"转账支付-借款短信"
,
notes
=
"<br>By:姜文业"
)
@GetMapping
(
"/sendLoanSms"
)
public
Result
<
String
>
sendLoanSms
(
@RequestParam
(
"mobile"
)
@NotBlank
(
message
=
"通知的手机号码不能为空"
)
String
mobile
,
@Param
(
"loanNo"
)
@NotNull
(
message
=
"借款单号不能为空"
)
Long
loanNo
)
{
String
token
=
ownerLoanRecordService
.
sendLoanSms
(
mobile
,
loanNo
);
return
Result
.
ok
(
token
);
}
}
}
performance-web/src/main/java/com/clx/performance/controller/pc/loan/owner/OwnerRepaymentController.java
浏览文件 @
f5f2adbc
...
@@ -21,6 +21,7 @@ import org.apache.ibatis.annotations.Param;
...
@@ -21,6 +21,7 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
@Slf4j
@Slf4j
...
@@ -78,7 +79,13 @@ public class OwnerRepaymentController {
...
@@ -78,7 +79,13 @@ public class OwnerRepaymentController {
return
Result
.
ok
(
url
);
return
Result
.
ok
(
url
);
}
}
@ApiOperation
(
value
=
"转账支付-还款短信"
,
notes
=
"<br>By:姜文业"
)
@GetMapping
(
"/sendPaymentSms"
)
public
Result
<
String
>
sendPaymentSms
(
@RequestParam
(
"mobile"
)
@NotBlank
(
message
=
"通知的手机号码不能为空"
)
String
mobile
,
@Param
(
"repaymentNo"
)
@NotNull
(
message
=
"还款单号不能为空"
)
Long
repaymentNo
)
{
String
token
=
ownerRepaymentService
.
sendPaymentSms
(
mobile
,
repaymentNo
);
return
Result
.
ok
(
token
);
}
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/loan/OwnerRepaymentDaoImpl.java
浏览文件 @
f5f2adbc
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.performance.dao.loan.OwnerRepaymentDao
;
import
com.clx.performance.dao.loan.OwnerRepaymentDao
;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.mapper.loan.OwnerRepaymentMapper
;
import
com.clx.performance.mapper.loan.OwnerRepaymentMapper
;
import
com.clx.performance.model.loan.OwnerRepayment
;
import
com.clx.performance.model.loan.OwnerRepayment
;
import
com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerRepaymentParam
;
import
com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerRepaymentParam
;
...
@@ -13,6 +14,7 @@ import com.msl.common.dao.impl.BaseDaoImpl;
...
@@ -13,6 +14,7 @@ import com.msl.common.dao.impl.BaseDaoImpl;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -59,4 +61,11 @@ public class OwnerRepaymentDaoImpl extends BaseDaoImpl<OwnerRepaymentMapper, Own
...
@@ -59,4 +61,11 @@ public class OwnerRepaymentDaoImpl extends BaseDaoImpl<OwnerRepaymentMapper, Own
return
baseMapper
.
pageByParam
(
page
,
param
);
return
baseMapper
.
pageByParam
(
page
,
param
);
}
}
@Override
public
List
<
OwnerRepayment
>
selectListByStatusAndOwnerUserNo
(
Integer
status
,
Long
ownerUserNo
)
{
return
baseMapper
.
selectList
(
lQrWrapper
().
eq
(
OwnerRepayment:
:
getOwnerUserNo
,
ownerUserNo
)
.
lt
(
OwnerRepayment:
:
getStatus
,
status
)
);
}
}
}
performance-web/src/main/java/com/clx/performance/dao/loan/OwnerRepaymentDao.java
浏览文件 @
f5f2adbc
...
@@ -8,6 +8,8 @@ import com.clx.performance.param.pc.loan.carrier.PageOwnerRepaymentOfOwner;
...
@@ -8,6 +8,8 @@ import com.clx.performance.param.pc.loan.carrier.PageOwnerRepaymentOfOwner;
import
com.clx.performance.vo.pc.loan.carrier.OwnerRepaymentVO
;
import
com.clx.performance.vo.pc.loan.carrier.OwnerRepaymentVO
;
import
com.msl.common.dao.BaseDao
;
import
com.msl.common.dao.BaseDao
;
import
java.util.List
;
/**
/**
* @author kavin
* @author kavin
* Date 2024-01-20
* Date 2024-01-20
...
@@ -18,4 +20,11 @@ public interface OwnerRepaymentDao extends BaseDao<OwnerRepaymentMapper, OwnerRe
...
@@ -18,4 +20,11 @@ public interface OwnerRepaymentDao extends BaseDao<OwnerRepaymentMapper, OwnerRe
IPage
<
OwnerRepaymentVO
>
pageByParam
(
PageOwnerRepaymentOfOwner
param
);
IPage
<
OwnerRepaymentVO
>
pageByParam
(
PageOwnerRepaymentOfOwner
param
);
/**
* 查询未付款成功还款单
* @param status
* @param ownerUserNo
* @return
*/
List
<
OwnerRepayment
>
selectListByStatusAndOwnerUserNo
(
Integer
status
,
Long
ownerUserNo
);
}
}
performance-web/src/main/java/com/clx/performance/event/
SettlementListener
.java
→
performance-web/src/main/java/com/clx/performance/event/
EventListenerComponent
.java
浏览文件 @
f5f2adbc
...
@@ -2,9 +2,12 @@ package com.clx.performance.event;
...
@@ -2,9 +2,12 @@ package com.clx.performance.event;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.clx.performance.dao.loan.OrderChildLoanRetryRecordDao
;
import
com.clx.performance.dao.loan.OrderChildLoanRetryRecordDao
;
import
com.clx.performance.dao.loan.OwnerRepaymentDao
;
import
com.clx.performance.dao.settle.SettlementDriverDetailDao
;
import
com.clx.performance.dao.settle.SettlementDriverDetailDao
;
import
com.clx.performance.dao.settle.SettlementOwnerDetailDao
;
import
com.clx.performance.dao.settle.SettlementOwnerDetailDao
;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.model.loan.OrderChildLoanRetryRecord
;
import
com.clx.performance.model.loan.OrderChildLoanRetryRecord
;
import
com.clx.performance.model.loan.OwnerRepayment
;
import
com.clx.performance.model.settle.SettlementDriverDetail
;
import
com.clx.performance.model.settle.SettlementDriverDetail
;
import
com.clx.performance.model.settle.SettlementOwnerDetail
;
import
com.clx.performance.model.settle.SettlementOwnerDetail
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -15,7 +18,7 @@ import org.springframework.stereotype.Component;
...
@@ -15,7 +18,7 @@ import org.springframework.stereotype.Component;
@Component
@Component
@Slf4j
@Slf4j
@AllArgsConstructor
@AllArgsConstructor
public
class
SettlementListener
{
public
class
EventListenerComponent
{
private
final
SettlementOwnerDetailDao
settlementOwnerDetailDao
;
private
final
SettlementOwnerDetailDao
settlementOwnerDetailDao
;
...
@@ -23,6 +26,8 @@ public class SettlementListener {
...
@@ -23,6 +26,8 @@ public class SettlementListener {
private
final
OrderChildLoanRetryRecordDao
orderChildLoanRetryRecordDao
;
private
final
OrderChildLoanRetryRecordDao
orderChildLoanRetryRecordDao
;
private
final
OwnerRepaymentDao
ownerRepaymentDao
;
@EventListener
(
classes
=
{
SettlementUpdateEvent
.
class
})
@EventListener
(
classes
=
{
SettlementUpdateEvent
.
class
})
public
void
listen
(
SettlementUpdateEvent
event
)
{
public
void
listen
(
SettlementUpdateEvent
event
)
{
...
@@ -38,4 +43,12 @@ public class SettlementListener {
...
@@ -38,4 +43,12 @@ public class SettlementListener {
// 保存重试记录
// 保存重试记录
orderChildLoanRetryRecordDao
.
saveEntity
(
entity
);
orderChildLoanRetryRecordDao
.
saveEntity
(
entity
);
}
}
@EventListener
(
classes
=
{
OwnerRepaymentUpdateEvent
.
class
})
public
void
listen
(
OwnerRepaymentUpdateEvent
event
)
{
OwnerRepayment
update
=
new
OwnerRepayment
();
update
.
setId
(
event
.
getId
());
update
.
setBeOverdue
(
OwnerRePaymentEnum
.
BeOverdue
.
YES
.
getCode
());
ownerRepaymentDao
.
updateEntityByKey
(
update
);
}
}
}
performance-web/src/main/java/com/clx/performance/event/OwnerRepaymentUpdateEvent.java
0 → 100644
浏览文件 @
f5f2adbc
package
com
.
clx
.
performance
.
event
;
import
org.springframework.context.ApplicationEvent
;
public
class
OwnerRepaymentUpdateEvent
extends
ApplicationEvent
{
private
Integer
id
;
/**
* Create a new {@code ApplicationEvent}.
*
* @param source the object on which the event initially occurred or with
* which the event is associated (never {@code null})
*/
public
OwnerRepaymentUpdateEvent
(
Object
source
)
{
super
(
source
);
}
public
OwnerRepaymentUpdateEvent
(
Object
source
,
Integer
id
)
{
super
(
source
);
this
.
id
=
id
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
}
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
f5f2adbc
...
@@ -302,7 +302,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -302,7 +302,7 @@ public class OrderChildServiceImpl implements OrderChildService {
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_WEIGHT_LACK
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_WEIGHT_LACK
);
}
}
//接单判断
//接单
借款
判断
orderChildLoanComponent
.
getChildDetermine
(
orderInfo
,
ownerInfo
,
orderGoods
,
childNo
);
orderChildLoanComponent
.
getChildDetermine
(
orderInfo
,
ownerInfo
,
orderGoods
,
childNo
);
OrderChild
orderChild
=
new
OrderChild
();
OrderChild
orderChild
=
new
OrderChild
();
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanRecordServiceImpl.java
浏览文件 @
f5f2adbc
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.message.feign.ClxMessageOpenapiFeign
;
import
com.clx.message.req.message.AliSmsMessageReq
;
import
com.clx.order.enums.DeleteStatusEnum
;
import
com.clx.order.enums.DeleteStatusEnum
;
import
com.clx.performance.component.IdGenerateSnowFlake
;
import
com.clx.performance.component.IdGenerateSnowFlake
;
import
com.clx.performance.config.ClxMessageConfig
;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
...
@@ -100,6 +104,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -100,6 +104,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
NbBankConfig
nbBankConfig
;
private
final
NbBankConfig
nbBankConfig
;
private
final
ClxPayeeConfig
clxPayeeConfig
;
private
final
ClxPayeeConfig
clxPayeeConfig
;
private
final
ClxMessageOpenapiFeign
clxMessageOpenapiFeign
;
private
final
ClxMessageConfig
messageConfig
;
@Override
@Override
public
IPage
<
OwnerLoanRecordVO
>
pageOwnerLoanRecord
(
PageCarrierOwnerLoanRecordParam
param
)
{
public
IPage
<
OwnerLoanRecordVO
>
pageOwnerLoanRecord
(
PageCarrierOwnerLoanRecordParam
param
)
{
...
@@ -675,4 +681,21 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -675,4 +681,21 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
}
}
}
}
@Override
public
String
sendLoanSms
(
String
mobile
,
Long
loanNo
)
{
AliSmsMessageReq
req
=
new
AliSmsMessageReq
();
req
.
setTemplateCode
(
messageConfig
.
getRepaymentTemplateCode
());
JSONObject
jsonObject
=
new
JSONObject
();
//随机生成4位数字
jsonObject
.
set
(
"borrowNo"
,
loanNo
);
req
.
setChannelId
(
messageConfig
.
getChannelId
());
req
.
setAppId
(
messageConfig
.
getAppId
().
toString
());
req
.
setMobile
(
mobile
);
req
.
setContent
(
jsonObject
.
toString
());
req
.
setExpire
(
300L
);
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
return
UUID
.
randomUUID
().
toString
();
}
}
}
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerRepaymentServiceImpl.java
浏览文件 @
f5f2adbc
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
import
cn.hutool.json.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.message.feign.ClxMessageOpenapiFeign
;
import
com.clx.message.req.message.AliSmsMessageReq
;
import
com.clx.performance.config.ClxMessageConfig
;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
...
@@ -36,10 +40,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -36,10 +40,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
/**
/**
* @author kavin
* @author kavin
...
@@ -58,6 +59,8 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
...
@@ -58,6 +59,8 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
OwnerInfoServiceImpl
ownerInfoService
;
private
final
OwnerInfoServiceImpl
ownerInfoService
;
private
final
NbBankConfig
nbBankConfig
;
private
final
NbBankConfig
nbBankConfig
;
private
final
ClxMessageOpenapiFeign
clxMessageOpenapiFeign
;
private
final
ClxMessageConfig
messageConfig
;
@Override
@Override
public
IPage
<
OwnerRepaymentVO
>
pageOwnerRepayment
(
PageCarrierOwnerRepaymentParam
param
)
{
public
IPage
<
OwnerRepaymentVO
>
pageOwnerRepayment
(
PageCarrierOwnerRepaymentParam
param
)
{
...
@@ -160,4 +163,21 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
...
@@ -160,4 +163,21 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
Result
<
ContractEvidenceRecordVo
>
contractEvidenceDetail
=
contractEvidenceFeign
.
getContractEvidenceDetail
(
longResult
.
getData
());
Result
<
ContractEvidenceRecordVo
>
contractEvidenceDetail
=
contractEvidenceFeign
.
getContractEvidenceDetail
(
longResult
.
getData
());
return
contractEvidenceDetail
.
getData
().
getFileUrl
();
return
contractEvidenceDetail
.
getData
().
getFileUrl
();
}
}
@Override
public
String
sendPaymentSms
(
String
mobile
,
Long
repaymentNo
)
{
AliSmsMessageReq
req
=
new
AliSmsMessageReq
();
req
.
setTemplateCode
(
messageConfig
.
getRepaymentTemplateCode
());
JSONObject
jsonObject
=
new
JSONObject
();
//随机生成4位数字
jsonObject
.
set
(
"repaymentNo"
,
repaymentNo
);
req
.
setChannelId
(
messageConfig
.
getChannelId
());
req
.
setAppId
(
messageConfig
.
getAppId
().
toString
());
req
.
setMobile
(
mobile
);
req
.
setContent
(
jsonObject
.
toString
());
req
.
setExpire
(
300L
);
clxMessageOpenapiFeign
.
sendAliSms
(
req
);
return
UUID
.
randomUUID
().
toString
();
}
}
}
performance-web/src/main/java/com/clx/performance/service/loan/OwnerLoanRecordService.java
浏览文件 @
f5f2adbc
...
@@ -49,4 +49,6 @@ public interface OwnerLoanRecordService {
...
@@ -49,4 +49,6 @@ public interface OwnerLoanRecordService {
void
ownerLoanRecordRetryPay
(
String
loanNo
);
void
ownerLoanRecordRetryPay
(
String
loanNo
);
void
ownerLoanRecordCancelPay
(
String
loanNo
);
void
ownerLoanRecordCancelPay
(
String
loanNo
);
String
sendLoanSms
(
String
mobile
,
Long
loanNo
);
}
}
performance-web/src/main/java/com/clx/performance/service/loan/OwnerRepaymentService.java
浏览文件 @
f5f2adbc
...
@@ -29,4 +29,6 @@ public interface OwnerRepaymentService {
...
@@ -29,4 +29,6 @@ public interface OwnerRepaymentService {
OwnerTransferPaymentDetailVO
getTransferPaymentDetail
(
Integer
id
);
OwnerTransferPaymentDetailVO
getTransferPaymentDetail
(
Integer
id
);
String
savePaymentApplicationForm
(
ExportPaymentApplicationFormParam
param
);
String
savePaymentApplicationForm
(
ExportPaymentApplicationFormParam
param
);
String
sendPaymentSms
(
String
mobile
,
Long
repaymentNo
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论