✨ feat(礼包码): 礼包码类型区分
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
import { Service } from 'egg';
|
||||
import { REDIS_KEY, PAY_37_CALLBACK_CODE, SDK_37_CONST, ORDER_STATE, SDK_37_TREAT_CODE, SERVER_STATUS, SDK_37_REFUND_CODE, SDK_37_ACTIVITY_CODE, PUBLIC_ACCOUNT_GIFT, GIFT_GENERATE_TYPE } from '@consts';
|
||||
import { REDIS_KEY, PAY_37_CALLBACK_CODE, SDK_37_CONST, ORDER_STATE, SDK_37_TREAT_CODE, SERVER_STATUS, SDK_37_REFUND_CODE, SDK_37_ACTIVITY_CODE, PUBLIC_ACCOUNT_GIFT, GIFT_GENERATE_TYPE, GIFT_TYPE } from '@consts';
|
||||
import { GetGuildInfoByUserParam, GetRoleByServerParam, GetRoleByUidParam, GetServerAndUidParam, GetServerListParam, GetServerParam, GuildNameCallBackParam, IOSRefundParam, PayCallback37Data, RoleNameCallBackParam, SendGiftCodeParam } from '../domain/sdk';
|
||||
import { RedisClient } from 'redis';
|
||||
import { checkParamPrice, get37GetServerMd5Sign, get37Md5SignA, get37Md5SignB, getChannelId, getRedisSubChannel, md5 } from '../pubUtils/sdkUtil';
|
||||
@@ -455,6 +455,7 @@ export default class Sdk extends Service {
|
||||
if(!giftCode) {
|
||||
return resResult(SDK_37_ACTIVITY_CODE.GIFT_NOT_FOUND);
|
||||
}
|
||||
if(giftCode.type != GIFT_TYPE.WEB) return resResult(SDK_37_ACTIVITY_CODE.GIFT_TYPE_ERR);
|
||||
if(giftCode.generateType == GIFT_GENERATE_TYPE.ONE_TO_ONE) { // 一人一条,单条不能被多人使用
|
||||
if(giftCodeDetail.usedNum > 0) return resResult(SDK_37_ACTIVITY_CODE.GIFT_CODE_CANNOT_USE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user