Commit c13cd61c by 宋毅

orderPrice

parent 8957a52f
......@@ -107,41 +107,41 @@ class GatewaypushlogService extends ServiceBase {
}
//支付回调
async paySuccess(pobj) {
var self = this;
if (!pobj.orderNo) {
return {"message":"orderNo不能为空","data":{},"code":-200};
return { "message": "orderNo不能为空", "data": {}, "code": -200 };
}
if (!pobj.orderPrice) {
return {"message":"orderPrice不能为空","data":{},"code":-200};
pobj.orderPrice = Number(pobj.orderPrice || "0");
if (pobj.orderPrice < 0) {
return { "message": "orderPrice不能为空", "data": {}, "code": -200 };
}
if (!pobj.phone) {
return {"message":"phone不能为空","data":{},"code":-200};
return { "message": "phone不能为空", "data": {}, "code": -200 };
}
if (pobj.companyName) {
if (!pobj.city) {
return {"message":"city不能为空","data":{},"code":-200};
return { "message": "city不能为空", "data": {}, "code": -200 };
}
if (!pobj.companyCategory) {
return {"message":"companyCategory不能为空","data":{},"code":-200};
return { "message": "companyCategory不能为空", "data": {}, "code": -200 };
}
if (!pobj.orgType) {
return {"message":"orgType不能为空","data":{},"code":-200};
return { "message": "orgType不能为空", "data": {}, "code": -200 };
}
if (!pobj.industryType) {
return {"message":"industryType不能为空","data":{},"code":-200};
return { "message": "industryType不能为空", "data": {}, "code": -200 };
}
if (!pobj.scope) {
return {"message":"scope不能为空","data":{},"code":-200};
return { "message": "scope不能为空", "data": {}, "code": -200 };
}
} else if (pobj.park) {
if (!pobj.productType) {
return {"message":"productType不能为空","data":{},"code":-200};
return { "message": "productType不能为空", "data": {}, "code": -200 };
}
} else {
return {"message":"参数异常","data":{},"code":-200};
return { "message": "参数异常", "data": {}, "code": -200 };
}
var param = {
requestId: self.getUUID(),
......@@ -153,11 +153,82 @@ class GatewaypushlogService extends ServiceBase {
pushStatus: "wts",//推送状态
}
await this.create(param);
return {"message":"true","data":{},"code":200};
return { "message": "true", "data": {}, "code": 200 };
}
//icp需求提交
async icpSubmitNeed(pobj) {
var self = this;
if (!pobj.intentionBizId) {
return self.getResultFail("intentionBizId不能为空");
}
if (!pobj.phone) {
return self.getResultFail("mobile不能为空");
}
if (!pobj.consultType) {
return self.getResultFail("consultType不能为空");
}
pobj.type = pobj.consultType;
var param = {
requestId: self.getUUID(),
requestUrl: "/api/ali/tm/consultation/submit",
requestjson: JSON.stringify(pobj),//请求地址
pushUrl: "/action/intentionapi/queryOrderState",//调用地址
pushActionType: "icpSubmitNeed",//调用参数
pushtimes: 0,//推送次数
pushStatus: "wts",//推送状态
}
await self.create(param);
return self.getResultSuccess(param.requestId);
}
//icp需求反馈
async icpFeedbackSubmit(pobj) {
var self = this;
if (!pobj.intentionBizId) {
return self.getResultFail("intentionBizId不能为空");
}
if (!pobj.description) {
return self.getResultFail("description不能为空");
}
if (!pobj.intentionStatus) {
return self.getResultFail("intentionStatus不能为空");
}
var param = {
requestId: self.getUUID(),
requestUrl: "/api/ali/tm/feedback/submit",
requestjson: JSON.stringify(pobj),//请求地址
pushUrl: "/action/intentionapi/queryOrderState",//调用地址
pushActionType: "icpFeedbackSubmit",//调用参数
pushtimes: 0,//推送次数
pushStatus: "wts",//推送状态
}
await self.create(param);
return self.getResultSuccess(param.requestId);
}
//icp状态变更
async icpNotify(pobj) {
var self = this;
if (!pobj.bizId) {
return self.getResultFail("bizId不能为空");
}
if (!pobj.status) {
return self.getResultFail("status不能为空");
}
var param = {
requestId: self.getUUID(),
requestUrl: "/api/ali/tm/feedback/submit",
requestjson: JSON.stringify(pobj),//请求地址
pushUrl: "/action/intentionapi/queryOrderState",//调用地址
pushActionType: "icpNotify",//调用参数
pushtimes: 0,//推送次数
pushStatus: "wts",//推送状态
}
await self.create(param);
return self.getResultSuccess(param.requestId);
}
}
......
......@@ -60,6 +60,9 @@ class UtilsNeedSve extends AppServiceBase {
};
}
var userpin = "";
if(pobj.phone&&!pobj.mobile){
pobj.mobile=pobj.phone;
}
if (pobj.mobile) {
//获取用户userpin
var userparam = {
......
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