Commit 635b9d6e by 兰国旗

laolan

parent 2d9829bc
......@@ -18,33 +18,47 @@ class Order extends APIBase {
if (!pobj.isDirectBuy || pobj.isDirectBuy == 0) {
pobj.isDirectBuy = 0;
}
if (!pobj.mainOrderNo) {
return regCfg.getResultFail("mainOrderNo不能为空");
if (!pobj.orderNo) {
return regCfg.getResultFail("orderNo不能为空");
}
var i = 0;
var orderLength = pobj.subOrderList.lenght;
for (i = 0; i <= orderLength; i++) {
// var i = 0;
// var orderLength = pobj.subOrderList.lenght;
// for (i = 0; i <= orderLength; i++) {
if (!pobj.subOrderList[i].orderNo) {
return regCfg.getResultFail("orderNo不能为空");
}
if (pobj.isDirectBuy == 0 && !pobj.subOrderList[i].bizId) {
return regCfg.getResultFail("非直接下单bizId不能为空");
}
if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].phone) {
return regCfg.getResultFail("直接下单phone不能为空");
}
if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].consultType) {
return regCfg.getResultFail("直接下单consultType不能为空");
}
// if (pobj.subOrderList[i].area) {
// pobj.subOrderList[i].area = regCfg.baiduArea[pobj.subOrderList[i].area]
// }
if (!pobj.subOrderList[i].area) {
return regCfg.getResultFail("area参数错误");
}
// if (!pobj.subOrderList[i].orderNo) {
// return regCfg.getResultFail("orderNo不能为空");
// }
// if (pobj.isDirectBuy == 0 && !pobj.subOrderList[i].bizId) {
// return regCfg.getResultFail("非直接下单bizId不能为空");
// }
// if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].phone) {
// return regCfg.getResultFail("直接下单phone不能为空");
// }
// if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].consultType) {
// return regCfg.getResultFail("直接下单consultType不能为空");
// }
// // if (pobj.subOrderList[i].area) {
// // pobj.subOrderList[i].area = regCfg.baiduArea[pobj.subOrderList[i].area]
// // }
// if (!pobj.subOrderList[i].area) {
// return regCfg.getResultFail("area参数错误");
// }
// }
if (!pobj.orderNo) {
return regCfg.getResultFail("orderNo不能为空");
}
if (pobj.isDirectBuy==0 && !pobj.bizId) {
return self.getResultFail("非直接下单bizId不能为空");
}
if (pobj.isDirectBuy==1 && !pobj.phone) {
return self.getResultFail("直接下单phone不能为空");
}
if (pobj.isDirectBuy==1 && !pobj.consultType) {
return self.getResultFail("直接下单consultType不能为空");
}
if (pobj.area) {
pobj.area = regCfg.baiduArea[pobj.area]
}
pobj.status = 1;
pobj.action_type = "regOrderStatus";
......
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 to comment