-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
110 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
src/main/java/com/kbds/itamserveradmin/domain/contract/dto/ContExpireRes.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/main/java/com/kbds/itamserveradmin/domain/contract/dto/StopContRes.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
src/main/java/com/kbds/itamserveradmin/domain/user/dto/MainRes.java
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/main/java/com/kbds/itamserveradmin/domain/user/dto/UserInfoRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.kbds.itamserveradmin.domain.user.dto; | ||
|
||
|
||
import com.kbds.itamserveradmin.domain.user.entity.UserRole; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class UserInfoRes { | ||
private String userId; | ||
private String userName; | ||
private String userPhoto; | ||
private UserRole userRole; | ||
private String DeptName; | ||
private String CorpName; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/com/kbds/itamserveradmin/domain/user/entity/UserRole.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
package com.kbds.itamserveradmin.domain.user.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
@JsonFormat(shape = JsonFormat.Shape.OBJECT) | ||
public enum UserRole { | ||
L0("L0","주임"), | ||
L1("L1","대리"), | ||
L2_1("L2","과장"),L2_2("L2","차장"), | ||
L3_1("L3","수석 차장"),L3_2("L3","팀장"), | ||
L4_1("L4","부장"),L4_2("L4","본부장"); | ||
|
||
private final String code; | ||
private final String value; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/kbds/itamserveradmin/domain/user/repository/UserRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
package com.kbds.itamserveradmin.domain.user.repository; | ||
|
||
import com.kbds.itamserveradmin.domain.user.dto.UserInfoRes; | ||
import com.kbds.itamserveradmin.domain.user.entity.User; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
|
||
public interface UserRepository extends JpaRepository<User,String> { | ||
|
||
// @Query("SELECT u FROM User u WHERE u.userId =:user_id") | ||
// User findByUserId(@Param("user_id") String userId); | ||
|
||
|
||
@Query("SELECT NEW com.kbds.itamserveradmin.domain.user.dto.UserInfoRes(u.userId, u.userName, u.userPhoto, u.userRole, d.deptName, c.corpName) " + | ||
"FROM User u JOIN u.department d JOIN u.corporation c " + | ||
"WHERE u.userId = :userId") | ||
UserInfoRes findUserInfoWithCooperationAndDepartmentByUserId(@Param("userId") String userId); | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/java/com/kbds/itamserveradmin/domain/user/service/UserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
package com.kbds.itamserveradmin.domain.user.service; | ||
|
||
import com.kbds.itamserveradmin.domain.user.dto.UserInfoRes; | ||
|
||
public interface UserService { | ||
public UserInfoRes GetUserInfo(String userId); | ||
} |
Oops, something went wrong.