일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 자바 #java #이클립스 #eclipse #switch #switch문 #사칙연산 #계산기 #calculator #간단한계산기
- Spring
- 숫자정렬
- Java
- 스프링
- 배열정렬
- 자바GUI
- 어노테이션
- 오름차순정렬
- 버블소트
- GUI
- 내림차순정렬
- 자바 계산기
- 알고리즘
- Swing
- 계산기
- 자바
- 버블정렬
- Eclipse
- 이클립스
- 자바알고리즘
- 이클립스 #이클립스단축키 #자바 #자바단축키
- MVC
- annotation
- 계산기GUI
- Today
- Total
온 코딩
[게시판] Repository - 테이블 조인으로 함께 출력해야 할 값 설정 본문
1. 페이지 별 출력 값
1) list.html
- 카테고리 출력
- 진행 중 경매
: AuctionList - title, category, doDateTime, startPrice, (timer - regDate) , img
: Address - sido, sigungu
- 매칭 된 경매
: AuctionList - title, category, doDateTime , img
: Address - address
: BiddingList - id, offerPrice
- 지난 경매
: AuctionList - title, category, doDateTime(날짜만 잘라서 출력)
: BiddingList - id
2) register.html
3) read.html
: AuctionList - category, title, content, doDateTime, startPrice, driverLicense, age, gender, predicTime, auctionGap, state, (timer-regDate), Id, img
: Address - sido, sigungu or (매칭된 헬퍼거나 올린 유저일 때) address
4) hList.html
- 진행 중인 경매 (카테고리검색, 위치 검색 가능)
AuctionList : title, category, doDateTime, startPrice, (timer-regDate), img
Address : sido, sigungu
2. Repository 메소드 설계
.. 아직 잘 모르겠다.
3. Servie 에서 필요한 메서드 정의
package com.finalproject.ildoduk.service.auction;
import com.finalproject.ildoduk.dto.auction.*;
import com.finalproject.ildoduk.entity.action.*;
import com.finalproject.ildoduk.entity.user.*;
import java.util.*;
public interface AuctionService {
Long register(AuctionListDTO dto);
//경매 등록 메소드
Long BiddingIn(BiddingListDTO dto);
//경매 참여 메소드
//입찰(선택)메소드 - 입찰 시 돈 출금 됨
//경매 삭제 메소드
/* 경매 조회 메소드
진행 중 : x < regDate+1h
매칭 완료 : regDate+1h < x < doDateTime
진행 완료 : doDateTime < x
*/
Optional<AuctionList> getAuction(Long no);
//시간얻는 함수
long timer(Optional<AuctionList> auction);
//현황조회 메소드
//검색기능 - 지역별 검색 / 카테고리별 검색
default AuctionList dtoToEntity(AuctionListDTO dto){
User user = User.builder().id(dto.getId()).build();
AuctionList auctionList = AuctionList.builder().aucSeq(dto.getAucSeq()).id(user).doDateTime(dto.getDoDateTime()).auctionGap(dto.getAuctionGap())
.regDate(dto.getRegDate()).content(dto.getContent()).title(dto.getTitle()).level(dto.getLebel()).startPrice(dto.getStartprice())
.age(dto.getAge()).category(dto.getCategory()).driverLicense(dto.getDriverLicense()).gender(dto.getGender())
.predictHour(dto.getPredicHour()).state(dto.getState()).build();
return auctionList;
}
default BiddingList dtoToEntity(BiddingListDTO dto){
User user = User.builder().id(dto.getId()).build();
AuctionList auctionList = AuctionList.builder().aucSeq(dto.getAucSeq()).build();
BiddingList biddingList = BiddingList.builder().offerPrice(dto.getOfferPrice()).id(user).bidSeq(dto.getBidSeq()).chosen(dto.getChosen()).aucSeq(auctionList).build();
return biddingList;
}
}
더 필요한 메서드 있을 수도 있음
현재 최고 문제점
1. 한페이지에 다양한 함수를 쓰고, 다양한 경로설정을 해야하는데 안꼬이고 잘 할 수 있을지
'FINAL PROJECT' 카테고리의 다른 글
[게시판] 필요한 입출력 메소드 만들기 (0) | 2021.07.21 |
---|---|
[게시판] JQuery로 타이머 만들기 - (0) | 2021.07.18 |
[게시판] 게시판 관련 ENTITY, 기본 프로젝트 구조 (0) | 2021.07.16 |
[게시판] 유저전용게시판, 헬퍼전용게시판 (0) | 2021.07.15 |
[경매 기반 심부름 웹 애플리케이션] 20210706 회의록 1 (0) | 2021.07.06 |