Commit 5d71b921 by 王悦

fix

parent 09e922e6
......@@ -122,8 +122,8 @@ class TrademarkCtl extends CtlBase {
rtn = await this.service.bulkCreate(tradedb);
}
return system.getResult(rtn)
}catch (e) {
return system.getResultFail(-2,e)
} catch (e) {
return system.getResultFail(-2, e)
}
}
......@@ -151,9 +151,12 @@ class TrademarkCtl extends CtlBase {
await upload.save();
for (let i = 0; i < data.length; i += 200) {
let pushd = data.slice(i, i + 200);
await this.publish(pushd, uploadid)
pushd.opath = p.actionBody.opath;
pushd.user_id = p.actionBody.userid;
pushd.company_id = p.actionBody.company_id;
await this.publish(pushd, {upload_id: uploadid})
}
return system.getResult(1,"ok")
return system.getResult(1, "ok")
}
async excelpublish(p, q, req) {
......@@ -162,12 +165,18 @@ class TrademarkCtl extends CtlBase {
name: p.name,
file_url: p.file_url
});
let rtn = await pushClient({upload_id: upload.id, file_url: p.file_url}, pushmyurl);
let rtn = await pushClient({
upload_id: upload.id,
file_url: p.file_url,
opath: p.opath,
user_id: p.userid,
company_id: p.company_id
}, pushmyurl);
if (rtn.status == 1) {
return system.getResult(rtn)
}
return system.getResultFail(-1, rtn.msg, rtn)
}catch (e) {
} catch (e) {
return system.getResultFail(-2, e)
}
}
......@@ -235,10 +244,10 @@ class TrademarkCtl extends CtlBase {
await upload.save();
let tradedb = p.actionBody.resultInfo.data.tm;
tradedb.map(async db => {
await this.service.dao.model.update({
trademark_id: db.id,
tm_code: db.code
}, {where:{ tm_code:db.code}});
await this.service.dao.model.update({
trademark_id: db.id,
tm_code: db.code
}, {where: {tm_code: db.code}});
});
return system.getResult("ok")
}
......
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