Commit 9337228e by 庄冰

tmt api

parent 2128f4f7
var System = require("../../system");
var settings = require("../../../config/settings");
const ApiBase = require("../api.base");
const logCtl = System.getObject("web.oplogCtl");
class TmtransactionApi extends ApiBase {
constructor() {
super();
this.trademarktransactionSve = System.getObject("service.trademarktransactionSve");
this.companyS = System.getObject("service.companySve");
};
//获取某类型的交易商标 post
async findByTmType(obj){
if(!obj.company_id){
//获取当前域名
var hostname = "jiaoyi.gongsibao.com";
// console.log("xccccccccccccccccccccccccccccccccccccccc", hostname);
//按照hostname去查找公司站点信息
var companytmp = await this.companyS.findOne({ domainname: hostname, isEnabled: true });
if(companytmp){
obj.company_id=companytmp.id;
}
}
try {
return this.trademarktransactionSve.findByTmType(obj);
} catch (error) {
return {code:-200,msg:"操作失败"};
}
}
}
module.exports = TmtransactionApi;
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