Revert "✨ feat(db): 给GiftCode添加只读库支持"
This reverts commit a75feb611ff5e732a48408ea9360cb07f9c09f2e.
This commit is contained in:
@@ -17,7 +17,7 @@ import moment = require('moment');
|
||||
import { RegionModel } from '@db/Region';
|
||||
import { ActivityPublicAccountCodeModel } from '@db/ActivityPublicAccountCode';
|
||||
import { GiftCodeDetailModel } from '@db/GiftCodeDetail';
|
||||
import GiftCode from '@db/GiftCode';
|
||||
import { GiftCodeModel } from '@db/GiftCode';
|
||||
|
||||
/**
|
||||
* Test Service
|
||||
@@ -450,7 +450,7 @@ export default class Sdk extends Service {
|
||||
if(!giftCodeDetail) {
|
||||
return resResult(SDK_37_ACTIVITY_CODE.GIFT_NOT_FOUND);
|
||||
}
|
||||
let giftCode = await GiftCode.findByGiftId(giftCodeDetail.giftId);
|
||||
let giftCode = await GiftCodeModel.findByGiftId(giftCodeDetail.giftId);
|
||||
if(!giftCode) {
|
||||
return resResult(SDK_37_ACTIVITY_CODE.GIFT_NOT_FOUND);
|
||||
}
|
||||
@@ -475,7 +475,7 @@ export default class Sdk extends Service {
|
||||
}
|
||||
|
||||
await GiftCodeDetailModel.increaseUsedNum(giftCodeDetail.code, role.roleId, role.roleName, role.serverId, params.order_id);
|
||||
await GiftCode.increaseUsedNum(giftCode.id);
|
||||
await GiftCodeModel.increaseUsedNum(giftCode.id);
|
||||
|
||||
await ctx.service.utils.pushGiftCodeChannel(role.roleId, giftCode.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user