记得上下班打卡 | 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
694b83e9
Commit
694b83e9
authored
Jul 26, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-micropay' into pre
parents
1c565403
c432ced9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
96 additions
and
13 deletions
+96
-13
DragonMicropayWepayCodeEnum.java
.../service/dragon/constant/DragonMicropayWepayCodeEnum.java
+54
-0
DragonPayBaseRespDto.java
...om/liquidnet/service/dragon/dto/DragonPayBaseRespDto.java
+3
-0
GoblinGoodsSkuInfoDetailVo.java
...net/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
+2
-0
GoblinPayInnerResultVo.java
...quidnet/service/goblin/dto/vo/GoblinPayInnerResultVo.java
+5
-0
AlipayStrategyMicropayImpl.java
...nnel/alipay/strategy/impl/AlipayStrategyMicropayImpl.java
+4
-0
WepayPayRespDto.java
...et/service/dragon/channel/wepay/resp/WepayPayRespDto.java
+4
-0
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+4
-2
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+10
-9
WepayPayRespDto.java
...et/service/dragon/channel/wepay/resp/WepayPayRespDto.java
+5
-0
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+4
-2
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/constant/DragonMicropayWepayCodeEnum.java
0 → 100644
View file @
694b83e9
package
com
.
liquidnet
.
service
.
dragon
.
constant
;
/**
* 扫码错误码(暂时用不上、。)
*/
public
enum
DragonMicropayWepayCodeEnum
{
SYSTEMERROR
(
"SYSTEMERROR"
,
"接口返回错误(系统超时)"
),
PARAM_ERROR
(
"PARAM_ERROR"
,
"参数错误"
),
ORDERPAID
(
"ORDERPAID"
,
"订单已支付(订单号重复)"
),
NOAUTH
(
"NOAUTH"
,
"商户无权限"
),
AUTHCODEEXPIRE
(
"AUTHCODEEXPIRE"
,
"二维码已过期,请用户在微信上刷新后再试"
),
NOTENOUGH
(
"NOTENOUGH"
,
"余额不足"
),
NOTSUPORTCARD
(
"NOTSUPORTCARD"
,
"不支持卡类型"
),
ORDERCLOSED
(
"ORDERCLOSED"
,
"订单已关闭"
),
ORDERREVERSED
(
"ORDERREVERSED"
,
"当前订单已经被撤销"
),
BANKERROR
(
"BANKERROR"
,
"银行端超时"
),
USERPAYING
(
"USERPAYING"
,
"用户支付中,需要输入密码"
),
AUTH_CODE_ERROR
(
"AUTH_CODE_ERROR"
,
"付款码参数错误"
),
AUTH_CODE_INVALID
(
"AUTH_CODE_INVALID"
,
"扫描的不是微信支付的条码"
),
XML_FORMAT_ERROR
(
"XML_FORMAT_ERROR"
,
"XML格式错误"
),
REQUIRE_POST_METHOD
(
"REQUIRE_POST_METHOD"
,
"请使用post方法"
),
SIGNERROR
(
"SIGNERROR"
,
"参数签名结果不正确"
),
LACK_PARAMS
(
"LACK_PARAMS"
,
"缺少必要的请求参数"
),
NOT_UTF8
(
"NOT_UTF8"
,
"未使用指定编码格式"
),
BUYER_MISMATCH
(
"BUYER_MISMATCH"
,
"支付账号错误"
),
APPID_NOT_EXIST
(
"APPID_NOT_EXIST"
,
"参数中缺少APPID"
),
MCHID_NOT_EXIST
(
"MCHID_NOT_EXIST"
,
"参数中缺少MCHID"
),
OUT_TRADE_NO_USED
(
"OUT_TRADE_NO_USED"
,
"同一笔交易不能多次提交"
),
APPID_MCHID_NOT_MATCH
(
"APPID_MCHID_NOT_MATCH"
,
"appid和mch_id不匹配"
),
INVALID_REQUEST
(
"无效请求"
,
"商户系统异常导致,商户权限异常、重复请求支付、证书错误、频率限制等"
),
TRADE_ERROR
(
"TRADE_ERROR"
,
"交易错误"
);
private
String
code
;
private
String
message
;
DragonMicropayWepayCodeEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
String
getCode
()
{
return
code
;
}
public
static
String
getValue
(
String
code
)
{
DragonMicropayWepayCodeEnum
[]
carTypeEnums
=
values
();
for
(
DragonMicropayWepayCodeEnum
carTypeEnum
:
carTypeEnums
)
{
if
(
carTypeEnum
.
code
.
equals
(
code
))
{
return
carTypeEnum
.
getMessage
();
}
}
return
"未知错误"
;
}
public
String
getMessage
()
{
return
message
;
}
}
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/DragonPayBaseRespDto.java
View file @
694b83e9
...
...
@@ -40,6 +40,9 @@ public class DragonPayBaseRespDto implements Serializable {
private
String
productId
;
//为了应对扫码支付错误码信息
private
String
msg
;
@Data
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
View file @
694b83e9
...
...
@@ -43,6 +43,8 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
26
,
value
=
"限量[0-无限制|X:限购数量]"
)
private
Integer
buyLimit
;
@ApiModelProperty
(
position
=
27
,
value
=
"剩余库存"
)
private
Integer
restStock
;
private
static
final
GoblinGoodsSkuInfoDetailVo
obj
=
new
GoblinGoodsSkuInfoDetailVo
();
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinPayInnerResultVo.java
View file @
694b83e9
...
...
@@ -18,6 +18,11 @@ public class GoblinPayInnerResultVo implements Serializable, Cloneable {
private
String
returnUrl
;
private
BigDecimal
price
;
private
Object
payData
;
private
String
msg
;
public
String
getMsg
()
{
return
msg
==
null
?
""
:
msg
;
}
private
static
final
GoblinPayInnerResultVo
obj
=
new
GoblinPayInnerResultVo
();
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AlipayStrategyMicropayImpl.java
View file @
694b83e9
...
...
@@ -56,6 +56,10 @@ public class AlipayStrategyMicropayImpl extends AbstractAlipayStrategy {
@Override
DragonPayBaseRespDto
buildResponseDto
(
DragonPayBaseRespDto
payBaseRespDto
,
Map
<
String
,
Object
>
respResult
)
{
// payBaseRespDto.getPayData().setRedirectUrl(alipayGatewayUrl + "?" + respResult.get("body"));
//判断是否成功
if
(
respResult
.
get
(
"code"
)!=
null
&&!
respResult
.
get
(
"code"
).
equals
(
"10000"
)){
payBaseRespDto
.
setMsg
(
respResult
.
get
(
"subMsg"
)==
null
?
""
:
respResult
.
get
(
"subMsg"
).
toString
());
}
return
payBaseRespDto
;
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/resp/WepayPayRespDto.java
View file @
694b83e9
...
...
@@ -58,6 +58,10 @@ public class WepayPayRespDto {
private
String
attach
;
@XStreamAlias
(
"time_end"
)
private
String
time_end
;
@XStreamAlias
(
"err_code"
)
private
String
err_code
;
@XStreamAlias
(
"err_code_des"
)
private
String
err_code_des
;
public
static
void
xmlToBean
(){
String
xmlStr
=
"<xml><return_code><![CDATA[SUCCESS]]></return_code>\n"
+
...
...
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 @
694b83e9
...
...
@@ -101,12 +101,14 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getMessage
());
}
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getReturnCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())
||
dragonPayBaseReqDto
.
getDeviceFrom
().
equals
(
DragonConstant
.
DeviceFromEnum
.
MICROPAY
.
getCode
())
){
//构造公共返回参数
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
,
respWepayDto
);
//构造自定义返回参数
this
.
buildResponseDto
(
respPayDto
,
respWepayDto
);
if
(!
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())&&
dragonPayBaseReqDto
.
getDeviceFrom
().
equals
(
DragonConstant
.
DeviceFromEnum
.
MICROPAY
.
getCode
()))
{
respPayDto
.
setMsg
(
respWepayDto
.
getErr_code_des
());
}
//支付订单持久化
dragonServiceCommonBiz
.
buildPayOrders
(
dragonPayBaseReqDto
,
respPayDto
);
log
.
info
(
"wepay-->dragonPay--> 耗时:{}"
,(
System
.
currentTimeMillis
()
-
startTimeTotal
)+
"毫秒"
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
694b83e9
...
...
@@ -327,6 +327,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
else
{
goblinGoodsSkuInfoDetailVo
.
setStockLess
(
false
);
}
goblinGoodsSkuInfoDetailVo
.
setRestStock
(
stock
);
list
.
add
(
goblinGoodsSkuInfoDetailVo
);
}
}
...
...
@@ -380,7 +381,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
goblinFrontCubeVo
.
setGoblinGoodsInfoVoList
(
goblinGoodsInfoVoArrayList
);
}
else
{
}
else
{
return
null
;
}
return
goblinFrontCubeVo
;
...
...
@@ -465,11 +466,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
public
GoblinGoodsInfoListVoo
searchGoodesName
(
String
name
,
int
page
,
int
pageSize
)
{
public
GoblinGoodsInfoListVoo
searchGoodesName
(
String
name
,
int
page
,
int
pageSize
)
{
List
<
String
>
listStore
=
mongoUtils
.
getStoreInfoVoRegexName
(
name
);
Pattern
pattern
=
Pattern
.
compile
(
"^.*"
+
name
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
).
and
(
"marketId"
).
is
(
null
).
and
(
"cateFid"
).
nin
(
"22196120924543"
,
"22196122839313"
).
andOperator
(
query
.
addCriteria
(
Criteria
.
where
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
).
and
(
"marketId"
).
is
(
null
).
and
(
"cateFid"
).
nin
(
"22196120924543"
,
"22196122839313"
).
andOperator
(
new
Criteria
().
orOperator
(
Criteria
.
where
(
"name"
).
regex
(
pattern
),
Criteria
.
where
(
"storeId"
).
in
(
listStore
),
...
...
@@ -484,7 +485,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
));
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
GoblinGoodsInfoListVoo
goblinGoodsInfoListVoo
=
GoblinGoodsInfoListVoo
.
getNew
();
GoblinGoodsInfoListVoo
goblinGoodsInfoListVoo
=
GoblinGoodsInfoListVoo
.
getNew
();
goblinGoodsInfoListVoo
.
setCount
(
count
);
ArrayList
<
GoblinGoodsInfoListVo
>
list1
=
ObjectUtil
.
getGoblinGoodsInfoListVo
();
//遍历
...
...
@@ -530,7 +531,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
//
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
).
and
(
"marketId"
).
is
(
null
).
and
(
"cateFid"
).
nin
(
"22196120924543"
,
"22196122839313"
));
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
).
and
(
"marketId"
).
is
(
null
).
and
(
"cateFid"
).
nin
(
"22196120924543"
,
"22196122839313"
));
if
(
StringUtil
.
isNotBlank
(
categoryId
))
{
query
.
addCriteria
(
new
Criteria
().
orOperator
(
Criteria
.
where
(
"storeCateFid"
).
is
(
categoryId
),
...
...
@@ -857,7 +858,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
for
(
String
id
:
spuids
)
{
GoblinGoodsInfoVo
goblinGoodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
id
);
if
(
null
!=
goblinGoodsInfoVo
)
{
if
(
isHidden
(
goblinGoodsInfoVo
.
getCateFid
()))
{
if
(
isHidden
(
goblinGoodsInfoVo
.
getCateFid
()))
{
continue
;
}
goblinGoodsInfoVoArrayList
.
add
(
goblinGoodsInfoVo
);
...
...
@@ -912,7 +913,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
for
(
int
i
=
0
;
i
<
end
;
i
++)
{
if
(
i
>=
start
)
{
GoblinGoodsInfoVo
goblinGoodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
spuidss
[
i
]);
if
(
isHidden
(
goblinGoodsInfoVo
.
getCateFid
()))
{
if
(
isHidden
(
goblinGoodsInfoVo
.
getCateFid
()))
{
continue
;
}
goblinGoodsInfoVoArrayList
.
add
(
goblinGoodsInfoVo
);
...
...
@@ -1424,11 +1425,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
private
boolean
isHidden
(
String
fcateId
){
private
boolean
isHidden
(
String
fcateId
)
{
ArrayList
<
String
>
hiddenIds
=
CollectionUtil
.
arrayListString
();
hiddenIds
.
add
(
"22196120924543"
);
hiddenIds
.
add
(
"22196122839313"
);
if
(
hiddenIds
.
contains
(
fcateId
))
{
if
(
hiddenIds
.
contains
(
fcateId
))
{
return
true
;
}
return
false
;
...
...
liquidnet-bus-service/liquidnet-service-notify/liquidnet-service-notify-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/resp/WepayPayRespDto.java
View file @
694b83e9
...
...
@@ -58,6 +58,11 @@ public class WepayPayRespDto {
private
String
attach
;
@XStreamAlias
(
"time_end"
)
private
String
time_end
;
@XStreamAlias
(
"err_code"
)
private
String
err_code
;
@XStreamAlias
(
"err_code_des"
)
private
String
err_code_des
;
public
static
void
xmlToBean
(){
String
xmlStr
=
"<xml><return_code><![CDATA[SUCCESS]]></return_code>\n"
+
...
...
liquidnet-bus-service/liquidnet-service-notify/liquidnet-service-notify-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/AbstractWepayStrategy.java
View file @
694b83e9
...
...
@@ -101,12 +101,14 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getMessage
());
}
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getReturnCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())
||
dragonPayBaseReqDto
.
getDeviceFrom
().
equals
(
"micropay"
)
){
//构造公共返回参数
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
,
respWepayDto
);
//构造自定义返回参数
this
.
buildResponseDto
(
respPayDto
,
respWepayDto
);
if
(!
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())&&
dragonPayBaseReqDto
.
getDeviceFrom
().
equals
(
"micropay"
))
{
respPayDto
.
setMsg
(
respWepayDto
.
getErr_code_des
());
}
//支付订单持久化
dragonServiceCommonBiz
.
buildPayOrders
(
dragonPayBaseReqDto
,
respPayDto
);
log
.
info
(
"wepay-->dragonPay--> 耗时:{}"
,(
System
.
currentTimeMillis
()
-
startTimeTotal
)+
"毫秒"
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
694b83e9
...
...
@@ -463,6 +463,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
payInnerResultVo
.
setPayData
(
dto
.
getData
().
getPayData
());
payInnerResultVo
.
setPayType
(
preParam
.
getPayType
());
payInnerResultVo
.
setPrice
(
preParam
.
getPriceActual
());
payInnerResultVo
.
setMsg
(
dto
.
getData
().
getMsg
());
payCode
=
payInnerResultVo
.
getCode
();
payInnerResultVo
.
setShowUrl
(
preParam
.
getShowUrl
());
payInnerResultVo
.
setReturnUrl
(
preParam
.
getReturnUrl
());
...
...
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