Commit 1c2ab05b by 宋毅

tj

parent 3277561f
node_modules/
\ No newline at end of file
node_modules/
localsettings.js
\ No newline at end of file
......@@ -18,9 +18,9 @@ class APIBase {
"SelPrice2TX": "selPrice2TX",
"GetOverviewInfoByUser": "getOverviewInfoByUser",
"SubmitGoodsinfo": "submitGoodsinfo",
"NeedSubmit": "needSubmit",
"NeedList": "needList",
"NeedDetail": "needDetail",
"SubmitNeed": "needSubmit",
"GetNeedList": "needList",
"GetNeedDetail": "needDetail",
"GetOrderListByStatus": "getOrderListByStatus",
"GetQualificationCertificateListByUserAndType": "getQualificationCertificateListByUserAndType",
"GetQualificationCertificateDetail": "getQualificationCertificateDetail",
......
......@@ -16,7 +16,7 @@ class Need extends APIBase {
if (!pobj.interface || !pobj.interface.interfaceName) {
return system.getResult(null, "interfaceName参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.interface, req);
var result = await this.opActionProcess(pobj, pobj.interface.interfaceName, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
......
......@@ -4,7 +4,6 @@ var settings = require("../../../../config/settings");
class NotifyApi extends APIBase {
constructor() {
super();
this.needSolutionSve = system.getObject("service.need.needSolutionSve");
this.needInfoSve = system.getObject("service.need.needInfoSve");
}
/**
......@@ -27,7 +26,7 @@ class NotifyApi extends APIBase {
opResult = system.getResultSuccess("测试接口");
break;
case "needSubmit"://提交需求
opResult = await this.needSolutionSve.notifyNeedSubmit(pobj);
opResult = await this.needInfoSve.notifyNeedSubmit(pobj.actionBody);
break;
case "closeNeed"://关闭需求
opResult = await this.needInfoSve.closeNeed(pobj);
......
......@@ -67,6 +67,18 @@ class OrderDeliveryDao extends Dao{
return list;
}
/**
* 根据订单号获取订单详情
* @param {*} orderNum 订单号
*/
async getOrderDetailByOrderNum(orderNum){
var params = {
orderNum: orderNum
};
var sql = "select * from v_order_oproduct_odelivery where order_num = :orderNum order by updated_at desc limit 1 ";
var list = await this.customQuery(sql, params);
return list;
}
/**
* 通过订单号获取资质证照信息
*/
async getQcInfoByOrderNum(orderNum){
......
......@@ -21,6 +21,7 @@ module.exports = (db, DataTypes) => {
},
status_name: DataTypes.STRING(100), //
notes: DataTypes.STRING(255), //notes 备注
close_reason: DataTypes.STRING(255), //关闭原因
need_info: DataTypes.JSON, //need_info 需求信息(往服务商那边推送的信息)
servicer_code: DataTypes.STRING(100), //服务商
servicer_name:DataTypes.STRING(100),
......
......@@ -9,7 +9,7 @@ module.exports = (db, DataTypes) => {
solution_content: DataTypes.JSON, //solution_content 方案内容
is_refusal: DataTypes.INTEGER, //is_refusal 是否驳回
refusal_notes: DataTypes.INTEGER, //驳回原因
refusal_notes: DataTypes.STRING(255), //驳回/关闭原因
notes: DataTypes.STRING(255), //驳回/关闭原因
}, {
paranoid: true,//假的删除
underscored: true,
......
......@@ -7,7 +7,7 @@ module.exports = (db, DataTypes) => {
need_num: DataTypes.STRING, //需求号
user_id: DataTypes.STRING, //用户id
user_name: DataTypes.STRING, //用户名称
pay_time:DataTypes.DATE,//付款时间
quantity: DataTypes.INTEGER, //订单数量
total_sum: DataTypes.INTEGER, //订单总额
discount_amount: DataTypes.INTEGER, //折扣金额
......
......@@ -11,51 +11,57 @@ module.exports = (db, DataTypes) => {
product_type: DataTypes.STRING, //需求类型(产品二类id)
product_type_name: DataTypes.STRING, //需求类型名称(产品二类名称)
order_snapshot: DataTypes.JSON, //订单快照
product_snapshot:DataTypes.STRING //产品快照
tx_order_snapshot: DataTypes.JSON, //腾讯订单快照
product_snapshot: DataTypes.STRING, //产品快照
time_span: DataTypes.STRING, //计费数量
time_unit: DataTypes.STRING, //计费周期 年:y,月:m,日:d,时:h,分:M,秒:s,一次性购买:p
end_time: DataTypes.DATE, //到期时间
servicer_code: DataTypes.STRING, //服务商
servicer_name: DataTypes.STRING
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
// updatedAt: true,
// createdAt: true,
//freezeTableName: true,
// define the table's name
tableName: 'b_order_product',
validate: {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
// updatedAt: true,
// createdAt: true,
//freezeTableName: true,
// define the table's name
tableName: 'b_order_product',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
......@@ -19,6 +19,7 @@ class TxPushLogService extends ServiceBase {
}
async createCbsInstance(pobj, req) {
var self=this;
if (!pobj.interface.para.dealName) {
return self.returnTX(-1, "cgateway", "参数错误", null)
}
......@@ -26,7 +27,7 @@ class TxPushLogService extends ServiceBase {
if (loginfo) {
return self.returnTX(1, "cgateway", "ok", {"flowId":loginfo.flow_id,"resourceIds":[pobj.interface.para.dealName]})
}
var flow_id=this.getBusUid("f");
var flow_id=await this.getBusUid("f");
var newobj = {
flow_id: flow_id,
deal_name: pobj.interface.para.dealName,
......@@ -40,20 +41,20 @@ class TxPushLogService extends ServiceBase {
if(!creatlog){
return self.returnTX(-1, "cgateway", "参数错误", null)
}
pobj.logId=creatlog.dataValues.id;
var pushobj = {
"actionType": "orderSubmit",// Y 功能名称
"actionType": "produceData",// Y 功能名称
"actionBody": {
notifyUrl: "http://192.168.1.113:4011/api/action/need/springBoard",
actionType: "queryFlow",
pushUrl: settings.apiconfig.opPushUrl() + "/entService/consultation/springBoard",
messageBody: actionBody,
identifyCode: "needSubmit"
notifyUrl: "",
actionType: "orderPayNotify",
pushUrl: "192.168.1.113:4011/api/action/order/springBoard",
messageBody: pobj,
identifyCode: "orderPayNotify"
}
};
this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
return self.returnTX(1, "cgateway", "ok", {"flowId":loginfo.flow_id,"resourceIds":[pobj.interface.para.dealName]})
return self.returnTX(1, "cgateway", "ok", {"flowId":creatlog.flow_id,"resourceIds":[pobj.interface.para.dealName]})
}
async queryFlow(pobj) {
......@@ -64,6 +65,33 @@ class TxPushLogService extends ServiceBase {
if (!loginfo) {
return self.returnTX(-1, "cgateway", "产品不存在", null)
}
var orderInfo=await this.orderInfoDao.findOne({order_num:loginfo.dataValues.dealName});
if(!orderInfo){
return self.returnTX(-1, "cgateway", "资源不存在", null)
}
var status=0;
if(orderInfo.status==302){
status=3;
}
return self.returnTX(1, "cgateway", "ok", {"status":status})
}
async queryResources(pobj) {
if (!pobj.interface.para.resourceIds[0]) {
return self.returnTX(-1, "cgateway", "参数错误", null)
}
var loginfo = await this.findOne({ flow_id: pobj.interface.para.flowId, push_action_type: "orderPayNotify" });
if (!loginfo) {
return self.returnTX(-1, "cgateway", "产品不存在", null)
}
var orderInfo=await this.orderInfoDao.findOne({order_num:loginfo.dataValues.dealName});
if(!orderInfo){
return self.returnTX(-1, "cgateway", "资源不存在", null)
}
var status=0;
if(orderInfo.status==302){
status=3;
}
return self.returnTX(1, "cgateway", "ok", {"status":loginfo.push_status})
}
......
......@@ -31,14 +31,14 @@ class NeedInfoService extends ServiceBase {
}
var self = this;
return await self.db.transaction(async function (t) {
await self.dao.update({ id: needinfo.id, status: 5 }, t);
var needsolution = await self.needSolutionDao.model.findOne({
where: { need_num: ab.needNum },
raw: true
});
if (needsolution && needsolution.id) {
await sqlf.needSolutionDao.update({ id: needsolution.id, refusal_notes: ab.note }, t);
}
await self.dao.update({ id: needinfo.id, status: 5,close_reason:ab.note }, t);
// var needsolution = await self.needSolutionDao.model.findOne({
// where: { need_num: ab.needNum },
// raw: true
// });
// if (needsolution && needsolution.id) {
// await sqlf.needSolutionDao.update({ id: needsolution.id, refusal_notes: ab.note }, t);
// }
return system.getResultSuccess();
})
......@@ -78,8 +78,8 @@ class NeedInfoService extends ServiceBase {
if (serviceinfo.status < 0) {
return system.getResultFail(-203, "servicer is empty");
}
actionBody.servicerCode = serviceinfo.data.servicer_code;
actionBody.servicerName = serviceinfo.data.servicer_name;
actionBody.ServicerCode = serviceinfo.data.servicer_code;
actionBody.ServicerName = serviceinfo.data.servicer_name;
//需求创建
var need_num = await this.getBusUid("n");
var datavalue = {
......@@ -92,8 +92,8 @@ class NeedInfoService extends ServiceBase {
consult_type: actionBody.ConsultType,
consult_type_name: actionBody.ConsultTypeName,
notes: actionBody.Notes,
servicer_code: actionBody.servicerCode,
servicer_name: actionBody.servicerName,
servicer_code: actionBody.ServicerCode,
servicer_name: actionBody.ServicerName,
status: 1
}
if (actionBody.CompanyName) {
......@@ -101,49 +101,53 @@ class NeedInfoService extends ServiceBase {
companyName: actionBody.CompanyName
};
}
var newneedinfo = await this.create(datavalue);
if (!newneedinfo) {
return system.getResultFail(-310, "newneedinfo cannot be created");
}
actionBody.NeedNum = need_num;
//生产者------需求推送
var pushobj = {
"actionType": "needSubmit",// Y 功能名称
"actionType": "produceData",// Y 功能名称
"actionBody": {
notifyUrl: "http://192.168.1.113:4011/api/action/need/springBoard",
notifyUrl: "http://192.168.1.113:4011/api/receive/notifyApi/springBoard",
actionType: "needSubmit",
pushUrl: settings.apiconfig.deliveryUrl() + "/entService/consultation/springBoard",
messageBody: actionBody,
identifyCode: "needSubmit"
}
};
this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
var r = await this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
if (r.status < 1) {
return system.getResultFail(-102, "Post error");
}
var newneedinfo = await this.create(datavalue);
if (!newneedinfo) {
return system.getResultFail(-310, "newneedinfo cannot be created");
}
return system.getResultSuccess();
} catch (e) {
console.log(e)
return system.getResultFail(-510, e)
}
}
//需求提交回调
async notifyNeedSubmit(actionBody) {
if (!actionBody.needNum) {
if (actionBody.resultInfo.status < 1) {
return system.getResultFail(-1, "返回值异常")
}
if (!actionBody.messageBody.NeedNum) {
return system.getResultFail(-102, "needNum cannot be empty");
}
var needinfo = await this.findOne({ need_num: needNum });
var needinfo = await this.findOne({ need_num: actionBody.messageBody.NeedNum });
if (!needinfo) {
return system.getResultFail(-102, "needinfo is empty");
}
needinfo.DataValue.status = 2;
try {
await this.update(needinfo.DataValue);
await this.update({ id: needinfo.dataValues.id, status: 2 });
return system.getResultSuccess();
} catch (error) {
return system.getResultFail(-510, error)
}
}
......@@ -153,7 +157,7 @@ class NeedInfoService extends ServiceBase {
}
var sort = [["created_at", 'desc']];
if (searchObj.Sort) {
searchObj.Sort=JSON.parse(searchObj.Sort);
searchObj.Sort = JSON.parse(searchObj.Sort);
if (searchObj.Sort.key == "createdAt") {
searchObj.Sort.key = "created_at";
}
......@@ -192,7 +196,9 @@ class NeedInfoService extends ServiceBase {
}
var solutionInfo = await this.needSolutionDao.findOne(sobj);
if (!solutionInfo) {
return system.getResultFail(-102, "solutionInfo is empty");
solutionInfo = {
dataValues: null
}
}
var rtn = {
needInfo: needInfo.dataValues,
......
......@@ -47,13 +47,13 @@ class NeedSolutionService extends ServiceBase {
if (needsolution.is_refusal != 1) {
return system.getResultFail(-303, "只能修改用户驳回方案");
}
var new_solution_num = await this.getBusUid("NS_");
var updateObj = { id: needsolution.id, is_refusal: 0, solution_num: new_solution_num, solution_content: ab.solutionContent };
// var new_solution_num = await this.getBusUid("NS_");
var updateObj = { id: needsolution.id, is_refusal: 0, solution_content: ab.solutionContent };
var self = this;
return await self.db.transaction(async function (t) {
await self.dao.update(updateObj, t);
await self.needInfoDao.update({ id: needinfo.id, status: "3" }, t);
return system.getResultSuccess(new_solution_num);
return system.getResultSuccess();
});
} else {
......@@ -104,15 +104,10 @@ class NeedSolutionService extends ServiceBase {
if (!solutionInfo) {
return system.getResultFail(-102, "solutionInfo is empty");
}
needInfo.dataValues.status = 2;
solutionInfo.dataValues.is_refusal = 1;
solutionInfo.dataValues.solution_content.refusal_content = actionBody.RefusalContent;
await self.needInfoDao.update(needInfo.dataValues, t);
await self.dao.update(solutionInfo.dataValues, t);
//生产者------方案反馈
var pushobj = {
"actionType": "needClose",// Y 功能名称
"actionType": "produceData",// Y 功能名称
"actionBody": {
notifyUrl: "",
actionType: "needClose",
......@@ -121,7 +116,12 @@ class NeedSolutionService extends ServiceBase {
identifyCode: "needClose"
}
};
self.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
var r = await self.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
if (r.status < 1) {
return system.getResultFail(-102, "Post error");
}
await self.needInfoDao.update({ id: needInfo.dataValues.id, status: 2 }, t);
await self.dao.update({ id: solutionInfo.dataValues.id, is_refusal: 1, refusal_notes: actionBody.RefusalContent }, t);
return system.getResultSuccess();
})
}
......
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
var settings = require("../../../../config/settings");
const {PDICT} = require("../../../../config/platform");
const {PDICT,MsgTemplate} = require("../../../../config/platform");
class OrderDeliveryService extends ServiceBase {
constructor() {
super("order", ServiceBase.getDaoName(OrderDeliveryService));
......@@ -10,6 +10,7 @@ class OrderDeliveryService extends ServiceBase {
this.qualificationCertificateDao = system.getObject("db.order.qualificationCertificateDao");
this.applyInfoDao = system.getObject("db.order.applyInfoDao");
this.execClient = system.getObject("util.execClient");
this.utilsMsgSendSve = system.getObject("service.utilsSve.utilsMsgSendSve");
}
//服务商提交交付信息
async submitDeliveryInfo(pobj){
......@@ -144,9 +145,71 @@ class OrderDeliveryService extends ServiceBase {
this.createQualificationCertificateInfo(ab.orderNum);//创建资质证照信息
this.createApplyInfo(ab.orderNum);//创建申请主体信息
}
//发送短信通知
// this.sendSmsNotification(ab.orderNum,ab.status);
return system.getResultSuccess();
}
/**
* 发送短信通知
* @param {*} orderNum 订单号
* @param {*} status 订单交付状态
*/
async sendSmsNotification(orderNum,status){
try {
//获取订单详情
var orderDetailRes = await this.dao.getOrderDetailByOrderNum(orderNum);
if(orderDetailRes && orderDetailRes.length>0){
var orderdetail = orderDetailRes[0];
var params = {phoneNumber:null,messageBody:null};
params.phoneNumber=orderdetail.order_snapshot && orderdetail.order_snapshot.contactsPhone?orderdetail.order_snapshot.contactsPhone:"13075556693";//联系人手机号
if(params.phoneNumber && orderdetail.product_type ){
var productType=orderdetail.product_type;//产品类型
var product_type_name = orderdetail.product_type_name;//产品类型名称
var productArr = product_type_name.split("/");
if(productArr && productArr.length==4){
product_type_name = productArr[2];
}
if(productType=="/ic/cpreg/" && status==130){
return;
}
var messageBody= null;//短信模板
if(productType.indexOf("/ic/")>=0){//工商产品
messageBody=MsgTemplate.ic.order[status] && MsgTemplate.ic.order[status].sms?MsgTemplate.ic.order[status].sms:"";
}
if(productType.indexOf("/qcfw/")>=0){//资质证照
messageBody=MsgTemplate.qcfw.order[status] && MsgTemplate.qcfw.order[status].sms?MsgTemplate.qcfw.order[status].sms:"";
}
if(messageBody){
messageBody = messageBody.replace(/{productName}/g,product_type_name)
.replace(/{orderNum}/g,orderdetail.order_num);
if(orderdetail.end_time){//过期时间
messageBody = messageBody.replace(/{expirationDate}/g,orderdetail.end_time);
}
var deliverContent = orderdetail.deliver_content;
if(deliverContent){
if(productType=="/ic/cpreg/" && deliverContent.companyInfo && deliverContent.companyInfo.registeredPark){//注册园区
messageBody = messageBody.replace(/{parkName}/g,deliverContent.companyInfo.registeredPark);
}
}
params.messageBody = messageBody;
params.phoneNumber = "13075556693";
console.log(JSON.stringify(params))
this.utilsMsgSendSve.sendMessageByPhone(params);//发送短信
}
}
}
} catch (e) {
this.execClient.execLogs("orderDeliverySve.js/sendSmsNotification(发送短信通知)方法出现异常", {mobile:mobile,orderDeliveryInfo:orderDeliveryInfo}, "", null, e.stack);
}
}
/**
* 创建资质信息
* @param {*} orderNum 订单号
*/
......@@ -266,6 +329,6 @@ class OrderDeliveryService extends ServiceBase {
}
module.exports = OrderDeliveryService;
// var task = new OrderDeliveryService();
// task.createQualificationCertificateInfo("O202006130014").then(d=>{
// task.sendSmsNotification("1111125",120).then(d=>{
// })
......@@ -10,6 +10,7 @@ class OrderInfoService extends ServiceBase {
this.orderStatementDao = system.getObject("db.order.orderStatementDao");
this.orderProductDao = system.getObject("db.order.orderProductDao");
this.txPushLogDao = system.getObject("db.common.txPushLogDao");
this.needInfoDao = system.getObject("db.need.needInfoDao");
}
//订单详情(客户查看订单进度)
async getOrderDetail(pobj) {
......@@ -51,7 +52,14 @@ class OrderInfoService extends ServiceBase {
raw: true
};
var orderdelivery = await this.orderDeliveryDao.model.findOne(deliveryParams);
orderinfo["orderdeliveryinfo"] = orderdelivery;
orderinfo["orderDeliveryInfo"] = orderdelivery;
var productParams = {
where: { order_num: ab.OrderNum },
attributes: ["time_span", "time_unit", "end_time","product_type","product_type_name"],
raw: true
};
var orderproduct = await this.orderProductDao.model.findOne(productParams);
orderinfo["orderProductInfo"] = orderproduct;
return system.getResultSuccess(orderinfo);
}
//获取订单列表
......@@ -87,6 +95,9 @@ class OrderInfoService extends ServiceBase {
if (!pobj.actionBody.interface || !pobj.actionBody.interface.para) {
return system.getResultFail(-101, "参数错误");
}
if (!pobj.actionBody.logId) {
return system.getResultFail(-101, "参数错误");
}
// var selobj = {
// "version": 1,
// "componentName": "qcbuy",
......@@ -106,6 +117,12 @@ class OrderInfoService extends ServiceBase {
// "spanId": "https://buy.qcloud.com;61911"
// }
// var txorder = this.execPostByTimeOut(selobj, "http://trade.sandbox.com/interfaces/interface.php");
if (!pobj.actionBody.interface.para.dealName || !pobj.actionBody.interface.para.bigDealId) {
return system.getResultFail(-101, "参数异常");
}
pobj.actionBody.interface.para.bigDealId
var txorder = {
"version": 1,
"componentName": "trade",
......@@ -119,52 +136,11 @@ class OrderInfoService extends ServiceBase {
"deals": [
{
"dealId": "6138696",
"dealName": "20170829128463",
"bigDealId": "20170829128464",
"goodsCategoryId": "75",
"goodsDetail": {
"action": "firstyear",
"years": 1,
"timeSpan": 1,
"timeUnit": "y",
"regionId": 1,
"zoneId": "",
"email": "whoisprotect@dnspod.cn",
"productInfo": [
{
"name": "域名",
"value": "lipinhua.com"
}
],
"formInfo": {
"addressType": true,
"businessScope": "演出及经纪业务;组织文化艺术活动;演出票务代理;字画、工艺美术品(金饰品除外)、旅游纪念品的销售;演出器材的销售、租赁;艺术装饰;艺术品展示; 舞台美术、工艺美术品、包装装璜设计、制作。",
"businessType": "公司注册",
"companyName": "breijinhg",
"companyProperties": "有限责任公司",
"contactsName": "111111",
"contactsPhone": "18738988150",
"engagedIndustry": "文化传媒类",
"fullAddress": "",
"isWhether": true,
"memoInfo": "11111111111111111111",
"serviceArea": "北京",
"serviceCode": "110100",
"taxpayerType": "小规模纳税人"
},
"product": {
"productIcon": null,
"productType": "/ic/gsreg/",
"productTypeName": "/工商服务/公司注册/",
"servicerCode": "GSB",
"servicerName": "公司宝"
},
"tpl_id": 1,
"service": "DR_CLUB_NEW",
"resourceId": "",
"domain": "suiyi512.club"
},
"ownerUin": "100001050256",
"dealName": "20190919188291",
"bigDealId": "20190919188291",
"goodsCategoryId": "101630",
"goodsDetail": pobj.actionBody.interface.para.goodsDetail,
"ownerUin": "10628520",
"platform": "1",
"regionId": "1",
"appId": "1254105646",
......@@ -232,13 +208,34 @@ class OrderInfoService extends ServiceBase {
return system.getResultFail(-101, "txorder is error");
}
var txorderdetail = txorder.data.deals[0];
console.log(txorderdetail.goodsDetail,"....txorderdetail.goodsDetail.....1");
console.log(txorderdetail.goodsDetail, "....txorderdetail.goodsDetail.....1");
var self = this;
var corder = await self.db.transaction(async function (t) {
var oldorder = await self.findOne({})
var isoldsolutionorder = false;
var ispush = true;
var corder = await this.db.transaction(async function (t) {
var oldorder = await self.findOne({ order_num: pobj.actionBody.interface.para.dealName, tx_orders_num: pobj.actionBody.interface.para.bigDealId }, t)
if (oldorder) {
ispush = false;
return system.getResultSuccess();
}
if (txorderdetail.goodsDetail.formInfo.solutionNum) {
var snobj = {
solutionNum: txorderdetail.goodsDetail.formInfo.solutionNum
}
var sql = "SELECT * FROM `b_order_product` where tx_order_snapshot->'$.goodsDetail.formInfo.solutionNum'=:solutionNum;"
var orderproductinfo = await self.customQuery(sql, snobj, t);
if (orderproductinfo && orderproductinfo.length > 0) {
if (orderproductinfo[0].tx_orders_num != pobj.actionBody.interface.para.bigDealId) {
ispush = false;
isoldsolutionorder = true;
}
} else {
await self.needInfoDao.updateByWhere({ status: 4 }, { where: { need_num: txorderdetail.goodsDetail.formInfo.needNum } }, t)
}
}
//创建订单
var txorderdetail = txorder.data.deals[0];
console.log(txorderdetail.goodsDetail,"....txorderdetail.goodsDetail...2");
console.log(txorderdetail.goodsDetail, "....txorderdetail.goodsDetail...2");
var orderobj = {
tx_orders_num: pobj.actionBody.interface.para.bigDealId,
order_num: pobj.actionBody.interface.para.dealName,
......@@ -250,10 +247,16 @@ class OrderInfoService extends ServiceBase {
discount_amount: Number(txorderdetail.goodsPrice.totalCost) - Number(txorderdetail.goodsPrice.realTotalCost),
pay_total_sum: txorderdetail.goodsPrice.realTotalCost || 0,
order_status: 1,
order_status_name: "已支付",
order_status_name: "已付款",
}
if (isoldsolutionorder) {
orderobj.order_status = 320;
orderobj.order_status_name = "已退款";
}
var orderinfo = await self.create(orderobj, t);
if (isoldsolutionorder) {
return system.getResultSuccess();
}
//创建订单产品
var orderProductobj = {
tx_orders_num: pobj.actionBody.interface.para.bigDealId,
......@@ -289,21 +292,27 @@ class OrderInfoService extends ServiceBase {
pay_total_sum: txorderdetail.goodsPrice.realTotalCost
}
await self.orderStatementDao.create(orderPayobj, t);
var txPushLoginfo=await self.txPushLogDao.findOne({deal_name:pobj.actionBody.interface.para.dealName});
if(!txPushLoginfo){
var txPushLoginfo = await self.txPushLogDao.findOne({ deal_name: pobj.actionBody.interface.para.dealName });
if (!txPushLoginfo) {
return system.getResultFail(-101, "txPushLoginfo is error");
}
txPushLoginfo.dataValues.push_status=0;
await self.txPushLogDao.update(txPushLoginfo.dataValues,t);
txPushLoginfo.dataValues.push_status = 0;
await self.txPushLogDao.update(txPushLoginfo.dataValues, t);
return system.getResultSuccess();
});
if (corder.status > 0) {
await self.txPushLogDao.update({ id: pobj.logId, push_status: 1 });
}
if (!ispush) {
return system.getResultSuccess();
}
//生产者------订单推送
var pushobj = {
"actionType": "orderSubmit",// Y 功能名称
"actionType": "produceData",// Y 功能名称
"actionBody": {
notifyUrl: "http://192.168.1.113:4011/api/action/order/springBoard",
actionType: "orderSubmit",
pushUrl: settings.apiconfig.opPushUrl() + "/entService/consultation/springBoard",
pushUrl: settings.apiconfig.deliveryUrl() + "/entService/order/springBoard",
messageBody: {
"txOrderNum": pobj.actionBody.interface.para.bigDealId,
"orderNum": pobj.actionBody.interface.para.dealName,
......@@ -315,13 +324,18 @@ class OrderInfoService extends ServiceBase {
"contactsName": txorderdetail.goodsDetail.formInfo.contactsName,
"contactsMoblie": txorderdetail.goodsDetail.formInfo.contactsMoblie,
"productType": txorderdetail.goodsDetail.product.productType,
"order_snapshot": txorderdetail.goodsDetail.formInfo
"productTypeName": txorderdetail.goodsDetail.product.productTypeName,
"txPriceCode": txorderdetail.goodsDetail.product.txPriceCode,
"realTotalCost": txorderdetail.goodsPrice.realTotalCost,
"orderSnapshot": txorderdetail.goodsDetail.formInfo
},
identifyCode: "orderSubmit"
}
};
this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
var r = await this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
if (r.status < 1) {
return system.getResultFail(-102, "Post error");
}
return corder;
}
......@@ -401,12 +415,15 @@ class OrderInfoService extends ServiceBase {
// if()
// priceName = pobj.actionBody.subjectType + pobj.actionBody.taxpayerType;
// }
var p = '%' + priceName + '%';
var sqlobj = {
pathCode: pobj.actionBody.PathCode
pathCode: pobj.actionBody.PathCode,
priceName: p
}
var sql = "select product_code goodsSubType,pid,price_code billingcode from tx_product_price where product_name=:pathCode";
if (priceName) {
sql += " and price_name like '%" + priceName + "%';";
sql += " and price_name like :priceName;";
}
var txprice = await this.customQuery(sql, sqlobj);
if (txprice && txprice.length > 0) {
......@@ -489,7 +506,8 @@ class OrderInfoService extends ServiceBase {
productType: pobj.actionBody.PathCode,
productTypeName: txproductinfo.data.product_type_name,
servicerCode: txproductinfo.data.servicer_code,
servicerName: txproductinfo.data.servicer_name
servicerName: txproductinfo.data.servicer_name,
txPriceCode: billingcode
},
productSnapshot: txobj.interface.para.resInfo[0].goodsDetail
}
......@@ -500,7 +518,7 @@ class OrderInfoService extends ServiceBase {
if (!pobj.actionBody.Info) {
return system.getResultFail(-101, "Info is empty");
}
pobj.actionBody.Info=JSON.parse(pobj.actionBody.Info);
pobj.actionBody.Info = JSON.parse(pobj.actionBody.Info);
if (pobj.actionBody.Info.length < 1) {
return system.getResultFail(-101, "info is empty");
}
......@@ -513,10 +531,10 @@ class OrderInfoService extends ServiceBase {
if (!pobj.actionBody.Info[0].showInfo) {
return system.getResultFail(-101, "showInfo is empty");
}
var goodsCategoryId = 100114;
if (pobj.actionBody.Info[0].product.productType.indexOf("/ic/") < 0) {
goodsCategoryId = 100114;
}
var goodsCategoryId = 101630;
// if (pobj.actionBody.Info[0].product.productType.indexOf("/ic/") < 0) {
// goodsCategoryId = 100114;
// }
var so = {
itemDetails: {
raw_goodsData: [ //raw_goodsData为数组,支持同时购买多个商品
......@@ -532,7 +550,7 @@ class OrderInfoService extends ServiceBase {
payMode: 1, //计费模式,1表示包年包月(预付费)
// goodsDetail内容详见下方文档链接
goodsDetail: {
timeUnit: "m",
timeUnit: "p",
timeSpan: 1,
pid: "11546",//购买商品的pid
productInfo: [] //产品详情,用于展示商品配置详情
......@@ -564,8 +582,227 @@ class OrderInfoService extends ServiceBase {
"url": "https://buy.cloud.tencent.com/order/check",
"param": so
}
await this.test(so)
return system.getResultSuccess(robj);
}
async test(pobj) {
var p = {
"eventId": 697271589,
"componentName": "BillingRoute",
"seqId": "unknown",
"spanId": "http://trade.tencentyun.com;1",
"interface": {
"interfaceName": "qcloud.cbs.CreateCbsInstance",
"para": {
"appId": 123,
"tranId": "20190919188290",
"dealName": Date.now(),
"bigDealId": Date.now(),
"uin": "10628520",
"type": "cbs",
"region": 6,
"operateUin": "10628520",
"payMode": 1,
"projectId": 1019190,
"zoneId": 400001,
"goodsDetail": pobj.itemDetails.raw_goodsData[0].goodsDetail
}
}
}
await this.execPostByTimeOut(p,"http://192.168.1.113:4011/api/action/txapi/springBoard");
return system.getResultSuccess();
}
// async gsOrderSubmit(pobj) {
// if (!pobj.actionBody.Info) {
// return system.getResultFail(-101, "Info is empty");
// }
// pobj.actionBody.Info=JSON.parse(pobj.actionBody.Info);
// if (pobj.actionBody.Info.length < 1) {
// return system.getResultFail(-101, "info is empty");
// }
// if (!pobj.actionBody.Info[0].productSnapshot) {
// return system.getResultFail(-101, "productSnapshot is empty");
// }
// if (!pobj.actionBody.Info[0].product) {
// return system.getResultFail(-101, "product is empty");
// }
// if (!pobj.actionBody.Info[0].showInfo) {
// return system.getResultFail(-101, "showInfo is empty");
// }
// var txorderobj = {
// "version": 1,
// "componentName": "qcbuy",
// "eventId": "n152351534",
// "timestamp": 1496196202296,
// "user": "auto",
// "interface": {
// "interfaceName": "qcloud.Deal.generateDeals",
// "para": {
// "uin": pobj.actionBody.form.UserId,
// "ownerUin": pobj.actionBody.form.UserId,
// "appId": 251007582,
// "goods": [
// {
// "goodsCategoryId": 101630,
// "goodsNum": 1,
// "payMode": 1,
// "regionId": 1,
// "projectId": 0,
// "goodsDetail": {
// "productCode": "p_business_registration",
// "subProductCode": "sp_business_registration_company_registration",
// "productInfo": [
// {
// "name": "公司名称",
// "value": pobj.actionBody.form.companyName
// },
// {
// "name": "注册地址",
// "value": pobj.actionBody.form.fullAddress != "--" ? pobj.actionBody.form.fullAddress : "腾讯云地址",
// },
// {
// "name": "纳税人类型",
// "value": pobj.actionBody.form.taxpayerType
// },
// {
// "name": "公司性质",
// "value": pobj.actionBody.form.companyProperties
// },
// {
// "name": "从事行业",
// "value": pobj.actionBody.form.engagedIndustry
// }
// ],
// "service": "DR_COM_NEW",
// "autoRenewFlag": 0,
// "pid": "1000760",
// "timeSpan": "1",
// "timeUnit": "n",
// "sv_pstn_count": "1",
// "sv_pstn_num_ctd": "2",
// "extparam": {
// "tranId": "xxxxxxxxxxxxxxx"
// }
// }
// }
// ],
// "cpsUin": "1369988980"
// }
// },
// "seqId": "702d4148-9ac0-cb47-21fa-cdee20234ea0"
// }
// var goodsinfo = {
// goodsCategoryId: goodsCategoryId, //商品ID
// regionId: 1, //地域ID
// projectId: 0, //项目ID
// zoneId: 100001, //可用区ID
// goodsNum: 1, //购买数量
// payMode: 1, //计费模式,1表示包年包月(预付费)
// // goodsDetail内容详见下方文档链接
// goodsDetail: {
// timeUnit: "p",
// timeSpan: 1,
// pid: "11546",//购买商品的pid
// productInfo: [] //产品详情,用于展示商品配置详情
// }
// };
// goodsinfo.goodsDetail = pobj.actionBody.Info[0].productSnapshot;
// goodsinfo.goodsDetail.product = pobj.actionBody.Info[0].product;
// goodsinfo.goodsDetail.productInfo = pobj.actionBody.Info[0].showInfo;
// goodsinfo.goodsDetail.formInfo = pobj.actionBody.Info[0].formInfo;
// txorderobj.interface.para.goods.push(goodsinfo);
// if (pobj.actionBody.Info.length >= 2) {
// var newgoodsinfo = JSON.parse(JSON.stringify(goodsinfo));
// newgoodsinfo.goodsDetail.product = pobj.actionBody.Info[1].product;
// newgoodsinfo.goodsDetail = pobj.actionBody.Info[1].productSnapshot;
// newgoodsinfo.goodsDetail.productInfo = pobj.actionBody.Info[1].showInfo;
// newgoodsinfo.goodsDetail.formInfo = pobj.actionBody.Info[1].formInfo;
// txorderobj.interface.para.goods.push(newgoodsinfo);
// }
// if (pobj.actionBody.Info.length == 3) {
// var newgoodsinfo1 = JSON.parse(JSON.stringify(goodsinfo));
// newgoodsinfo1.goodsDetail.product = pobj.actionBody.Info[2].product;
// newgoodsinfo1.goodsDetail = pobj.actionBody.Info[2].productSnapshot;
// newgoodsinfo1.goodsDetail.productInfo = pobj.actionBody.Info[2].showInfo;
// newgoodsinfo1.goodsDetail.formInfo = pobj.actionBody.Info[2].formInfo;
// txorderobj.interface.para.goods.push(newgoodsinfo1);
// }
// var txorderinfo = await this.execPostByTimeOut(txorderobj, "http://trade.sandbox.com/interfaces/interface.php");
// if (txorderinfo.returnValue < 0) {
// return system.getResultFail(-101, "txorderinfo is error");
// }
// var newpobj = pobj;
// pobj.actionBody.product[0].orderNum;
// pobj.actionBody.product[0].orderNum; bigDealId
// newpobj.actionBody.product = pobj.actionBody.product[0];
// newpobj.actionBody.productSnapshot = pobj.actionBody.productSnapshot[0];
// newpobj.actionBody.productInfo = pobj.actionBody.productInfo[0];
// var gsorder = await this.orderCreate(newpobj);
// var kzorder = null;
// if (pobj.actionBody.form.isWhether) {
// newpobj.product = pobj.product[1];
// newpobj.productSnapshot = pobj.productSnapshot[1];
// kzorder = await this.orderCreate(newpobj);
// }
// }
// //订单创建
// async orderCreate(pobj) {
// var actionBody = pobj.actionBody.form;
// if (!actionBody.userId) {
// return system.getResultFail(-101, "user is empty");
// }
// return await self.db.transaction(async function (t) {
// //创建订单
// var orderobj = {
// order_num: actionBody.orderNum,
// need_num: actionBody.needNum || "",
// user_id: actionBody.userId,
// user_name: actionBody.userName || "",
// quantity: actionBody.quantity,
// total_sum: actionBody.totalSum || 0,
// discount_amount: actionBody.discountAmount || 0,
// pay_total_sum: actionBody.payTotalSum || 0,
// refund_sum: actionBody.refundSum || 0,
// order_status: 0,
// order_status_name: "待支付",
// }
// var orderinfo = await self.create(orderobj, t);
// //创建订单产品
// var orderProductobj = {
// order_num: pobj.actionBody.orderNum,
// user_id: actionBody.userId,
// user_name: actionBody.userName || "",
// region_id: actionBody.regionId || 0,
// region_name: actionBody.regionName || "",
// product_icon: actionBody.product.productIcon || 0,
// product_type: actionBody.product.productType || 0,
// product_type_name: actionBody.product.productTypeName || "",
// order_snapshot: actionBody.orderSnapshot || {},
// product_snapshot: actionBody.productSnapshot || {},
// servicer_code: actionBody.product.servicerCode || "",
// servicer_name: actionBody.product.servicerName || "",
// // tx_order_snapshot: actionBody.txOrderSnapshot || {}
// }
// var orderProductinfo = await self.orderProductDao.create(orderProductobj, t);
// // //创建订单交付单
// // var orderDeliveryobj = {
// // order_num: order_num,
// // user_id: actionBody.userId,
// // user_name: actionBody.userName || "",
// // delivery_status: 1,
// // delivery_status_name: "待接单"
// // }
// // var orderDeliveryinfo = await self.orderProductDao.create(orderDeliveryinfo, t);
// return system.getResultSuccess();
// });
// }
}
module.exports = OrderInfoService;
......
......@@ -69,7 +69,7 @@ class UtilsMsgSendService extends AppServiceBase {
var sendResult = await this.sendPhoneMsg(params);
return sendResult;
}
async sendPhoneMsg(params) {
async sendPhoneMsg(obj) {
var params = {
"version": 1,
"caller": "postman",
......@@ -82,14 +82,14 @@ class UtilsMsgSendService extends AppServiceBase {
"themeId": 364,
"tplParams": {
"smsTpl": [
params.messageBody
obj.messageBody
]
},
"receiver": {
"wechatList": [
],
"phoneList": [
params.phoneNumber
obj.phoneNumber
],
"emailList": [
],
......
var settings = {
redis: {
host: "43.247.184.32",
port: 8967,
password: "Gongsibao2018",
db: 5,
},
database: {
dbname: "tx-shop",
user: "write",
password: "write",
config: {
host: '43.247.184.35',
port: 8899,
dialect: 'mysql',
operatorsAliases: false,
pool: {
max: 5,
min: 0,
acquire: 90000000,
idle: 1000000
},
debug: false,
dialectOptions: {
requestTimeout: 999999,
// timezone: '+8:00'
// instanceName:'DEV'
} //设置MSSQL超时时间
}
},
reqEsDevUrl: "http://192.168.4.249:9200/",
reqHomePageDevUrl: "http://zcchannel.apps.com:4003/",
reqAuthUrl: "http://sj.app.com:4002/auth"
};
module.exports = settings;
......@@ -28,7 +28,111 @@ module.exports = {
"310":"部分已退款",
"320":"已退款",
"330":"已作废"},
need_status:{"1":"已提交","2":"待顾问反馈","3":"待用户确认","4":"已完成","5":"已关闭"},
need_status:{1:"已提交",2:"待顾问反馈",3:"待用户确认",4:"已完成",5:"已关闭"},
license_type:{"1":"ICP资质",2:"EDI资质"},
},
MsgTemplate:{
"ic":{
"order":{
"1"://已付款
{
"webinfo":"\n工商订单支付状态变更通知\n尊敬的腾讯云用户,您好!\n您提交的{productName}订单(订单号:{orderNum}),已支付成功,腾讯授权服务商将会与您电话沟通后续办理事宜,请留意接听。\n此致\n腾讯云团队\n",
"sms":"",
"email":""
},
"320"://已退款
{
"webinfo":"\n工商订单支付状态变更通知\n尊敬的腾讯云用户,您好!\n您的{productName}订单(订单号:{orderNum})已完成退款,退款金额预计${3}个工作日内返还。订单详情可在腾讯云官网:费用中心-订单管理中查看。\n此致\n腾讯云团队\n",
"sms":"\n您的{productName}订单(订单号:{orderNum})已完成退款,退款金额预计${3}个工作日内返还。订单详情可在腾讯云官网:费用中心-订单管理中查看。\n",
"email":"\n工商订单支付状态变更通知\n尊敬的腾讯云用户,您好!\n您的{productName}订单(订单号:{orderNum})已完成退款,退款金额预计${3}个工作日内返还。订单详情可在腾讯云官网:费用中心-订单管理中查看。\n此致\n腾讯云团队\n"
},
"179":{//即将到期
"webinfo":"\n工商服务到期提醒\n尊敬的腾讯云用户,您好!\n您的{productName}订单将于{expirationDate}正式到期,截至目前仅剩{timeRemaining}天。为了不影响您的正常使用,请登录腾讯云官网费用中心-续费管理及时续费;若您已开通自动续费功能,请保证账户余额充足。\n此致\n腾讯云团队\n",
"sms":"\n您的{productName}订单将于{expirationDate}正式到期,截至目前仅剩{timeRemaining}天。为了不影响您的正常使用,请登录腾讯云官网费用中心-续费管理及时续费;若您已开通自动续费功能,请保证账户余额充足。\n",
"email":"\n工商服务到期提醒\n尊敬的腾讯云用户,您好!\n您的{productName}订单将于{expirationDate}正式到期,截至目前仅剩{timeRemaining}天。为了不影响您的正常使用,请登录腾讯云官网费用中心-续费管理及时续费;若您已开通自动续费功能,请保证账户余额充足。\n此致\n腾讯云团队\n",
},
"180":{//已到期
"webinfo":"\n工商服务到期提醒\n尊敬的腾讯云用户,您好!\n您的{productName}订单已于{expirationDate}正式到期,逾期未续费,将不再为您提供{productName}服务。若您扔需要该服务可进入腾讯云工商服务网站再次购买。如已缴费请忽略此信息。\n此致\n腾讯云团队\n",
"sms":"\n您的{productName}订单已于{expirationDate}正式到期,逾期未续费,将不再为您提供{productName}服务。若您扔需要该服务可进入腾讯云工商服务网站再次购买。如已缴费请忽略此信息。\n",
"email":"\n工商服务到期提醒\n尊敬的腾讯云用户,您好!\n您的{productName}订单已于{expirationDate}正式到期,逾期未续费,将不再为您提供{productName}服务。若您扔需要该服务可进入腾讯云工商服务网站再次购买。如已缴费请忽略此信息。\n此致\n腾讯云团队\n"
},
"130":{//工商审核环节
"webinfo":"\n工商服务进度通知\n尊敬的腾讯云用户,您好!\n您购买的{productName}订单(订单号:{orderNum})已提交至工商行政管理局审核,审核结果我们会及时为您更新通知,感谢您的信任。\n此致\n腾讯云团队\n",
"sms":"\n您购买的{productName}订单(订单号:{orderNum})已提交至工商行政管理局审核,审核结果我们会及时为您更新通知,感谢您的信任。\n",
"email":""
},
"120":{//园区入驻审核
"webinfo":"\n工商服务进度通知\n尊敬的腾讯云用户,您好!\n您购买的{productName}订单(订单号:{orderNum})已提交至{parkName}园区审核,审核结果我们会及时为您更新通知,感谢您的信任。\n此致\n腾讯云团队\n",
"sms":"\n您购买的{productName}订单(订单号:{orderNum})已提交至{parkName}园区审核,审核结果我们会及时为您更新通知,感谢您的信任。\n",
"email":""
},
"30":{//已交付
"webinfo":"\n工商服务进度通知\n尊敬的腾讯云用户,您好!\n您购买的{productName}订单(订单号:{orderNum})已为您办理交付,感谢您的信任。\n此致\n腾讯云团队\n",
"sms":"\n您购买的{productName}订单(订单号:{orderNum})已为您办理交付,感谢您的信任。\n",
"email":""
},
"150":{//证件邮寄环节
"webinfo":"\n工商服务进度通知\n尊敬的腾讯云用户,您好!\n您购买的{productName}相关交付物,顾问已按您提供的地址为您邮寄(物流公司:{logisticsCompany},运单号:{waybillNo}),请注意查收,感谢您的信任。\n此致\n腾讯云团队\n",
"sms":"\n您购买的{productName}相关交付物,顾问已按您提供的地址为您邮寄(物流公司:{logisticsCompany},运单号:{waybillNo}),请注意查收,感谢您的信任。\n",
"email":""
}
},
"need":{
"3":{//待用户确认
"webinfo":"\n工商服务进度通知\n尊敬的腾讯云用户,您好!\n顾问已根据您的需求为您提交了{productName}方案,为了尽快为您办理入驻,请您登录腾讯云官网确认并完成支付,感谢您的信任。\n此致\n腾讯云团队\n",
"sms":"\n顾问已根据您的需求为您提交了{productName}方案,为了尽快为您办理入驻,请您登录腾讯云官网确认并完成支付,感谢您的信任。\n",
"email":""
},
},
"others":{
}
},
"qcfw":{
"order":{
"1"://已付款
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),已支付成功,腾讯授权服务商将会与您电话沟通后续申请事宜,请留意接听。"
},
"80"://递交材料中
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),顾问已准备好申请材料,请尽快登录控制台确认申请材料。"
},
"90"://工信部处理中
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),顾问已帮您提交申请材料至行政审核单位,申办周期较长,请您关注办理进度,耐心等待。"
},
"179":{//即将到期
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})有资质即将到期(资质编号:{qcNo};资质类型:{productName}),请前往控制台立即续期。"
},
"150":{//证件邮寄环节
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),纸质版证书已寄出(快递单号:{waybillNo};快递公司:{logisticsCompany}),请注意查收。"
},
"170"://"已完成",
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),服务已完成,感谢您的使用。"
},
"190"://关闭交付
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})提交的{productType}订单(申请类型:{productName}申请;申请地区:{area}),服务已关闭,感谢您的使用。"
},
"210"://已交付
{
"sms":"尊敬的腾讯云用户,您好!\n您的腾讯云账号(账号 ID:{userId},昵称:{userName})购买的资质年报服务(资质编号:{qcNo};资质类型:{productName}),本年度已申报,请前我的资质证照查看。"
}
},
"need":{
}
},
}
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ var settings = {
return "http://60.205.209.94:4019/api/queueAction/producer/springBoard";
},
opPushUrl: function () {
return "http://192.168.1.128/api/queueAction/producer/springBoard";
return "http://192.168.1.128:4018/api/queueAction/producer/springBoard";
},
deliveryUrl: function () {
return "http://tx.g.com:8000";
......
......@@ -8,9 +8,9 @@
1. [商城询价接口](#SelPrice2TX)
1. [用户获取概览数据](#GetOverviewInfoByUser)
1. [立即购买](#SubmitGoodsinfo)
1. [需求提交](#NeedSubmit)
1. [需求列表](#NeedList)
1. [需求详情](#NeedDetail)
1. [需求提交](#SubmitNeed)
1. [需求列表](#GetNeedList)
1. [需求详情](#GetNeedDetail)
1. [根据交付状态获取订单列表](#GetOrderListByStatus)
1. [关闭需求](#RefusalSolution)
1. [我的资质证照列表](#GetQualificationCertificateListByUserAndType)
......@@ -173,13 +173,15 @@
"DiscountAmount": 0,
"PayTotalSum": 300,
"RefundSum": 0,
"PayTime": null,
"OrderStatus": 1,
"Notes": "第一单",
"CreatedAt": "2020-06-03T10:17:28.000Z",
"UpdatedAt": null,
"Orderdeliveryinfo": "{\"deliver_content\":{\"agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36\",\"userid\":\"13\",\"bizpath\":\"/deliverManage/cmpBizDeliverCase\",\"baseInfo\":{\"isVirtual\":\"\",\"isWhether\":\"\",\"payStatus\":\"已交付\",\"contactsName\":\"wangyongfei1122\",\"contactsPhone\":\"23456789\"},\"clientIp\":\"192.168.1.199\",\"username\":\"wangyongfei\",\"classname\":\"bizchance.deliverybillCtl\",\"company_id\":\"11\",\"companyInfo\":{\"spareName\":[\"兴业1\",\"兴业2\",\"兴业3\"],\"spareName1\":\"兴业1\",\"spareNames\":[{\"value\":\"兴业2\",\"status\":1},{\"value\":\"兴业3\",\"status\":1}],\"addressType\":\"practical\",\"companyName\":\"兴业有限公司\",\"fullAddress\":\"发发地方\",\"serviceArea\":\"shanghai\",\"taxpayerType\":\"generalTaxpayer\",\"businessScope\":\"演出及经纪业务;组织文化艺术活动;演出票务代理;字画、工艺美术品(金饰品除外)、旅游纪念品的销售;演出器材的销售、租赁;艺术装饰;艺术品展示;舞台美术、工艺美术品、包装装璜设计、制作。\",\"registeredDate\":\"2020-06-16\",\"engagedIndustry\":\"culturalMedia\",\"operatingPeriod\":\"发到付\",\"companyProperties\":\"limitedLiabilityCompany\",\"registeredCapital\":80,\"reserveProportion\":79},\"deliverInfo\":{\"isVirtual\":\"\",\"isWhether\":\"\",\"payStatus\":\"已交付\",\"contactsName\":\"张三\",\"contactsPhone\":\"13800138000\"},\"contactsInfo\":{\"contactsName\":\"wangyongfei1122\",\"contactsPhone\":\"23456789\"},\"positionInfo\":{\"positionData\":[{\"fixedPhone\":\"2345678\",\"mailboxInfo\":\"2839273\",\"mobilePhone\":\"45678\",\"persionName\":\"附近的酸辣粉\",\"functionInfo\":\"发链接\",\"houseAddress\":\"的激发了肯德基\"}]},\"deliverNumber\":\"1111115\",\"registeredInfo\":{\"registeredDate\":\"2020-06-16\",\"registeredCapital\":80,\"reserveProportion\":79},\"contributionInfo\":{\"contributionData\":[{\"phoneNumber\":\"1234567\",\"contactAddress\":\"房间爱老师肯定放假啦\",\"hareholderName\":\"兴业\",\"contributionAmount\":\"80\",\"IdentificationNumber\":\"2345678\",\"contributionProportion\":\"10\"}]}},\"created_at\":\"2020-06-12T16:19:53.000Z\",\"updated_at\":\"2020-06-17T08:16:34.000Z\",\"delivery_status\":130,\"delivery_status_name\":\"工商审核环节\"}"
"OrderDeliveryInfo": "{\"deliver_content\":{\"agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36\",\"userid\":\"13\",\"bizpath\":\"/deliverManage/cmpBizDeliverCase\",\"baseInfo\":{\"isVirtual\":\"\",\"isWhether\":\"\",\"payStatus\":\"已交付\",\"contactsName\":\"wangyongfei1122\",\"contactsPhone\":\"23456789\"},\"clientIp\":\"192.168.1.199\",\"username\":\"wangyongfei\",\"classname\":\"bizchance.deliverybillCtl\",\"company_id\":\"11\",\"companyInfo\":{\"spareName\":[\"兴业1\",\"兴业2\",\"兴业3\"],\"spareName1\":\"兴业1\",\"spareNames\":[{\"value\":\"兴业2\",\"status\":1},{\"value\":\"兴业3\",\"status\":1}],\"addressType\":\"practical\",\"companyName\":\"兴业有限公司\",\"fullAddress\":\"发发地方\",\"serviceArea\":\"shanghai\",\"taxpayerType\":\"generalTaxpayer\",\"businessScope\":\"演出及经纪业务;组织文化艺术活动;演出票务代理;字画、工艺美术品(金饰品除外)、旅游纪念品的销售;演出器材的销售、租赁;艺术装饰;艺术品展示;舞台美术、工艺美术品、包装装璜设计、制作。\",\"registeredDate\":\"2020-06-16\",\"engagedIndustry\":\"culturalMedia\",\"operatingPeriod\":\"发到付\",\"companyProperties\":\"limitedLiabilityCompany\",\"registeredCapital\":80,\"reserveProportion\":79},\"deliverInfo\":{\"isVirtual\":\"\",\"isWhether\":\"\",\"payStatus\":\"已交付\",\"contactsName\":\"张三\",\"contactsPhone\":\"13800138000\"},\"contactsInfo\":{\"contactsName\":\"wangyongfei1122\",\"contactsPhone\":\"23456789\"},\"positionInfo\":{\"positionData\":[{\"fixedPhone\":\"2345678\",\"mailboxInfo\":\"2839273\",\"mobilePhone\":\"45678\",\"persionName\":\"附近的酸辣粉\",\"functionInfo\":\"发链接\",\"houseAddress\":\"的激发了肯德基\"}]},\"deliverNumber\":\"1111115\",\"registeredInfo\":{\"registeredDate\":\"2020-06-16\",\"registeredCapital\":80,\"reserveProportion\":79},\"contributionInfo\":{\"contributionData\":[{\"phoneNumber\":\"1234567\",\"contactAddress\":\"房间爱老师肯定放假啦\",\"hareholderName\":\"兴业\",\"contributionAmount\":\"80\",\"IdentificationNumber\":\"2345678\",\"contributionProportion\":\"10\"}]}},\"created_at\":\"2020-06-12T16:19:53.000Z\",\"updated_at\":\"2020-06-17T08:16:34.000Z\",\"delivery_status\":130,\"delivery_status_name\":\"工商审核环节\"}",
"OrderProductInfo": "{\"time_span\":null,\"time_unit\":null,\"end_time\":null}"
},
"RequestId": "bba7f390-b29c-11ea-97f7-efd638e57201"
"RequestId": "16c9d3d0-b43a-11ea-9bcc-11a1d3415630"
}
}
......@@ -515,13 +517,13 @@
}
```
## **<a name="NeedSubmit"> 创建需求</a>**
## **<a name="SubmitNeed"> 创建需求</a>**
[返回到目录](#menu)
##### URL
[/api/action/need/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 功能模块 Action:NeedSubmit
#### 功能模块 Action:SubmitNeed
#### 参数说明
......@@ -542,7 +544,7 @@
#### 参数示例
``` javascript
{
"Action": "needSubmit",
"Action": "SubmitNeed",
"ActionBody": {
"UserId": "011",
"ContactsMoblie":"17610163852",
......@@ -566,13 +568,13 @@
}
```
## **<a name="NeedList"> 需求列表</a>**
## **<a name="GetNeedList"> 需求列表</a>**
[返回到目录](#menu)
##### URL
[/api/action/need/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 功能模块 Action:NeedList
#### 功能模块 Action:GetNeedList
#### 参数说明
......@@ -591,7 +593,7 @@
#### 参数示例
``` javascript
{
"Action": "NeedList",
"Action": "GetNeedList",
"ActionBody": {
"UserId": "011",
"PageNo":"1",
......@@ -618,13 +620,13 @@
}
```
## **<a name="needDetail"> 需求详情</a>**
## **<a name="GetNeedDetail"> 需求详情</a>**
[返回到目录](#menu)
##### URL
[/api/action/need/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 功能模块 Action:NeedDetail
#### 功能模块 Action:GetNeedDetail
#### 参数说明
......@@ -636,7 +638,7 @@
#### 参数示例
``` javascript
{
"Action": "NeedDetail",
"Action": "GetNeedDetail",
"ActionBody": {
"NeedNum": "202006100003"
}
......
......@@ -128,7 +128,7 @@ order_snapshot | Y | string | 500 | 订单快照(json转字符串)
"contactsName":"",
"contactsMoblie":"",
"productType":""
"order_snapshot":{}
"orderSnapshot":{}
}
}
```
......@@ -154,15 +154,16 @@ order_snapshot | Y | string | 500 | 订单快照(json转字符串)
参数名 | 必须 | 字段类型 | 长度限制 | 说明
-|-|-|-|-
needNum | Y | string | 100 | 需求号
refusalContent | Y | string | 100 | 备注信息
NeedNum | Y | string | 100 | 需求号
RefusalContent | Y | string | 100 | 备注信息
SolutionNum | Y | string | 100 | 方案号
``` javascript
{
"actionType": "needClose",
"actionBody": {
"needNum":"",
"refusalContent":"" //描述
"NeedNum":"",
"RefusalContent":"", //描述
"SolutionNum":""
}
}
......
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