Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
00df2b4c
提交
00df2b4c
authored
3月 27, 2024
作者:
aiqingguo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v1.0_init_contract_20240306' into dev
上级
30ec8754
ce8c27e9
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
397 行增加
和
40 行删除
+397
-40
pom.xml
performance-api/pom.xml
+6
-0
UserConstants.java
...main/java/com/clx/performance/constant/UserConstants.java
+16
-0
PerformanceFeign.java
...main/java/com/clx/performance/feign/PerformanceFeign.java
+1
-1
PerformanceSDKFeign.java
...n/java/com/clx/performance/feign/PerformanceSDKFeign.java
+28
-0
OwnerInfoVO.java
...c/main/java/com/clx/performance/vo/feign/OwnerInfoVO.java
+100
-0
OwnerAccountAllVO.java
...ain/java/com/clx/performance/vo/pc/OwnerAccountAllVO.java
+7
-0
pom.xml
performance-web/pom.xml
+10
-6
ThirdAppConfig.java
.../main/java/com/clx/performance/config/ThirdAppConfig.java
+83
-0
OrderCancelFeignController.java
...formance/controller/feign/OrderCancelFeignController.java
+3
-0
OwnerAccountFeignController.java
...ormance/controller/feign/OwnerAccountFeignController.java
+1
-1
PerformanceSdkFeignController.java
...mance/controller/feign/PerformanceSdkFeignController.java
+58
-0
TempBankController.java
...m/clx/performance/controller/temp/TempBankController.java
+7
-7
TempController.java
...a/com/clx/performance/controller/temp/TempController.java
+20
-19
OrderChildDtsListener.java
...a/com/clx/performance/listener/OrderChildDtsListener.java
+36
-4
OwnerAccountService.java
...java/com/clx/performance/service/OwnerAccountService.java
+2
-0
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+15
-2
OwnerAccountStruct.java
...n/java/com/clx/performance/struct/OwnerAccountStruct.java
+4
-0
没有找到文件。
performance-api/pom.xml
浏览文件 @
00df2b4c
...
...
@@ -44,6 +44,12 @@
<groupId>
com.msl
</groupId>
<artifactId>
convertor-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
com.clx.cy
</groupId>
<artifactId>
open-sdk
</artifactId>
</dependency>
</dependencies>
...
...
performance-api/src/main/java/com/clx/performance/constant/UserConstants.java
0 → 100644
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
constant
;
/**
* @ClassName UserConstants
* @Description
* @Author kavin
* @Date 2024/3/25 14:15
* @Version 1.0
*/
public
class
UserConstants
{
public
static
String
PRODUCT_CODE
=
"Product-Code"
;
public
static
String
TOKEN
=
"Token"
;
}
performance-api/src/main/java/com/clx/performance/feign/PerformanceFeign.java
浏览文件 @
00df2b4c
...
...
@@ -3,6 +3,7 @@ package com.clx.performance.feign;
import
com.clx.performance.param.app.collect.CollectTruckParam
;
import
com.clx.performance.param.feign.OrderAdjustTonnageDownParam
;
import
com.clx.performance.param.pc.OrderCancelFeignParam
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.param.pc.OrderChildReportParam
;
import
com.clx.performance.param.pc.owner.FrozenAccountParam
;
import
com.clx.performance.param.pc.owner.ThawAccountParam
;
...
...
@@ -67,7 +68,6 @@ public interface PerformanceFeign {
@PostMapping
(
value
=
{
"clx-performance/feign/order/orderCancel"
})
Result
<
Object
>
orderCancel
(
@RequestBody
OrderCancelFeignParam
param
);
/**
* 更新货单暂停标志
* @param orderNo
...
...
performance-api/src/main/java/com/clx/performance/feign/PerformanceSDKFeign.java
0 → 100644
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
feign
;
import
com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.msl.common.result.Result
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
@FeignClient
(
name
=
"clx-performance"
,
configuration
=
PerformanceClientConfiguration
.
class
)
public
interface
PerformanceSDKFeign
{
@PostMapping
(
value
=
{
"clx-performance/feign/sdk/ownCancelOrderPre"
})
Result
<
String
>
ownCancelOrderPre
(
@RequestBody
OrderCancelParam
param
);
@GetMapping
(
value
=
{
"clx-performance/feign/sdk/orderCancelResidueWeight"
})
Result
<
OwnerCancelResidueWeightDTO
>
orderCancelResidueWeight
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"optionType"
)
String
optionType
);
@GetMapping
(
value
=
{
"clx-performance/feign/sdk/accountAllInfo"
})
Result
<
OwnerAccountAllVO
>
accountAllInfo
(
@RequestParam
Long
userNo
);
}
performance-api/src/main/java/com/clx/performance/vo/feign/OwnerInfoVO.java
0 → 100644
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
vo
.
feign
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @Description
* @Author aiqingguo
* @Date 2023-10-19 16:33:52
* @Version 1.0
*/
@Getter
@Setter
public
class
OwnerInfoVO
{
@ApiModelProperty
(
"用户编号"
)
private
Long
userNo
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"手机号码"
)
private
String
mobile
;
@ApiModelProperty
(
"货主类型 1企业 2个人"
)
private
Integer
ownerType
;
@ApiModelProperty
(
"所属银行"
)
private
String
ownerAccountBank
;
@ApiModelProperty
(
"开户行"
)
private
String
ownerOpenBank
;
@ApiModelProperty
(
"开户行号"
)
private
String
ownerOpenBankNumber
;
@ApiModelProperty
(
"户名"
)
private
String
ownerAccountName
;
@ApiModelProperty
(
"银行账户"
)
private
String
ownerBankAccount
;
@ApiModelProperty
(
"结算账期 1拉运完成结 2月结"
)
private
Integer
settlementAccountPeriod
;
@ApiModelProperty
(
"结算方式 1装车净重 2卸车净重"
)
private
Integer
settlementWay
;
@ApiModelProperty
(
"冻结方式 1自动冻结 2手动冻结"
)
private
Integer
freezeSetting
;
@ApiModelProperty
(
"公司名称"
)
private
String
companyName
;
@ApiModelProperty
(
"法人姓名"
)
private
String
legalName
;
@ApiModelProperty
(
"法人身份证"
)
private
String
legalCardNo
;
@ApiModelProperty
(
value
=
"法人手机号"
,
example
=
""
)
private
String
legalMobile
;
@ApiModelProperty
(
"营业执照图片地址"
)
private
String
companyBusinessImg
;
@ApiModelProperty
(
"营业执照编号"
)
private
String
companyBusinessNo
;
@ApiModelProperty
(
"公司税号"
)
private
String
companyTaxCode
;
@ApiModelProperty
(
"公司地址"
)
private
String
companyAddress
;
@ApiModelProperty
(
"公司联系电话"
)
private
String
companyTelephone
;
@ApiModelProperty
(
"公司银行账户"
)
private
String
companyBankAccount
;
@ApiModelProperty
(
"公司开户行"
)
private
String
companyOpenBank
;
@ApiModelProperty
(
"统一社会信用代码"
)
private
String
companyGroupCode
;
@ApiModelProperty
(
"联系人"
)
private
String
contactsName
;
@ApiModelProperty
(
"联系电话"
)
private
String
contactsTelephone
;
@ApiModelProperty
(
"联系地址"
)
private
String
contactsAddress
;
@ApiModelProperty
(
"网络货运货主编码"
)
private
String
transportOwnerCode
;
@ApiModelProperty
(
"创建时间"
)
private
String
createTime
;
}
performance-api/src/main/java/com/clx/performance/vo/pc/OwnerAccountAllVO.java
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
vo
.
pc
;
import
com.clx.performance.vo.feign.OwnerInfoVO
;
import
com.msl.common.convertor.field.Converted
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -17,4 +18,10 @@ public class OwnerAccountAllVO {
@ApiModelProperty
(
"0:没有交易密码 1:有交易密码"
)
private
Integer
ownerAccountPassword
;
@ApiModelProperty
(
"借款账户信息"
)
private
OwnerLoanAccountVO
loanAccountVO
;
@ApiModelProperty
(
"货主信息"
)
private
OwnerInfoVO
ownerInfoVO
;
}
performance-web/pom.xml
浏览文件 @
00df2b4c
...
...
@@ -51,11 +51,6 @@
<artifactId>
message-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.clx.cy
</groupId>
<artifactId>
open-sdk
</artifactId>
</dependency>
<dependency>
<groupId>
com.msl
</groupId>
<artifactId>
user-sdk
</artifactId>
...
...
@@ -76,6 +71,12 @@
<artifactId>
trace-spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
com.msl
</groupId>
<artifactId>
trace-spring-boot-starter-openfeign
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.msl</groupId>-->
<!-- <artifactId>message-api</artifactId>-->
...
...
@@ -260,7 +261,10 @@
<artifactId>
openBasicSDK
</artifactId>
<version>
1.7.0
</version>
</dependency>
<dependency>
<groupId>
com.clx.cy
</groupId>
<artifactId>
open-sdk
</artifactId>
</dependency>
</dependencies>
...
...
performance-web/src/main/java/com/clx/performance/config/ThirdAppConfig.java
0 → 100644
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
config
;
import
com.clx.open.sdk.callback.OpenCallBackClient
;
import
com.clx.open.sdk.request.OpenRequestClient
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Getter
@Configuration
@ConfigurationProperties
(
prefix
=
"third"
)
// 配置 文件的前缀
@Slf4j
public
class
ThirdAppConfig
implements
InitializingBean
{
// 这里的名字要和yml中的对应字段名称一致
public
static
Map
<
String
,
AppConfig
>
config
=
new
HashMap
<>();
public
Map
<
String
,
OpenCallBackClient
>
openCallBackClientMap
=
new
HashMap
<>();
public
Map
<
String
,
OpenRequestClient
>
openRequestClientMap
=
new
HashMap
<>();
// 注意此处的 static 关键字
public
static
AppConfig
getConfig
(
String
appNo
)
{
return
config
.
get
(
appNo
);
}
public
void
setConfig
(
List
<
AppConfig
>
appConfigs
)
{
config
=
appConfigs
.
stream
().
collect
(
Collectors
.
toMap
(
AppConfig:
:
getAppNo
,
value
->
value
));
}
public
OpenCallBackClient
getOpenCallBackClient
(
String
appNo
)
{
OpenCallBackClient
openCallBackClient
=
openCallBackClientMap
.
get
(
appNo
);
if
(
openCallBackClient
==
null
)
{
log
.
info
(
"当前appNo:{}对应的client不存在"
,
appNo
);
throw
new
RuntimeException
(
"当前appNo对应的client不存在"
);
}
return
openCallBackClient
;
}
public
OpenRequestClient
getOpenRequestClient
(
String
appNo
)
{
OpenRequestClient
openRequestClient
=
openRequestClientMap
.
get
(
appNo
);
if
(
openRequestClient
==
null
)
{
log
.
info
(
"当前appNo:{}对应的client不存在"
,
appNo
);
throw
new
RuntimeException
(
"当前appNo对应的client不存在"
);
}
return
openRequestClient
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
if
(
config
.
isEmpty
())
{
log
.
info
(
"third app config is empty"
);
return
;
}
for
(
Map
.
Entry
<
String
,
AppConfig
>
entry
:
config
.
entrySet
())
{
String
key
=
entry
.
getKey
();
AppConfig
value
=
entry
.
getValue
();
openCallBackClientMap
.
put
(
key
,
new
OpenCallBackClient
(
value
.
getUrl
(),
value
.
getAppNo
(),
value
.
getSecret
()));
openRequestClientMap
.
put
(
key
,
new
OpenRequestClient
(
value
.
getUrl
(),
value
.
getAppNo
(),
value
.
getSecret
()));
}
}
@Data
public
static
class
AppConfig
{
private
String
appNo
;
private
String
secret
;
private
String
url
;
}
}
performance-web/src/main/java/com/clx/performance/controller/feign/OrderCancelFeignController.java
浏览文件 @
00df2b4c
...
...
@@ -2,8 +2,10 @@ package com.clx.performance.controller.feign;
import
com.clx.performance.param.pc.OrderCancelFeignParam
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.service.OrderCancelService
;
import
com.msl.common.result.Result
;
import
com.msl.user.utils.TokenUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
...
...
@@ -31,4 +33,5 @@ public class OrderCancelFeignController {
orderCancelService
.
ownerConfirmCancelOrderPre
(
param
.
getOrderNo
());
return
Result
.
ok
();
}
}
performance-web/src/main/java/com/clx/performance/controller/feign/OwnerAccountFeignController.java
浏览文件 @
00df2b4c
...
...
@@ -45,7 +45,7 @@ public class OwnerAccountFeignController {
return
Result
.
ok
(
ownerAccountService
.
accountInfo
(
userNo
));
}
@ApiOperation
(
value
=
"查询用户
预付运费和保证金
账户"
,
notes
=
"<br>By:胡宇帆"
)
@ApiOperation
(
value
=
"查询用户
借款
账户"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/loanAccount"
)
public
Result
<
OwnerLoanAccountVO
>
loanAccount
(
@RequestParam
Long
userNo
)
{
return
Result
.
ok
(
ownerAccountService
.
loanAccount
(
userNo
));
...
...
performance-web/src/main/java/com/clx/performance/controller/feign/PerformanceSdkFeignController.java
0 → 100644
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
controller
.
feign
;
import
com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.service.OrderCancelService
;
import
com.clx.performance.service.OrderGoodsService
;
import
com.clx.performance.service.OwnerAccountService
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.msl.common.result.Result
;
import
com.msl.user.utils.TokenUtil
;
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
java.math.BigDecimal
;
@Slf4j
@RestController
@RequestMapping
(
"/feign/sdk"
)
@Validated
@Api
(
tags
=
"对外sdk Feign"
)
@AllArgsConstructor
public
class
PerformanceSdkFeignController
{
private
final
OrderCancelService
orderCancelService
;
private
final
OrderGoodsService
orderGoodsService
;
private
final
OwnerAccountService
ownerAccountService
;
@ApiOperation
(
value
=
"货主端取消订单"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/ownCancelOrderPre"
)
public
Result
<
Object
>
ownCancelOrderPre
(
@RequestBody
OrderCancelParam
param
)
{
log
.
info
(
"取消订单参数:{}"
,
TokenUtil
.
getLoginUserInfo
());
orderCancelService
.
ownerCancelOrderPre
(
param
);
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"获取当前订单可取消吨数"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/orderCancelResidueWeight"
)
public
Result
<
OwnerCancelResidueWeightDTO
>
orderCancelResidueWeight
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"optionType"
)
String
optionType
)
{
log
.
info
(
"当前订单可取消吨数参数:{}"
,
TokenUtil
.
getLoginUserInfo
());
OwnerCancelResidueWeightDTO
dto
=
new
OwnerCancelResidueWeightDTO
();
dto
.
setWeight
(
orderGoodsService
.
orderCancelResidueWeight
(
orderNo
,
optionType
).
toString
());
return
Result
.
ok
(
dto
);
}
@ApiOperation
(
value
=
"获取当前用户所有账户信息"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/accountAllInfo"
)
public
Result
<
OwnerAccountAllVO
>
accountAllInfo
(
@RequestParam
Long
userNo
)
{
return
Result
.
ok
(
ownerAccountService
.
accountAllInfo
(
userNo
));
}
}
performance-web/src/main/java/com/clx/performance/controller/temp/TempBankController.java
浏览文件 @
00df2b4c
...
...
@@ -27,14 +27,14 @@ public class TempBankController {
private
NbBankService
bankService
;
@ApiOperation
(
value
=
"转账支付"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/orderTransferPay"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/orderTransferPay", method = RequestMethod.POST)
public
Result
<
NbBankOrderPayResultVO
>
directBankTransferOrder
()
{
return
Result
.
ok
(
bankService
.
orderTransferPay
(
1
));
}
@ApiOperation
(
value
=
"订单支付"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/orderDirectPay"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/orderDirectPay", method = RequestMethod.POST)
public
Result
<
NbBankOrderPayResultVO
>
orderDirectPay
()
{
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000076809", "黑玫瑰"));
...
...
@@ -43,7 +43,7 @@ public class TempBankController {
}
@ApiOperation
(
value
=
"订单支付1"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/orderDirectPay1"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/orderDirectPay1", method = RequestMethod.POST)
public
Result
<
NbBankOrderPayResultVO
>
orderDirectPay1
(
String
payAcctNo
,
String
payAcctNm
)
{
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000076809", "黑玫瑰"));
...
...
@@ -52,28 +52,28 @@ public class TempBankController {
}
@ApiOperation
(
value
=
"查询"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/getResult"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/getResult", method = RequestMethod.POST)
public
Result
<
NbBankOrderResultVO
>
getResult
(
String
merSeqNo
)
{
return
Result
.
ok
(
bankService
.
getResult
(
merSeqNo
));
}
@ApiOperation
(
value
=
"调账"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/adjust"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/adjust", method = RequestMethod.POST)
public
Result
<
NbBankOrderResultVO
>
adjust
(
String
orgMerSeqNo
,
Integer
amount
)
{
return
Result
.
ok
(
bankService
.
adjust
(
orgMerSeqNo
,
amount
));
}
@ApiOperation
(
value
=
"退款"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/refund"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/refund", method = RequestMethod.POST)
public
Result
<
NbBankOrderResultVO
>
refund
(
Integer
type
,
String
orgMerSeqNo
,
Integer
amount
,
String
orgTransSeqNo
)
{
return
Result
.
ok
(
bankService
.
refund
(
type
,
orgMerSeqNo
,
amount
,
orgTransSeqNo
));
}
@ApiOperation
(
value
=
"回调"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/notify"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/notify", method = RequestMethod.POST)
public
Result
notify
(
NbBankOrderResultVO
param
)
{
bankService
.
orderPayCallback
(
param
.
getMerSeqNo
(),
param
.
getTransSeqNo
(),
param
.
getAmount
(),
param
.
getAmount
(),
param
.
getStatus
(),
param
.
getSignNo
());
...
...
performance-web/src/main/java/com/clx/performance/controller/temp/TempController.java
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
controller
.
temp
;
import
com.clx.
performance.component.ThirdComponent
;
import
com.clx.
open.sdk.callback.message.OrderChildSyncMessage
;
import
com.clx.performance.extranal.transport.TransportService
;
import
com.clx.performance.feign.TransportFeignService
;
import
com.clx.performance.param.feign.transport.OrderChildPaySyncParam
;
import
com.clx.performance.param.feign.transport.OwnerSettlementSyncParam
;
import
com.clx.performance.param.feign.transport.ThirdOrderChildRiskStatusParam
;
import
com.clx.performance.listener.OrderChildDtsListener
;
import
com.clx.performance.service.TempService
;
import
com.clx.performance.service.child.FeignOrderChildService
;
import
com.clx.performance.vo.pc.child.OrderChildLineStatisticsVO
;
import
com.msl.common.dto.HttpDTO
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.
*
;
import
javax.validation.constraints.NotBlank
;
import
org.springframework.web.bind.annotation.
RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
/**
...
...
@@ -39,12 +35,17 @@ public class TempController {
@Autowired
private
TransportFeignService
transportFeignService
;
@Autowired
private
OrderChildDtsListener
orderChildDtsListener
;
@ApiOperation
(
value
=
"test"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/test"
,
method
=
RequestMethod
.
GET
)
public
Result
test
()
{
OrderChildSyncMessage
message
=
new
OrderChildSyncMessage
();
message
.
setId
(
1
);
orderChildDtsListener
.
thirdpartySync
(
message
);
return
Result
.
ok
();
}
...
...
@@ -67,16 +68,16 @@ public class TempController {
// return Result.ok();
// }
@ApiOperation
(
value
=
"测试支付划账 (临时接口)"
,
notes
=
"<br>By:胡宁宁"
)
@RequestMapping
(
value
=
"/paymentTest"
,
method
=
RequestMethod
.
GET
)
public
Result
<
Void
>
paymentTest
(
@RequestParam
(
"fromUser"
)
@NotBlank
(
message
=
"扣款方"
)
String
fromUser
,
@RequestParam
(
"toUser"
)
@NotBlank
(
message
=
"收款方"
)
String
toUser
,
@RequestParam
(
"figure"
)
@NotBlank
(
message
=
"金额"
)
String
figure
)
{
tempService
.
paymentTest
(
fromUser
,
toUser
,
figure
);
return
Result
.
ok
();
}
//
@ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁")
//
@RequestMapping(value = "/paymentTest", method = RequestMethod.GET)
//
public Result<Void> paymentTest(@RequestParam("fromUser") @NotBlank(message = "扣款方") String fromUser,
//
@RequestParam("toUser") @NotBlank(message = "收款方") String toUser,
//
@RequestParam("figure") @NotBlank(message = "金额") String figure) {
//
//
tempService.paymentTest(fromUser,toUser,figure);
//
//
return Result.ok();
//
}
// @ApiOperation(value = "承运同步网络货运 (临时接口)", notes = "<br>By:艾庆国")
...
...
performance-web/src/main/java/com/clx/performance/listener/OrderChildDtsListener.java
浏览文件 @
00df2b4c
...
...
@@ -3,21 +3,22 @@ package com.clx.performance.listener;
import
com.alibaba.fastjson.JSON
;
import
com.clx.open.sdk.callback.OpenCallBackClient
;
import
com.clx.open.sdk.callback.message.OrderChildMessage
;
import
com.clx.open.sdk.callback.message.OrderChildSyncMessage
;
import
com.clx.open.sdk.enums.ResultStatusEnum
;
import
com.clx.order.enums.OrderEnum
;
import
com.clx.order.enums.SyncPlatformEnum
;
import
com.clx.order.feign.OrderFeign
;
import
com.clx.order.vo.feign.FeignOrderVO
;
import
com.clx.performance.config.MslAppConfig
;
import
com.clx.performance.config.ThirdAppConfig
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.dto.dts.DataTransportDTO
;
import
com.clx.performance.enums.DtsOperationTypeEnum
;
import
com.clx.performance.enums.OrderChildEnum
;
import
com.clx.performance.extranal.user.DriverService
;
import
com.clx.performance.event.OrderChildCancelEvent
;
import
com.clx.performance.extranal.user.DriverService
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.service.LastTruckService
;
import
com.clx.performance.struct.OrderChildStruct
;
import
com.clx.user.vo.feign.FeignDriverTruckModelVo
;
import
com.msl.common.enums.ResultCodeEnum
;
import
com.msl.common.result.Result
;
...
...
@@ -27,7 +28,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.stereotype.Component
;
...
...
@@ -43,6 +43,8 @@ public class OrderChildDtsListener {
private
final
LastTruckService
lastTruckService
;
private
final
DriverService
driverService
;
private
final
ApplicationEventPublisher
applicationEventPublisher
;
private
final
ThirdAppConfig
thirdAppConfig
;
@RabbitListener
(
queues
=
RabbitKeyConstants
.
CLX_PERFORMANCE_ORDER_CHILD_QUEUE
)
...
...
@@ -56,6 +58,8 @@ public class OrderChildDtsListener {
OrderChildMessage
before
=
DtsMapConvertUtil
.
convert
(
dataTransportDTO
.
getBeforeMap
(),
new
OrderChildMessage
());
OrderChildMessage
after
=
DtsMapConvertUtil
.
convert
(
dataTransportDTO
.
getAfterMap
(),
new
OrderChildMessage
());
thirdpartySync
(
DtsMapConvertUtil
.
convert
(
dataTransportDTO
.
getAfterMap
(),
new
OrderChildSyncMessage
()));
if
(
Objects
.
equals
(
DtsOperationTypeEnum
.
INSERT
.
getCode
(),
dataTransportDTO
.
getOperationType
().
getCode
())){
//同步after数据
log
.
info
(
"新增:{}"
,
after
);
...
...
@@ -90,7 +94,7 @@ public class OrderChildDtsListener {
return
;
}
//同步交易平台的运单
if
(
Objects
.
equals
(
orderInfoFeign
.
getOrderSource
(),
SyncPlatformEnum
.
TRADE_PLATFORM
.
getCode
())){
if
(
Objects
.
equals
(
orderInfoFeign
.
getOrderSource
(),
SyncPlatformEnum
.
Source
.
TRADE_PLATFORM
.
getCode
())){
String
truckModel
=
after
.
getTruckModel
();
if
(
StringUtils
.
isNotBlank
(
truckModel
)){
...
...
@@ -135,7 +139,35 @@ public class OrderChildDtsListener {
}
}
/**
* 第三方同步
*/
public
void
thirdpartySync
(
OrderChildSyncMessage
message
){
// FeignOrderVO orderInfoFeign = orderFeign.getOrderInfoFeign("");
// if (orderInfoFeign == null) {
// return;
// }
// // 同步新货主客户端的运单
// if(!Objects.equals(orderInfoFeign.getOrderSource(), SyncPlatformEnum.Source.NEW_OWNER_CLIENT.getCode())){
//
// }
try
{
OpenCallBackClient
openCallBackClient
=
thirdAppConfig
.
getOpenCallBackClient
(
SyncPlatformEnum
.
Source
.
NEW_OWNER_CLIENT
.
getCode
().
toString
());
log
.
info
(
"运单同步:{}"
,
message
.
getId
());
Result
<?>
result
=
openCallBackClient
.
encryptPost
(
JSON
.
toJSONString
(
message
),
message
.
topic
());
if
(
result
.
succeed
())
{
log
.
info
(
"运单同步成功:{}"
,
message
.
getId
());
}
else
{
log
.
info
(
"运单同步失败:{}"
,
message
.
getId
());
}
}
catch
(
Exception
e
){
}
}
}
performance-web/src/main/java/com/clx/performance/service/OwnerAccountService.java
浏览文件 @
00df2b4c
...
...
@@ -104,4 +104,6 @@ public interface OwnerAccountService {
void
resetPassword
(
ResetPasswordParam
param
);
OwnerLoanAccountVO
loanAccount
(
Long
userNo
);
OwnerAccountAllVO
accountAllInfo
(
Long
userNo
);
}
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
00df2b4c
...
...
@@ -43,6 +43,7 @@ import com.clx.performance.utils.excel.ExcelData;
import
com.clx.performance.utils.excel.ExcelField
;
import
com.clx.performance.utils.excel.ExcelSheet
;
import
com.clx.performance.utils.excel.ExcelUtil
;
import
com.clx.performance.vo.feign.OwnerInfoVO
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
...
...
@@ -96,8 +97,6 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private
final
OwnerCaseOutDao
ownerCaseOutDao
;
private
final
OwnerTransferInfoDao
ownerTransferInfoDao
;
private
final
OwnerInfoFeign
ownerInfoFeign
;
private
final
OwnerBindCardRecordDao
ownerBindCardRecordDao
;
...
...
@@ -1257,4 +1256,18 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
return
ownerLoanAccountStruct
.
convert
(
ownerLoanAccount
);
}
@Override
public
OwnerAccountAllVO
accountAllInfo
(
Long
userNo
)
{
OwnerAccountAllVO
ownerAccountAllVO
=
this
.
accountInfo
(
userNo
);
OwnerLoanAccountVO
ownerLoanAccountVO
=
this
.
loanAccount
(
userNo
);
ownerAccountAllVO
.
setLoanAccountVO
(
ownerLoanAccountVO
);
Result
<
OwnerInfoFeignVO
>
ownerInfoResult
=
ownerFeign
.
getOwnerInfo
(
userNo
);
if
(
ownerInfoResult
.
succeed
())
{
OwnerInfoVO
ownerInfoVO
=
ownerAccountStruct
.
convertVo
(
ownerInfoResult
.
getData
());
ownerAccountAllVO
.
setOwnerInfoVO
(
ownerInfoVO
);
}
return
ownerAccountAllVO
;
}
}
performance-web/src/main/java/com/clx/performance/struct/OwnerAccountStruct.java
浏览文件 @
00df2b4c
package
com
.
clx
.
performance
.
struct
;
import
com.clx.performance.model.OwnerAccount
;
import
com.clx.performance.vo.feign.OwnerInfoVO
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
import
com.clx.user.vo.feign.OwnerInfoFeignVO
;
import
com.msl.common.utils.DateStructUtil
;
import
com.msl.common.utils.DateUtils
;
import
org.mapstruct.Mapper
;
...
...
@@ -16,4 +18,6 @@ public interface OwnerAccountStruct {
List
<
OwnerAccountVO
>
convertList
(
List
<
OwnerAccount
>
orderGoods
);
OwnerInfoVO
convertVo
(
OwnerInfoFeignVO
vo
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论