Commit 2f3df96a by 王悦

fix

parent c75bf9e6
...@@ -336,8 +336,14 @@ class TrademarktransactionService extends ServiceBase { ...@@ -336,8 +336,14 @@ class TrademarktransactionService extends ServiceBase {
delete objlist[i].publish_status_name delete objlist[i].publish_status_name
if (objlist[i].id) if (objlist[i].id)
await this.dao.updateByWhere(objlist[i], {where: {id: objlist[i].id}}) await this.dao.updateByWhere(objlist[i], {where: {id: objlist[i].id}})
else else{
res = await this.dao.create(objlist[i]); let alires = await this.queryAlistatus(objlist[i].code)
if (alires.status === 1 && alires.trademarks[0].TmType === "NORMAL") {
res = await this.dao.findOne({code: objlist[i].code, publish_status: "ON_SALE"})
await this.dao.updateByWhere(objlist[i], {code: objlist[i].code, publish_status: "ON_SALE"})
}else
res = await this.dao.create(objlist[i]);
}
err = await this.updateAlistatus([objlist[i].id||res.id],"ON_SALE") err = await this.updateAlistatus([objlist[i].id||res.id],"ON_SALE")
} }
return system.getResult(!err,err); return system.getResult(!err,err);
...@@ -535,7 +541,7 @@ class TrademarktransactionService extends ServiceBase { ...@@ -535,7 +541,7 @@ class TrademarktransactionService extends ServiceBase {
res=res.Trademarks res=res.Trademarks
if (res.length>0){ if (res.length>0){
if (res[0].Status==1) if (res[0].Status==1)
return {status:1} return {status:1,trademarks:res}
else else
return {status:0,fail_reason:res[0].AuditResult} return {status:0,fail_reason:res[0].AuditResult}
}else }else
......
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