- add id ascending order to ensure consistent sorting results - maintain existing level and name sorting while improving result stability
@@ -12,8 +12,9 @@ export class AreaService {
const areas = await this.areaRepository.find({
where: { isDeleted: 0 },
order: {
+ id: 'ASC',
level: 'ASC',
- name: 'ASC'
+ name: 'ASC',
}
});
@@ -144,8 +145,9 @@ export class AreaService {
isDisabled: DisabledStatus.ENABLED
},