Commit 622a8545 by unknown

add the book offline

parent bdef0c47
......@@ -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;
}
/**
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment