Skip to content

Commit

Permalink
feat: modal, index header, footer 수정 #45 (#54)
Browse files Browse the repository at this point in the history
* feat: modal, index header, footer 수정 #45

* feat : Login, Join Link 추가

* feat : footer 링크 추가 및 Project 정보 추가

* feat : Header수정, 및 Bootstrap파일 변경을 위해서 Bootstrap 직접 static에서 가져오도록 변경, 관리자 계정 쿼리 추가

* feat : 관리자 UI작업중

* style : footer size 변경

* feat : 로그아웃 li 추가, 로그인시 사용자 닉네임과 포인트 출력 추가

* style : UI Header, 관리자 컷

* feat : 메인페이지 UI
- 경매품 이미지 출력 및 Detail페이지로 이동 할 수 있게 a태그 설정.
- 출력할 물품이 없는 경우에 맞는 Block추가
- More 버튼 이벤트 추가
    - Vanila Javascript Function 생성 및 인자값에 따라 다르게 가져 올 수 있도록 생성.

* feat : index 누락 태그 추가

* feat: 모달 ui 작성 #45

* feat: footer, index 수정 #45

* feat: index background 설정 #45

* feat: popup 구현, ui 수정 #45

* feat: popup 수정 #45

* feat: popup 완료 #45

* refactor : cut

---------

Co-authored-by: donsonioc2010 <whddnjs822@gmail.com>
  • Loading branch information
bongsh0112 and donsonioc2010 authored Sep 25, 2023
1 parent be86ecf commit f473b79
Show file tree
Hide file tree
Showing 66 changed files with 43,507 additions and 311 deletions.
32 changes: 23 additions & 9 deletions Api/src/main/java/picasso/server/api/HomeController.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
package picasso.server.api;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;
import java.util.Set;
import org.springframework.web.bind.annotation.RequestMapping;
import picasso.server.api.auction.service.PictureService;
import picasso.server.domain.domains.items.PictureStatus;


@Slf4j
@RequestMapping("/")
@Controller
@RequiredArgsConstructor
public class HomeController {
@GetMapping("/")
public String index() {

private final PictureService pictureService;

@GetMapping
public String index(Model model) {
// 관리자 승인된 경매전 게시물
model.addAttribute("afterApprove",
pictureService
.preparePictureInfoPage(0, 10, PictureStatus.AFTER_APPROVE)
.getContent()
);
// 현재 경매중인 게시물
model.addAttribute("bidding",
pictureService.preparePictureInfoPage(0, 10, PictureStatus.BIDDING)
.getContent()
);
return "index";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
@RequiredArgsConstructor
@Controller
public class PaymentController {

private final PaymentService paymentService;
private final UserService userService;

@GetMapping("/payment")
public String paymentForm() {
return "exchange";
}

@ResponseBody
@PostMapping("/payment")
public void createPayment(@RequestBody PostCreatePaymentRequest body) {
log.info("{} {} {} {} {} {}", body.getPayResult(), body.getUserId(), body.getMerchantUid(), body.getProductName(), body.getPgProvider(), body.getPaidAmount());
paymentService.savePaymentHistory(body);
Optional<User> user = userService.findUserById(body.getUserId());
user.ifPresent(u -> u.updatePoint(body.getPaidAmount()));
}

private final PaymentService paymentService;
private final UserService userService;

@GetMapping("/payment")
public String paymentForm() {
return "payment/payment";
}

@ResponseBody
@PostMapping("/payment")
public void createPayment(@RequestBody PostCreatePaymentRequest body) {
paymentService.savePaymentHistory(body);
Optional<User> user = userService.findUserById(body.getUserId());
user.ifPresent(u -> u.updatePoint(body.getPaidAmount()));
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f473b79

Please sign in to comment.