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

feat: add the user get phoneNumber #19

Merged
merged 1 commit into from
Dec 26, 2023
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
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.h2database:h2:2.1.214'

}

dependencyManagement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.bit.lotte.flower.user.common.valueobject.UserId;
import com.bit.lotte.flower.user.social.dto.command.UserLoginCommand;
import com.bit.lotte.flower.user.social.dto.response.UserLoginDataResponse;
import com.bit.lotte.flower.user.social.service.GetUserInfoService;
import com.bit.lotte.flower.user.social.service.MapAuthIdToUserIdService;
import com.bit.lotte.flower.user.social.service.SocialUserLoginManager;
import com.bit.lotte.flower.user.social.service.SoftDeleteStrategyService;
Expand All @@ -17,10 +18,11 @@

@RequiredArgsConstructor
@RestController
public class UserFeignController {
public class SocialUserFeignController {

private final MapAuthIdToUserIdService<AuthId> mapAuthIdToUserIdService;
private final SoftDeleteStrategyService softDeleteStrategyService;
private final GetUserInfoService getUserInfoService;
private final SocialUserLoginManager socialUserLoginManager;


Expand All @@ -32,6 +34,11 @@ public CommonResponse<UserLoginDataResponse> userLogin(
}


@PutMapping("/client/users/{userId}/phone-number")
CommonResponse<String> getUserPhoneNumber(@PathVariable Long userId) {
return CommonResponse.success(getUserInfoService.getUserdata(userId).getPhoneNumber());
}

@PutMapping("/client/users/{userId}")
CommonResponse<Boolean> delete(@PathVariable Long userId) {
UserId convertedUserId = mapAuthIdToUserIdService.convert(new AuthId(userId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import bloomingblooms.response.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.bit.lotte.flower.user.store.http.feign;

import com.bit.lotte.flower.user.store.http.feign.dto.UpdateStoreManagerPendingStausDto;
import bloomingblooms.response.CommonResponse;
import com.bit.lotte.flower.user.store.http.feign.dto.UpdateStoreManagerPendingStatusDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "init-store-manager-status",url = "${service.auth.domain}")
public interface InitStoreManagerStatusPendingFeignRequest {
@PatchMapping("/client/admin/store-manager")
public void publish(@RequestBody UpdateStoreManagerPendingStausDto dto);
@PutMapping("/client/store-manager")
public CommonResponse<String> publish(@RequestBody UpdateStoreManagerPendingStatusDto dto);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@AllArgsConstructor
@NoArgsConstructor
@Getter
public class UpdateStoreManagerPendingStausDto {
public class UpdateStoreManagerPendingStatusDto {

@NotNull
private final String status = "ROLE_STORE_MANAGER_PENDING";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.bit.lotte.flower.user.common.valueobject.UserId;
import com.bit.lotte.flower.user.store.http.feign.InitStoreManagerStatusPendingFeignRequest;
import com.bit.lotte.flower.user.store.http.feign.dto.UpdateStoreManagerPendingStausDto;
import com.bit.lotte.flower.user.store.http.feign.dto.UpdateStoreManagerPendingStatusDto;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand All @@ -15,6 +15,6 @@ public class InitStoreManagerAuthorizationPublisherImpl implements

@Override
public void publish(UserId storeManagerId) {
request.publish(new UpdateStoreManagerPendingStausDto(storeManagerId.getValue()));
request.publish(new UpdateStoreManagerPendingStatusDto(storeManagerId.getValue()));
}
}
Loading