Commit 919efa67 by 宋毅

tj

parent 5b676a01
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class ProductAPI extends APIBase {
constructor() {
super();
this.utilsOpOrderSve = system.getObject("service.utilsSve.utilsOpOrderSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "updateContacts"://修改订单联系人
opResult = await this.utilsOpOrderSve.updateContacts(pobj, pobj.actionBody);
break;
case "updateTmOrder"://修改商标订单信息
opResult = await this.utilsOpOrderSve.updateTmOrder(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = ProductAPI;
\ No newline at end of file
...@@ -39,7 +39,7 @@ class PaymentAPI extends APIBase { ...@@ -39,7 +39,7 @@ class PaymentAPI extends APIBase {
case "queryOrderStatus"://通联支付查询 case "queryOrderStatus"://通联支付查询
opResult = await this.utilsOrderSve.queryOrderStatus(pobj, pobj.actionBody); opResult = await this.utilsOrderSve.queryOrderStatus(pobj, pobj.actionBody);
break; break;
case "getQrCode"://pc端订单支付二维码生成 case "getQrCode"://获取pc端支付二维码--不跟订单关联
opResult = await this.utilsOrderSve.getQrCode(pobj, pobj.actionBody); opResult = await this.utilsOrderSve.getQrCode(pobj, pobj.actionBody);
break; break;
case "queryOrder"://通联支付查询 case "queryOrder"://通联支付查询
......
const system = require("../../../system");
var settings = require("../../../../config/settings");
const querystring = require('querystring');
const AppServiceBase = require("../../app.base");
class UtilsOpOrderService extends AppServiceBase {
constructor() {
super();
this.centerOrderUrl = settings.centerOrderUrl();
}
async updateContacts(pobj, actionBody) {
if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty");
}
var reqUrl = this.centerOrderUrl + "opaction/opOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
async updateTmOrder(pobj, actionBody) {
if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty");
}
var reqUrl = this.centerOrderUrl + "opaction/opOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
}
module.exports = UtilsOpOrderService;
...@@ -125,7 +125,6 @@ class UtilsOrderService extends AppServiceBase { ...@@ -125,7 +125,6 @@ class UtilsOrderService extends AppServiceBase {
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
return result; return result;
} }
/** /**
* 获取H5支付地址 * 获取H5支付地址
* @param {*} pobj * @param {*} pobj
...@@ -282,7 +281,7 @@ class UtilsOrderService extends AppServiceBase { ...@@ -282,7 +281,7 @@ class UtilsOrderService extends AppServiceBase {
return system.getResultFail(-130, "请及时支付"); return system.getResultFail(-130, "请及时支付");
} }
/** /**
* 只是获取二维码--不跟订单关联 * 获取pc端支付二维码--不跟订单关联
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
* "actionBody": { * "actionBody": {
......
...@@ -51,7 +51,7 @@ module.exports = function (app) { ...@@ -51,7 +51,7 @@ module.exports = function (app) {
req.body.actionProcess = result.data.app_code; req.body.actionProcess = result.data.app_code;
var lst = [ var lst = [
"addOrder", "getH5PayUrl", "getOrderQrCode", "queryOrderStatus","getOrderInfo", "getOrderDeliveryInfo", "addOrder", "getH5PayUrl", "getOrderQrCode", "queryOrderStatus","getOrderInfo", "getOrderDeliveryInfo",
"getOrderDeliveryFlowInfo", "getOrderDeliveryFlowList", "getOrderLogInfo", "getOrderDeliveryFlowInfo", "getOrderDeliveryFlowList", "getOrderLogInfo", "updateContacts", "updateTmOrder",
"getNeedInfo",//---暂时没有用到 "getNeedInfo",//---暂时没有用到
"tmConfirm", "updateTmInfo", "tmConfirm", "updateTmInfo",
"updateNclInfo", "updateContacts", "updateNclInfo", "updateContacts",
......
...@@ -16,22 +16,29 @@ ...@@ -16,22 +16,29 @@
## 2. 商标检索相关接口 ## 2. 商标检索相关接口
  1 [商标检索中心](doc/api/opTrademark/tmSearch.md)   1 [商标检索中心](doc/api/opTrademark/tmSearch.md)
## 3. 支付相关接口 ## 3. 专利检索接口
  1 [支付中心](doc/api/paymentDesc/payment.md)
## 4. 专利检索接口
  1 [专利检索](doc/api/patentDesc/patent.md)   1 [专利检索](doc/api/patentDesc/patent.md)
## 5. 证照相关接口 ## 4. 证照相关接口
  1 [证照相关推荐](doc/api/licensesDesc/license.md)   1 [证照相关推荐](doc/api/licensesDesc/license.md)
## 6. 用户中心相关接口 ## 5. 用户中心相关接口
  1 [用户中心](doc/api/platform/user.md)   1 [用户中心](doc/api/platform/user.md)
## 7. 产品中心相关接口 ## 6. 产品中心相关接口
  1 [产品中心接口](doc/api/platform/product.md)   1 [产品中心接口](doc/api/platform/product.md)
## 8. 订单中心相关接口 ## 7. 订单中心相关接口
  1 [订单中心接口](doc/api/platform/order.md)   1 [订单中心接口](doc/api/platform/order.md)
## 9. 政策相关接口
## 8. 支付中心相关接口
  1 [支付中心接口](doc/api/paymentDesc/payment.md)
## 9. 商标订单相关接口
  1 [商标订单接口](doc/api/platform/tmOrder.md)
## 10. 工商订单相关接口
  1 [工商订单接口](doc/api/platform/icbcOrder.md)
## 11. 政策相关接口
  1 [政策接口](doc/api/platform/policy.md)   1 [政策接口](doc/api/platform/policy.md)
\ No newline at end of file
<a name="menu" href="/doc">返回主目录</a> <a name="menu" href="/doc">返回主目录</a>
1. [pc端订单支付二维码生成](#paypc)
## **<a name="paypc"> 订单支付</a>** 1. [获取pc端支付二维码--不跟订单关联](#getQrCode)
1. [获取H5支付链接](#getH5PayUrl)
## **<a name="getQrCode"> 获取pc端支付二维码--不跟订单关联</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/payment/paymentApi/getQrCode] [/web/payment/paymentApi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:paypc #### 渠道执行的类型 actionType:getQrCode
``` javascript ``` javascript
{ {
"uapp_id": "1", //平台渠道ID "uapp_id": "1", //平台渠道ID
...@@ -33,3 +35,29 @@ ...@@ -33,3 +35,29 @@
"requestId": "058244807fff4ab388bbda79afc04b28" "requestId": "058244807fff4ab388bbda79afc04b28"
  }   }
``` ```
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
[返回到目录](#menu)
##### URL
[/web/payment/paymentApi/springBoard]
#### 参数格式 `JSON`人
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getH5PayUrl
``` javascript
{
"orderNo":"OT26202002151649kPgs"
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"payUrl": "https://syb.allinpay.com/apiweb/h5unionpay/unionorder?appid=00172286&body=%E5%95%86%E6%A0%87%E6%B3%A8%E5%86%8C%E3%80%90%E4%B8%93%E5%AE%B6%E8%BE%85%E5%8A%A9%E7%94%B3%E8%AF%B7%E3%80%91&charset=UTF-8&cusid=560595073992Z6G&notify_url=http%3A%2F%2Fgsb.qifu.gongsibao.com%3A4012%2Ftlpay%2Fnotify&randomstr=1581758584924&remark=h5paypagesywdy&reqsn=OT26202002151649kPgs&returl=http%3A%2F%2Fgsb.qifu.gongsibao.com%3A4012%2Ftlpay%2Fnotify&sign=439FA9F49D365DC32FE1CA712F5AD848&trxamt=69900&version=12", // H5支付链接
"requestId": "ac22e84d8ebc4df09629c0aff2bb1fe9"
}
```
<a name="menu" href="/doc">返回主目录</a>
1. [获取工商订单交付流程信息](#getIcbcOrderDeliveryFlowInfo)
## **<a name="getIcbcOrderDeliveryFlowInfo"> 获取工商订单交付流程信息</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getOrderDeliveryFlowInfo
``` javascript
{
"sourceOrderNo":"OT31202002191453Hpib33"// Y 订单号
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":{
"updated": "2020-02-19T06:56:32.000Z",
"flowList":{
"updated": "2020-02-19T06:53:09.000Z",
"orderDeliveryStatus": "已下单",//流程状态编码
"orderDeliveryStatusName": "已下单",//流程状态名称
"flowList": [//流程列表
{
"updated": "2020-02-19T06:53:09.000Z",
"orderDeliveryStatus": "已下单",
"orderDeliveryStatusName": "已下单"
},
{
"updated": "2020-02-18",
"orderDeliveryStatus": "已提交材料",
"orderDeliveryStatusName": "已提交材料"
}
]
}
},
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
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