Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void update(RequestSocialCreateDto dto, ArrayList<Path> imgPaths) {
if(!social.getUser().getId().equals(dto.getUserId()))
throw new CustomException(ErrorCode.NOT_AUTHOR);

if(dto.getImgs() != null && !dto.getImgs().isEmpty()){
if(dto.getImgs() != null && !dto.getImgs().isEmpty() && !dto.getImgs().get(0).isEmpty()){
deleteImgs(social.getId(), social.getImgs().stream().map(SocialImgEntity::getImg).toList());
saveImgs(dto.getImgs(), social, imgPaths);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
@Setter
public class ResponseUserInfoDetailDto {

private Long id;

private String name;
private String nickName;
private int point;
Expand All @@ -25,19 +27,18 @@ public class ResponseUserInfoDetailDto {
public static ResponseUserInfoDetailDto of(UserEntity userFullEntity) {
UserDetailEntity detail = userFullEntity.getUserDetail();

ResponseUserInfoDetailDto dto = new ResponseUserInfoDetailDto(userFullEntity.getName(), userFullEntity.getNickName(), userFullEntity.getPoint(),
ResponseUserInfoDetailDto dto = new ResponseUserInfoDetailDto(userFullEntity.getId(), userFullEntity.getName(), userFullEntity.getNickName(), userFullEntity.getPoint(),
userFullEntity.getAddress(), userFullEntity.getNumber(), userFullEntity.getAreaNumber(), detail.getEmail(),
detail.getSocialProvider());

if(userFullEntity.getImg() != null) {
dto.img = new ImgDto(userFullEntity.getImg());
}
dto.img = new ImgDto(userFullEntity.getImg());

return dto;
}

private ResponseUserInfoDetailDto(String name, String nickName, int point, String address,
private ResponseUserInfoDetailDto(Long userId, String name, String nickName, int point, String address,
String number, String areaNumber, String email, String socialProvider) {
this.id = userId;
this.name = name;
this.nickName = nickName;
this.point = point;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
@Getter
public class UserFundingInfoDto {

private Long id;

private String name;
private String nickName;

Expand All @@ -19,6 +21,7 @@ public class UserFundingInfoDto {

public static UserFundingInfoDto of(UserEntity user) {
UserFundingInfoDto dto = new UserFundingInfoDto();
dto.id = user.getId();
dto.setName(user.getName());
dto.setNickName(user.getNickName());
dto.setNumber(user.getNumber());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@Setter
public class UserSocialProfileDto {

private Long id;

private String name;
private String nickName;
private Long followCount;
Expand All @@ -22,6 +24,7 @@ public class UserSocialProfileDto {

public static UserSocialProfileDto of(UserEntity user, Long followCount, Long isFollow) {
UserSocialProfileDto dto = new UserSocialProfileDto();
dto.id = user.getId();
dto.followCount = followCount;
dto.name = user.getName();
dto.nickName = user.getNickName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
@ToString
public class UserSummeryInfoDto {

private Long id;

private String name;
private String nickName;

public static UserSummeryInfoDto of(UserEntity user) {
UserSummeryInfoDto dto = new UserSummeryInfoDto();
dto.id = user.getId();
dto.name = user.getName();
dto.nickName = user.getNickName();
return dto;
Expand Down
Loading