Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
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
曲欣亮
shop
Commits
4e0cbebe
Commit
4e0cbebe
authored
Sep 26, 2024
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
9a29262b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
24 deletions
+41
-24
OrderServiceImpl.java
...ava/com/egolm/shop/api/service/impl/OrderServiceImpl.java
+41
-24
No files found.
src/main/java/com/egolm/shop/api/service/impl/OrderServiceImpl.java
View file @
4e0cbebe
...
@@ -1760,80 +1760,97 @@ public class OrderServiceImpl implements OrderService {
...
@@ -1760,80 +1760,97 @@ public class OrderServiceImpl implements OrderService {
BigDecimal
PayAmount
=
(
BigDecimal
)
payObj
.
get
(
"PayAmount"
);
BigDecimal
PayAmount
=
(
BigDecimal
)
payObj
.
get
(
"PayAmount"
);
String
OutTradeNO
=
(
String
)
payObj
.
get
(
"OutTradeNO"
);
String
OutTradeNO
=
(
String
)
payObj
.
get
(
"OutTradeNO"
);
BigDecimal
PayPoint
=
(
BigDecimal
)
payObj
.
get
(
"PayPoint"
);
BigDecimal
PayPoint
=
(
BigDecimal
)
payObj
.
get
(
"PayPoint"
);
Date
PayDateTime
=
(
Date
)
payObj
.
get
(
"PayDateTime"
);
if
(
PayDateTime
==
null
)
{
Date
PayDateTime
=
null
;
if
(
payObj
.
containsKey
(
"PayDateTime"
))
{
PayDateTime
=
(
Date
)
payObj
.
get
(
"PayDateTime"
);
if
(
PayDateTime
==
null
||
PayDateTime
.
equals
(
"1900-01-01 0:00:00"
))
{
PayDateTime
=
now
;
}
}
else
{
PayDateTime
=
now
;
PayDateTime
=
now
;
}
}
String
posno
=
"999"
;
String
posno
=
"999"
;
String
cashier
=
PayCardNO
;
String
cashier
=
PayCardNO
;
String
hostname
=
"localhost"
;
String
hostname
=
"localhost"
;
Number
Tag
=
(
Number
)
payObj
.
get
(
"Tag"
);
Number
Tag
=
(
Number
)
payObj
.
get
(
"Tag"
);
OutParameter
pOrderStatus
=
new
OutParameter
(
Types
.
VARCHAR
);
/*
OutParameter pOrderStatus = new OutParameter(Types.VARCHAR);
OutParameter pOrderStatusName = new OutParameter(Types.VARCHAR);
OutParameter pOrderStatusName = new OutParameter(Types.VARCHAR);
OutParameter pStatus = new OutParameter(Types.INTEGER);
OutParameter pStatus = new OutParameter(Types.INTEGER);
OutParameter pErrorMsg = new OutParameter(Types.VARCHAR);
OutParameter pErrorMsg = new OutParameter(Types.VARCHAR);
*/
String
agentId
=
payObj
.
get
(
"AgentID"
)+
""
;
String
agentId
=
payObj
.
get
(
"AgentID"
)+
""
;
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
(
PayTypeID
.
equals
(
"81"
)
||
PayTypeID
.
equals
(
"882"
)
)
&&
Tag
.
intValue
()
==
0
)
{
//优会券和提货券
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
(
PayTypeID
.
equals
(
"81"
)
||
PayTypeID
.
equals
(
"882"
)
)
&&
Tag
.
intValue
()
==
0
)
{
//优会券和提货券
crmService
.
couponVerification
(
shopNO
,
PayCardNO
,
salesOrderID
,
PayAmount
,
TotalRealSaleAmount
,
OutTradeNO
,
goodsList
,
cashier
,
"1"
,
PayTypeID
,
agentId
);
crmService
.
couponVerification
(
shopNO
,
PayCardNO
,
salesOrderID
,
PayAmount
,
TotalRealSaleAmount
,
OutTradeNO
,
goodsList
,
cashier
,
"1"
,
PayTypeID
,
agentId
);
jdbcTemplate
.
exec
(
"exec up_B2BSalesOrderPayConfirm ?, ?, ?, ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
salesOrderID
,
PayTypeID
,
PayAmount
,
shopNO
,
PayDateTime
,
OutTradeNO
,
pOrderStatus
,
pOrderStatusName
,
pStatus
,
pErrorMsg
});
Integer
rStatus
=
(
Integer
)
pStatus
.
getValue
();
List
<
Map
<
String
,
Object
>>
returnMap
=
jdbcTemplate
.
executeMutil
(
"exec up_B2BSalesOrderPayCallBack ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
OutTradeNO
,
""
,
PayAmount
,
now
,
PayTypeID
,
"0"
,
"1"
}).
getDatas
().
get
(
0
);
String
rErrorMsg
=
(
String
)
pErrorMsg
.
getValue
();
String
rOrderStatus
=
(
String
)
pOrderStatus
.
getValue
();
String
returnStr
=
GsonUtil
.
toJson
(
returnMap
);
logger
.
info
(
"优惠券回写:{}"
,
returnStr
);
Map
<
String
,
Object
>
aMap
=
returnMap
.
get
(
0
);
Integer
rStatus
=
(
Integer
)
aMap
.
get
(
"Status"
);
String
rErrorMsg
=
(
String
)
aMap
.
get
(
"ErrorMsg"
);
String
rOrderStatus
=
(
String
)
aMap
.
get
(
"OrderStatus"
);
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
());
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
else
if
(
rStatus
>
0
)
{
}
else
if
(
rStatus
>
0
)
{
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
(
));
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
payObj
.
put
(
"ErrorMsg"
,
PayTypeID
.
equals
(
"81"
)
?
"优惠券核销确认异常"
:
"提货券核销确认异常"
);
payObj
.
put
(
"ErrorMsg"
,
PayTypeID
.
equals
(
"81"
)
?
"优惠券核销确认异常"
:
"提货券核销确认异常"
);
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
}
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
PayTypeID
.
equals
(
"103"
)
&&
Tag
.
intValue
()
==
0
)
{
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
PayTypeID
.
equals
(
"103"
)
&&
Tag
.
intValue
()
==
0
)
{
crmService
.
vUpdateMemPoint
(
0
,
shopNO
,
shopNO
,
PayPoint
,
OutTradeNO
,
cashier
,
hostname
,
ipaddress
);
crmService
.
vUpdateMemPoint
(
0
,
shopNO
,
shopNO
,
PayPoint
,
OutTradeNO
,
cashier
,
hostname
,
ipaddress
);
jdbcTemplate
.
exec
(
"EXEC up_B2BSalesOrderPayConfirm ?, ?, ?, ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
salesOrderID
,
PayTypeID
,
PayAmount
,
PayCardNO
,
PayDateTime
,
OutTradeNO
,
pOrderStatus
,
pOrderStatusName
,
pStatus
,
pErrorMsg
});
List
<
Map
<
String
,
Object
>>
returnMap
=
jdbcTemplate
.
executeMutil
(
"exec up_B2BSalesOrderPayCallBack ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
OutTradeNO
,
""
,
PayAmount
,
now
,
PayTypeID
,
"0"
,
"1"
}).
getDatas
().
get
(
0
);
Integer
rStatus
=
(
Integer
)
pStatus
.
getValue
();
String
returnStr
=
GsonUtil
.
toJson
(
returnMap
);
String
rErrorMsg
=
(
String
)
pErrorMsg
.
getValue
();
logger
.
info
(
"积分回写:{}"
,
returnStr
);
String
rOrderStatus
=
(
String
)
pOrderStatus
.
getValue
();
Map
<
String
,
Object
>
aMap
=
returnMap
.
get
(
0
);
Integer
rStatus
=
(
Integer
)
aMap
.
get
(
"Status"
);
String
rErrorMsg
=
(
String
)
aMap
.
get
(
"ErrorMsg"
);
String
rOrderStatus
=
(
String
)
aMap
.
get
(
"OrderStatus"
);
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
(
));
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
else
if
(
rStatus
>
0
)
{
}
else
if
(
rStatus
>
0
)
{
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"ErrorMsg"
,
"积分扣减确认异常"
);
payObj
.
put
(
"ErrorMsg"
,
"积分扣减确认异常"
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
(
));
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
}
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
PayTypeID
.
equals
(
"112"
)
&&
Tag
.
intValue
()
==
0
)
{
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
PayTypeID
.
equals
(
"112"
)
&&
Tag
.
intValue
()
==
0
)
{
crmService
.
vCardPay
(
shopNO
,
shopNO
,
PayAmount
,
posno
,
OutTradeNO
,
cashier
,
hostname
,
ipaddress
);
crmService
.
vCardPay
(
shopNO
,
shopNO
,
PayAmount
,
posno
,
OutTradeNO
,
cashier
,
hostname
,
ipaddress
);
jdbcTemplate
.
exec
(
"EXEC up_B2BSalesOrderPayConfirm ?, ?, ?, ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
salesOrderID
,
PayTypeID
,
PayAmount
,
PayCardNO
,
PayDateTime
,
OutTradeNO
,
pOrderStatus
,
pOrderStatusName
,
pStatus
,
pErrorMsg
});
List
<
Map
<
String
,
Object
>>
returnMap
=
jdbcTemplate
.
executeMutil
(
"exec up_B2BSalesOrderPayCallBack ?, ?, ?, ?, ?, ?, ?"
,
new
Object
[]
{
OutTradeNO
,
""
,
PayAmount
,
now
,
PayTypeID
,
"0"
,
"1"
}).
getDatas
().
get
(
0
);
Integer
rStatus
=
(
Integer
)
pStatus
.
getValue
();
String
returnStr
=
GsonUtil
.
toJson
(
returnMap
);
String
rErrorMsg
=
(
String
)
pErrorMsg
.
getValue
();
logger
.
info
(
"储值余额支付回写:{}"
,
returnStr
);
String
rOrderStatus
=
(
String
)
pOrderStatus
.
getValue
();
Map
<
String
,
Object
>
aMap
=
returnMap
.
get
(
0
);
Integer
rStatus
=
(
Integer
)
aMap
.
get
(
"Status"
);
String
rErrorMsg
=
(
String
)
aMap
.
get
(
"ErrorMsg"
);
String
rOrderStatus
=
(
String
)
aMap
.
get
(
"OrderStatus"
);
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
if
(
rStatus
<=
0
&&
rOrderStatus
.
equals
(
"2"
))
{
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"Status"
,
rStatus
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"ErrorMsg"
,
rErrorMsg
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
(
));
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
else
if
(
rStatus
>
0
)
{
}
else
if
(
rStatus
>
0
)
{
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"Status"
,
1
);
payObj
.
put
(
"ErrorMsg"
,
"储值余额支付确认异常"
);
payObj
.
put
(
"ErrorMsg"
,
"储值余额支付确认异常"
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatus"
,
rOrderStatus
);
payObj
.
put
(
"OrderStatusName"
,
pOrderStatusName
.
getValue
(
));
payObj
.
put
(
"OrderStatusName"
,
aMap
.
get
(
"OrderStatusName"
));
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
payObj
).
toJson
();
}
}
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
Tag
.
intValue
()
==
0
&&
(
PayTypeID
.
equals
(
"120"
)
||
PayTypeID
.
equals
(
"121"
)
||
PayTypeID
.
equals
(
"170"
)
||
PayTypeID
.
equals
(
"122"
)
||
PayTypeID
.
equals
(
"130"
)
||
PayTypeID
.
equals
(
"140"
)
||
PayTypeID
.
equals
(
"150"
)
||
PayTypeID
.
equals
(
"900"
)
||
PayTypeID
.
equals
(
"901"
)
||
PayTypeID
.
equals
(
"902"
)
||
PayTypeID
.
equals
(
"903"
)))
{
}
else
if
(
PayTypeID
!=
null
&&
Tag
!=
null
&&
Tag
.
intValue
()
==
0
&&
(
PayTypeID
.
equals
(
"120"
)
||
PayTypeID
.
equals
(
"121"
)
||
PayTypeID
.
equals
(
"170"
)
||
PayTypeID
.
equals
(
"122"
)
||
PayTypeID
.
equals
(
"130"
)
||
PayTypeID
.
equals
(
"140"
)
||
PayTypeID
.
equals
(
"150"
)
||
PayTypeID
.
equals
(
"900"
)
||
PayTypeID
.
equals
(
"901"
)
||
PayTypeID
.
equals
(
"902"
)
||
PayTypeID
.
equals
(
"903"
)))
{
...
...
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