สร้างโครงสร้าง
This commit is contained in:
parent
042422938c
commit
8184152ac0
16 changed files with 295 additions and 84 deletions
|
|
@ -22,8 +22,7 @@ import HttpError from "../interfaces/http-error";
|
|||
import { CreateOrgChild2, OrgChild2, UpdateOrgChild2 } from "../entities/OrgChild2";
|
||||
import { OrgChild1 } from "../entities/OrgChild1";
|
||||
import { OrgChild3 } from "../entities/OrgChild3";
|
||||
|
||||
@Route("organization")
|
||||
@Route("api/v1/org/child2")
|
||||
@Tags("OrgChild2")
|
||||
@Security("bearerAuth")
|
||||
@Response(
|
||||
|
|
@ -82,6 +81,7 @@ export class OrgChild2Controller extends Controller {
|
|||
child2.lastUpdateUserId = request.user.sub;
|
||||
child2.lastUpdateFullName = request.user.name;
|
||||
child2.orgRootId = String(child1?.orgRootId);
|
||||
child2.orgRevisionId = String(child1?.orgRevisionId);
|
||||
child2.orgChild1Id = String(child1?.id);
|
||||
await this.child2Repository.save(child2);
|
||||
return new HttpSuccess();
|
||||
|
|
@ -142,6 +142,7 @@ export class OrgChild2Controller extends Controller {
|
|||
child2.lastUpdateFullName = request.user.name;
|
||||
child2.lastUpdatedAt = new Date();
|
||||
child2.orgRootId = String(child1IdExits?.orgRootId);
|
||||
child2.orgRevisionId = String(child1IdExits?.orgRevisionId);
|
||||
child2.orgChild1Id = String(child1IdExits?.id);
|
||||
this.child2Repository.merge(child2, requestBody);
|
||||
await this.child2Repository.save(child2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue