ソースを参照

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

MaiXinRong 6 ヶ月 前
コミット
2687cb9425
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/service/message.js

+ 1 - 1
app/service/message.js

@@ -117,7 +117,7 @@ module.exports = app => {
                 const operate = id === 0 ? await transaction.insert(this.tableName, data) :
                     await transaction.update(this.tableName, data);
 
-                const result = operate.affectedRows > 0 ? operate.insertId : false;
+                const result = operate.affectedRows > 0 ? (id === 0 ? operate.insertId : true) : false;
                 if (id === 0) {
                     const attList = await this.ctx.service.messageAtt.getAllDataByCondition({ where: { mid: 0, uid: user.accountId } });
                     if (attList.length > 0) {