活动:任务接口添加serverId接口
This commit is contained in:
@@ -15,7 +15,7 @@ import { ActivityPopUpShopModel, ActivityPopUpShopModelType } from '../db/Activi
|
||||
*/
|
||||
|
||||
export async function popUpShopActivity(serverId: number, roleId: string) {
|
||||
let activityArray: ActivityModelType[] = await ActivityModel.findOpenActivityByType(ACTIVITY_TYPE.POP_UP_SHOP, new Date())
|
||||
let activityArray: ActivityModelType[] = await ActivityModel.findOpenActivityByType(serverId, ACTIVITY_TYPE.POP_UP_SHOP, new Date())
|
||||
activityArray = activityArray.sort((a, b) => {
|
||||
return b.activityId - a.activityId
|
||||
});
|
||||
@@ -36,7 +36,7 @@ export async function popUpShopActivity(serverId: number, roleId: string) {
|
||||
*
|
||||
*/
|
||||
export async function getPlayerPopUpShopData(activityId: number, serverId: number, roleId: string) {
|
||||
let activityData: ActivityModelType = await ActivityModel.findActivity(activityId, true);
|
||||
let activityData: ActivityModelType = await ActivityModel.findActivity(serverId, activityId, true);
|
||||
let playerRecords: ActivityPopUpShopModelType[] = await ActivityPopUpShopModel.findAllOpenData(serverId, activityId, roleId);
|
||||
|
||||
let allPlayerShop = [];
|
||||
@@ -65,7 +65,7 @@ export async function getPlayerPopUpShopData(activityId: number, serverId: numbe
|
||||
*/
|
||||
export async function makePopUpShopReward(roleId: string, roleName: string, sid: string, serverId: number, funcs: number[],
|
||||
activityId: number, productID: string) {
|
||||
let activityData: ActivityModelType = await ActivityModel.findActivity(activityId, true);
|
||||
let activityData: ActivityModelType = await ActivityModel.findActivity(serverId, activityId, true);
|
||||
if (!activityData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user