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

Feature/bad word deactivate(wr9 34) #35

Merged
merged 7 commits into from
Feb 19, 2025

Conversation

yhd1101
Copy link
Collaborator

@yhd1101 yhd1101 commented Feb 19, 2025

Pull Request Template

๐Ÿ“ PR ์„ค๋ช…

๊ธˆ์น™์–ด ์ƒํƒœ ๋ณ€๊ฒฝ(ํ™œ์„ฑํ™”/๋น„ํ™œ์„ฑํ™”) ๊ธฐ๋Šฅ ์ถ”๊ฐ€

๐Ÿ” ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ

  • PATCH /api/bad-words/{badWordId}/status ์—”๋“œํฌ์ธํŠธ ์ถ”๊ฐ€
  • BadWordService์— ๊ธˆ์น™์–ด ์ƒํƒœ ๋ณ€๊ฒฝ(isUsed true/false) ๋กœ์ง ์ถ”๊ฐ€
  • ๊ธˆ์น™์–ด ํ™œ์„ฑํ™” ์‹œ Redis์— ์ถ”๊ฐ€, ๋น„ํ™œ์„ฑํ™” ์‹œ Redis์—์„œ ์‚ญ์ œ ๊ธฐ๋Šฅ ์ถ”๊ฐ€
  • BadWordControllerTest - ์ƒํƒœ ๋ณ€๊ฒฝ ์„ฑ๊ณต/์‹คํŒจ ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท (์„ ํƒ์‚ฌํ•ญ)

  • UI ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์žˆ๋‹ค๋ฉด ์Šคํฌ๋ฆฐ์ƒท์„ ์ฒจ๋ถ€ํ•ด์ฃผ์„ธ์š”.

๐Ÿงช ํ…Œ์ŠคํŠธ

  • ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€/์ˆ˜์ •
  • ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ ํ™•์ธ
  • ์†Œ๋‚˜ํด๋ผ์šฐ๋“œ ํ’ˆ์งˆ ๊ฒŒ์ดํŠธ ํ†ต๊ณผ

โœ… ์ฒดํฌ๋ฆฌ์ŠคํŠธ

  • ์ฝ”๋“œ ์ปจ๋ฒค์…˜์„ ์ค€์ˆ˜ํ–ˆ๋‚˜์š”?
  • ๋ถˆํ•„์š”ํ•œ ์ฝ”๋“œ๋‚˜ ์ฃผ์„์ด ์—†๋‚˜์š”?
  • ๋ธŒ๋žœ์น˜ ๋„ค์ด๋ฐ ์ปจ๋ฒค์…˜์„ ๋”ฐ๋ž๋‚˜์š”?
  • ๊ด€๋ จ ๋ฌธ์„œ๋ฅผ ์—…๋ฐ์ดํŠธํ–ˆ๋‚˜์š”?

๐Ÿค ๊ด€๋ จ ์ด์Šˆ

  • closes #์ด์Šˆ๋ฒˆํ˜ธ

Copy link
Collaborator

@leeys9423 leeys9423 left a comment

Choose a reason for hiding this comment

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

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค.

@RequestBody @Valid UpdateBadWordStatusRequest request) {

badWordService.updateBadWordStatus(badWordId, request);
return ResponseEntity.ok(BaseResponse.of(null, "๊ธˆ์น™์–ด ์ƒํƒœ ๋ณ€๊ฒฝ ์™„๋ฃŒ"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

๊ฒ€์—ด๋‹จ์–ด, ๊ธˆ์น™์–ด ๋‹จ์–ด๋ฅผ ํ†ต์ผ์‹œํ‚ค๋Š”๊ฒŒ ์ข‹์ง€ ์•Š์„๊นŒ์š”?!

  • null ๋ฐ˜ํ™˜๋„ ์ข‹์ง€๋งŒ, ์–ด๋–ป๊ฒŒ update ๋˜์—ˆ๋Š”์ง€ ๋ฐ˜ํ™˜ํ•ด์ฃผ๋Š”๊ฒƒ๋„ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค. but ํ•ด๋‹น ๊ธฐ๋Šฅ์€ ํ™”๋ฉด์ด ์—†์Šต๋‹ˆ๋‹ค.

@@ -26,4 +26,10 @@ public class BadWord extends BaseEntity {
@Column(nullable = false)
private Boolean isUsed;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrapper ํ˜• ๋ณด๋‹ค ๊ธฐ๋ณธํ˜• ์“ฐ๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค.

์™œ? why? ๊ธฐ๋ณธํ˜•์„ ์‚ฌ์šฉ์‹œ ์–ด์ฐจํ”ผ ๊ธฐ๋ณธ๊ฐ’์ด false์ด๋‹ค. wrapper ์“ฐ๋ฉด ํ˜น์‹œ ๋ชจ๋ฅผ Null๊ฐ’์— ์กฐ์‹ฌํ•ด์•ผํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์•„์ฃผ ๊นจ์•Œ๊ฐ™์€ ๋ฉ”๋ชจ๋ฆฌ ์ธก๋ฉด์—์„œ๋„ ๊ธฐ๋ณธํ˜•์ด ๋œ์žก์•„๋จน์œผ๋‹ˆ๊นŒ ๊ธฐ๋ณธํ˜•์„ ์“ฐ๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค.

@AllArgsConstructor
public class UpdateBadWordStatusRequest {
@NotNull(message = "์ƒํƒœ๊ฐ’์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.")
private Boolean isUsed;
Copy link
Collaborator

Choose a reason for hiding this comment

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

๋ฐ‘์— ๋ฐ”๊พธ๋ฉด ์ด๋ถ€๋ถ„๋„ ๋ฐ”๊ฟ”์ฃผ์‹œ๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”..

ํ†ต์ผ์„ฑ ์ง€ํ‚ค๊ธฐ

@yhd1101 yhd1101 merged commit 69f19ce into dev Feb 19, 2025
3 checks passed
@yhd1101 yhd1101 deleted the feature/bad-word-deactivate(WR9-34) branch February 19, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants