装备:分解装备获得奖励合起来
This commit is contained in:
+2
-2
@@ -135,8 +135,8 @@ export default class Equip extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getEquips(ids: Array<number>) {
|
||||
let result: EquipType[] = await EquipModel.find({ seqId: { $in: ids } });
|
||||
public static async getEquips(roleId: string, ids: Array<number>) {
|
||||
let result: EquipType[] = await EquipModel.find({ roleId, seqId: { $in: ids } });
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export default class ServerStategy extends BaseModel {
|
||||
|
||||
public static async findByCondition(page: number, pageSize: number, sortField: string, sortOrder: string, form: { id?: number, name?: string, isDefault?: boolean } = {}) {
|
||||
|
||||
let searchObj = ServerStategyModel.getSearchObj(form);
|
||||
let searchObj = this.getSearchObj(form);
|
||||
let sort = {};
|
||||
if (sortField && sortOrder) {
|
||||
if (sortOrder == 'ascend') {
|
||||
@@ -60,7 +60,7 @@ export default class ServerStategy extends BaseModel {
|
||||
|
||||
public static async countByCondition(form: { id?: number, name?: string, isDefault?: boolean } = {}) {
|
||||
|
||||
let searchObj = ServerStategyModel.getSearchObj(form);
|
||||
let searchObj = this.getSearchObj(form);
|
||||
const result = await ServerStategyModel.count(searchObj);
|
||||
return result;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ export default class ServerStategy extends BaseModel {
|
||||
id = await CounterModel.getNewCounter(COUNTER.SERVER_STATEGY);
|
||||
}
|
||||
if(values.isDefault) {
|
||||
await ServerStategyModel.unsetDefault();
|
||||
await this.unsetDefault();
|
||||
}
|
||||
delete values.id;
|
||||
let rec: ServerStategyType = await ServerStategyModel.findOneAndUpdate({ id }, { $set: {...values, updatedBy: uid}, $setOnInsert: { createdBy: uid } },
|
||||
|
||||
@@ -8,7 +8,7 @@ export interface RewardInter {
|
||||
}
|
||||
|
||||
export interface ItemInter {
|
||||
id?: number;
|
||||
id: number;
|
||||
count?: number;
|
||||
seqId?: number;
|
||||
type?: number;
|
||||
|
||||
Reference in New Issue
Block a user