Compare commits
3 Commits
33014394d1
...
61d8f56385
Author | SHA1 | Date |
---|---|---|
|
61d8f56385 | |
|
2a42d85814 | |
|
bacdb1773b |
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Debug Nest Framework",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": ["run", "start:debug", "--", "--inspect-brk"],
|
||||||
|
"autoAttachChildProcesses": true,
|
||||||
|
"restart": true,
|
||||||
|
"sourceMaps": true,
|
||||||
|
"stopOnEntry": false,
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -28,19 +28,18 @@ export class SeasonPeriodHolidayHandler
|
||||||
holidayDate.creator_name = event.data.data.creator_name;
|
holidayDate.creator_name = event.data.data.creator_name;
|
||||||
holidayDate.updated_at = event.data.data.updated_at;
|
holidayDate.updated_at = event.data.data.updated_at;
|
||||||
holidayDate.season_type = event.data.data.season_type;
|
holidayDate.season_type = event.data.data.season_type;
|
||||||
holidayDate.item_rates = event.data.data.item_rates;
|
holidayDate.item_rates = event.data.data.item_rates.map((item) => {
|
||||||
|
delete item['id'];
|
||||||
|
|
||||||
|
return item;
|
||||||
|
});
|
||||||
holidayDate.priority = 1;
|
holidayDate.priority = 1;
|
||||||
|
|
||||||
holidayDates.push(holidayDate);
|
await this.dataService.createBatch(queryRunner, SeasonPeriodModel, [
|
||||||
|
holidayDate,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create batch
|
|
||||||
await this.dataService.createBatch(
|
|
||||||
queryRunner,
|
|
||||||
SeasonPeriodModel,
|
|
||||||
holidayDates,
|
|
||||||
);
|
|
||||||
|
|
||||||
// delete data
|
// delete data
|
||||||
await this.dataService.deleteById(
|
await this.dataService.deleteById(
|
||||||
queryRunner,
|
queryRunner,
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
import {
|
import { Injectable } from '@nestjs/common';
|
||||||
HttpStatus,
|
|
||||||
Injectable,
|
|
||||||
UnprocessableEntityException,
|
|
||||||
} from '@nestjs/common';
|
|
||||||
import {
|
import {
|
||||||
EventTopics,
|
EventTopics,
|
||||||
columnUniques,
|
columnUniques,
|
||||||
|
|
Loading…
Reference in New Issue