Skip to content

Commit

Permalink
Feat : #33 쓸데없는 주석 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
hyobim committed Jan 10, 2023
1 parent 1d650bb commit fd4cc94
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class GroupbuyingService {
private final ProductRepository productRepository;
private final UserReportRepository userReportRepository;

//글 등록
public Product createProduct(GroupBuyingPostRequest product, String id) {
Optional<User> user = userRepository.findByLoginId(id);

Expand All @@ -64,7 +63,6 @@ public Product createProduct(GroupBuyingPostRequest product, String id) {

}

//글 수정
public Product updateProduct(GroupBuyingPostRequest product, Long id) {
Optional<Product> optionalProduct = productRepository.findById(id);
if (!optionalProduct.isPresent()) {
Expand All @@ -83,7 +81,6 @@ public Product updateProduct(GroupBuyingPostRequest product, Long id) {
}


//글 삭제
public Product deleteProduct(Long id, String userId) {

Optional<User> user = userRepository.findByLoginId(userId);
Expand Down Expand Up @@ -116,7 +113,6 @@ public Product deleteProduct(Long id, String userId) {
}
}

//같이구매 메인조회

public ProductResponse groupBuyingMain(String loginId) {
Optional<User> user = userRepository.findByLoginId(loginId);
Expand Down Expand Up @@ -216,14 +212,11 @@ public ProductResponse groupBuyingMain(String loginId) {
}
}

//내가 등록한 같이구매, 내가 참여한 같이구매
public List<ProductInfo> myGroupBuying(String loginId, String type) {
Optional<User> user = userRepository.findByLoginId(loginId);
List<ProductInfo> newList = new ArrayList<>();
List<Product> loginUserProductList = null;
List<JoinPeople> loginUserJoinPeopleList = null;
List<JoinPeople> loginUserJoinPeopleList2 = null;
List<JoinStorage> loginUserJoinStorageList = null;

if (type.equals("register")) {
loginUserProductList = productRepository.findByWriter(loginId);
Expand Down Expand Up @@ -276,7 +269,6 @@ public List<ProductInfo> myGroupBuying(String loginId, String type) {
if (!user.isPresent()) {
throw new BaseException(ErrorCode.USERS_EMPTY_USER_ID);
}
// String loginIdx = String.valueOf(userRepository.findByLoginId(loginId).get().getUserIdx());
loginUserJoinPeopleList = joinPeopleRepository.findByJoinStatusAndJoinUserLoginId(loginId);
loginUserJoinPeopleList.forEach(people -> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public CommonResponse<Message> createMessage(@RequestHeader("token") String acce
list.forEach(id->{
if(userRepository.findByUserIdx(id).isEmpty()){
throw new BaseException(ErrorCode.USERS_EMPTY_USER_ID);
//에러처리
}
Long userIdx = userRepository.findByLoginId(userId).get().getUserIdx();
if(id.equals(userIdx)){
Expand Down

0 comments on commit fd4cc94

Please sign in to comment.