Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
622a8545
authored
Sep 28, 2017
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the book offline
parent
bdef0c47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
src/main/java/com/ctrip/fun/admin/controller/order/OpCourseOrderController.java
src/main/java/com/ctrip/fun/admin/service/file/QiniuFileService.java
src/main/java/com/ctrip/fun/admin/controller/order/OpCourseOrderController.java
View file @
622a8545
...
...
@@ -1067,7 +1067,32 @@ public class OpCourseOrderController extends AbstractOpOrderController<CourseOrd
*/
@Override
public
String
billCreate
(
HttpServletRequest
request
,
@Valid
@ModelAttribute
(
"form"
)
OrderPayForm
form
,
BindingResult
binding
,
ModelMap
model
)
{
return
null
;
String
result
=
this
.
billBook
(
request
,
form
,
binding
,
model
);
if
(
"error"
.
equalsIgnoreCase
(
result
))
{
return
result
;
}
/* PlaceOrder placeOrder = (PlaceOrder) model.get("placeOrder");
PlaceOrderBean responseOrder = (PlaceOrderBean) model.get("responseOrder");
Object subRetSubmitOrder = model.get("retSubmitOrder");
if(subRetSubmitOrder!=null){
model.put("message", "下单成功");
return "/order/bill/billPaySuccess";
}
if (!ProductPaymentTypeEnum.PREPAY.getName().equals(placeOrder.getPayMode()) && !ProductPaymentTypeEnum.PREPAY_AND_DESK.getName().equals(placeOrder.getPayMode())
&& !ProductPaymentTypeEnum.CREDIT.getName().equals(placeOrder.getPayMode())) {
throw new CommonException(-12, "不支持的支付方式");
}*/
return
result
;
/* try {
} catch (CommonException e) {
model.put("message", e.getMsg() + e.getCode());
return "error";
}
*/
//return null;
}
/**
...
...
src/main/java/com/ctrip/fun/admin/service/file/QiniuFileService.java
View file @
622a8545
...
...
@@ -54,12 +54,10 @@ public class QiniuFileService {
new
InetSocketAddress
(
proxyHost
,
proxyPort
)));
}
if
(
multipartFile
==
null
||
multipartFile
.
isEmpty
())
{
System
.
out
.
println
(
"multipartFile is null 000"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
"上传文件不能为空"
);
return
null
;
}
if
(
StringUtils
.
isEmpty
(
filename
)
||
StringUtils
.
isEmpty
(
filename
.
trim
()))
{
System
.
out
.
println
(
"multipartFile is null 111"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
"上传文件名为空"
);
return
null
;
}
...
...
@@ -78,13 +76,11 @@ public class QiniuFileService {
QiniuResponse
qiniuResponse
=
new
Gson
()
.
fromJson
(
res
.
bodyString
(),
QiniuResponse
.
class
);
if
(!
StringUtils
.
isEmpty
(
qiniuResponse
.
getError
()))
{
System
.
out
.
println
(
"multipartFile is null 2222"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
String
.
format
(
"error: %s"
,
qiniuResponse
.
getError
()));
return
null
;
}
if
(
StringUtils
.
isEmpty
(
qiniuResponse
.
getKey
()))
{
System
.
out
.
println
(
"multipartFile is null 3333"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
"七牛服务返回值的key为空"
);
return
null
;
}
...
...
@@ -93,18 +89,15 @@ public class QiniuFileService {
com
.
ctrip
.
fun
.
admin
.
utility
.
qiniu
.
QiniuResponse
r
=
e
.
response
;
if
(
r
!=
null
)
{
try
{
System
.
out
.
println
(
"multipartFile is null 444"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
+
",exception:"
+
r
.
bodyString
(),
String
.
format
(
"QiniuException msg: %s"
,
r
.
bodyString
()));
}
catch
(
Exception
e2
)
{
System
.
out
.
println
(
"multipartFile is null 555"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
String
.
format
(
"Exceptio2 msg: %s"
,
e
.
getMessage
()));
}
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"multipartFile is null 666"
);
logger
.
error
(
"Qiniu upload error:host:"
+
proxyHost
+
",port:"
+
proxyPort
,
String
.
format
(
"Exception error: %s"
,
e
.
getMessage
()));
}
finally
{
...
...
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