Commit be7c1563 by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents e905c679 3dac6b31
......@@ -9,7 +9,7 @@ class AccessAuthAPI extends APIBase {
this.pushlogSve = system.getObject("service.common.pushlogSve");
this.aliclient = system.getObject("util.aliyunClient");
this.utilsTmAliyunSve = system.getObject("service.utilsSve.utilsTmAliyunSve");
this.utilsTmOrderCallService = system.getObject("service.utilsSve.utilsTmOrderCallSve");
}
async taskAliIcapi() {
var rtn = await this.gatewaypushlogSve.taskAliIcapi();
......@@ -36,7 +36,7 @@ class AccessAuthAPI extends APIBase {
}
async taskAlijsonfile(pobj, qobj, req) {//操作阿里商标交易上架
var rtn = await this.UtilsTmOrderCallService.createjsonfile();
var rtn = await this.utilsTmOrderCallService.createjsonfile();
return rtn;
}
......
......@@ -4,7 +4,7 @@ var settings = require("../../../../config/settings");
class ProductAPI extends WEBBase {
constructor() {
super();
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
this.utilsTmOrderCallSve = system.getObject("service.utilsSve.utilsTmOrderCallSve");
}
/**
* 接口跳转-POST请求
......@@ -13,9 +13,6 @@ class ProductAPI extends WEBBase {
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
......@@ -25,7 +22,6 @@ class ProductAPI extends WEBBase {
async opActionProcess(pobj, action_type, req) {
pobj.requestId = req.requestId;
var opResult = null;
console.log("11111",opResult)
switch (action_type) {
case "queryTradeProduceList"://2020 0907 lin 新增 ali查询 用户确认资料支付尾款,并更新订单状态
opResult = await this.utilsTmOrderCallSve.queryTradeProduceList(pobj, pobj.actionBody);
......
......@@ -277,13 +277,13 @@ class UtilsOrderService extends AppServiceBase {
}
pobj.actionType = "getPayOrderInfo";
var orderUrl = settings.centerOrderUrl() + "action/order/springBoard";
var orderResult = await this.restPostUrl(pobj, url);
var orderResult = await this.restPostUrl(pobj, orderUrl);
if (orderResult.status != 0) {
return orderResult;
}
//检查流水号是否已经支付
var receiptVoucher = orderResult.data.receiptVoucher;
var payTrxid = opType == "wx" ? receiptVoucher.wxPayOrderCode : receiptVoucher.aliPayOrderCode;
var payTrxid = actionBody.opType == "wx" ? receiptVoucher.wxPayOrderCode : receiptVoucher.aliPayOrderCode;
pobj.actionBody.trxid = payTrxid;
pobj.actionType = "queryOrderStatus";
......@@ -305,6 +305,7 @@ class UtilsOrderService extends AppServiceBase {
// payStatus.data.out_trade_no = attachList[0];
// payStatus.data.company_id = attachList[1];
// return await this.utilstlbankSve.opBackNotify(payStatus.data, "页面回调");
return system.getResultFail(-100130,'订单已支付,请勿重复付款,100130')
}
else if (payStatus.data && payStatus.data.trxstatus == "3045") {
return system.getResultFail(-100170, "超时未支付,请刷新页面,100170");
......@@ -819,6 +820,7 @@ class UtilsOrderService extends AppServiceBase {
pobj.actionType = "addOrder";
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
pobj.actionBody.channelOrder.orderStatus = 64;// 2020 0908 lin 新增。64作为orderinfo的orderStatus的值。含义为已付部分款
var result = await this.restPostUrl(pobj, reqUrl);
if(result) {
var tmResult = {
......
......@@ -2,6 +2,7 @@ const system = require("../../../system");
var settings = require("../../../../config/settings");
const querystring = require('querystring');
const AppServiceBase = require("../../app.base");
const { or } = require("sequelize");
//订单操作类
class UtilsTmOrderCallService extends AppServiceBase {
constructor() {
......@@ -9,8 +10,18 @@ class UtilsTmOrderCallService extends AppServiceBase {
this.aliclient = system.getObject("util.aliyunClient");
}
async queryTradeProduceList(pobj, actionBody) {//修改联系人
return system.getResultSuccess();
async queryTradeProduceList(pobj, actionBody) {//2020 0907 lin 新增 ali查询 用户确认资料支付尾款,并更新订单状态
var obj = {
BuyerStatus: 11,
PageNum: 1,
PageSize: 20,
SortFiled: "updateTime",
SortOrder: "DESC",
type: "TM"
};
let orderList = await this.aliclient.reqbyget({ action: "QueryTradeProduceList", reqbody: obj });
console.log("orderList",orderList)
return system.getResultSuccess(orderList);
}
async createjsonfile() {
......@@ -26,9 +37,10 @@ class UtilsTmOrderCallService extends AppServiceBase {
actionType:"createjsonfile",
actionBody:{}
}
var getjsonurl=settings.tmtransactionUrl()+"/api/action/trademarktransaction"
var getjsonurl=settings.tmtransactionUrl()+"/tmtransaction/action/trademarktransaction/springBoard"
var jsonurl=await this.restPostUrl(obj,getjsonurl);
if(!jsonurl){
console.log(jsonurl);
return system.getResultSuccess();
}
var upobj={
......@@ -36,14 +48,16 @@ class UtilsTmOrderCallService extends AppServiceBase {
filedir:rst.data.FileDir,
objectName:jsonurl.data.name,
encodePolicy:rst.data.EncodedPolicy,
endpoint:"http://partner-sync-file.oss-cn-beijing.aliyuncs.com",
endpoint:"http://oss-cn-beijing.aliyuncs.com",
accessKeyId:rst.data.AccessId,
bucketName:"partner-sync-file"
bucketName:"partner-sync-file",
signature:rst.data.Signature
}
var aliOssFileInfo = await this.execPostUrl(upobj, settings.aliossjavaUrl());
if (aliOssFileInfo == true) {
var fileUrl = params.filedir + "/" + params.objectName;
var fileUrl = rst.data.FileDir + "/" + jsonurl.data.name;
console.log(fileUrl)
return system.getResultSuccess(fileUrl);
}
......@@ -52,4 +66,4 @@ class UtilsTmOrderCallService extends AppServiceBase {
module.exports = UtilsTmOrderCallService;
// var a=new UtilsTmOrderCallService();
// a.createjsonfile();
// a.createjsonfile();
\ No newline at end of file
......@@ -212,7 +212,7 @@ module.exports = function (app) {
return;
}
// 2020 0812 lin 只去掉了check,因为要记录智能诊断的返回值,其他接口暂时未去掉
if (["getAppTokenByHosts", "getAppTokenByAppKey", "test", "getIndustries", "getSecondIndustries", "getQualificationByIndustry", "counselling"].indexOf(req.body.actionType) >= 0) {
if (["getAppTokenByHosts", "getAppTokenByAppKey", "test", "getIndustries", "getSecondIndustries", "getQualificationByIndustry", "counselling","queryTradeProduceList"].indexOf(req.body.actionType) >= 0) {
req.body.actionBody.appHosts = req.host;
next();
return;
......
......@@ -3,7 +3,7 @@
1. [获取偏好信息](#getPreference)
1. [提交选择信息起名](#createName)
## **<a name="getCache">询价</a>**
## **<a name="getCache">获取行业信息</a>**
[返回到目录](#menu)
##### URL
[/web/nmaction/name/springBoard]
......
......@@ -176,7 +176,8 @@
"channelServiceNo":"",// N 渠道订单号
"orderStatus":"",// N 订单状态
"startTime": "2019-10-27",// N 开始时间
"entTime": "2019-10-31"// N 结束时间
"entTime": "2019-10-31",// N 结束时间
"typeCode":"gsfu" //N 大类code
}
```
......
......@@ -7,7 +7,7 @@
1. [合成事实与理由文件模板 docx](#composeDocAndDownload)
1. [合成委托申请书模板 docx](#getEntrustDoc)
## **<a name="addorder">询价</a>**
## **<a name="addorder">创建驳回复审订单</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
......
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