Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
e419d6a5
提交
e419d6a5
authored
10月 19, 2023
作者:
liruixin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
引入open-sdk
上级
2a83987d
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
1 行增加
和
297 行删除
+1
-297
pom.xml
performance-sdk/pom.xml
+0
-94
Message.java
...ava/com/clx/performance/sdk/callback/message/Message.java
+0
-6
OrderChildMessage.java
...x/performance/sdk/callback/message/OrderChildMessage.java
+0
-57
ActionConstants.java
...ava/com/clx/performance/sdk/constant/ActionConstants.java
+0
-7
MessageConstants.java
...va/com/clx/performance/sdk/constant/MessageConstants.java
+0
-15
PerformanceRequestClient.java
...clx/performance/sdk/request/PerformanceRequestClient.java
+0
-51
Action.java
...n/java/com/clx/performance/sdk/request/action/Action.java
+0
-10
PaymentSettlementAction.java
...rformance/sdk/request/action/PaymentSettlementAction.java
+0
-56
pom.xml
performance-web/pom.xml
+1
-1
没有找到文件。
performance-sdk/pom.xml
deleted
100644 → 0
浏览文件 @
2a83987d
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.clx.cy
</groupId>
<artifactId>
performance-sdk
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
performance-sdk
</name>
<parent>
<groupId>
com.msl
</groupId>
<artifactId>
msl-parent
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath/>
</parent>
<properties>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.target>
8
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.24
</version>
</dependency>
<dependency>
<groupId>
com.msl
</groupId>
<artifactId>
msl-common
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
com.msl
</groupId>
<artifactId>
convertor-spring-boot-starter
</artifactId>
</dependency>
<!-- gson -->
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>
nexus-releases
</id>
<name>
Releases
</name>
<url>
http://139.129.222.24:8081/repository/maven-releases/
</url>
</repository>
<snapshotRepository>
<id>
nexus-releases
</id>
<name>
Snapshot
</name>
<url>
http://139.129.222.24:8081/repository/maven-snapshots/
</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-source-plugin
</artifactId>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
performance-sdk/src/main/java/com/clx/performance/sdk/callback/message/Message.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
callback
.
message
;
public
interface
Message
{
String
topic
();
}
performance-sdk/src/main/java/com/clx/performance/sdk/callback/message/OrderChildMessage.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
callback
.
message
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
java.math.BigDecimal
;
import
static
com
.
clx
.
performance
.
sdk
.
constant
.
MessageConstants
.
ORDER_CHILD_INFO_SYNC
;
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode
public
class
OrderChildMessage
implements
Message
{
@ApiModelProperty
(
value
=
"运单编号"
,
example
=
"100000000"
)
private
String
childNo
;
@ApiModelProperty
(
value
=
"运费单价(分)"
,
example
=
"1.23"
)
private
BigDecimal
freightPrice
;
@ApiModelProperty
(
value
=
"车牌号"
,
example
=
"京A12345"
)
private
String
truckNo
;
@ApiModelProperty
(
value
=
"司机姓名"
,
example
=
"张安"
)
private
String
driverName
;
@ApiModelProperty
(
value
=
"司机手机号"
,
example
=
"12222222222"
)
private
String
driverMobile
;
@ApiModelProperty
(
"运单状态:10:已接单 30:前往货源地 40:到达货源地 50:装货成功 60:前往目的地 70:到达目的地 80:收货待确认"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"接单时间"
,
example
=
"2020-01-01 10:10:10"
)
private
String
payTime
;
@ApiModelProperty
(
value
=
"装车时间"
,
example
=
"2020-01-01 10:10:10"
)
private
String
loadTime
;
@ApiModelProperty
(
value
=
"装货净重"
,
example
=
"10"
)
private
BigDecimal
loadNet
;
@ApiModelProperty
(
value
=
"卸车时间"
,
example
=
"2020-01-01 10:10:10"
)
private
String
unloadTime
;
@ApiModelProperty
(
value
=
"卸货净重"
,
example
=
"41"
)
private
BigDecimal
unloadNet
;
@Override
public
String
topic
()
{
return
ORDER_CHILD_INFO_SYNC
;
}
}
performance-sdk/src/main/java/com/clx/performance/sdk/constant/ActionConstants.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
constant
;
public
class
ActionConstants
{
public
static
final
String
PAYMENT_SETTLEMENT
=
"payment.settlement"
;
}
performance-sdk/src/main/java/com/clx/performance/sdk/constant/MessageConstants.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
constant
;
public
class
MessageConstants
{
public
static
final
String
APP_ID
=
"app_id"
;
public
static
final
String
APP_SECRET
=
"app_secret"
;
public
static
final
String
ORDER_CHILD_INFO_SYNC_URL
=
"order_child_info_sync_url"
;
public
static
final
String
ORDER_CHILD_INFO_SYNC
=
"order.child.info.sync"
;
}
performance-sdk/src/main/java/com/clx/performance/sdk/request/PerformanceRequestClient.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
request
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.clx.performance.sdk.request.action.Action
;
import
com.google.gson.Gson
;
import
com.msl.common.dto.HttpDTO
;
import
com.msl.common.result.Result
;
import
com.msl.common.utils.EncryptUtil
;
import
com.msl.common.utils.HttpUtil
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author wanglq
* Date 2023/8/5
* Time 16:50
*/
@Slf4j
public
class
PerformanceRequestClient
{
private
String
gatewayUrl
;
private
String
appNo
;
private
String
appSecret
;
public
PerformanceRequestClient
(
String
gatewayUrl
,
String
appNo
,
String
appSecret
)
{
this
.
gatewayUrl
=
gatewayUrl
;
this
.
appNo
=
appNo
;
this
.
appSecret
=
appSecret
;
}
public
<
T
>
Result
<
T
>
doAction
(
Action
<
T
>
action
)
{
try
{
HttpDTO
httpDTO
=
EncryptUtil
.
buildDTO
(
appNo
,
JSON
.
toJSONString
(
action
),
appSecret
,
System
.
currentTimeMillis
());
httpDTO
.
setAction
(
action
.
action
());
return
HttpUtil
.
post
(
gatewayUrl
,
null
,
httpDTO
)
.
map
(
r
->
JSON
.
parseObject
(
r
,
new
TypeReference
<
HttpDTO
>()
{
}))
.
mapTry
(
dto
->
EncryptUtil
.
decrypt
(
dto
.
getData
(),
appSecret
))
.
mapWithObj
(
new
TypeReference
<
Result
<
T
>>()
{
},
this
::
covertResult
)
.
get
();
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"http请求失败"
,
e
);
}
}
private
<
T
>
Result
<
T
>
covertResult
(
String
result
,
TypeReference
<
Result
<
T
>>
reference
)
{
return
new
Gson
().
fromJson
(
result
,
reference
.
getType
());
}
}
performance-sdk/src/main/java/com/clx/performance/sdk/request/action/Action.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
request
.
action
;
/**
* @author wanglq
* Date 2023/8/5
* Time 18:19
*/
public
interface
Action
<
T
>
{
String
action
();
}
performance-sdk/src/main/java/com/clx/performance/sdk/request/action/PaymentSettlementAction.java
deleted
100644 → 0
浏览文件 @
2a83987d
package
com
.
clx
.
performance
.
sdk
.
request
.
action
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
static
com
.
clx
.
performance
.
sdk
.
constant
.
ActionConstants
.
PAYMENT_SETTLEMENT
;
/**
* @Author liruixin
* @create 2023-09-19 13:33
*/
@Getter
@Setter
@Accessors
(
chain
=
true
)
public
class
PaymentSettlementAction
implements
Action
<
String
>{
@NotNull
(
message
=
"结算单号不能为空"
)
@ApiModelProperty
(
value
=
"结算单号"
,
example
=
"JS10"
)
private
String
settlementNo
;
@NotBlank
(
message
=
"收款人不能为空"
)
@ApiModelProperty
(
value
=
"收款人"
,
example
=
"收款人"
)
private
String
payee
;
@NotBlank
(
message
=
"收款银行不能为空"
)
@ApiModelProperty
(
value
=
"收款银行"
,
example
=
"浙江银行"
)
private
String
payeeBankName
;
@NotBlank
(
message
=
"收款银行卡卡号不能为空"
)
@ApiModelProperty
(
value
=
"收款银行卡卡号"
,
example
=
"62213545878787"
)
private
String
payeeBankCardNo
;
@NotBlank
(
message
=
"付款银行不能为空"
)
@ApiModelProperty
(
value
=
"付款银行"
,
example
=
"浙江银行"
)
private
String
paymentBankName
;
@NotBlank
(
message
=
"付款银行卡卡号不能为空"
)
@ApiModelProperty
(
value
=
"付款银行卡卡号"
,
example
=
"62213545878787"
)
private
String
paymentBankCardNo
;
@NotBlank
(
message
=
"付款凭证不能为空"
)
@ApiModelProperty
(
value
=
"付款凭证"
,
example
=
"/a.png"
)
private
String
paymentImg
;
@Override
public
String
action
()
{
return
PAYMENT_SETTLEMENT
;
}
}
performance-web/pom.xml
浏览文件 @
e419d6a5
...
...
@@ -47,7 +47,7 @@
<dependency>
<groupId>
com.clx.cy
</groupId>
<artifactId>
performance
-sdk
</artifactId>
<artifactId>
open
-sdk
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论