Commit c57e19ab by 宋毅

tj

parent fece029b
var APIBase = require("../../api.base");
var system = require("../../../system");
class NeedOrderAPI extends APIBase {
constructor() {
super();
this.needinfoSve = system.getObject("service.dbneed.needinfoSve");
}
/**
* 接口跳转-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 = null;
pobj.actionBody["user"]=req.user;
pobj.actionBody["app"]=req.app;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "subNeed"://提交需求
opResult = await this.needinfoSve.subNeed(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = NeedOrderAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class PushBusinessAPI extends APIBase {
constructor() {
super();
this.toolSve = system.getObject("service.trademark.toolSve");
this.toolApi = system.getObject("api.tool.toolApi");
this.appSourceList = {
"tm_ali": "阿里云应用", "ic_ali": "阿里云应用", "icp_ali": "阿里云应用",
"tm_jdyun": "京东云应用", "ic_jdyun": "京东云应用", "icp_jdyun": "京东云应用",
"tm_1688": "1688应用", "ic_1688": "1688应用", "icp_1688": "1688应用",
};
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
var self = this;
if (!req.app) {
return system.getResult(null, "app is not empty");
}
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
switch (pobj.actionProcess) {
case "tm_1688":
opResult = await self.opActionProcess(pobj.actionProcess);
break;
case "ic_1688":
opResult = await this.toolSve.getNclByLikeNameAndNcl(action_body);
break;
case "icp_1688":
opResult = await this.toolSve.word2pic(action_body);
break;
case "tm_ali":
opResult = await this.toolSve.getNcl(action_body);
break;
case "ic_ali":
opResult = await this.toolSve.getNclByLikeNameAndNcl(action_body);
break;
case "icp_ali":
opResult = await this.toolSve.word2pic(action_body);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async opActionProcess(pushBusinessSource, action_type, action_body) {
if (!pobj.actionBody.idempotentId) {
return system.getResult(null, "idempotentId is not empty");
}//接入方业务产品 ID
if (!pobj.actionBody.idempotentSource) {
return system.getResult(null, "idempotentSource is not empty");
}//业务来源(ali、jdyun、1688)
if (!pobj.actionBody.idempotentSourceName) {
return system.getResult(null, "idempotentSourceName is not empty");
}//业务来源名称 京东云应用、阿里云应用、1688应用
if (!pobj.actionBody.phone) {
return system.getResult(null, "phone is not empty");
}//手机号
if (!pobj.actionBody.orderPrice) {
return system.getResult(null, "orderPrice is not empty");
}//订单金额 double
if (!pobj.actionBody.productId) {
return system.getResult(null, "productId is not empty");
}//订单金额 string
if (!pobj.actionBody.productQuantity) {
return system.getResult(null, "productQuantity is not empty");
}//产品数量 int
// city、companyName
var opResult = null;
switch (action_type) {
case "fqdev"://dev
result = await this.opActionProcess(pushBusinessSource, reqEnv, action_body);
break;
case "fqProd"://prod
result = await this.opActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = PushBusinessAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class TmOrderAPI extends APIBase {
constructor() {
super();
this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils");
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
this.customerinfoSve = system.getObject("service.dborder.customerinfoSve");
this.customercontactsSve = system.getObject("service.dborder.customercontactsSve");
this.trademarkSve = system.getObject("service.dbtrademark.trademarkSve");
}
/**
* 接口跳转-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 = null;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
action_body.app = { id: 1, appPayType: "00", appDataOpType: "00" };
action_body.user = { id: 1, app_id: 1, nickname: "测试用户" };
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "addOrder"://商标提报
opResult = await this.ordertmproductSve.addTmOrder(action_body);
break;
case "getTmOrderList"://商标交付列表
opResult = await this.ordertmproductSve.getTmOrderList(action_body);
break;
case "getTmOrderInfo"://商标交付信息
opResult = await this.ordertmproductSve.getTmOrder(action_body);
break;
case "getTmApplyInfo"://商标订单-申请信息
opResult = await this.ordertmproductSve.getTmApply(action_body);
break;
case "getTmNclList"://商标订单-商标尼斯信息
opResult = await this.ordertmproductSve.getTmNclList(action_body);
break;
case "updateTmInfo"://修改商标订单-商标信息修改
opResult = await this.trademarkSve.updateTmInfo(action_body);
break;
case "updateNclInfo"://修改商标订单-商标尼斯信息修改
opResult = await this.trademarkSve.updateNclInfo(action_body);
break;
case "updateContacts"://修改商标订单-修改商标交付单联系人
opResult = await this.customercontactsSve.updateContacts(action_body);
break;
case "updateCustomerInfo"://修改商标订单-修改申请人信息
opResult = await this.customerinfoSve.updateCustomerInfo(action_body);
break;
case "updateOfficial"://修改商标订单-修改交官文件
opResult = await this.customerinfoSve.updateOfficial(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = TmOrderAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class TmTransactionAPI extends APIBase {
constructor() {
super();
}
/**
* 接口跳转-POST请求
* actionProcess 执行的流程
* actionType 执行的类型
* actionBody 执行的参数
*/
async springboard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.action_type) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "addOrder"://添加订单
// opResult = await this.orderSve.addOrder(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = TmTransactionAPI;
\ No newline at end of file
...@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => { ...@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => {
updatedAt: false, updatedAt: false,
//freezeTableName: true, //freezeTableName: true,
// define the table's name // define the table's name
tableName: 'zc_op_log', tableName: 'zcapi_op_log',
validate: { validate: {
}, },
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("app", {
name: DataTypes.STRING(100), // 应用名称
appDataOpType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_data_op_type),
}, // 应用数据操作类型:00独立,10全委托,20部分委托
appPayType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type),
}, // 支付类型:00第三方支付,10平台代收款
contactName : DataTypes.STRING(30), // 联系人姓名
contactMobile: DataTypes.STRING(30), // 联系人手机
contactEmail : DataTypes.STRING(30), // 联系人邮箱
uappKey : DataTypes.STRING(64), // 平台应用key
appSecret : DataTypes.STRING(64), // 密钥信息,用于进行签名请求接口
status : DataTypes.INTEGER, // 状态 0禁用 1启用
channelAppId : DataTypes.STRING(64), // 渠道appID
channelAppKey: DataTypes.STRING(64), // 渠道appKey
notes : DataTypes.STRING, // 备注
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app',
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}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("appproduct", {
app_id :DataTypes.STRING(50),// 应用id
itemCode :DataTypes.STRING(100),// 产品编码
itemName :DataTypes.STRING(100),// 产品名称
picUrl :DataTypes.STRING(500),// 产品图片地址
channelItemCode :DataTypes.STRING(100),// 渠道产品编码
channelItemName :DataTypes.STRING(100),// 渠道产品名称
status :DataTypes.BOOLEAN,// 状态 0禁用 1启用
verifyPrice :DataTypes.BOOLEAN,// 是否验证价格 0不验证 1验证
proPrice :DataTypes.DOUBLE,// 产品价格
serviceCharge :DataTypes.DOUBLE,// 服务费
publicExpense :DataTypes.DOUBLE,// 官费
rateConfig :DataTypes.DECIMAL(12, 2),// 税率
discountsRateConfig :DataTypes.DECIMAL(12, 2),// 优惠税率
channelProfitRate :DataTypes.DECIMAL(12, 2),// 渠道利润分成比率(只分订单中毛利润总额的分成)
sort :DataTypes.INTEGER,// 排序
productType_id :DataTypes.INTEGER,// 产品类型Id
productOneType_id :DataTypes.INTEGER,// 产品大类Id
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app_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}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("appuser", {
app_id : DataTypes.INTEGER, // 应用id
channelUserId : DataTypes.STRING(64), // 渠道用户ID
channelUserName : DataTypes.STRING(64), // 渠道用户登录名
userMoblie : DataTypes.STRING(20), // 用户手机号
nickname : DataTypes.STRING(50), // 昵称
orgName : DataTypes.STRING(255), // 组织结构名称
orgPath : DataTypes.STRING(255), // 组织结构路径
isEnabled : DataTypes.INTEGER, // 是否启用
lastLoginTime : DataTypes.DATE, // 上次登录时间
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app_user',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("needinfo", {
app_id :DataTypes.INTEGER, //
needNo :DataTypes.STRING(64), //需求单号
needDesc :DataTypes.STRING(255), //
needUserMoblie :DataTypes.STRING(20), //
notes :DataTypes.STRING(255), //
opNotes :DataTypes.STRING(500), //
channelUserName :DataTypes.STRING(50), // 渠道用户登录名
auditStatus :DataTypes.STRING(10), //确认状态:00待确认,10确认通过,20确认不通过
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, //
creator :DataTypes.STRING(50), //
updator :DataTypes.STRING(50), //
owner :DataTypes.STRING(50), //
ownerMoblie :DataTypes.STRING(20), //
itemCode :DataTypes.STRING(80), //产品码
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_needinfo',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customercontacts", {
app_id :DataTypes.INTEGER, //
customerinfo_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
mobile :DataTypes.STRING(20), //
email :DataTypes.STRING(50), //
tel :DataTypes.STRING(20), //
fax :DataTypes.STRING(50), //
name :DataTypes.STRING(1000), // 联系人
code :DataTypes.STRING(100), // 暂时没有用
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customercontacts',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customerinfo", {
customerTypeName :DataTypes.STRING(50), //
customerType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.customer_type),
set: function (val) {
this.setDataValue("customerType", val);
this.setDataValue("customerTypeName", uiconfig.config.pdict.customer_type[val]);
},
defaultValue: "0",
}, //申请企业类型: ent:企业,person:个人
identityCardPic :DataTypes.STRING(500), // 身份证图片
identityCardPdf :DataTypes.STRING(500), // 身份证pdf
businessLicensePic :DataTypes.STRING(500), // 营业执照图片
businessLicensePdf :DataTypes.STRING(500), // 营业执照pdf
name :DataTypes.STRING(1000), // 公司名称或个人名称
code :DataTypes.STRING(100), // 公司统一社会代码
app_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
applyAddr :DataTypes.STRING, // 申请地址
applyArea :DataTypes.STRING(50), // 存储省市编码
province :DataTypes.STRING(50), // 省
city :DataTypes.STRING(50), // 市
identityCardNo :DataTypes.STRING(50), // 身份证号
notes :DataTypes.STRING, // 备注
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, // 拥有者
zipCode :DataTypes.STRING(20), //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customerinfo',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("order", {
app_id :DataTypes.INTEGER,//
orderNo :DataTypes.STRING(64),// 订单号
channelServiceNo :DataTypes.STRING(64),// 渠道服务单号
channelOrderNo :DataTypes.STRING(1024),// 渠道订单号列表,多个以,隔开
itemCode :DataTypes.STRING(64),//
itemName :DataTypes.STRING(100),//
channelItemCode :DataTypes.STRING(64),// 渠道产品编码
channelItemName :DataTypes.STRING,// 渠道产品名称
payTime :DataTypes.DATE,// 渠道有支付时间则用渠道的支付时间
salesNum :DataTypes.INTEGER,// 项目订单数量(即服务项目的倍数,默认值为1)
salesDiliverNum :DataTypes.INTEGER,// 项目订单交付数量(即与项目订单数量相对应)
minitermNum :DataTypes.INTEGER,// 订单小项数量
minitermDiliverNum :DataTypes.INTEGER,// 订单小项交付数量
orderType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_type),
},// 订单类型,zzdd: 自主订单,dkxd: 代客下单
orderPayStatusName: DataTypes.STRING(50),//
orderPayStatus :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_pay_status),
set: function (val) {
this.setDataValue("orderPayStatus", val);
this.setDataValue("orderPayStatusName", uiconfig.config.pdict.order_pay_status[val]);
}
},// 订单付款状态dfk: 待付款, zfpz: 已上传支付凭证, yfk: 已付款, ddqx: 订单取消, tkclz: 退款处理中, bfytk: 部分已退款, ytk: 已退款,zfshbtg:支付审核不通过
totalServiceCharge :DataTypes.DECIMAL(12, 2),// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :DataTypes.DECIMAL(12, 2),// 官费总额(产品配置的官费*订单件数)
totalDiscounts :DataTypes.DECIMAL(12, 2),// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
totalTaxes :DataTypes.DECIMAL(12, 2),// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalSum :DataTypes.DECIMAL(12, 2),// 订单总额(产品价格×优惠费率×订单件数)
refundSum :DataTypes.DECIMAL(12, 2),// 退款金额
totalProfitSum :DataTypes.DECIMAL(12, 2),// 订单毛利润总额(订单总额-官费总额)
pfProfitSum :DataTypes.DECIMAL(12, 2),// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :DataTypes.DECIMAL(12, 2),// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit :DataTypes.DECIMAL(12, 2),// 平台结算渠道利润,0否,1是
opNotes :DataTypes.STRING,// 备注
appPayType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type),
},// 支付类型:00第三方支付,10平台代收款
createuser_id :DataTypes.INTEGER,//
updateuser_id :DataTypes.INTEGER,//
owner_id :DataTypes.INTEGER,//
creator :DataTypes.STRING(100),//
updator :DataTypes.STRING(100),//
owner :DataTypes.STRING(100),//
ownerMoblie :DataTypes.STRING(20),//
invoiceApplyStatus :DataTypes.STRING(10),// 发票状态:00: 未申请, 10: 已申请,20:已开票
channelUserId :DataTypes.STRING(64), // 渠道用户ID
needNo :DataTypes.STRING(64), // 需求单号
picUrl :DataTypes.STRING(500),// 产品图片地址
productType_id :DataTypes.INTEGER, //产品类型Id
productOneType_id :DataTypes.INTEGER, //产品大类Id
serviceItemSnapshot :DataTypes.TEXT, //产品快照
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderflow", {
sourceOrderNo: DataTypes.STRING(64), // 来源单号
opContent: DataTypes.STRING(1024), // 操作描述
app_id: DataTypes.INTEGER, //
notes: DataTypes.STRING, // 备注
createuser_id: DataTypes.INTEGER, //
isShow: {//是否显示
type: DataTypes.BOOLEAN,
defaultValue: false,
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_orderflow',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("ordertmproduct", {
app_id: DataTypes.INTEGER,//
productType_id: DataTypes.INTEGER,//产品类型Id
productOneType_id: DataTypes.INTEGER,//产品大类Id
itemCode: DataTypes.STRING(64),//产品编码
itemName: DataTypes.STRING(100),//产品名称
tmName: DataTypes.STRING(1000),//商标名称
tmType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_type),
},//p:普通商标,j:集体商标,z:证明商标,t:特殊商标
tmFormTypeName: DataTypes.STRING(50),//
tmFormType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_form_type),
set: function (val) {
this.setDataValue("tmFormType", val);
this.setDataValue("tmFormTypeName", uiconfig.config.pdict.tm_form_type[val]);
}
},//商标类型形式:1:立体,3:字,4:图,5:字图,6:颜色,7:彩色
nclOneCodes: DataTypes.STRING,//尼斯大类列表:格式以,隔开
payStatusName: DataTypes.STRING(50),//
payStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_service_pay_status),
set: function (val) {
this.setDataValue("payStatus", val);
this.setDataValue("payStatusName", uiconfig.config.pdict.order_service_pay_status[val]);
}
},//支付状态:dfk:待付款,yzf:已支付
deliveryStatusName: DataTypes.STRING(50),//
deliveryStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.delivery_status),
set: function (val) {
this.setDataValue("deliveryStatus", val);
this.setDataValue("deliveryStatusName", uiconfig.config.pdict.delivery_status[val]);
}
},//商标交付状态:dsccl:待上传材料,dsh:待审核,ddj:待递交, ydj: 已递交,ywc:已完成
appDataOpType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_data_op_type),
},//应用数据操作类型:00独立,10全委托,20部分委托
deliveryOrderNo: DataTypes.STRING(64),//交付订单号
channelServiceNo: DataTypes.STRING(64),//渠道服务单号
channelOrderNo: DataTypes.STRING(1024),//渠道订单号列表,多个以,隔开
needNo: DataTypes.STRING(64),//需求单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求,20服务商
picUrl: DataTypes.STRING(500), //商标图样
colorizedPicUrl: DataTypes.STRING(500),//商标彩色图样
gzwtsUrl: DataTypes.STRING(500), //盖章委托书
sywjUrl: DataTypes.STRING(500), //声音文件
smwjUrl: DataTypes.STRING(500), //说明文件
channelUserId: DataTypes.STRING(64),//渠道用户ID
notes: DataTypes.STRING(255),//备注
createuser_id: DataTypes.INTEGER,//
updateuser_id: DataTypes.INTEGER,//
auditor_id: DataTypes.INTEGER,//
createuser: DataTypes.STRING(100),//
updateuser: DataTypes.STRING(100),//
auditor: DataTypes.STRING(100),//
nclOneCount: DataTypes.INTEGER, // 尼斯大类数量
nclCount: DataTypes.INTEGER, // 尼斯数量
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order_tm_product',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("pushbusiness", {
sourceCode: DataTypes.STRING(100), // 业务来源
sourceName: DataTypes.STRING(100), // 业务来源名称
uappKey: DataTypes.STRING(64), // 平台应用key
aliAppkey: DataTypes.STRING(64), // 阿里网关appkey
aliSecret: DataTypes.STRING(255), // 阿里网关密钥
status: DataTypes.INTEGER, // 状态 0禁用 1启用
pushSveUrl: DataTypes.STRING(500), // 推送服务url
pushProductId: DataTypes.STRING(255), // 推送方产品ID
sveProductId: DataTypes.STRING(255), // 服务方产品ID
notes: DataTypes.STRING(255), // 备注
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_push_business',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tmofficial", {
tmRegistNum :DataTypes.STRING(50), //注册号
officialTypeName :DataTypes.STRING(50), //
officialType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.official_type),
set: function (val) {
this.setDataValue("officialType", val);
this.setDataValue("officialTypeName", uiconfig.config.pdict.official_type[val]);
}
}, //商标官文类型:1: 商标注册申请书, 2: 商标注册申请补正通知书, 3: 商标注册申请受理通知书, 4: 商标注册申请不予受理通知书,
//5: 商标注册同日申请补送使用证据通知书,6: 商标注册同日申请协商通知书商标注册同日申请抽签通知书,
//7: 商标驳回通知书, 8: 商标部分驳回通知书, 9: 商标注册申请初步审定公告通知书,
//10: 商标异议答辩通知书, 11: 异议裁定书, 12: 纸质版商标注册证, 13: 电子版商标注册证
officialFileName :DataTypes.STRING(200), // 官文文件名称
officialFileUrl :DataTypes.STRING(255), // 官文文件地址
notes :DataTypes.STRING , //
name :DataTypes.STRING(1000), //暂时没有用
code :DataTypes.STRING(64), //官文单号(自动生成)
app_id :DataTypes.INTEGER, //
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_tmofficial',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AapService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AapService));
}
}
module.exports=AapService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AppProductService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AppProductService));
}
}
module.exports = AppProductService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AapUserService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AapUserService));
this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils");
}
async loginUser(channelUserId, channelUserName, userMoblie, nickname, orgName, orgPath) {
if (!channelUserId) {
return system.getResult(null, "channelUserId不能为空");
}
var params = {
channelUserId: channelUserId,
channelUserName: channelUserName,
userMoblie: userMoblie,
nickname: nickname,
orgName: orgName,
orgPath: orgPath
}
var userItem = await this.cacheManager["ApiUserCache"].cache(channelUserId, { status: true }, 3000, params);
if (!userItem) {
return system.getResult(null, "用户注册失败");
}
return system.getResultSuccess(userItem);
}
}
module.exports = AapUserService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class NeedInfoService extends ServiceBase {
constructor() {
super("dbneed", ServiceBase.getDaoName(NeedInfoService));
}
async subNeed(obj){
var user = obj.user;
var app = obj.app;
if(!user){
return system.getResultFail(-100, "未知用户");
}
if(!app){
return system.getResultFail(-101, "未知渠道");
}
var needNo=await this.getBusUid("ni");
var needObj={
app_id :app.id,
needNo :needNo,
needDesc :obj.needDesc,
needUserMoblie :obj.needUserMoblie,
notes :obj.notes,
channelUserName :user.channelUserName,
auditStatus :"00",
createuser_id :user.id,
itemCode:obj.itemCode
};
var need = await this.dao.create(needObj);
return system.getResultSuccess(need);
}
}
module.exports=NeedInfoService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class CustomerContactsService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(CustomerContactsService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改商标交付单联系人(订单详情页面)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.name 联系人,obj.mobile 联系电话,obj.email 电子邮箱,obj.tel 座机电话
* obj.user 用户数据
*/
async updateContacts(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var self = this;
return await self.db.transaction(async function (t) {
var contactsObj={deliveryOrderNo:deliveryOrderNo};
if(obj.name){
contactsObj["name"]=obj.name;
}
if(obj.mobile){
contactsObj["mobile"]=obj.mobile;
}
if(obj.email){
contactsObj["email"]=obj.email;
}
if(obj.tel){
contactsObj["tel"]=obj.tel;
}
//修改联系人信息
await self.dao.model.update(contactsObj, { where: { deliveryOrderNo:deliveryOrderNo }, transaction: t });
return system.getResultSuccess();
})
}
}
module.exports=CustomerContactsService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class CustomerInfoService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(CustomerInfoService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改申请人信息(订单详情页面使用)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.customerType 申请人类型,
* obj.name 公司名称或个人名称,
* obj.code 社会统一信用代码,
* obj.applyAddr 公司地址,
* obj.zipCode 邮编
* obj.identityCardPic 身份证图片,
* obj.businessLicensePic 营业执照图片,
* obj.identityCardPdf 身份证pdf,
* obj.businessLicensePdf 营业执照pdf,
* obj.user 用户数据
*/
async updateCustomerInfo(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var customerinfo = await this.dao.model.findOne({
where:{
deliveryOrderNo:deliveryOrderNo
},
raw:true
});
if(!customerinfo || !customerinfo.id){
return system.getResultFail(-104, "未知申请人");
}
var self = this;
return await self.db.transaction(async function (t) {
var ciObj={ id:customerinfo.id,updateuser_id:user.id };
if(obj.customerType){
ciObj["customerType"]=obj.customerType;
}
if(obj.name){
ciObj["name"]=obj.name;
}
if(obj.code){
ciObj["code"]=obj.code;
}
if(obj.applyAddr){
ciObj["applyAddr"]=obj.applyAddr;
}
if(obj.zipCode){
ciObj["zipCode"]=obj.zipCode;
}
if(obj.businessLicensePic){
ciObj["businessLicensePic"]=obj.businessLicensePic;
}
if(obj.identityCardPic){
ciObj["identityCardPic"]=obj.identityCardPic;
}
if(obj.businessLicensePdf){
ciObj["businessLicensePdf"]=obj.businessLicensePdf;
}
if(obj.identityCardPdf){
ciObj["identityCardPdf"]=obj.identityCardPdf;
}
await self.dao.update(ciObj,t);//修改申请人信息
return system.getResultSuccess();
})
}
/**
* 修改交官文件
* @param {*} obj
* obj.deliveryOrderNo 交付单号,
* obj.gzwtsUrl 盖章委托书,
* obj.smwjUrl 说明文件,
* obj.identityCardPic 身份证图片,
* obj.businessLicensePic 营业执照图片,
* obj.identityCardPdf 身份证pdf,
* obj.businessLicensePdf 营业执照pdf,
* obj.user 用户数据
*/
async updateOfficial(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var customerinfo = await this.dao.model.findOne({
where:{
deliveryOrderNo:deliveryOrderNo
},
raw:true
});
if(!customerinfo || !customerinfo.id){
return system.getResultFail(-104, "未知申请人");
}
var self = this;
return await self.db.transaction(async function (t) {
var ciObj={ id:customerinfo.id,updateuser_id:user.id };
if(obj.businessLicensePic){
ciObj["businessLicensePic"]=obj.businessLicensePic;
}
if(obj.identityCardPic){
ciObj["identityCardPic"]=obj.identityCardPic;
}
if(obj.businessLicensePdf){
ciObj["businessLicensePdf"]=obj.businessLicensePdf;
}
if(obj.identityCardPdf){
ciObj["identityCardPdf"]=obj.identityCardPdf;
}
await self.dao.update(ciObj,t);//申请人信息 修改营业执照、身份证文件
var otpObj={
id:ordertmproduct.id,
updateuser_id:user.id,
updateuser:user.nickname
};
if(obj.gzwtsUrl){
otpObj["gzwtsUrl"]=obj.gzwtsUrl;
}
if(obj.smwjUrl){
otpObj["smwjUrl"]=obj.smwjUrl;
}
await self.ordertmproductSve.update(otpObj,t);//商标交付单 修改盖章委托书、说明文件
return system.getResultSuccess();
})
}
}
module.exports=CustomerInfoService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class OrderService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderService));
}
}
module.exports = OrderService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class OrderFlowService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderFlowService));
}
}
module.exports=OrderFlowService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class PushBusinessService extends ServiceBase {
constructor() {
super("dbpush", ServiceBase.getDaoName(PushBusinessService));
this.pushbusinessDao = system.getObject("db.dbpush.pushbusinessDao");
}
async opFqPushBusiness(pushBusinessSource, reqEnv, action_body) {
var item = await this.pushbusinessDao.getItemByUappKey(action_body.app.uappKey, reqEnv);
if (!item) {
return system.getResult(null, "push_business item is not empty");
}
var body = {
idempotentId: item.pushProductId,// 是 接入方业务产品 ID
productId: item.sveProductId,// 是 产品 ID
idempotentSource: item.sourceCode || "tm_1688",// 是 业务来源(ali、jd)
idempotentSourceName: item.sourceName || "1688应用",// 是 阿里,京东
city: action_body.city || "",// 否 所属城市
phone: action_body.phone || "15010929366",// 是 手机号
userId: action_body.userId || "channelUserIdtest01",// 否 用户 ID
companyName: action_body.companyName || "",// 否 公司名称
orderPrice: action_body.phoneaction_body.orderPrice || 899,// 是 订单金额
productQuantity: action_body.productQuantity || 1,// 是 产品数量
};
if (!body.idempotentId) {
return system.getResult(null, "idempotentId is not empty");
}//接入方业务产品 ID
if (!body.idempotentSource) {
return system.getResult(null, "idempotentSource is not empty");
}//业务来源(ali、jdyun、1688)
if (!body.idempotentSourceName) {
return system.getResult(null, "idempotentSourceName is not empty");
}//业务来源名称 京东云应用、阿里云应用、1688应用
if (!body.phone) {
return system.getResult(null, "phone is not empty");
}//手机号
if (!body.orderPrice) {
return system.getResult(null, "orderPrice is not empty");
}//订单金额 double
if (!body.productId) {
return system.getResult(null, "productId is not empty");
}//订单金额 string
if (!body.productQuantity) {
return system.getResult(null, "productQuantity is not empty");
}//产品数量 int
// city、companyName
var aliGateway = system.getObject("util.aliyunClient");
var result = await aliGateway.post(item.aliAppkey, item.aliSecret, item.pushSveUrl, body);
return result;
// if (reqEnv == "fqdev") {
// aliGateway=system.getObject("util.aliyunFqDevClient");
// }
// else if (reqEnv == "fqProd") {
// aliGateway=system.getObject("util.aliyunFqProdClient");
// }
}
}
module.exports = PushBusinessService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TmOfficialService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TmOfficialService));
}
}
module.exports=TmOfficialService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TmStuffService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TmStuffService));
}
}
module.exports=TmStuffService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TradeMarkService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TradeMarkService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改商标信息 (订单详情页面使用)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.tmName 商标名称,
* obj.tmFormType 商标类型,
* obj.notes 商标说明,
* obj.picUrl 商标图样,
* obj.colorizedPicUrl 商标彩色图样,
* obj.user 用户数据
*/
async updateTmInfo(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var self = this;
return await self.db.transaction(async function (t) {
var otpObj={
id:ordertmproduct.id,
deliveryOrderNo:deliveryOrderNo,
updateuser_id:user.id,
updateuser:user.nickname
};
if(obj.picUrl){//商标图样 黑白
otpObj["picUrl"]=obj.picUrl;
}
if(obj.colorizedPicUrl){//彩色商标图样
otpObj["colorizedPicUrl"]=obj.colorizedPicUrl;
}
if(obj.tmName){//商标名称
otpObj["tmName"]=obj.tmName;
}
if(obj.tmFormType){//商标类型
otpObj["tmFormType"]=obj.tmFormType;
}
if(obj.notes){//商标说明
otpObj["notes"]=obj.notes;
}
await self.ordertmproductSve.dao.update(otpObj,t);//商标交付单 修改商标图样
return system.getResultSuccess();
})
}
/**
* 修改商标尼斯信息 (订单详情页面使用)
* @param {*} obj
* obj.tbCode 商标提报号,
* obj.deliveryOrderNo 交付订单号,
* obj.nclOneCodes 商标尼斯大类,
* obj.nclSmallCodes 商标尼斯小类数组
* obj.user 用户数据
*/
async updateNclInfo(obj){
var user = obj.user;
var self = this;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var tbCode = obj.tbCode;
if(!tbCode){
return system.getResultFail(-104, "tbCode参数错误");
}
//获取商标尼斯信息
var tm = await this.dao.model.findOne({
where:{tbCode:tbCode},
raw:true
});
if(!tm || !tm.id){
return system.getResultFail(-105, "尼斯信息不存在");
}
//获取交付单下其它商标尼斯信息
var othertm = await this.dao.model.findAll({
where:{
deliveryOrderNo:deliveryOrderNo,
tbCode: { [self.db.Op.ne]: tbCode }
},
raw:true
});
if(!obj.nclOneCodes){
return system.getResultFail(-106, "nclOneCodes参数错误");
}
if(!obj.nclSmallCodes || obj.nclSmallCodes.length<1){
return system.getResultFail(-107, "nclSmallCodes参数错误");
}
if(obj.nclSmallCodes.length>10){
return system.getResultFail(-108, "尼斯小类不能超过10项");
}
var nclOneCodes2 = obj.nclOneCodes;
for(var i=0;i<othertm.length;i++){//判断重复大类
var other = othertm[i];
if(other.nclOneCodes==obj.nclOneCodes){
return system.getResultFail(-109, "该商标存在重复的尼斯大类");
}else{
nclOneCodes2=nclOneCodes2+","+other.nclOneCodes;
}
}
return await self.db.transaction(async function (t) {
var tmObj={
id:tm.id,
nclOneCodes:obj.nclOneCodes,
nclSmallCodes: JSON.stringify(obj.nclSmallCodes),
updateuser_id:user.id,
updateuser:user.nickname
};
await self.dao.update(tmObj,t);//修改商标尼斯信息
var otpObj={
id:ordertmproduct.id,
nclOneCodes:nclOneCodes2,
updateuser_id:user.id,
updateuser:user.nickname
};
await self.ordertmproductSve.dao.update(otpObj,t);//商标交付单 修改大类列表
return system.getResultSuccess();
})
}
}
module.exports=TradeMarkService;
...@@ -6,7 +6,7 @@ var settings={ ...@@ -6,7 +6,7 @@ var settings={
db:10, db:10,
}, },
database:{ database:{
dbname : "igirl_zcapi", dbname : "igirl_channel",
user: "write", user: "write",
password: "write", password: "write",
config: { config: {
......
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