记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
3ae024ba
Commit
3ae024ba
authored
Jul 20, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
2a1e09ae
f24cd423
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
353 additions
and
91 deletions
+353
-91
DragonErrorCodeEnum.java
...iquidnet/service/dragon/constant/DragonErrorCodeEnum.java
+3
-1
MybatisPlusCodeGenerator.java
...om/liquidnet/service/dragon/MybatisPlusCodeGenerator.java
+4
-4
DragonOrderLogs.java
.../com/liquidnet/service/dragon/entity/DragonOrderLogs.java
+24
-10
DragonOrderRefundLogs.java
...iquidnet/service/dragon/entity/DragonOrderRefundLogs.java
+23
-9
DragonOrderRefunds.java
...m/liquidnet/service/dragon/entity/DragonOrderRefunds.java
+38
-20
DragonOrders.java
...ava/com/liquidnet/service/dragon/entity/DragonOrders.java
+29
-18
DragonPayNotify.java
.../com/liquidnet/service/dragon/entity/DragonPayNotify.java
+58
-0
DragonPayNotifyFail.java
.../liquidnet/service/dragon/entity/DragonPayNotifyFail.java
+63
-0
DragonOrderLogsMapper.java
...iquidnet/service/dragon/mapper/DragonOrderLogsMapper.java
+9
-3
DragonOrderRefundLogsMapper.java
...et/service/dragon/mapper/DragonOrderRefundLogsMapper.java
+9
-3
DragonOrderRefundsMapper.java
...idnet/service/dragon/mapper/DragonOrderRefundsMapper.java
+9
-3
DragonOrdersMapper.java
...m/liquidnet/service/dragon/mapper/DragonOrdersMapper.java
+9
-2
DragonPayNotifyFailMapper.java
...dnet/service/dragon/mapper/DragonPayNotifyFailMapper.java
+16
-0
DragonPayNotifyMapper.java
...iquidnet/service/dragon/mapper/DragonPayNotifyMapper.java
+16
-0
DragonOrderLogsMapper.xml
...liquidnet/service/dragon/mapper/DragonOrderLogsMapper.xml
+0
-0
DragonOrderRefundLogsMapper.xml
...net/service/dragon/mapper/DragonOrderRefundLogsMapper.xml
+0
-0
DragonOrderRefundsMapper.xml
...uidnet/service/dragon/mapper/DragonOrderRefundsMapper.xml
+0
-0
DragonOrdersMapper.xml
...om/liquidnet/service/dragon/mapper/DragonOrdersMapper.xml
+0
-0
DragonPayNotifyFailMapper.xml
...idnet/service/dragon/mapper/DragonPayNotifyFailMapper.xml
+5
-0
DragonPayNotifyMapper.xml
...liquidnet/service/dragon/mapper/DragonPayNotifyMapper.xml
+5
-0
pom.xml
liquidnet-bus-do/pom.xml
+0
-1
DragonServiceCommonBiz.java
.../liquidnet/service/dragon/biz/DragonServiceCommonBiz.java
+1
-1
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+2
-1
WepayBiz.java
.../liquidnet/service/dragon/channel/wepay/biz/WepayBiz.java
+6
-5
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+24
-10
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/constant/DragonErrorCodeEnum.java
View file @
3ae024ba
...
@@ -27,7 +27,9 @@ public enum DragonErrorCodeEnum {
...
@@ -27,7 +27,9 @@ public enum DragonErrorCodeEnum {
TRADE_ALIPAY_QUERY_ERROR
(
"PAY0010010"
,
"支付宝订单查询失败!"
),
TRADE_ALIPAY_QUERY_ERROR
(
"PAY0010010"
,
"支付宝订单查询失败!"
),
TRADE_WEPAY_SIGN_ERROR
(
"PAY0020001"
,
"微信签名异常!"
);
TRADE_WEPAY_SIGN_ERROR
(
"PAY0020001"
,
"微信签名异常!"
),
TRADE_WEPAY_QUERY_ERROR
(
"PAY0020002"
,
"微信订单查询失败!"
);
private
String
code
;
private
String
code
;
private
String
message
;
private
String
message
;
...
...
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/MybatisPlusCodeGenerator.java
View file @
3ae024ba
...
@@ -56,7 +56,7 @@ public class MybatisPlusCodeGenerator {
...
@@ -56,7 +56,7 @@ public class MybatisPlusCodeGenerator {
@Override
@Override
public
String
outputFile
(
TableInfo
tableInfo
)
{
public
String
outputFile
(
TableInfo
tableInfo
)
{
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return
moduleRootPath
+
"/src/main/resources/com/liquidnet/service/
adam
/mapper/"
+
pc
.
getModuleName
()
return
moduleRootPath
+
"/src/main/resources/com/liquidnet/service/
dragon
/mapper/"
+
pc
.
getModuleName
()
+
"/"
+
tableInfo
.
getEntityName
()
+
"Mapper"
+
StringPool
.
DOT_XML
;
+
"/"
+
tableInfo
.
getEntityName
()
+
"Mapper"
+
StringPool
.
DOT_XML
;
}
}
});
});
...
@@ -89,13 +89,13 @@ public class MybatisPlusCodeGenerator {
...
@@ -89,13 +89,13 @@ public class MybatisPlusCodeGenerator {
DataSourceConfig
dsc
=
new
DataSourceConfig
();
DataSourceConfig
dsc
=
new
DataSourceConfig
();
// dsc.setSchemaName("public");
// dsc.setSchemaName("public");
dsc
.
setDriverName
(
"com.mysql.cj.jdbc.Driver"
);
dsc
.
setDriverName
(
"com.mysql.cj.jdbc.Driver"
);
dsc
.
setUrl
(
"jdbc:mysql://39.106.122.201:3308/
test
_ln_scene?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=CST"
);
dsc
.
setUrl
(
"jdbc:mysql://39.106.122.201:3308/
dev
_ln_scene?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=CST"
);
dsc
.
setUsername
(
"testmall"
);
dsc
.
setUsername
(
"testmall"
);
dsc
.
setPassword
(
"zhengzai!mYT"
);
dsc
.
setPassword
(
"zhengzai!mYT"
);
String
resourcePath
=
"/Users/
zhanggb
/Downloads/tmp"
;
String
resourcePath
=
"/Users/
anjiabin
/Downloads/tmp"
;
String
directory
=
"com.liquidnet.service.dragon"
;
String
directory
=
"com.liquidnet.service.dragon"
;
String
[]
dbTableArray
=
new
String
[]{
"dragon_orders"
,
"dragon_order_logs"
,
"dragon_order_refunds"
,
"dragon_order_refund_logs"
};
String
[]
dbTableArray
=
new
String
[]{
"dragon_orders"
,
"dragon_order_logs"
,
"dragon_order_refunds"
,
"dragon_order_refund_logs"
,
"dragon_pay_notify"
,
"dragon_pay_notify_fail"
};
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
}
}
...
...
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonOrderLogs.java
View file @
3ae024ba
...
@@ -2,43 +2,57 @@ package com.liquidnet.service.dragon.entity;
...
@@ -2,43 +2,57 @@ package com.liquidnet.service.dragon.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
/**
import
java.math.BigDecimal
;
* <p>
import
java.time.LocalDateTime
;
* 支付订单日志表
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonOrderLogs
implements
Serializable
{
public
class
DragonOrderLogs
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
private
Long
mid
;
/**
/**
*
order_
id
*
订单
id
*/
*/
private
String
orderId
;
private
String
code
;
/**
/**
*
payment_type
*
支付类型
*/
*/
private
String
paymentType
;
private
String
paymentType
;
/**
/**
*
content
*
支付通知内容
*/
*/
private
String
content
;
private
String
content
;
/**
/**
*
created_at
*
创建时间
*/
*/
private
LocalDateTime
createdAt
;
private
LocalDateTime
createdAt
;
/**
/**
*
updated_at
*
更新时间
*/
*/
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
/**
* 删除时间
*/
private
LocalDateTime
deletedAt
;
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonOrderRefundLogs.java
View file @
3ae024ba
...
@@ -2,12 +2,19 @@ package com.liquidnet.service.dragon.entity;
...
@@ -2,12 +2,19 @@ package com.liquidnet.service.dragon.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
/**
import
java.time.LocalDateTime
;
* <p>
* 退款订单信息表
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonOrderRefundLogs
implements
Serializable
{
public
class
DragonOrderRefundLogs
implements
Serializable
{
...
@@ -18,32 +25,39 @@ public class DragonOrderRefundLogs implements Serializable {
...
@@ -18,32 +25,39 @@ public class DragonOrderRefundLogs implements Serializable {
private
Long
mid
;
private
Long
mid
;
/**
/**
*
order_
id
*
订单
id
*/
*/
private
String
orderId
;
private
String
orderId
;
/**
/**
*
order_refund_
id
*
退款订单
id
*/
*/
private
String
orderRefundId
;
private
String
orderRefundId
;
/**
/**
*
refund_type
*
退款类型
*/
*/
private
String
refundType
;
private
String
refundType
;
/**
/**
*
content
*
退款通知内容
*/
*/
private
String
content
;
private
String
content
;
/**
/**
*
created_at
*
创建时间
*/
*/
private
LocalDateTime
createdAt
;
private
LocalDateTime
createdAt
;
/**
/**
*
updated_at
*
更新时间
*/
*/
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
/**
* 删除时间
*/
private
LocalDateTime
deletedAt
;
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonOrderRefunds.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
entity
;
package
com
.
liquidnet
.
service
.
dragon
.
entity
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
/**
import
java.math.BigDecimal
;
* <p>
import
java.time.LocalDateTime
;
* 退款订单表
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonOrderRefunds
implements
Serializable
{
public
class
DragonOrderRefunds
implements
Serializable
{
...
@@ -19,73 +26,84 @@ public class DragonOrderRefunds implements Serializable {
...
@@ -19,73 +26,84 @@ public class DragonOrderRefunds implements Serializable {
private
Long
mid
;
private
Long
mid
;
/**
/**
* order_id
* order_
refund_
id
*/
*/
private
String
orderId
;
private
String
order
Refund
Id
;
/**
/**
* status
* 订单id
*/
private
Long
orderId
;
/**
* 订单退款状态
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
/**
*
code
*
订单退款编号
*/
*/
private
String
code
;
private
String
code
;
/**
/**
*
orderRefundCode
*
调用端订单退款编号
*/
*/
private
String
order_refund_c
ode
;
private
String
orderRefundC
ode
;
/**
/**
*
price
*
退款价格
*/
*/
private
BigDecimal
price
;
private
BigDecimal
price
;
/**
/**
*
reason
*
退款原因
*/
*/
private
String
reason
;
private
String
reason
;
/**
/**
*
notify_url
*
退款完成通知回调地址
*/
*/
private
String
notifyUrl
;
private
String
notifyUrl
;
/**
/**
*
refund_type
*
退款类型
*/
*/
private
String
refundType
;
private
String
refundType
;
/**
/**
*
refund_id
*
退款的订单号
*/
*/
private
String
refundId
;
private
String
refundId
;
/**
/**
*
refund_error
*
退款失败原因
*/
*/
private
String
refundError
;
private
String
refundError
;
/**
/**
*
refund_at
*
退款时间
*/
*/
private
LocalDateTime
refundAt
;
private
LocalDateTime
refundAt
;
/**
/**
*
finished_at
*
退款结束时间
*/
*/
private
LocalDateTime
finishedAt
;
private
LocalDateTime
finishedAt
;
/**
/**
*
created_at
*
创建时间
*/
*/
private
LocalDateTime
createdAt
;
private
LocalDateTime
createdAt
;
/**
/**
*
updated_at
*
更新时间
*/
*/
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
/**
* 删除时间
*/
private
LocalDateTime
deletedAt
;
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonOrders.java
View file @
3ae024ba
...
@@ -9,9 +9,18 @@ import java.io.Serializable;
...
@@ -9,9 +9,18 @@ import java.io.Serializable;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
/**
* <p>
* 支付订单表
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonOrders
implements
Serializable
{
public
class
DragonOrders
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
...
@@ -21,89 +30,91 @@ public class DragonOrders implements Serializable {
...
@@ -21,89 +30,91 @@ public class DragonOrders implements Serializable {
* order_id
* order_id
*/
*/
private
String
orderId
;
private
String
orderId
;
/**
/**
*
status
*
订单状态(0未支付 1支付成功 2支付失败)
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
/**
*
code
*
订单支付编号
*/
*/
private
String
code
;
private
String
code
;
/**
/**
*
type
*
订单类型
*/
*/
private
String
type
;
private
String
type
;
/**
/**
*
price
*
总价格
*/
*/
private
BigDecimal
price
;
private
BigDecimal
price
;
/**
/**
*
name
*
类别或名称
*/
*/
private
String
name
;
private
String
name
;
/**
/**
*
detail
*
详情或描述
*/
*/
private
String
detail
;
private
String
detail
;
/**
/**
*
order_code
*
调用端订单编号
*/
*/
private
String
orderCode
;
private
String
orderCode
;
/**
/**
*
client_ip
*
用户客户端ip地址
*/
*/
private
String
clientIp
;
private
String
clientIp
;
/**
/**
*
notify_url
*
支付完成通知回调地址
*/
*/
private
String
notifyUrl
;
private
String
notifyUrl
;
/**
/**
*
notify_status
*
通知状态(0初始化 1通知成功 2 通知失败 3通知超时)
*/
*/
private
String
notifyStatus
;
private
Integer
notifyStatus
;
/**
/**
*
payment_type
*
支付类型
*/
*/
private
String
paymentType
;
private
String
paymentType
;
/**
/**
*
payment_id
*
支付的订单号
*/
*/
private
String
paymentId
;
private
String
paymentId
;
/**
/**
*
payment_at
*
支付时间
*/
*/
private
LocalDateTime
paymentAt
;
private
LocalDateTime
paymentAt
;
/**
/**
*
finished_at
*
结束时间
*/
*/
private
LocalDateTime
finishedAt
;
private
LocalDateTime
finishedAt
;
/**
/**
*
created_at
*
创建时间
*/
*/
private
LocalDateTime
createdAt
;
private
LocalDateTime
createdAt
;
/**
/**
*
updated_at
*
更新时间
*/
*/
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
/**
/**
*
deleted_at
*
删除时间
*/
*/
private
LocalDateTime
deletedAt
;
private
LocalDateTime
deletedAt
;
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonPayNotify.java
0 → 100644
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 支付通知成功
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonPayNotify
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 订单支付编号
*/
private
String
code
;
/**
* 订单编号
*/
private
String
orderCode
;
/**
* 通知url
*/
private
String
notifyUrl
;
/**
* 通知参数
*/
private
String
notifyData
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/entity/DragonPayNotifyFail.java
0 → 100644
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 支付通知失败记录
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
DragonPayNotifyFail
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 订单支付编号
*/
private
String
code
;
/**
* 订单编号
*/
private
String
orderCode
;
/**
* 通知url
*/
private
String
notifyUrl
;
/**
* 通知参数
*/
private
String
notifyData
;
/**
* 失败描述
*/
private
String
failDesc
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonOrderLogsMapper.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.dragon.entity.DragonOrderLogs
;
import
com.liquidnet.service.dragon.entity.DragonOrderLogs
;
import
com.liquidnet.service.dragon.entity.DragonOrders
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 支付订单日志表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonOrderLogsMapper
extends
BaseMapper
<
DragonOrderLogs
>
{
public
interface
DragonOrderLogsMapper
extends
BaseMapper
<
DragonOrderLogs
>
{
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonOrderRefundLogsMapper.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.dragon.entity.DragonOrderRefundLogs
;
import
com.liquidnet.service.dragon.entity.DragonOrderRefundLogs
;
import
com.liquidnet.service.dragon.entity.DragonOrders
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 退款订单信息表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonOrderRefundLogsMapper
extends
BaseMapper
<
DragonOrderRefundLogs
>
{
public
interface
DragonOrderRefundLogsMapper
extends
BaseMapper
<
DragonOrderRefundLogs
>
{
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonOrderRefundsMapper.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.dragon.entity.DragonOrderRefunds
;
import
com.liquidnet.service.dragon.entity.DragonOrderRefunds
;
import
com.liquidnet.service.dragon.entity.DragonOrders
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 退款订单表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonOrderRefundsMapper
extends
BaseMapper
<
DragonOrderRefunds
>
{
public
interface
DragonOrderRefundsMapper
extends
BaseMapper
<
DragonOrderRefunds
>
{
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonOrdersMapper.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.dragon.entity.DragonOrders
;
import
com.liquidnet.service.dragon.entity.DragonOrders
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 支付订单表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonOrdersMapper
extends
BaseMapper
<
DragonOrders
>
{
public
interface
DragonOrdersMapper
extends
BaseMapper
<
DragonOrders
>
{
}
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonPayNotifyFailMapper.java
0 → 100644
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.liquidnet.service.dragon.entity.DragonPayNotifyFail
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 支付通知失败记录 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonPayNotifyFailMapper
extends
BaseMapper
<
DragonPayNotifyFail
>
{
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/java/com/liquidnet/service/dragon/mapper/DragonPayNotifyMapper.java
0 → 100644
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
mapper
;
import
com.liquidnet.service.dragon.entity.DragonPayNotify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 支付通知成功 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-07-20
*/
public
interface
DragonPayNotifyMapper
extends
BaseMapper
<
DragonPayNotify
>
{
}
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
.liquidnet.service.dragon.
mapper/DragonOrderLogsMapper.xml
→
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
/liquidnet/service/dragon/
mapper/DragonOrderLogsMapper.xml
View file @
3ae024ba
File moved
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
.liquidnet.service.dragon.
mapper/DragonOrderRefundLogsMapper.xml
→
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
/liquidnet/service/dragon/
mapper/DragonOrderRefundLogsMapper.xml
View file @
3ae024ba
File moved
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
.liquidnet.service.dragon.
mapper/DragonOrderRefundsMapper.xml
→
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
/liquidnet/service/dragon/
mapper/DragonOrderRefundsMapper.xml
View file @
3ae024ba
File moved
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
.liquidnet.service.dragon.
mapper/DragonOrdersMapper.xml
→
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com
/liquidnet/service/dragon/
mapper/DragonOrdersMapper.xml
View file @
3ae024ba
File moved
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com/liquidnet/service/dragon/mapper/DragonPayNotifyFailMapper.xml
0 → 100644
View file @
3ae024ba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.dragon.mapper.DragonPayNotifyFailMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-dragon-do/src/main/resources/com/liquidnet/service/dragon/mapper/DragonPayNotifyMapper.xml
0 → 100644
View file @
3ae024ba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.dragon.mapper.DragonPayNotifyMapper"
>
</mapper>
liquidnet-bus-do/pom.xml
View file @
3ae024ba
...
@@ -43,6 +43,5 @@
...
@@ -43,6 +43,5 @@
<artifactId>
fastjson
</artifactId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.73
</version>
<version>
1.2.73
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/biz/DragonServiceCommonBiz.java
View file @
3ae024ba
...
@@ -49,7 +49,7 @@ public class DragonServiceCommonBiz {
...
@@ -49,7 +49,7 @@ public class DragonServiceCommonBiz {
orders
.
setOrderCode
(
dragonPayBaseReqDto
.
getOrderCode
());
orders
.
setOrderCode
(
dragonPayBaseReqDto
.
getOrderCode
());
orders
.
setClientIp
(
dragonPayBaseReqDto
.
getClientIp
());
orders
.
setClientIp
(
dragonPayBaseReqDto
.
getClientIp
());
orders
.
setNotifyUrl
(
dragonPayBaseReqDto
.
getNotifyUrl
());
orders
.
setNotifyUrl
(
dragonPayBaseReqDto
.
getNotifyUrl
());
orders
.
setNotifyStatus
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_INIT
.
getCode
(
));
orders
.
setNotifyStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_INIT
.
getCode
()
));
orders
.
setPaymentType
((
dragonPayBaseReqDto
.
getDeviceFrom
()+
dragonPayBaseReqDto
.
getPayType
()).
toUpperCase
());
orders
.
setPaymentType
((
dragonPayBaseReqDto
.
getDeviceFrom
()+
dragonPayBaseReqDto
.
getPayType
()).
toUpperCase
());
// orders.setPaymentId();
// orders.setPaymentId();
orders
.
setPaymentAt
(
LocalDateTime
.
now
());
orders
.
setPaymentAt
(
LocalDateTime
.
now
());
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
3ae024ba
...
@@ -152,7 +152,8 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
...
@@ -152,7 +152,8 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getMessage
());
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getMessage
());
}
}
// 当返回状态为“TRADE_FINISHED”交易成功结束和“TRADE_SUCCESS”支付成功时更新交易状态
// 当返回状态为“TRADE_FINISHED”交易成功结束和“TRADE_SUCCESS”支付成功时更新交易状态
if
(
"TRADE_SUCCESS"
.
equals
(
resultMap
.
get
(
"tradeStatus"
))
||
"TRADE_FINISHED"
.
equals
(
resultMap
.
get
(
"tradeStatus"
)))
{
if
(
AlipayConstant
.
AlipayTradeStateEnum
.
TRADE_SUCCESS
.
getCode
().
equals
(
resultMap
.
get
(
"tradeStatus"
))
||
AlipayConstant
.
AlipayTradeStateEnum
.
TRADE_FINISHED
.
getCode
().
equals
(
resultMap
.
get
(
"tradeStatus"
)))
{
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
}
}
return
respDto
;
return
respDto
;
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/biz/WepayBiz.java
View file @
3ae024ba
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
biz
;
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
biz
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -12,6 +11,8 @@ import org.apache.http.util.EntityUtils;
...
@@ -12,6 +11,8 @@ import org.apache.http.util.EntityUtils;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.SortedMap
;
import
java.util.SortedMap
;
import
java.util.TreeMap
;
import
java.util.TreeMap
;
...
@@ -35,9 +36,9 @@ public class WepayBiz{
...
@@ -35,9 +36,9 @@ public class WepayBiz{
*
*
* @return
* @return
*/
*/
public
WepayOrderQueryRespDto
tradeQuery
(
String
outTradeNo
,
String
appid
)
{
public
Map
<
String
,
Object
>
tradeQuery
(
String
outTradeNo
,
String
appid
)
{
Map
<
String
,
Object
>
respMap
=
new
HashMap
<>();
log
.
info
(
"======>支付宝交易查询"
);
log
.
info
(
"======>支付宝交易查询"
);
WepayOrderQueryRespDto
respDto
=
null
;
SortedMap
<
String
,
Object
>
paramMap
=
new
TreeMap
<>();
SortedMap
<
String
,
Object
>
paramMap
=
new
TreeMap
<>();
paramMap
.
put
(
"appid"
,
appid
);
paramMap
.
put
(
"appid"
,
appid
);
paramMap
.
put
(
"mch_id"
,
merchantId
);
paramMap
.
put
(
"mch_id"
,
merchantId
);
...
@@ -57,11 +58,11 @@ public class WepayBiz{
...
@@ -57,11 +58,11 @@ public class WepayBiz{
String
xmlStr
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
String
xmlStr
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
EntityUtils
.
consume
(
entity
);
EntityUtils
.
consume
(
entity
);
log
.
info
(
"dragonPay:wepay:wap response xmlStr: {} "
,
xmlStr
);
log
.
info
(
"dragonPay:wepay:wap response xmlStr: {} "
,
xmlStr
);
resp
Dto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayOrderQueryRespDto
.
class
);
resp
Map
=
XmlUtil
.
xmlToMap
(
xmlStr
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
}
}
return
resp
Dto
;
return
resp
Map
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/AbstractWepayStrategy.java
View file @
3ae024ba
...
@@ -4,15 +4,18 @@ import com.liquidnet.common.exception.LiquidnetServiceException;
...
@@ -4,15 +4,18 @@ import com.liquidnet.common.exception.LiquidnetServiceException;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.biz.DragonServiceCommonBiz
;
import
com.liquidnet.service.dragon.biz.DragonServiceCommonBiz
;
import
com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.biz.WepayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.biz.WepayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.constant.WepayConstant
;
import
com.liquidnet.service.dragon.channel.wepay.constant.WepayConstant
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.constant.DragonErrorCodeEnum
;
import
com.liquidnet.service.dragon.constant.DragonErrorCodeEnum
;
import
com.liquidnet.service.dragon.dto.DragonOrdersDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.utils.DataUtils
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -26,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -26,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.time.ZoneOffset
;
import
java.util.Map
;
import
java.util.SortedMap
;
import
java.util.SortedMap
;
import
java.util.TreeMap
;
import
java.util.TreeMap
;
...
@@ -43,9 +47,15 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -43,9 +47,15 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
@Autowired
@Autowired
private
WepayBiz
wepayBiz
;
private
WepayBiz
wepayBiz
;
@Autowired
private
DataUtils
dataUtils
;
@Autowired
@Autowired
private
DragonServiceCommonBiz
dragonServiceCommonBiz
;
private
DragonServiceCommonBiz
dragonServiceCommonBiz
;
@Autowired
private
DragonPayBiz
dragonPayBiz
;
@Override
@Override
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
...
@@ -159,15 +169,19 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -159,15 +169,19 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
@Override
@Override
public
DragonPayOrderQueryRespDto
checkOrderStatus
(
String
code
)
{
public
DragonPayOrderQueryRespDto
checkOrderStatus
(
String
code
)
{
WepayOrderQueryRespDto
result
=
wepayBiz
.
tradeQuery
(
code
,
this
.
getAppid
());
DragonOrdersDto
ordersDto
=
dataUtils
.
getPayOrderByCode
(
code
);
DragonPayOrderQueryRespDto
respDto
=
new
DragonPayOrderQueryRespDto
();
Map
<
String
,
Object
>
resultMap
=
wepayBiz
.
tradeQuery
(
code
,
this
.
getAppid
());
respDto
.
setCode
(
code
);
DragonPayOrderQueryRespDto
respDto
=
dragonPayBiz
.
buildPayOrderQueryRespDto
(
ordersDto
);
// respDto.setOrderCode("");
// respDto.setStatus("");
Object
returnCode
=
resultMap
.
get
(
"return_code"
);
// respDto.setType();
// 查询失败
// respDto.setPaymentId();
if
(
null
==
returnCode
||
"FAIL"
.
equals
(
returnCode
))
{
// respDto.setPrice();
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_WEPAY_QUERY_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_WEPAY_QUERY_ERROR
.
getMessage
());
// respDto.setPaymentType();
}
// 当trade_state为SUCCESS时才返回result_code
if
(
"SUCCESS"
.
equals
(
resultMap
.
get
(
"trade_state"
)))
{
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
}
return
respDto
;
return
respDto
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment