Commit 769cbc17 by 蒋勇

alionlines

parent baac8efc
......@@ -28,6 +28,9 @@ class ProductAPI extends APIBase {
case "tmInfo": // 2020 0903 lin 新增 标原管理
opResult = await this.trademarkTransactionSve.tmInfo(pobj, pobj.actionBody);
break;
case "aliOnline": // 2020 0903 lin 新增 标原管理
opResult = await this.trademarkTransactionSve.aliOnline(pobj, pobj.actionBody);
break;
case "forceUpdate":
opResult = await this.trademarkTransactionSve.forceUpdate(pobj, pobj.actionBody);
break;
......
......@@ -393,14 +393,7 @@ class TrademarktransactionService extends ServiceBase {
whereObj["code"] = { [this.db.Op.like]: "%" + ab.code + "%" };
countObj["code"] = { [this.db.Op.like]: "%" + ab.code + "%" };
}
if (ab.tm_applier) {// 申请主体 2020 0917 lin 修改 查询条件改为tm_applier。但前端的条件字段为channel_name
whereObj["tm_applier"] = { [this.db.Op.like]: "%" + ab.tm_applier + "%" };
countObj["tm_applier"] = { [this.db.Op.like]: "%" + ab.tm_applier + "%" };
}
if (ab.channel_name) {// 申请主体 2020 0917 lin 新增
whereObj["channel_name"] = { [this.db.Op.like]: "%" + ab.channel_name + "%" };
countObj["channel_name"] = { [this.db.Op.like]: "%" + ab.channel_name + "%" };
}
if (ab.tm_start_day && ab.tm_end_day) {// 专用期限
// whereObj["created_at"] = { [this.db.Op.between]: [ab.stdate, ab.endate] };
// countObj["created_at"] = { [this.db.Op.between]: [ab.stdate, ab.endate] };
......@@ -451,6 +444,35 @@ class TrademarktransactionService extends ServiceBase {
result.totalCount = count;
return result;
}
async aliOnline(pobj, actionBody) {
if (!pobj || !pobj.actionBody) {
return system.getResultFail(-103, "actionBody is empty");
}
console.log("ali online..................................aliOnline")
var ab = pobj.actionBody;
// 2020 0914 lin 修改 channle_coode为非必填
// if (!ab.channel_code) {
// return system.getResultFail(-104, "渠道码不能为空");
// }
var PageSize = ab.pageSize ? Number(ab.pageSize) : 10;
var PageNum = ab.pageNumber
// var countObj = { channel_code: ab.channel_code };
// var whereObj = { channel_code: ab.channel_code };
var queryObj = { };
queryObj.PageNum=PageNum,
queryObj.PageSize=PageSize
if (ab.RegistrationNumber) {// 申请号
queryObj.RegisterCode=ab.RegistrationNumber.trim()
}
let rtn = await reqbyget({
action:"QueryTrademarkOnSale",
reqbody: queryObj
},'POST')
var result = system.getResultSuccess(rtn.Trademarks);
result.totalCount = rtn.TotalCount;
return result;
}
/**
* @api {post} /tmtransaction/action/trademarktransaction/springBoard 标原详情
* @apiGroup 标源管理
......@@ -1065,3 +1087,8 @@ module.exports = TrademarktransactionService;
// var a = new TrademarktransactionService();
// a.addbaseinfo([{ "code": "22426244" }, { "code": "31566397" }, { "code": "37222371" }]);
// a.createjsonfile();
// (async ()=>{
// })()
......@@ -11,7 +11,7 @@ getAliTMClient = () => {
}
//阿里接口
exports.reqbyget = async (obj) => {
exports.reqbyget = async (obj,method='GET') => {
var action = obj.action;
var reqbody = obj.reqbody;
try {
......@@ -23,9 +23,11 @@ exports.reqbyget = async (obj) => {
timeout: 10000, // default 3000 ms 2020 0916 lin修改3000为10000,原因ConfirmIcpIntention BizIds 超过5条会超时
formatAction: true, // default true, format the action to Action
formatParams: true, // default true, format the parameter name to first letter upper case
method: 'GET', // set the http method, default is GET
method: method, // set the http method, default is GET
headers: {}, // set the http request headers
});
console.log(JSON.stringify(res))
return res
// console.log(obj.reqbody.tmNumber,"---",obj.reqbody.tmName,"---","成功");
} catch (e) {
// console.log(obj.reqbody.tmNumber,"---",obj.reqbody.tmName,"---",e.data.Message);
......
......@@ -15,7 +15,7 @@ var settings = {
env: ENVINPUT.APP_ENV,
usertimeout: 3600,//单位秒
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 4006,
port: process.env.NODE_PORT || 3004,
opLogUrl: function () {
if (this.env == "dev" || this.env == "test") {
return "http://er.es.gongsibao.com:7200/center-tm-transaction_log/_doc?pretty";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,7 +4,7 @@
"description": "h5framework",
"apidoc": {
"title": "apidoc浏览器自定义标题",
"url" : "文档url地址"
"url": "文档url地址"
},
"main": "main.js",
"scripts": {
......
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