This commit is contained in:
@@ -103,10 +103,16 @@ export class PartnerCityService {
|
||||
if (!primary.cityId) return { id: -1n };
|
||||
|
||||
const warehouseIds = await this.resolveManagedWarehouseIds(primary.id);
|
||||
if (warehouseIds.length > 0) {
|
||||
return { fulfillmentWarehouseId: { in: warehouseIds } };
|
||||
// 未配置管仓:不推送/不展示酒订单(同城无仓由总部履约)
|
||||
if (warehouseIds.length === 0) {
|
||||
return { id: -1n };
|
||||
}
|
||||
return { cityId: primary.cityId };
|
||||
return { fulfillmentWarehouseId: { in: warehouseIds } };
|
||||
}
|
||||
|
||||
async hasManagedWarehouse(partnerAccountId: bigint): Promise<boolean> {
|
||||
const ids = await this.resolveManagedWarehouseIds(partnerAccountId);
|
||||
return ids.length > 0;
|
||||
}
|
||||
|
||||
/** 合伙人可管仓库:主账号 managedWarehouseId + 绑定为管仓合伙人的仓 */
|
||||
|
||||
Reference in New Issue
Block a user