Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

局divisionAPIの作成 #909

Merged
merged 14 commits into from
Jan 18, 2025
Merged

Conversation

hikahana
Copy link
Collaborator

対応Issue

resolve #904

概要

divisionsのAPIを作成しました。
getは年度とfinancialRecordIdをパラメータで指定できます。

画面スクリーンショット等

  • URL
    スクリーンショット
    image

image

テスト項目

  • swaggerでそれぞれのAPIが動作するか
  • コードレビュー

備考

@hikahana hikahana requested a review from Kubosaka January 14, 2025 09:58
@hikahana hikahana self-assigned this Jan 14, 2025
Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少しコメントしました
selectでクエリに不具合あったのであとでそれに伴い修正お願いします

api/internals/usecase/division_usecase.go Outdated Show resolved Hide resolved
api/internals/usecase/division_usecase.go Outdated Show resolved Hide resolved
api/externals/repository/division_repository.go Outdated Show resolved Hide resolved
api/externals/controller/division_controller.go Outdated Show resolved Hide resolved
api/externals/repository/division_repository.go Outdated Show resolved Hide resolved
@hikahana hikahana requested a review from Kubosaka January 15, 2025 11:20
api/externals/repository/division_repository.go Outdated Show resolved Hide resolved
api/externals/repository/division_repository.go Outdated Show resolved Hide resolved
api/externals/repository/division_repository.go Outdated Show resolved Hide resolved
api/internals/usecase/division_usecase.go Outdated Show resolved Hide resolved
api/externals/controller/division_controller.go Outdated Show resolved Hide resolved
@hikahana hikahana requested a review from Kubosaka January 16, 2025 09:04
Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ちょっと修正お願いします

func (d *divisionController) IndexDivisions(c echo.Context) error {
ctx := c.Request().Context()
year := c.QueryParam("year")
financialRecordId := c.QueryParam("financial_record_id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[must]これopenapiとクエリパラメータとどっちか揃えてください!

ds = ds.Where(goqu.Ex{"years.year": year})
}
if financialRecordId != "" {
ds = ds.Where(goqu.Ex{"financial_records.idr": financialRecordId})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[must]
ごめん、タイポしてた

Suggested change
ds = ds.Where(goqu.Ex{"financial_records.idr": financialRecordId})
ds = ds.Where(goqu.Ex{"financial_records.id": financialRecordId})

@hikahana hikahana requested a review from Kubosaka January 17, 2025 12:27
Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hikahana hikahana merged commit cc8d7d0 into develop Jan 18, 2025
2 checks passed
@hikahana hikahana deleted the feat/hikahana/904-create-division-api branch January 18, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[予算管理]部門 API作成
2 participants