Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
aaefc560
提交
aaefc560
authored
2月 22, 2024
作者:
jiangwenye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
转账还款短信发送
上级
bfe138fa
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
77 行增加
和
5 行删除
+77
-5
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
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-web/src/main/java/com/clx/performance/config/ClxMessageConfig.java
浏览文件 @
aaefc560
...
...
@@ -20,4 +20,13 @@ public class ClxMessageConfig {
//短信验证码模板
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
浏览文件 @
aaefc560
...
...
@@ -124,4 +124,13 @@ public class CarrierOwnerLoanRecordController {
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
浏览文件 @
aaefc560
...
...
@@ -21,6 +21,7 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
@Slf4j
...
...
@@ -78,7 +79,13 @@ public class OwnerRepaymentController {
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/service/impl/loan/OwnerLoanRecordServiceImpl.java
浏览文件 @
aaefc560
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.performance.component.IdGenerateSnowFlake
;
import
com.clx.performance.config.ClxMessageConfig
;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
...
...
@@ -100,6 +104,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
NbBankConfig
nbBankConfig
;
private
final
ClxPayeeConfig
clxPayeeConfig
;
private
final
ClxMessageOpenapiFeign
clxMessageOpenapiFeign
;
private
final
ClxMessageConfig
messageConfig
;
@Override
public
IPage
<
OwnerLoanRecordVO
>
pageOwnerLoanRecord
(
PageCarrierOwnerLoanRecordParam
param
)
{
...
...
@@ -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
浏览文件 @
aaefc560
package
com
.
clx
.
performance
.
service
.
impl
.
loan
;
import
cn.hutool.json.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.PaymentFromConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
...
...
@@ -36,10 +40,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.*
;
/**
* @author kavin
...
...
@@ -58,6 +59,8 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
private
final
PaymentFromConfig
paymentFromConfig
;
private
final
OwnerInfoServiceImpl
ownerInfoService
;
private
final
NbBankConfig
nbBankConfig
;
private
final
ClxMessageOpenapiFeign
clxMessageOpenapiFeign
;
private
final
ClxMessageConfig
messageConfig
;
@Override
public
IPage
<
OwnerRepaymentVO
>
pageOwnerRepayment
(
PageCarrierOwnerRepaymentParam
param
)
{
...
...
@@ -156,4 +159,21 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
Result
<
ContractEvidenceRecordVo
>
contractEvidenceDetail
=
contractEvidenceFeign
.
getContractEvidenceDetail
(
longResult
.
getData
());
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
浏览文件 @
aaefc560
...
...
@@ -49,4 +49,6 @@ public interface OwnerLoanRecordService {
void
ownerLoanRecordRetryPay
(
String
loanNo
);
void
ownerLoanRecordCancelPay
(
String
loanNo
);
String
sendLoanSms
(
String
mobile
,
Long
loanNo
);
}
performance-web/src/main/java/com/clx/performance/service/loan/OwnerRepaymentService.java
浏览文件 @
aaefc560
...
...
@@ -29,4 +29,6 @@ public interface OwnerRepaymentService {
OwnerTransferPaymentDetailVO
getTransferPaymentDetail
(
Integer
id
);
String
savePaymentApplicationForm
(
ExportPaymentApplicationFormParam
param
);
String
sendPaymentSms
(
String
mobile
,
Long
repaymentNo
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论