Commit 6909cd26 by 宋毅

tj

parent ada786e6
......@@ -6,6 +6,7 @@ class UtilsOpOrderService extends AppServiceBase {
constructor() {
super();
this.centerOrderUrl = settings.centerOrderUrl();
this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve");
}
async updateContacts(pobj, actionBody) {
if (!actionBody.orderNo) {
......@@ -23,14 +24,12 @@ class UtilsOpOrderService extends AppServiceBase {
}
var reqUrl = this.centerOrderUrl + "opaction/opOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
this.opUpdatePushInfo(result, pobj, actionBody, "pushUpdateOrder");
this.opUpdatePushInfo(result, pobj, "pushUpdateOrder");
result.data = null;
return result;
}
async opUpdatePushInfo(result, pobj, actionBody, opType) {
if (result.status == 0 && result.data.orderStatus > 2) {
actionBody.product_info = product_info;
result.data = actionBody;
async opUpdatePushInfo(result, pobj, opType) {
if (result.status == 0 && result.data.orderStatus < 4) {
result.data.appInfo = {
uapp_id: pobj.appInfo.uapp_id,
uapp_key: pobj.appInfo.uapp_key,
......@@ -42,7 +41,8 @@ class UtilsOpOrderService extends AppServiceBase {
channel_username: pobj.userInfo.channel_username,
channel_nickname: pobj.userInfo.channel_nickname
};
this.utilsPushSve.pushInfo(result.data, opType);
delete result.data["orderStatus"];
this.utilsPushSve.pushInfo(result.data, opType, 1);
}
}
}
......
......@@ -393,7 +393,7 @@ class UtilsOrderService extends AppServiceBase {
return resultSign;
}
//获取充值业务锁
// await this.cacheManager["TlPayLocker"].init(parmas.out_trade_no);//---测试时放开
await this.cacheManager["TlPayLocker"].init(parmas.out_trade_no);//---测试时放开
var locker = await this.cacheManager["TlPayLocker"].enter(parmas.out_trade_no);
if (!locker || locker != "1") {
this.logCtl.info({
......@@ -428,12 +428,12 @@ class UtilsOrderService extends AppServiceBase {
channel_username: opResult.data.order_info.channelUserId,
channel_nickname: opResult.data.order_info.channelUserId
};
this.utilsPushSve.pushInfo(opResult.data, "pushBusiness");
this.utilsPushSve.pushInfo(opResult.data, "pushOrder");
// this.utilsPushSve.pushInfo(opResult.data, "pushBusiness",0);
this.utilsPushSve.pushInfo(opResult.data, "pushOrder",0);
}
opResult.data = null;
return opResult;
} catch (e) {
await this.cacheManager["TlPayLocker"].release(parmas.out_trade_no);
this.logCtl.error({
......
......@@ -7,7 +7,7 @@ class UtilsPushService extends AppServiceBase {
super();
this.pushlogSve = system.getObject("service.common.pushlogSve");
};
async pushInfo(actionBody, opType) {
async pushInfo(actionBody, opType, isDelProductInfo) {
var interface_list = actionBody.product_info.interface_info;
if (!interface_list) {
return "";
......@@ -18,10 +18,10 @@ class UtilsPushService extends AppServiceBase {
}
for (let index = 0; index < interface_list_temp.length; index++) {
const element = interface_list_temp[index];
var refOpResult = this.reflexAction(element, actionBody);
var refOpResult = this.reflexAction(element, actionBody, isDelProductInfo);
}
}
async reflexAction(interface_info, pobj) {
async reflexAction(interface_info, actionBody, isDelProductInfo) {
var refResult = null;
try {
if (interface_info.interface_type == "bd") {
......@@ -32,21 +32,26 @@ class UtilsPushService extends AppServiceBase {
if (!invokeObj[interface_info.method_name]) {
return system.getResult(null, "产品接口参数方法信息有误,100360");
}
pobj.interface_params = interface_info.params;
var params = [pobj];
actionBody.interface_params = interface_info.params;
var params = [actionBody];
refResult = await invokeObj[interface_info.method_name].apply(invokeObj, params);
}
else if (interface_info.interface_type == "yc") {
if (!interface_info.interface_url) {
return system.getResult(null, "产品接口interface_url参数不能为空,100370");
}
refResult = await this.restPostUrl(pobj, interface_info.interface_url);
delete actionBody.product_info["price_list"];
delete actionBody.product_info["interface_info"];
if (isDelProductInfo && isDelProductInfo == 1) {
delete actionBody["product_info"];
}//是否删除产品信息进行推送
refResult = await this.restPostUrl(actionBody, interface_info.interface_url);
}
this.pushlogSve.createDb({
appid: pobj.appInfo.uapp_id,
appkey: pobj.appInfo.uapp_key,
appid: actionBody.appInfo.uapp_id,
appkey: actionBody.appInfo.uapp_key,
op: "推送的接口信息:" + JSON.stringify(interface_info),
content: JSON.stringify(pobj),
content: JSON.stringify(actionBody),
resultInfo: refResult ? JSON.stringify(refResult) : "",
returnType: '1',
opTitle: "数据推送成功"
......@@ -54,10 +59,10 @@ class UtilsPushService extends AppServiceBase {
return refResult;
} catch (e) {
this.pushlogSve.createDb({
appid: pobj.appInfo.uapp_id,
appkey: pobj.appInfo.uapp_key,
appid: actionBody.appInfo.uapp_id,
appkey: actionBody.appInfo.uapp_key,
op: "推送的接口信息:" + JSON.stringify(interface_info),
content: JSON.stringify(pobj),
content: JSON.stringify(actionBody),
resultInfo: JSON.stringify(e.stack),
returnType: '0',
opTitle: "数据推送异常"
......
1.修改订单联系人,对已支付订单进行数据修改推送给交付系统的信息
1.修改订单联系人,对已支付订单进行数据修改推送给交付系统的信息
......@@ -2,14 +2,178 @@
方式:POST
地址:
参数:
{
"orderNo": "TM34202003052259EJGx",
"notes": "订单备注put",
"orderContact": {
"contacts": "宋毅",
"mobile": "15010929369",
"email": "songyi@gongsibao.com",
"fax": ""
},
"appInfo": {
"uapp_id": "26",
"uapp_key": "202001170336",
"app_code": "gsb",
"app_name": "政策应用"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": ""
}
}
2.添加商标后,支付成功回调通知交付系统的信息
方式:POST
地址:
参数:
{
"order_info": {
"id": 135,
"uapp_id": 26,
"orderNo": "TM34202003052259EJGx",
"channelServiceNo": "TM34202003052259EJGx",
"channelOrderNo": "TM34202003052259EJGx",
"channelUserId": "15010929366",
"ownerUserId": "15010929366",
"payTime": null,
"quantity": 1,
"serviceQuantity": 0,
"orderStatusName": "待付款",
"orderStatus": 1,
"totalSum": "300.00",
"payTotalSum": "300.00",
"refundSum": "0.00",
"invoiceApplyStatus": "00",
"created_at": "2020-03-07T04:07:05.000Z"
},
"delivery_content": {
"tm": {
"picUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg",
"tmName": "testbiao",
"tmFormType": "3",
"colorizedPicUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg"
},
"apply": {
"code": "91310110398635929J",
"name": "上海辰者信息科技有限公司",
"smwjUrl": "111",
"zipCode": "100000",
"gzwtsUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_wts863215710393842862019914.jpg",
"applyAddr": "上海市杨浦区国定路346号三楼0624室",
"applyArea": "",
"customerType": "ent",
"identityCardNo": "",
"identityCardPdf": "",
"identityCardPic": "",
"businessLicensePdf": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.pdf",
"businessLicensePic": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.jpg"
},
"notes": "订单备注信息",
"nclones": [
{
"code": "02",
"name": "颜料油漆",
"tbCode": "TB26202003071207dL8j",
"nclCount": 2,
"nclThree": [
{
"code": "020008",
"name": "绘画用铝粉",
"pcode": "0202",
"disabled": "false",
"fullname": "020008 绘画用铝粉"
},
{
"code": "020005",
"name": "食品用着色剂",
"pcode": "0203",
"disabled": "false",
"fullname": "020005 食品用着色剂"
}
],
"tmStatus": "dsh",
"submitTime": "",
"tmRegistNum": "",
"deliveryType": "10",
"tmStatusName": "待审核",
"nclPublicExpense": 300
}
],
"opNotes": "",
"orderContact": {
"id": 495,
"contactName": "宋毅",
"mobile": "15010929368",
"tel": null,
"email": "songyi@gongsibao.com",
"fax": null
},
"deliveryStatus": "dsh",
"deliveryStatusList": [
{
"deliveryStatus": "dsccl",
"deliveryUpdated": "2020-03-07T04:07:05.806Z",
"deliveryStatusName": "待上传材料"
},
{
"deliveryStatus": "dsh",
"deliveryUpdated": "2020-03-07T04:13:22.542Z",
"deliveryStatusName": "待审核"
}
],
"deliveryStatusName": "待审核"
},
"product_info": {
"id": 1,
"uapp_id": 26,
"is_enabled": 1,
"path_code": "/sbfu/sbzc/",
"path_name": "/商标服务/商标注册/",
"item_code": "zzsbzc",
"item_name": "商标注册【自助申请】",
"channel_item_code": "zzsbzc",
"channel_item_name": "商标注册【自助申请】",
"service_business_code": null,
"service_business_name": null,
"pic_url": "http://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_qft_pi15755163570461.png",
"product_short_desc": "适合熟知商标注册流程的企业用户",
"product_desc": "[\"自己检索商标,准备官方所需注册材料\",\"提交迅速,及时反馈\",\"全流程跟踪,掌握申请进度\"]",
"desc_url": null,
"icon_url": null,
"pay_after_jump_h5url": null,
"pay_after_jump_pcurl": null,
"productType_id": 2,
"price_item": {
"id": 4,
"pay_code": "zzsbzc-2",
"price": 30,
"supply_price": 30,
"service_charge": 0,
"public_expense": 30,
"is_default": 0,
"price_type": "mx",
"price_type_name": "项",
"sort": 2,
"price_desc": "1项",
"min_qty": null,
"max_qty": null,
"service_code": null
}
},
"appInfo": {
"uapp_id": "34",
"uapp_key": "202002291726",
"app_code": "gsbtmh5",
"app_name": "公司宝H5商标"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": "15010929366"
}
}
......@@ -17,6 +181,117 @@
方式:POST
地址:
参数:
(1)修改申请人信息
{
"orderNo": "TM262020030712059HGj",
"apply": {
"applyAddr": "上海市杨浦区国定路346号三楼0624室",
"applyArea": "",
"businessLicensePic": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.jpg",
"businessLicensePdf": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.pdf",
"code": "91310110398635929J",
"customerType": "ent",
"identityCardNo": "",
"identityCardPic": "",
"identityCardPdf": "",
"name": "上海辰者信息科技有限公司11",
"zipCode": "100008"
},
"deliveryStatus": "dsh",
"deliveryStatusName": "待审核",
"appInfo": {
"uapp_id": "26",
"uapp_key": "202001170336",
"app_code": "gsb",
"app_name": "政策应用"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": ""
}
}
(2)修改商标信息
{
"orderNo": "TM34202003052259EJGx",
"tm": {
"colorizedPicUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg",
"tmName": "testbiao-tibao",
"picUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg",
"tmFormType": "3"
},
"appInfo": {
"uapp_id": "26",
"uapp_key": "202001170336",
"app_code": "gsb",
"app_name": "政策应用"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": ""
}
}
(3)修改交官材料
{
"orderNo": "TM34202003052259EJGx",
"apply": {
"gzwtsUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_wts863215710393842862019914.jpg",
},
"appInfo": {
"uapp_id": "26",
"uapp_key": "202001170336",
"app_code": "gsb",
"app_name": "政策应用"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": ""
}
}
(4)修改尼斯信息
{
"orderNo": "TM34202003052259EJGx",
"nclones": [
{
"code": "02",
"name": "颜料油漆",
"nclThree": [
{
"code": "020008",
"disabled": "false",
"fullname": "020008 绘画用铝粉--88",
"name": "绘画用铝粉",
"pcode": "0202"
},
{
"code": "020005",
"disabled": "false",
"fullname": "020005 食品用着色剂",
"name": "食品用着色剂",
"pcode": "0203"
}
],
"nclCount": 2,
"nclPublicExpense": 300,
"tmStatus": "dsh",
"tmStatusName": "待审核",
"submitTime": "",
"deliveryType": "10",
"tbCode": "TB26202003071309yHWQ",
"tmRegistNum": ""
}
],
"appInfo": {
"uapp_id": "26",
"uapp_key": "202001170336",
"app_code": "gsb",
"app_name": "政策应用"
},
"userInfo": {
"channel_userid": "15010929366",
"channel_username": "15010929366",
"channel_nickname": ""
}
}
\ No newline at end of file
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