Commit 1b8817f4 by 王悦

fix

parent b61cc5be
...@@ -149,13 +149,15 @@ class TrademarkCtl extends CtlBase { ...@@ -149,13 +149,15 @@ class TrademarkCtl extends CtlBase {
let rtn = await this.execClient.execPost(body, tmurl); let rtn = await this.execClient.execPost(body, tmurl);
let data = JSON.parse(rtn.stdout); let data = JSON.parse(rtn.stdout);
if (data.status == 1) { if (data.status == 1) {
rtn = await this.service.create({ let one = await this.service.findOne({tm_code: data.code});
if (!one)
this.service.create({
opath: p.opath, opath: p.opath,
user_id: p.userid, user_id: p.userid,
company_id: p.company_id, company_id: p.company_id,
trademark_id: data.id, trademark_id: data.id,
type:p.data.type, type: p.data.type,
reason:p.data.reason, reason: p.data.reason,
tm_code: data.code tm_code: data.code
}); });
} }
......
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