Skip to content

Commit

Permalink
Merge pull request #368 from GSM-MSG/feature/365-update-teacher-stude…
Browse files Browse the repository at this point in the history
…nt-details

포트폴리오 PDF 파일 관련 DTO 수정 및 "학생정보 수정 로직" 수정
  • Loading branch information
enbraining authored Jun 18, 2024
2 parents bd488c2 + 6be71f4 commit d9f0f0c
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class DetailStudentInfoTeacherResponseData(
val name: String,
val introduce: String,
val portfolioUrl: String?,
val portfolioFileUrl: String?,
val grade: Int,
val classNum: Int,
val number: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class DetailStudentInfoTokenResponseData(
val name: String,
val introduce: String,
val portfolioUrl: String?,
val portfolioFileUrl: String?,
val grade: Int,
val classNum: Int,
val number: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,17 @@ class ModifyStudentInfoUseCase(
// 학생 정보 수정
val checkStudentMismatch = studentService.checkStudentDataMismatch(student, modifyStudentInfoDataModel)
if (checkStudentMismatch) {
studentService.saveStudent(modifyStudentInfoDataModel.copy(id = student.id), user)
val portfolioFileUrl =
if(student.portfolioUrl != modifyStudentInfoDataModel.portfolioUrl
&& modifyStudentInfoData.portfolioUrl != null) null
else student.portfolioFileUrl

studentService.saveStudent(
modifyStudentInfoDataModel.copy(
id = student.id,
portfolioFileUrl = portfolioFileUrl
), user
)
}

// 기술 스택 지우기 수정
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class StudentInfoTeacherUseCase(
name = student.name,
introduce = student.introduce,
portfolioUrl = student.portfolioUrl,
portfolioFileUrl = student.portfolioFileUrl,
grade = student.stuNum.substring(0, 1).toInt(),
classNum = student.stuNum.substring(1, 2).toInt(),
number = student.stuNum.substring(2, 4).toInt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class StudentInfoTokenUseCase(
name = student.name,
introduce = student.introduce,
portfolioUrl = student.portfolioUrl,
portfolioFileUrl = student.portfolioFileUrl,
grade = student.stuNum.substring(0, 1).toInt(),
classNum = student.stuNum.substring(1, 2).toInt(),
number = student.stuNum.substring(2, 4).toInt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class UserProfileDetailResponseData(
val name: String,
val introduce: String,
val portfolioUrl: String?,
val portfolioFileUrl: String?,
val grade: Int,
val classNum: Int,
val number: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class QueryCurrentUserProfileDetailUseCase(
name = student.name,
introduce = student.introduce,
portfolioUrl = student.portfolioUrl,
portfolioFileUrl = student.portfolioFileUrl,
grade = student.stuNum.substring(0, 1).toInt(),
classNum = student.stuNum.substring(1, 2).toInt(),
number = student.stuNum.substring(2, 4).toInt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class StudentWebAdapter(
name = this.name,
introduce = this.introduce,
portfolioUrl = this.portfolioUrl,
portfolioFileUrl = this.portfolioFileUrl,
grade = this.grade,
classNum = this.classNum,
number = this.number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class DetailStudentInfoTokenWebResponse(
val name: String,
val introduce: String,
val portfolioUrl: String?,
val portfolioFileUrl: String?,
val grade: Int,
val classNum: Int,
val number: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class UserWebAdapter(
name = this.name,
introduce = this.introduce,
portfolioUrl = this.portfolioUrl,
portfolioFileUrl = this.portfolioFileUrl,
grade = this.grade,
classNum = this.classNum,
number = this.number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class UserProfileDetailWebResponse(
val name: String,
val introduce: String,
val portfolioUrl: String?,
val portfolioFileUrl: String?,
val grade: Int,
val classNum: Int,
val number: Int,
Expand Down

0 comments on commit d9f0f0c

Please sign in to comment.