From 9821a2d06cbc455a215e062cda501657de080186 Mon Sep 17 00:00:00 2001 From: luying Date: Sun, 23 Apr 2023 11:23:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(37=E9=9C=80=E6=B1=82):=20?= =?UTF-8?q?=E7=A4=BC=E5=8C=85=E7=A0=81=E6=94=AF=E6=8C=81=E4=B8=80=E4=BA=BA?= =?UTF-8?q?=E4=B8=80=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-server/app/service/Sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-server/app/service/Sdk.ts b/web-server/app/service/Sdk.ts index 59e2664dc..c031efcb0 100644 --- a/web-server/app/service/Sdk.ts +++ b/web-server/app/service/Sdk.ts @@ -454,8 +454,8 @@ export default class Sdk extends Service { if(!giftCode) { return resResult(SDK_37_ACTIVITY_CODE.GIFT_NOT_FOUND); } - if(giftCode.generateType != GIFT_GENERATE_TYPE.ONE_TO_MANY) { // 一人一条,单条不能被多人使用 - return resResult(SDK_37_ACTIVITY_CODE.GIFT_CODE_CANNOT_USE); + if(giftCode.generateType == GIFT_GENERATE_TYPE.ONE_TO_ONE) { // 一人一条,单条不能被多人使用 + if(giftCodeDetail.usedNum > 0) return resResult(SDK_37_ACTIVITY_CODE.GIFT_CODE_CANNOT_USE); } if(!giftCode.isEnable) return resResult(SDK_37_ACTIVITY_CODE.GIFT_CODE_HAS_EXPIRED); if (giftCode.beginTime > nowSeconds()) return resResult(SDK_37_ACTIVITY_CODE.GIFT_CODE_NOT_START);