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
d356e028
Commit
d356e028
authored
Aug 19, 2024
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V1.1.7.8.3
parent
d5d5f75f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
OrderController.java
src/main/java/com/egolm/shop/api/OrderController.java
+9
-1
PayNotifyController.java
src/main/java/com/egolm/shop/api/PayNotifyController.java
+15
-1
OrderServiceImpl.java
...ava/com/egolm/shop/api/service/impl/OrderServiceImpl.java
+3
-1
redmine.html
src/main/resources/templates/redmine.html
+1
-0
No files found.
src/main/java/com/egolm/shop/api/OrderController.java
View file @
d356e028
...
...
@@ -72,13 +72,21 @@ public class OrderController {
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"data"
,
dataType
=
"String"
,
required
=
false
,
value
=
"JSON格式"
,
defaultValue
=
"{\"shopNO\": \"00029975\",\"terminal\": \"wechat\",\"langID\": \"936\",\"payTypeID\":1,\"addrID\":\"111111\",\"orderMemo\":\"备注\",\"couponNO\":\"\",\"couponTypeID\":\"\", \"bankType\": \"xxx\", 'bankAccount': 'xxx', 'bankAccountName': 'xxx', 'revBankType': 'xxx', 'revBankAccount': 'xxx', 'revBankAccountNo': 'xxx', 'formId': 'xxx', 'email': 'xxx', 'salesmanNo': 'xxx','onlinePayTypeID':'xxx','payCardNO':'PayCardNO'}"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"balanceAmount"
,
dataType
=
"String"
,
required
=
false
,
value
=
"余额"
,
defaultValue
=
"需求 #17203"
),
})
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@IDCLogResource
(
name
=
"订单正式提交(JSON格式)"
)
public
String
submit
(
HttpServletRequest
request
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
balanceAmount
=
request
.
getParameter
(
"balanceAmount"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
if
(
StringUtil
.
isNotUndefinedAndNull
(
balanceAmount
))
{
jsonObj
.
put
(
"balanceAmount"
,
balanceAmount
);
}
else
{
jsonObj
.
put
(
"balanceAmount"
,
0
);
}
System
.
out
.
println
(
"submit-------"
+
reqJson
);
return
orderService
.
submit
(
jsonObj
);
}
...
...
src/main/java/com/egolm/shop/api/PayNotifyController.java
View file @
d356e028
...
...
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.egolm.common.GsonUtil
;
import
com.egolm.common.HttpsUtil
;
import
com.egolm.common.LogBackUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.bean.WxPayResponse
;
...
...
@@ -49,6 +50,19 @@ public class PayNotifyController {
WxPayResponse
postData
=
null
;
try
{
//设置一个requetId
String
traceId
=
req
.
getHeader
(
LogBackUtil
.
TRACE_ID
);
if
(!
StringUtil
.
isNotBlank
(
traceId
))
{
traceId
=
StringUtil
.
getId
(
32
,
"S"
);
}
LogBackUtil
.
setTraceId
(
traceId
);
resp
.
setHeader
(
LogBackUtil
.
TRACE_ID
,
traceId
);
}
catch
(
Exception
e1
)
{
}
try
{
// 转换微信post过来的xml内容
ServletInputStream
in
=
req
.
getInputStream
();
...
...
@@ -64,7 +78,7 @@ public class PayNotifyController {
postData
=
(
WxPayResponse
)
xs
.
fromXML
(
xmlMsg
);
List
<
Map
<
String
,
Object
>>
returnMap
=
orderService
.
payCallback
(
postData
,
xmlMsg
,
callBackFilePath
);
logger
.
info
(
"从egoPay中接收到支付信息结果 {}"
,
GsonUtil
.
toJson
(
returnMap
));
logger
.
info
(
"从egoPay中接收到支付信息
处理
结果 {}"
,
GsonUtil
.
toJson
(
returnMap
));
}
catch
(
Exception
e
)
{
logger
.
info
(
"处理从egoPay中接收到支付回调信息异常:{} "
,
e
);
...
...
src/main/java/com/egolm/shop/api/service/impl/OrderServiceImpl.java
View file @
d356e028
...
...
@@ -140,12 +140,14 @@ public class OrderServiceImpl implements OrderService {
revBankType
=
StringUtil
.
isBlank
(
revBankType
)
?
""
:
revBankType
;
revBankAccount
=
StringUtil
.
isBlank
(
revBankAccount
)
?
""
:
revBankAccount
;
revBankAccountNo
=
StringUtil
.
isBlank
(
revBankAccountNo
)
?
""
:
revBankAccountNo
;
String
balanceAmount
=
submitObj
.
containsKey
(
"balanceAmount"
)?
submitObj
.
getString
(
"balanceAmount"
):
"0"
;
//需求 #17203
String
sql
=
"exec up_NewCreatetSalesOrder '"
+
shopNO
+
"',null, '"
+
payID
+
"', '"
+
terminalTypeID
+
"', '"
+
addrID
+
"', '"
+
orderMemo
+
"', '"
+
couponNO
+
"','"
+
couponTypeID
+
"', '', '1', '"
+
(
bankType
==
null
?
""
:
bankType
)
+
"', '"
+
(
bankAccount
==
null
?
""
:
bankAccount
)
+
"', '"
+
bankAccountName
+
"', '"
+
revBankType
+
"', '"
+
revBankAccount
+
"', '"
+
revBankAccountNo
+
"','0','','"
+
onlinePayTypeID
+
"' ,'"
+
payCardNO
+
"' "
;
+
"','0','','"
+
onlinePayTypeID
+
"' ,'"
+
payCardNO
+
"'
,'"
+
balanceAmount
+
"'
"
;
List
<
Map
<
String
,
Object
>>
commitMap
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
0
);
logger
.
info
(
"提交订单:{}, 提交结果: {}"
,
submitObj
,
GsonUtil
.
toJson
(
commitMap
));
...
...
src/main/resources/templates/redmine.html
View file @
d356e028
...
...
@@ -26,6 +26,7 @@
<div
id=
"app"
>
<el-divider
content-position=
"left"
>
V1.1.7.8.3 2024-8-15
</el-divider>
<p
class=
"title"
>
1.需求 #17240
</p>
<p
class=
"title"
>
2. 订单提交增加参数,需求 #17203
</p>
<el-divider
content-position=
"left"
>
V1.1.7.8.2 2024-8-14
</el-divider>
<p
class=
"title"
>
1.回调增加个日志,便于查。
</p>
<p
class=
"title"
>
2.confirmReceipt 长度扩36
</p>
...
...
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