正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
@@ -102,6 +102,8 @@ func (companyService *CompanyService) CreateCompany(createCompanyCommand *comman | @@ -102,6 +102,8 @@ func (companyService *CompanyService) CreateCompany(createCompanyCommand *comman | ||
102 | if company, err := companyRepository.Save(newCompany); err != nil { | 102 | if company, err := companyRepository.Save(newCompany); err != nil { |
103 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 103 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
104 | } else { | 104 | } else { |
105 | + // todo 新增公司管理员 | ||
106 | + | ||
105 | if err := transactionContext.CommitTransaction(); err != nil { | 107 | if err := transactionContext.CommitTransaction(); err != nil { |
106 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 108 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
107 | } | 109 | } |
@@ -265,6 +267,8 @@ func (companyService *CompanyService) SetCompanyAdmin(setCompanyAdminCommand *co | @@ -265,6 +267,8 @@ func (companyService *CompanyService) SetCompanyAdmin(setCompanyAdminCommand *co | ||
265 | if company, err := companyRepository.Save(company); err != nil { | 267 | if company, err := companyRepository.Save(company); err != nil { |
266 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 268 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
267 | } else { | 269 | } else { |
270 | + // todo 更改公司管理员 | ||
271 | + | ||
268 | if err := transactionContext.CommitTransaction(); err != nil { | 272 | if err := transactionContext.CommitTransaction(); err != nil { |
269 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 273 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
270 | } | 274 | } |
@@ -318,6 +322,8 @@ func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *comman | @@ -318,6 +322,8 @@ func (companyService *CompanyService) UpdateCompany(updateCompanyCommand *comman | ||
318 | if err := company.SetCompanyAdmin(companyAdmin); err != nil { | 322 | if err := company.SetCompanyAdmin(companyAdmin); err != nil { |
319 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 323 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
320 | } | 324 | } |
325 | + | ||
326 | + // todo 更改公司管理员 | ||
321 | } | 327 | } |
322 | 328 | ||
323 | if company, err := companyRepository.Save(company); err != nil { | 329 | if company, err := companyRepository.Save(company); err != nil { |
-
请 注册 或 登录 后发表评论