记得上下班打卡 | 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
96cb3e71
Commit
96cb3e71
authored
Jul 13, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
aa9cc936
32c4e700
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
214 additions
and
87 deletions
+214
-87
DragonPayOrderQueryRespDto.java
...uidnet/service/dragon/dto/DragonPayOrderQueryRespDto.java
+21
-0
PayDataVo.java
.../com/liquidnet/service/kylin/dto/vo/middle/PayDataVo.java
+5
-19
PayInnerResultVo.java
...uidnet/service/kylin/dto/vo/returns/PayInnerResultVo.java
+21
-0
PayResultVo.java
...m/liquidnet/service/kylin/dto/vo/returns/PayResultVo.java
+2
-15
IKylinOrderTicketsOrderService.java
...service/kylin/service/IKylinOrderTicketsOrderService.java
+2
-2
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+3
-3
KylinOrderTickets.java
...com/liquidnet/service/kylin/entity/KylinOrderTickets.java
+6
-1
AbstractAlipayStrategy.java
.../channel/alipay/strategy/impl/AbstractAlipayStrategy.java
+4
-1
WePayRefundReturnCallBackInfoDto.java
.../channel/wepay/resp/WePayRefundReturnCallBackInfoDto.java
+1
-1
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+2
-1
PayController.java
...om/liquidnet/service/dragon/controller/PayController.java
+20
-3
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+75
-0
db_kylin_structure.sql
.../liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
+1
-0
KylinOrderTicketsController.java
...service/order/controller/KylinOrderTicketsController.java
+4
-4
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+46
-36
sqlmap.properties
...t-service-order-impl/src/main/resources/sqlmap.properties
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/DragonPayOrderQueryRespDto.java
0 → 100644
View file @
96cb3e71
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
import
lombok.Data
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayOrderQueryRespDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/13 15:39
*/
@Data
public
class
DragonPayOrderQueryRespDto
{
private
String
code
;
private
String
orderCode
;
private
String
status
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/middle/PayDataVo.java
View file @
96cb3e71
...
@@ -10,31 +10,17 @@ import java.io.Serializable;
...
@@ -10,31 +10,17 @@ import java.io.Serializable;
public
class
PayDataVo
implements
Serializable
{
public
class
PayDataVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5841205289132250565L
;
private
static
final
long
serialVersionUID
=
-
5841205289132250565L
;
@JsonProperty
(
"appId"
)
private
String
appid
;
@JsonProperty
(
"appid"
)
private
String
appId
;
private
String
appId
;
@JsonProperty
(
"nonceStr"
)
private
String
noncestr
;
@JsonProperty
(
"noncestr"
)
private
String
nonceStr
;
private
String
nonceStr
;
@JsonProperty
(
"timeStamp"
)
private
String
timestamp
;
@JsonProperty
(
"timestamp"
)
private
String
timeStamp
;
private
String
timeStamp
;
@JsonProperty
(
"package"
)
@JsonProperty
(
"package"
)
private
String
packageOther
;
private
String
packages
;
private
String
packages
;
private
String
partnerId
;
private
String
partnerid
;
private
String
prepayId
;
private
String
prepayid
;
private
String
sign
;
private
String
sign
;
private
String
mweb
_u
rl
;
private
String
mweb
U
rl
;
private
String
paySign
;
private
String
paySign
;
private
String
signType
;
private
String
signType
;
private
String
redirectUrl
;
private
String
redirect_url
;
private
String
orderStr
;
private
String
order_str
;
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/PayInnerResultVo.java
0 → 100644
View file @
96cb3e71
package
com
.
liquidnet
.
service
.
kylin
.
dto
.
vo
.
returns
;
import
com.liquidnet.service.kylin.dto.vo.middle.PayDataVo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
@Data
public
class
PayInnerResultVo
implements
Serializable
{
private
String
code
;
private
String
orderCode
;
private
Integer
status
;
private
String
orderId
;
private
String
showUrl
;
private
String
returnUrl
;
private
BigDecimal
price
;
private
PayDataVo
payData
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/PayResultVo.java
View file @
96cb3e71
...
@@ -12,19 +12,6 @@ public class PayResultVo implements Serializable {
...
@@ -12,19 +12,6 @@ public class PayResultVo implements Serializable {
private
static
final
long
serialVersionUID
=
1541552316829686035L
;
private
static
final
long
serialVersionUID
=
1541552316829686035L
;
private
String
code
;
private
String
code
;
private
String
message
;
private
String
order_code
;
private
PayInnerResultVo
data
;
private
Integer
status
;
private
String
order_id
;
private
String
showUrl
;
private
String
returnUrl
;
private
BigDecimal
price
;
private
PayDataVo
pay_data
;
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/service/IKylinOrderTicketsOrderService.java
View file @
96cb3e71
...
@@ -20,10 +20,10 @@ import java.util.List;
...
@@ -20,10 +20,10 @@ import java.util.List;
public
interface
IKylinOrderTicketsOrderService
{
public
interface
IKylinOrderTicketsOrderService
{
// 下单前判断接口(判断是否可锁定库存)(无订单->待支付->可支付)
// 下单前判断接口(判断是否可锁定库存)(无订单->待支付->可支付)
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
);
ResponseDto
<
Pay
Inner
ResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
);
// 再次支付(待支付->可支付->倒计时结束释放库存)
// 再次支付(待支付->可支付->倒计时结束释放库存)
ResponseDto
<
PayResultVo
>
payAgain
(
PayAgainParam
payAgainParam
);
ResponseDto
<
Pay
Inner
ResultVo
>
payAgain
(
PayAgainParam
payAgainParam
);
// 支付回调(待支付->已支付->中断倒计时)
// 支付回调(待支付->已支付->中断倒计时)
String
syncOrder
(
SyncOrderParam
syncOrderParam
);
String
syncOrder
(
SyncOrderParam
syncOrderParam
);
...
...
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
96cb3e71
...
@@ -54,8 +54,8 @@ liquidnet:
...
@@ -54,8 +54,8 @@ liquidnet:
url
:
http://devservice.zhengzai.tv/
url
:
http://devservice.zhengzai.tv/
order
:
order
:
url-pay
:
url-pay
:
pay
:
http://dev
pay.zhengzai.tv/
pay
:
http://dev
dragon.zhengzai.tv/dragon/pay/dragonPay
check
:
http://dev
pay.zhengzai.tv/order/verify
check
:
http://dev
dragon.zhengzai.tv/dragon/pay/checkOrder
localUrl
:
http://devorder.zhengzai.tv/order/order/syncOrder
localUrl
:
http://devorder.zhengzai.tv/order/order/syncOrder
url-service
:
url-service
:
url
:
http://devservice.zhengzai.tv/
url
:
http://devservice.zhengzai.tv/
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/KylinOrderTickets.java
View file @
96cb3e71
...
@@ -138,6 +138,11 @@ public class KylinOrderTickets implements Serializable {
...
@@ -138,6 +138,11 @@ public class KylinOrderTickets implements Serializable {
*/
*/
private
String
paymentType
;
private
String
paymentType
;
/**
* 支付的订单号
*/
private
String
paymentId
;
/**
/**
* 支付时间
* 支付时间
*/
*/
...
@@ -240,7 +245,7 @@ public class KylinOrderTickets implements Serializable {
...
@@ -240,7 +245,7 @@ public class KylinOrderTickets implements Serializable {
*/
*/
public
Object
[]
getSynOrderObject
(
LocalDateTime
updateTime
,
LocalDateTime
createTime
)
{
public
Object
[]
getSynOrderObject
(
LocalDateTime
updateTime
,
LocalDateTime
createTime
)
{
return
new
Object
[]{
return
new
Object
[]{
paymentType
,
payCode
,
timePay
,
qrCode
,
updatedAt
,
orderTicketsId
,
updateTime
,
createTime
payment
Id
,
payment
Type
,
payCode
,
timePay
,
qrCode
,
updatedAt
,
orderTicketsId
,
updateTime
,
createTime
};
};
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AbstractAlipayStrategy.java
View file @
96cb3e71
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
alipay
.
strategy
.
impl
;
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
alipay
.
strategy
.
impl
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.alipay.biz.AlipayBiz
;
import
com.liquidnet.service.dragon.channel.alipay.biz.AlipayBiz
;
import
com.liquidnet.service.dragon.channel.alipay.req.AlipayTradePayReq
;
import
com.liquidnet.service.dragon.channel.alipay.req.AlipayTradePayReq
;
...
@@ -40,7 +41,9 @@ public abstract class AbstractAlipayStrategy implements IAlipayStrategy {
...
@@ -40,7 +41,9 @@ public abstract class AbstractAlipayStrategy implements IAlipayStrategy {
alipayTradePayReq
.
setBody
(
dragonPayBaseReqDto
.
getDetail
());
alipayTradePayReq
.
setBody
(
dragonPayBaseReqDto
.
getDetail
());
//dragon中支付编号
//dragon中支付编号
alipayTradePayReq
.
setOutTradeNo
(
dragonPayBaseReqDto
.
getCode
());
alipayTradePayReq
.
setOutTradeNo
(
dragonPayBaseReqDto
.
getCode
());
alipayTradePayReq
.
setTimeExpire
(
dragonPayBaseReqDto
.
getExpireTime
());
//设置订单过期时间
String
timeExpire
=
DateUtil
.
format
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
dragonPayBaseReqDto
.
getCreateDate
()).
plusMinutes
(
Long
.
parseLong
(
dragonPayBaseReqDto
.
getExpireTime
())),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
alipayTradePayReq
.
setTimeExpire
(
timeExpire
);
alipayTradePayReq
.
setNotifyUrl
(
this
.
getNotifyUrl
());
alipayTradePayReq
.
setNotifyUrl
(
this
.
getNotifyUrl
());
alipayTradePayReq
.
setTimestamp
(
dragonPayBaseReqDto
.
getCreateDate
());
alipayTradePayReq
.
setTimestamp
(
dragonPayBaseReqDto
.
getCreateDate
());
//调用支付
//调用支付
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/resp/WePayRefundReturnCallBackInfoDto.java
View file @
96cb3e71
...
@@ -4,7 +4,7 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
...
@@ -4,7 +4,7 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
@XStreamAlias
(
"
xml
"
)
@XStreamAlias
(
"
root
"
)
public
class
WePayRefundReturnCallBackInfoDto
{
public
class
WePayRefundReturnCallBackInfoDto
{
@XStreamAlias
(
"out_refund_no"
)
@XStreamAlias
(
"out_refund_no"
)
private
String
outRefundNo
;
private
String
outRefundNo
;
...
...
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 @
96cb3e71
...
@@ -106,7 +106,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -106,7 +106,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
parameters
.
put
(
"body"
,
dragonPayBaseReqDto
.
getName
());
parameters
.
put
(
"body"
,
dragonPayBaseReqDto
.
getName
());
parameters
.
put
(
"detail"
,
dragonPayBaseReqDto
.
getDetail
());
parameters
.
put
(
"detail"
,
dragonPayBaseReqDto
.
getDetail
());
parameters
.
put
(
"out_trade_no"
,
dragonPayBaseReqDto
.
getCode
());
parameters
.
put
(
"out_trade_no"
,
dragonPayBaseReqDto
.
getCode
());
parameters
.
put
(
"time_expire"
,
"203110908103456"
);
String
timeExpire
=
DateUtil
.
format
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
dragonPayBaseReqDto
.
getCreateDate
()).
plusMinutes
(
Long
.
parseLong
(
dragonPayBaseReqDto
.
getExpireTime
())),
DateUtil
.
Formatter
.
yyyyMMddHHmmssTrim
);
parameters
.
put
(
"time_expire"
,
timeExpire
);
parameters
.
put
(
"notify_url"
,
this
.
getNotifyUrl
());
parameters
.
put
(
"notify_url"
,
this
.
getNotifyUrl
());
return
parameters
;
return
parameters
;
};
};
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/PayController.java
View file @
96cb3e71
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
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.service.IDragonOrdersService
;
import
com.liquidnet.service.dragon.service.IDragonOrdersService
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -47,7 +48,9 @@ public class PayController {
...
@@ -47,7 +48,9 @@ public class PayController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"detail"
,
value
=
"订单描述"
,
example
=
"测试订单001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"detail"
,
value
=
"订单描述"
,
example
=
"测试订单001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderCode"
,
value
=
"订单编号"
,
example
=
"ORDER0001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"orderCode"
,
value
=
"订单编号"
,
example
=
"ORDER0001"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"clientIp"
,
value
=
"客户端ip"
,
example
=
"127.0.0.1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"clientIp"
,
value
=
"客户端ip"
,
example
=
"127.0.0.1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"notifyUrl"
,
value
=
"通知url"
,
example
=
"testdragon.zhengzai.tv"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"notifyUrl"
,
value
=
"通知url"
,
example
=
"devdragon.zhengzai.tv"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"createDate"
,
value
=
"订单创建时间"
,
example
=
"2021-07-13 13:00:00"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"expireTime"
,
value
=
"订单过期时间"
,
example
=
"5"
),
})
})
@ResponseBody
@ResponseBody
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
...
@@ -65,8 +68,8 @@ public class PayController {
...
@@ -65,8 +68,8 @@ public class PayController {
// @RequestParam(value = "quitUrl",required = false) String quitUrl,
// @RequestParam(value = "quitUrl",required = false) String quitUrl,
// @RequestParam(value = "showUrl",required = false) String showUrl,
// @RequestParam(value = "showUrl",required = false) String showUrl,
// @RequestParam(value = "code",required = false) String code,
// @RequestParam(value = "code",required = false) String code,
@RequestParam
(
value
=
"createDate"
,
required
=
fals
e
)
String
createDate
,
@RequestParam
(
value
=
"createDate"
,
required
=
tru
e
)
String
createDate
,
@RequestParam
(
value
=
"expireTime"
,
required
=
fals
e
)
String
expireTime
){
@RequestParam
(
value
=
"expireTime"
,
required
=
tru
e
)
String
expireTime
){
//为什么在js和applet中才需要判断open_id?
//为什么在js和applet中才需要判断open_id?
if
(
payType
.
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
())){
if
(
payType
.
equalsIgnoreCase
(
DragonConstant
.
PayChannelEnum
.
WEPAY
.
getCode
())){
if
(
StringUtil
.
isEmpty
(
openId
)){
if
(
StringUtil
.
isEmpty
(
openId
)){
...
@@ -92,4 +95,18 @@ public class PayController {
...
@@ -92,4 +95,18 @@ public class PayController {
dragonPayBaseReqDto
.
setExpireTime
(
expireTime
);
dragonPayBaseReqDto
.
setExpireTime
(
expireTime
);
return
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
);
return
dragonOrdersService
.
dragonPay
(
dragonPayBaseReqDto
);
}
}
@PostMapping
(
"/checkOrder"
)
@ApiOperation
(
"订单查询"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
""
,
example
=
"PAY202107131522368438531155"
)
})
@ResponseBody
public
ResponseDto
<
DragonPayOrderQueryRespDto
>
checkOrder
(
@RequestParam
(
value
=
"code"
)
@NotNull
(
message
=
"支付编号不能为空!"
)
String
code
){
DragonPayOrderQueryRespDto
respDto
=
new
DragonPayOrderQueryRespDto
();
respDto
.
setCode
(
code
);
respDto
.
setOrderCode
(
""
);
respDto
.
setStatus
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
());
return
ResponseDto
.
success
(
respDto
);
}
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
96cb3e71
...
@@ -394,6 +394,80 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -394,6 +394,80 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
}
}
public
String
aliPayRefundCallBack
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
InputStream
inStream
;
ByteArrayOutputStream
outSteam
;
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
try
{
inStream
=
request
.
getInputStream
();
outSteam
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
1024
];
int
len
=
0
;
while
((
len
=
inStream
.
read
(
buffer
))
!=
-
1
)
{
outSteam
.
write
(
buffer
,
0
,
len
);
}
// 获取微信调用我们notify_url的返回信息
String
jsonStr
=
new
String
(
outSteam
.
toByteArray
(),
"utf-8"
);
outSteam
.
close
();
inStream
.
close
();
log
.
debug
(
"JSON = "
+
jsonStr
);
WePayRefundReturnCallBackDto
callBackDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnCallBackDto
.
class
);
log
.
debug
(
"DATA = "
+
callBackDto
);
if
(
callBackDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
))
{
String
reqInfo
=
PayWepayUtils
.
getInstance
().
unCodeReqInfo
(
callBackDto
.
getReqInfo
());
log
.
debug
(
"REQINFO = "
+
reqInfo
);
WePayRefundReturnCallBackInfoDto
info
=
XmlUtil
.
toBean
(
reqInfo
,
WePayRefundReturnCallBackInfoDto
.
class
);
String
outRefundNo
=
info
.
getOutRefundNo
();
String
refundAt
=
info
.
getSuccessTime
();
try
{
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
new
Object
[]{
outRefundNo
,
info
.
getRefundRequestSource
(),
JSON
.
toJSONString
(
info
),
nowTime
,
nowTime
}
);
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_success.update"
),
new
Object
[]{
nowTime
,
refundAt
,
DragonConstant
.
RefundStatusEnum
.
STATUS_REFUNDED
.
getCode
(),
outRefundNo
}
);
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
info
.
getRefundStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
}
else
{
dto
.
setStatus
(
0
);
}
// dto.setOrderCode();
// dto.setCode();
// dto.setType();
// dto.setPrice();
// dto.setPaymentType();
// dto.setPaymentId();
// dto.setPaymentAt();
dto
.
setOrderRefundCode
(
info
.
getOutRefundNo
());
dto
.
setRefundCode
(
info
.
getOutTradeNo
());
dto
.
setRefundPrice
(
info
.
getRefundFee
());
// dto.setRefundReason();
dto
.
setRefundId
(
info
.
getRefundId
());
// dto.setRefundType(info.getrefund);
dto
.
setRefundAt
(
refundAt
);
dto
.
setRefundError
(
callBackDto
.
getReturnMsg
());
sendNotifyUrl
(
dto
);
return
"<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>"
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
""
);
return
"<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[ERROR]]></return_msg></xml>"
;
}
}
else
{
return
"<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[ERROR]]></return_msg></xml>"
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
""
);
return
"<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[ERROR]]></return_msg></xml>"
;
}
}
/**
/**
* 给 REDIS 队列发送消息 数据库相关
* 给 REDIS 队列发送消息 数据库相关
*
*
...
@@ -432,6 +506,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -432,6 +506,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
String
response
=
HttpUtil
.
post
((
String
)
redisUtil
.
get
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
()),
params
);
String
response
=
HttpUtil
.
post
((
String
)
redisUtil
.
get
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
()),
params
);
log
.
debug
(
"RETURN RESPONSE="
+
response
);
if
(
response
.
equals
(
"success"
))
{
if
(
response
.
equals
(
"success"
))
{
sendMySqlRedis
(
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
View file @
96cb3e71
...
@@ -494,6 +494,7 @@ CREATE TABLE `kylin_order_tickets`
...
@@ -494,6 +494,7 @@ CREATE TABLE `kylin_order_tickets`
`refund_number`
int
(
32
)
NOT
NULL
DEFAULT
0
COMMENT
'退款张数'
,
`refund_number`
int
(
32
)
NOT
NULL
DEFAULT
0
COMMENT
'退款张数'
,
`pay_type`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'选择支付方式'
,
`pay_type`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'选择支付方式'
,
`payment_type`
varchar
(
255
)
NULL
DEFAULT
''
COMMENT
'实际支付方式'
,
`payment_type`
varchar
(
255
)
NULL
DEFAULT
''
COMMENT
'实际支付方式'
,
`payment_id`
varchar
(
255
)
NULL
DEFAULT
''
COMMENT
'支付的订单号'
,
`time_pay`
varchar
(
255
)
NULL
DEFAULT
''
COMMENT
'支付时间'
,
`time_pay`
varchar
(
255
)
NULL
DEFAULT
''
COMMENT
'支付时间'
,
`express_contacts`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'收货人'
,
`express_contacts`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'收货人'
,
`express_address`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'收货地址'
,
`express_address`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'收货地址'
,
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/controller/KylinOrderTicketsController.java
View file @
96cb3e71
...
@@ -41,7 +41,7 @@ public class KylinOrderTicketsController {
...
@@ -41,7 +41,7 @@ public class KylinOrderTicketsController {
@PostMapping
(
"pre"
)
@PostMapping
(
"pre"
)
@ApiOperation
(
"下单"
)
@ApiOperation
(
"下单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
@RequestBody
@Valid
PayOrderParam
payOrderParam
)
{
public
ResponseDto
<
Pay
Inner
ResultVo
>
checkCanOrder
(
@RequestBody
@Valid
PayOrderParam
payOrderParam
)
{
return
orderTicketsOrderService
.
checkCanOrder
(
payOrderParam
);
return
orderTicketsOrderService
.
checkCanOrder
(
payOrderParam
);
}
}
...
@@ -49,7 +49,7 @@ public class KylinOrderTicketsController {
...
@@ -49,7 +49,7 @@ public class KylinOrderTicketsController {
@PostMapping
(
"pre2"
)
@PostMapping
(
"pre2"
)
@ApiOperation
(
"下单2"
)
@ApiOperation
(
"下单2"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PayResultVo
>
checkCanOrder2
(
@RequestBody
@Valid
EncryptedReq
<
PayOrderParam
>
encryptedReq
)
{
public
ResponseDto
<
Pay
Inner
ResultVo
>
checkCanOrder2
(
@RequestBody
@Valid
EncryptedReq
<
PayOrderParam
>
encryptedReq
)
{
PayOrderParam
payOrderParam
=
encryptedReq
.
getData
();
PayOrderParam
payOrderParam
=
encryptedReq
.
getData
();
return
orderTicketsOrderService
.
checkCanOrder
(
payOrderParam
);
return
orderTicketsOrderService
.
checkCanOrder
(
payOrderParam
);
}
}
...
@@ -57,8 +57,8 @@ public class KylinOrderTicketsController {
...
@@ -57,8 +57,8 @@ public class KylinOrderTicketsController {
@PostMapping
(
"payAgain"
)
@PostMapping
(
"payAgain"
)
@ApiOperation
(
"再次支付"
)
@ApiOperation
(
"再次支付"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PayResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
payAgainParam
)
{
public
ResponseDto
<
Pay
Inner
ResultVo
>
payAgain
(
@RequestBody
@Valid
PayAgainParam
payAgainParam
)
{
PayResultVo
vo
=
orderTicketsOrderService
.
payAgain
(
payAgainParam
).
getData
();
Pay
Inner
ResultVo
vo
=
orderTicketsOrderService
.
payAgain
(
payAgainParam
).
getData
();
if
(
null
==
vo
)
{
if
(
null
==
vo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20024"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20024"
));
}
else
{
}
else
{
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
96cb3e71
...
@@ -18,6 +18,7 @@ import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo;
...
@@ -18,6 +18,7 @@ import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.PayInnerResultVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.PayResultVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.PayResultVo
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketEntities
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketEntities
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketRelations
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketRelations
;
...
@@ -100,7 +101,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -100,7 +101,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}};
}};
@Override
@Override
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
public
ResponseDto
<
Pay
Inner
ResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
Long
currentTime
;
Long
currentTime
;
boolean
isDownGeneral
=
false
;
boolean
isDownGeneral
=
false
;
List
<
AdamEntersVo
>
entersVoList
=
new
ArrayList
<>();
List
<
AdamEntersVo
>
entersVoList
=
new
ArrayList
<>();
...
@@ -305,7 +306,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -305,7 +306,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
}
ResponseDto
<
PayResultVo
>
resultData
=
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
,
currentTime
);
ResponseDto
<
Pay
Inner
ResultVo
>
resultData
=
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
,
currentTime
);
isDownGeneral
=
false
;
isDownGeneral
=
false
;
redisLockUtil
.
unlock
(
lock
);
redisLockUtil
.
unlock
(
lock
);
return
resultData
;
return
resultData
;
...
@@ -333,7 +334,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -333,7 +334,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
}
}
}
private
ResponseDto
<
PayResultVo
>
order
(
PayOrderParam
payOrderParam
,
String
uid
,
boolean
isMember
,
int
isTrueName
,
KylinPerformanceVo
performanceData
,
KylinTicketVo
ticketData
,
List
<
AdamEntersVo
>
entersVoList
,
Integer
isStudent
,
KylinTicketTimesVo
ticketTimesData
,
Long
currentTime
)
{
private
ResponseDto
<
Pay
Inner
ResultVo
>
order
(
PayOrderParam
payOrderParam
,
String
uid
,
boolean
isMember
,
int
isTrueName
,
KylinPerformanceVo
performanceData
,
KylinTicketVo
ticketData
,
List
<
AdamEntersVo
>
entersVoList
,
Integer
isStudent
,
KylinTicketTimesVo
ticketTimesData
,
Long
currentTime
)
{
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
String
source
=
CurrentUtil
.
getCliSource
()
==
null
?
""
:
CurrentUtil
.
getCliSource
();
String
source
=
CurrentUtil
.
getCliSource
()
==
null
?
""
:
CurrentUtil
.
getCliSource
();
String
version
=
CurrentUtil
.
getCliVersion
()
==
null
?
""
:
CurrentUtil
.
getCliVersion
();
String
version
=
CurrentUtil
.
getCliVersion
()
==
null
?
""
:
CurrentUtil
.
getCliVersion
();
...
@@ -534,36 +535,39 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -534,36 +535,39 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
httpData
.
add
(
"price"
,
orderTickets
.
getPriceActual
().
toString
());
httpData
.
add
(
"price"
,
orderTickets
.
getPriceActual
().
toString
());
httpData
.
add
(
"name"
,
useTime
+
ticketData
.
getTitle
()
+
"-"
+
performanceData
.
getTitle
());
httpData
.
add
(
"name"
,
useTime
+
ticketData
.
getTitle
()
+
"-"
+
performanceData
.
getTitle
());
httpData
.
add
(
"detail"
,
performanceData
.
getTitle
()
+
"-"
+
ticketData
.
getTitle
()
+
"-"
+
useTime
);
httpData
.
add
(
"detail"
,
performanceData
.
getTitle
()
+
"-"
+
ticketData
.
getTitle
()
+
"-"
+
useTime
);
httpData
.
add
(
"order_code"
,
orderTickets
.
getOrderCode
());
httpData
.
add
(
"orderCode"
,
orderTickets
.
getOrderCode
());
httpData
.
add
(
"client_ip"
,
CurrentUtil
.
getCliIpAddr
());
httpData
.
add
(
"clientIp"
,
CurrentUtil
.
getCliIpAddr
());
httpData
.
add
(
"notify_url"
,
synUrl
);
httpData
.
add
(
"notifyUrl"
,
synUrl
);
httpData
.
add
(
"create_date"
,
orderTickets
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
httpData
.
add
(
"createDate"
,
orderTickets
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
httpData
.
add
(
"expire_time"
,
(
orderTickets
.
getPayCountdownMinute
())
+
""
);
httpData
.
add
(
"expireTime"
,
(
orderTickets
.
getPayCountdownMinute
())
+
""
);
httpData
.
add
(
"payType"
,
payOrderParam
.
getPayType
());
httpData
.
add
(
"deviceFrom"
,
payOrderParam
.
getDeviceFrom
());
if
(
payOrderParam
.
getDeviceFrom
().
equals
(
"js"
)
||
payOrderParam
.
getDeviceFrom
().
equals
(
"applet"
))
{
if
(
payOrderParam
.
getDeviceFrom
().
equals
(
"js"
)
||
payOrderParam
.
getDeviceFrom
().
equals
(
"applet"
))
{
httpData
.
add
(
"open
_i
d"
,
payOrderParam
.
getOpenId
());
httpData
.
add
(
"open
I
d"
,
payOrderParam
.
getOpenId
());
}
}
if
(
payOrderParam
.
getPayType
().
equals
(
"alipay"
)
&&
payOrderParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
if
(
payOrderParam
.
getPayType
().
equals
(
"alipay"
)
&&
payOrderParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
httpData
.
add
(
"show
_u
rl"
,
payOrderParam
.
getShowUrl
()
+
orderTicketId
);
httpData
.
add
(
"show
U
rl"
,
payOrderParam
.
getShowUrl
()
+
orderTicketId
);
httpData
.
add
(
"return
_u
rl"
,
payOrderParam
.
getReturnUrl
()
+
orderTicketId
);
httpData
.
add
(
"return
U
rl"
,
payOrderParam
.
getReturnUrl
()
+
orderTicketId
);
}
}
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
System
.
currentTimeMillis
();
String
returnData
=
HttpUtil
.
post
(
payUrl
+
payOrderParam
.
getDeviceFrom
()
+
"/"
+
payOrderParam
.
getPayType
()
,
httpData
);
String
returnData
=
HttpUtil
.
post
(
payUrl
,
httpData
);
log
.
debug
(
"NOTIFY_URL = "
+
synUrl
);
log
.
debug
(
"NOTIFY_URL = "
+
synUrl
);
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"调用 PHP 支付 -> time:"
+
(
currentTime
)
+
"毫秒"
);
log
.
debug
(
"调用 PHP 支付 -> time:"
+
(
currentTime
)
+
"毫秒"
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
payResultVo
.
setOrder_i
d
(
orderTicketId
);
payResultVo
.
getData
().
setOrderI
d
(
orderTicketId
);
payResultVo
.
setPrice
(
orderTickets
.
getPriceActual
());
payResultVo
.
getData
().
setPrice
(
orderTickets
.
getPriceActual
());
orderTickets
.
setPayCode
(
payResultVo
.
getCode
());
orderTickets
.
setPayCode
(
payResultVo
.
get
Data
().
get
Code
());
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket.add"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket.add"
));
LinkedList
<
Object
[]>
sqlsDataA
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataA
=
new
LinkedList
<>();
sqlsDataA
.
add
(
orderTickets
.
getAddObject
());
sqlsDataA
.
add
(
orderTickets
.
getAddObject
());
if
(
payOrderParam
.
getPayType
().
equals
(
"alipay"
)
&&
payOrderParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
if
(
payOrderParam
.
getPayType
().
equals
(
"alipay"
)
&&
payOrderParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
payResultVo
.
setShowUrl
(
payOrderParam
.
getShowUrl
()
+
orderTicketId
);
payResultVo
.
getData
().
setShowUrl
(
payOrderParam
.
getShowUrl
()
+
orderTicketId
);
payResultVo
.
setReturnUrl
(
payOrderParam
.
getReturnUrl
()
+
orderTicketId
);
payResultVo
.
getData
().
setReturnUrl
(
payOrderParam
.
getReturnUrl
()
+
orderTicketId
);
}
}
// 生成vo
// 生成vo
KylinOrderTicketVo
orderTicketVo
=
new
KylinOrderTicketVo
();
KylinOrderTicketVo
orderTicketVo
=
new
KylinOrderTicketVo
();
...
@@ -594,12 +598,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -594,12 +598,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
sqlData
);
sqlData
);
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"MQ 发送 -> time:"
+
(
currentTime
)
+
"毫秒"
);
log
.
debug
(
"MQ 发送 -> time:"
+
(
currentTime
)
+
"毫秒"
);
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
payOrderParam
,
payResultVo
));
log
.
info
(
UserPathDto
.
setData
(
"下单(唤起支付)"
,
payOrderParam
,
payResultVo
.
getData
()
));
return
ResponseDto
.
success
(
payResultVo
);
return
ResponseDto
.
success
(
payResultVo
.
getData
()
);
}
}
@Override
@Override
public
ResponseDto
<
PayResultVo
>
payAgain
(
PayAgainParam
payAgainParam
)
{
public
ResponseDto
<
Pay
Inner
ResultVo
>
payAgain
(
PayAgainParam
payAgainParam
)
{
try
{
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
// checkOrderTime(uid);
// checkOrderTime(uid);
...
@@ -621,7 +625,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -621,7 +625,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
}
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
orderTicketData
.
getPayCode
(),
null
);
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
orderTicketData
.
getPayCode
(),
null
);
PayResultVo
checkVo
=
JsonUtils
.
fromJson
(
returnCheckData
,
PayResultVo
.
class
);
PayResultVo
checkVo
=
JsonUtils
.
fromJson
(
returnCheckData
,
PayResultVo
.
class
);
if
(
checkVo
.
getStatus
()
==
1
)
{
if
(
checkVo
.
get
Data
().
get
Status
()
==
1
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20027"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20027"
));
}
}
if
(!
orderTicketData
.
getPayType
().
equals
(
"no"
))
{
if
(!
orderTicketData
.
getPayType
().
equals
(
"no"
))
{
...
@@ -636,26 +640,31 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -636,26 +640,31 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
httpData
.
add
(
"price"
,
orderTicketData
.
getPriceActual
().
toString
());
httpData
.
add
(
"price"
,
orderTicketData
.
getPriceActual
().
toString
());
httpData
.
add
(
"name"
,
entitiesData
.
getUseStart
()
+
""
+
entitiesData
.
getPerformanceTitle
());
httpData
.
add
(
"name"
,
entitiesData
.
getUseStart
()
+
""
+
entitiesData
.
getPerformanceTitle
());
httpData
.
add
(
"detail"
,
entitiesData
.
getPerformanceTitle
()
+
"-"
+
entitiesData
.
getTicketTitle
()
+
"-"
+
entitiesData
.
getUseStart
());
httpData
.
add
(
"detail"
,
entitiesData
.
getPerformanceTitle
()
+
"-"
+
entitiesData
.
getTicketTitle
()
+
"-"
+
entitiesData
.
getUseStart
());
httpData
.
add
(
"order
_c
ode"
,
orderTicketData
.
getOrderCode
());
httpData
.
add
(
"order
C
ode"
,
orderTicketData
.
getOrderCode
());
httpData
.
add
(
"client
_i
p"
,
CurrentUtil
.
getCliIpAddr
());
httpData
.
add
(
"client
I
p"
,
CurrentUtil
.
getCliIpAddr
());
httpData
.
add
(
"notify
_u
rl"
,
synUrl
);
httpData
.
add
(
"notify
U
rl"
,
synUrl
);
httpData
.
add
(
"create
_d
ate"
,
orderTicketData
.
getCreatedAt
());
httpData
.
add
(
"create
D
ate"
,
orderTicketData
.
getCreatedAt
());
httpData
.
add
(
"expire
_t
ime"
,
orderTicketData
.
getPayCountdownMinute
().
toString
());
httpData
.
add
(
"expire
T
ime"
,
orderTicketData
.
getPayCountdownMinute
().
toString
());
httpData
.
add
(
"open_id"
,
payAgainParam
.
getOpenId
());
httpData
.
add
(
"payType"
,
payAgainParam
.
getPayType
());
httpData
.
add
(
"deviceFrom"
,
payAgainParam
.
getDeviceFrom
());
if
(
payAgainParam
.
getDeviceFrom
().
equals
(
"js"
)
||
payAgainParam
.
getDeviceFrom
().
equals
(
"applet"
))
{
httpData
.
add
(
"openId"
,
payAgainParam
.
getOpenId
());
}
if
(
payAgainParam
.
getPayType
().
equals
(
"alipay"
)
&&
payAgainParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
if
(
payAgainParam
.
getPayType
().
equals
(
"alipay"
)
&&
payAgainParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
httpData
.
add
(
"show
_u
rl"
,
payAgainParam
.
getShowUrl
()
+
payAgainParam
.
getOrderId
());
httpData
.
add
(
"show
U
rl"
,
payAgainParam
.
getShowUrl
()
+
payAgainParam
.
getOrderId
());
httpData
.
add
(
"return
_u
rl"
,
payAgainParam
.
getReturnUrl
()
+
payAgainParam
.
getOrderId
());
httpData
.
add
(
"return
U
rl"
,
payAgainParam
.
getReturnUrl
()
+
payAgainParam
.
getOrderId
());
}
}
String
returnData
=
HttpUtil
.
post
(
payUrl
+
payAgainParam
.
getDeviceFrom
()
+
"/"
+
payAgainParam
.
getPayType
(),
httpData
);
String
returnData
=
HttpUtil
.
post
(
payUrl
+
payAgainParam
.
getDeviceFrom
()
+
"/"
+
payAgainParam
.
getPayType
(),
httpData
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
payResultVo
.
setOrder_i
d
(
orderTicketData
.
getOrderTicketsId
());
payResultVo
.
getData
().
setOrderI
d
(
orderTicketData
.
getOrderTicketsId
());
payResultVo
.
setPrice
(
orderTicketData
.
getPriceActual
());
payResultVo
.
getData
().
setPrice
(
orderTicketData
.
getPriceActual
());
if
(
payAgainParam
.
getPayType
().
equals
(
"alipay"
)
&&
payAgainParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
if
(
payAgainParam
.
getPayType
().
equals
(
"alipay"
)
&&
payAgainParam
.
getDeviceFrom
().
equals
(
"wap"
))
{
payResultVo
.
setShowUrl
(
payAgainParam
.
getShowUrl
());
payResultVo
.
getData
().
setShowUrl
(
payAgainParam
.
getShowUrl
());
payResultVo
.
setReturnUrl
(
payAgainParam
.
getReturnUrl
());
payResultVo
.
getData
().
setReturnUrl
(
payAgainParam
.
getReturnUrl
());
}
}
KylinOrderTickets
orderTickets
=
new
KylinOrderTickets
();
KylinOrderTickets
orderTickets
=
new
KylinOrderTickets
();
...
@@ -694,8 +703,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -694,8 +703,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsDataA
,
sqlsDataB
,
sqlsDataC
,
sqlsDataD
);
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsDataA
,
sqlsDataB
,
sqlsDataC
,
sqlsDataD
);
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_AGAIN
,
MQConst
.
ROUTING_KEY_SQL_ORDER_AGAIN
,
sqlData
);
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_AGAIN
,
MQConst
.
ROUTING_KEY_SQL_ORDER_AGAIN
,
sqlData
);
log
.
info
(
UserPathDto
.
setData
(
"再次支付"
,
payAgainParam
,
payResultVo
));
log
.
info
(
UserPathDto
.
setData
(
"再次支付"
,
payAgainParam
,
payResultVo
.
getData
()
));
return
ResponseDto
.
success
(
payResultVo
);
return
ResponseDto
.
success
(
payResultVo
.
getData
()
);
}
}
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20029"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20029"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -765,6 +774,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -765,6 +774,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
orderTickets
.
setTimePay
(
timePay
);
orderTickets
.
setTimePay
(
timePay
);
orderTickets
.
setQrCode
(
IDGenerator
.
ticketQrCode
(
orderTicketData
.
getOrderTicketsId
()));
orderTickets
.
setQrCode
(
IDGenerator
.
ticketQrCode
(
orderTicketData
.
getOrderTicketsId
()));
orderTickets
.
setUpdatedAt
(
now
);
orderTickets
.
setUpdatedAt
(
now
);
orderTickets
.
setPaymentId
(
syncOrderParam
.
getPayment_id
());
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket.synPay"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket.synPay"
));
sqlsDataA
.
add
(
orderTickets
.
getSynOrderObject
(
strTime
,
strTime
));
sqlsDataA
.
add
(
orderTickets
.
getSynOrderObject
(
strTime
,
strTime
));
...
@@ -890,7 +900,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
...
@@ -890,7 +900,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
else
{
}
else
{
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
orderTicketData
.
getPayCode
(),
null
);
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
orderTicketData
.
getPayCode
(),
null
);
PayResultVo
checkVo
=
JsonUtils
.
fromJson
(
returnCheckData
,
PayResultVo
.
class
);
PayResultVo
checkVo
=
JsonUtils
.
fromJson
(
returnCheckData
,
PayResultVo
.
class
);
if
(
checkVo
.
getStatus
()
==
1
)
{
if
(
checkVo
.
get
Data
().
get
Status
()
==
1
)
{
return
ResponseDto
.
success
(
1
);
return
ResponseDto
.
success
(
1
);
}
else
{
}
else
{
return
ResponseDto
.
success
(
0
);
return
ResponseDto
.
success
(
0
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/resources/sqlmap.properties
View file @
96cb3e71
...
@@ -18,7 +18,7 @@ kylin_order_ticket_entities.payAgain=UPDATE kylin_order_ticket_entities SET upda
...
@@ -18,7 +18,7 @@ kylin_order_ticket_entities.payAgain=UPDATE kylin_order_ticket_entities SET upda
# ------------------------支付回调----------------------------
# ------------------------支付回调----------------------------
kylin_order_ticket.synPay
=
UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket.synPay
=
UPDATE kylin_order_tickets SET payment_
id =? ,payment_
type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_status.synPay
=
UPDATE kylin_order_ticket_status SET `status` = ?,pay_status = ?,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_status.synPay
=
UPDATE kylin_order_ticket_status SET `status` = ?,pay_status = ?,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_relation.synPay
=
UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_relation.synPay
=
UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.synPay
=
UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.synPay
=
UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? and (updated_at <= ? or created_at = ?)
...
...
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