diff --git a/app/service/Bind.js b/app/service/Bind.js index db37298..d13dbba 100644 --- a/app/service/Bind.js +++ b/app/service/Bind.js @@ -29,7 +29,7 @@ class BindService extends Service { const card = await ctx.model3.BDCard.update({ status: 0 }, { where: { card_id, card_imsi, status: 3 } }); if (card[0] == 0) return false; const result = await ctx.model4.TuserBind.destroy({ where: { user_uid: uid } }); - return result.length == 0 ? false : true; + return result == 0 ? false : true; } catch (error) { const blockName = fileName + "--" + "unBindCard"; ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error); diff --git a/app/service/Exam.js b/app/service/Exam.js index 7e43366..2bc58a1 100644 --- a/app/service/Exam.js +++ b/app/service/Exam.js @@ -73,7 +73,7 @@ class ExamService extends Service { where = { user_uid: uid }; } const resetList = await ctx.model4.TShortMsg.destroy({ where }); - return resetList.length == 0 ? false : resetList; + return resetList == 0 ? false : resetList; } catch (error) { const blockName = fileName + "--" + "delHistoryMsg"; ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error);