装备:修复分解消耗bug
This commit is contained in:
@@ -550,7 +550,7 @@ export class EquipHandler {
|
|||||||
jewels.push({ id: jewel, count: 1 });
|
jewels.push({ id: jewel, count: 1 });
|
||||||
}
|
}
|
||||||
goods = goods.concat(goodInfo.decomposeItem);
|
goods = goods.concat(goodInfo.decomposeItem);
|
||||||
cost.push({ seqId: equip.seqId });
|
cost.push({ seqId: equip.seqId, id: equip.id, count: 1 });
|
||||||
}
|
}
|
||||||
let costResult = await handleCost(roleId, sid, cost); // 删掉装备
|
let costResult = await handleCost(roleId, sid, cost); // 删掉装备
|
||||||
if(!costResult) return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
if(!costResult) return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export default class Maintenance extends BaseModel {
|
|||||||
|
|
||||||
public static async findByCondition(page: number, pageSize: number, sortField: string, sortOrder: string, form: { isOpen?: boolean } = {}) {
|
public static async findByCondition(page: number, pageSize: number, sortField: string, sortOrder: string, form: { isOpen?: boolean } = {}) {
|
||||||
|
|
||||||
let searchObj = MaintenanceModel.getSearchObj(form);
|
let searchObj = this.getSearchObj(form);
|
||||||
let sort = {};
|
let sort = {};
|
||||||
if (sortField && sortOrder) {
|
if (sortField && sortOrder) {
|
||||||
if (sortOrder == 'ascend') {
|
if (sortOrder == 'ascend') {
|
||||||
@@ -93,7 +93,7 @@ export default class Maintenance extends BaseModel {
|
|||||||
|
|
||||||
public static async countByCondition(form: { isOpen?: boolean } = {}) {
|
public static async countByCondition(form: { isOpen?: boolean } = {}) {
|
||||||
|
|
||||||
let searchObj = MaintenanceModel.getSearchObj(form);
|
let searchObj = this.getSearchObj(form);
|
||||||
const result = await MaintenanceModel.count(searchObj);
|
const result = await MaintenanceModel.count(searchObj);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default class Serverlist extends BaseModel {
|
|||||||
|
|
||||||
public static async findByCondition(page: number, pageSize: number, sortField: string, sortOrder: string, form: { id?: number, serverId?: string|number, name?: string, groupName?: string, groupId?: number, serverType?: string } = {}) {
|
public static async findByCondition(page: number, pageSize: number, sortField: string, sortOrder: string, form: { id?: number, serverId?: string|number, name?: string, groupName?: string, groupId?: number, serverType?: string } = {}) {
|
||||||
|
|
||||||
let searchObj = ServerlistModel.getSearchObj(form);
|
let searchObj = this.getSearchObj(form);
|
||||||
let sort = {};
|
let sort = {};
|
||||||
if(sortField && sortOrder) {
|
if(sortField && sortOrder) {
|
||||||
if(sortOrder == 'ascend') {
|
if(sortOrder == 'ascend') {
|
||||||
@@ -156,7 +156,7 @@ export default class Serverlist extends BaseModel {
|
|||||||
|
|
||||||
public static async countByCondition(form: { id?: number, serverId?: string|number, name?: string, groupName?: string, groupId?: number, serverType?: string } = {}) {
|
public static async countByCondition(form: { id?: number, serverId?: string|number, name?: string, groupName?: string, groupId?: number, serverType?: string } = {}) {
|
||||||
|
|
||||||
let searchObj = ServerlistModel.getSearchObj(form);
|
let searchObj = this.getSearchObj(form);
|
||||||
const result = await ServerlistModel.count(searchObj);
|
const result = await ServerlistModel.count(searchObj);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user