Commit dab359be by 宋毅

Merge branch 'igirl-channel' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel

parents 297b09d9 a5882f8e
......@@ -1115,6 +1115,14 @@ class OrderTmProductService extends ServiceBase {
async tmConfirm(obj) {
var self = this;
var user = obj.user;
var app = obj.app;
if (!user || !user.id) {
return system.getResultFail(-100, "未知用户");
}
if (!app || !app.id) {
return system.getResultFail(-100, "未知渠道");
}
var channelUserId = obj.channelUserId;
var deliveryOrderNo = obj.deliveryOrderNo;
var isConfirm = obj.isConfirm;
......@@ -1144,6 +1152,7 @@ class OrderTmProductService extends ServiceBase {
return await self.db.transaction(async function (t) {
var otpObj = { id: ordertmproduct.id };
var tmObj = { officialType: "dsh" };
var logMsg = { sourceOrderNo: deliveryOrderNo, opContent: "商标方案确认", app_id: app.id, isShow: 1 };
if (isConfirm == "0") {
if (!obj.notes) {
return system.getResultFail(-106, "方案确认失败,不通过原因不能为空");
......@@ -1151,13 +1160,17 @@ class OrderTmProductService extends ServiceBase {
otpObj["deliveryStatus"] = "fabtg";
otpObj["notes"] = obj.notes;
tmObj.officialType = "fabtg";
logMsg["opContent"]="商标方案不通过";
}
if (isConfirm == "1") {
otpObj["deliveryStatus"] = "dsh";
otpObj["notes"] = obj.notes || "";
logMsg["opContent"]="商标方案确认通过";
}
await self.trademarkDao.updateByWhere(tmObj, { where: { deliveryOrderNo: deliveryOrderNo } }, t);
await self.dao.update(otpObj, t);
await self.orderflowDao.create(logMsg, t);
return system.getResultSuccess();
})
}
......
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