diff --git a/src/main/java/zipdabang/server/aws/s3/AmazonS3Manager.java b/src/main/java/zipdabang/server/aws/s3/AmazonS3Manager.java index a335062..3527078 100644 --- a/src/main/java/zipdabang/server/aws/s3/AmazonS3Manager.java +++ b/src/main/java/zipdabang/server/aws/s3/AmazonS3Manager.java @@ -61,6 +61,8 @@ public String generateStepKeyName(Uuid uuid) { return amazonConfig.getRecipeStep() + '/' + uuid.getUuid(); } + public String generateInqueryKeyName(Uuid uuid) {return amazonConfig.getInquery() + '/' + uuid.getUuid();} + // 중복된 UUID가 있다면 중복이 없을때까지 재귀적으로 동작 public Uuid createUUID() { Uuid savedUuid = null; diff --git a/src/main/java/zipdabang/server/config/AmazonConfig.java b/src/main/java/zipdabang/server/config/AmazonConfig.java index 259c6f3..55d7990 100644 --- a/src/main/java/zipdabang/server/config/AmazonConfig.java +++ b/src/main/java/zipdabang/server/config/AmazonConfig.java @@ -38,6 +38,9 @@ public class AmazonConfig { @Value("${cloud.aws.s3.folder.zipdabang-proifile}") private String userProfile; + @Value("${cloud.aws.s3.folder.zipdabang-inquery}") + private String inquery; + private AWSCredentials awsCredentials; diff --git a/src/main/java/zipdabang/server/converter/MemberConverter.java b/src/main/java/zipdabang/server/converter/MemberConverter.java index bd6ead0..d1c5823 100644 --- a/src/main/java/zipdabang/server/converter/MemberConverter.java +++ b/src/main/java/zipdabang/server/converter/MemberConverter.java @@ -2,28 +2,36 @@ import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; +import zipdabang.server.aws.s3.AmazonS3Manager; import zipdabang.server.base.Code; import zipdabang.server.base.exception.handler.MemberException; import zipdabang.server.domain.Category; import zipdabang.server.domain.enums.GenderType; import zipdabang.server.domain.enums.SocialType; +import zipdabang.server.domain.etc.Uuid; +import zipdabang.server.domain.member.*; import zipdabang.server.domain.member.Deregister; import zipdabang.server.domain.member.Terms; import zipdabang.server.domain.member.Member; import zipdabang.server.domain.member.MemberPreferCategory; import zipdabang.server.repository.memberRepositories.MemberRepository; +import zipdabang.server.utils.converter.TimeConverter; import zipdabang.server.utils.dto.OAuthJoin; import zipdabang.server.web.dto.requestDto.MemberRequestDto; import zipdabang.server.web.dto.responseDto.MemberResponseDto; import javax.annotation.PostConstruct; +import java.io.IOException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; @Component @@ -34,8 +42,12 @@ public class MemberConverter { private static MemberRepository staticMemberRepository; + private final AmazonS3Manager amazonS3Manager; + private static String defaultProfileImage; + private static AmazonS3Manager staticAmazonS3Manager; + @Value("${cloud.aws.s3.user-default-image}") public void setDefaultImage(String value) { defaultProfileImage=value; @@ -105,6 +117,7 @@ public static MemberResponseDto.SocialJoinDto toSocialJoinDto(OAuthJoin.OAuthJoi @PostConstruct public void init() { this.staticMemberRepository = this.memberRepository; + this.staticAmazonS3Manager = amazonS3Manager; } @@ -234,6 +247,65 @@ public static MemberResponseDto.TempLoginDto toTempLoginDto(String token){ .build(); } + public static MemberResponseDto.MemberInqueryResultDto toMemberInqueryResultDto(Inquery inquery){ + return MemberResponseDto.MemberInqueryResultDto.builder() + .id(inquery.getId()) + .created_at(inquery.getMember().getCreatedAt()) + .build(); + } + + + public static List toInqueryImage(List imageList) + { + List inqueryImageList = imageList.stream() + .map( + image -> + { + try { + Uuid uuid = staticAmazonS3Manager.createUUID(); + String keyName = staticAmazonS3Manager.generateInqueryKeyName(uuid); + String inqueryImageUrl = staticAmazonS3Manager.uploadFile(keyName, image); + return InqueryImage.builder() + .imageUrl(inqueryImageUrl) + .build(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + ).collect(Collectors.toList()); + return inqueryImageList; + } + + public static Inquery toInquery(MemberRequestDto.InqueryDto request){ + return Inquery.builder() + .title(request.getTitle()) + .body(request.getBody()) + .receiveEmail(request.getEmail()) + .inqueryImageList(new ArrayList<>()) + .build(); + } + + public static MemberResponseDto.InqueryPreviewDto toInqueryPreviewDto(Inquery inquery){ + return MemberResponseDto.InqueryPreviewDto.builder() + .id(inquery.getId()) + .title(inquery.getTitle()) + .createdAt(TimeConverter.ConvertTime(inquery.getCreatedAt())) + .build(); + } + + public static MemberResponseDto.InqueryListDto toInqueryListDto(Page inqueryPage){ + + List inqueryPreviewDtoList = inqueryPage.getContent().stream() + .map(MemberConverter::toInqueryPreviewDto).collect(Collectors.toList()); + + return MemberResponseDto.InqueryListDto.builder() + .inqueryList(inqueryPreviewDtoList) + .isFirst(inqueryPage.isFirst()) + .isLast(inqueryPage.isLast()) + .currentPageElements(inqueryPage.getNumberOfElements()) + .totalElements(inqueryPage.getTotalElements()) + .totalPage(inqueryPage.getTotalPages()) public static Deregister toDeregister(String phoneNum, MemberRequestDto.DeregisterDto request) { return Deregister.builder() diff --git a/src/main/java/zipdabang/server/domain/member/Inquery.java b/src/main/java/zipdabang/server/domain/member/Inquery.java new file mode 100644 index 0000000..4fe4390 --- /dev/null +++ b/src/main/java/zipdabang/server/domain/member/Inquery.java @@ -0,0 +1,47 @@ +package zipdabang.server.domain.member; + +import lombok.*; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; +import zipdabang.server.domain.common.BaseEntity; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.List; + +@Getter +@Builder +@AllArgsConstructor(access = AccessLevel.PROTECTED) +@NoArgsConstructor(access = AccessLevel.PUBLIC) +@DynamicInsert +@DynamicUpdate +@Entity +public class Inquery extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @Column(nullable = false) + private String receiveEmail; + + @Column(nullable = false,length = 20) + private String title; + + @Column(nullable = false,length = 500) + private String body; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "member_id") + private Member member; + + @OneToMany(mappedBy = "inquery", cascade = CascadeType.ALL) + private List inqueryImageList = new ArrayList<>(); + + public void setMember(Member member){ + if(this.member != null) + member.getInqueryList().remove(this); + this.member = member; + member.getInqueryList().add(this); + } +} diff --git a/src/main/java/zipdabang/server/domain/member/InqueryImage.java b/src/main/java/zipdabang/server/domain/member/InqueryImage.java new file mode 100644 index 0000000..746b527 --- /dev/null +++ b/src/main/java/zipdabang/server/domain/member/InqueryImage.java @@ -0,0 +1,34 @@ +package zipdabang.server.domain.member; + +import lombok.*; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; + +@Getter +@Builder +@AllArgsConstructor(access = AccessLevel.PROTECTED) +@NoArgsConstructor(access = AccessLevel.PUBLIC) +@DynamicInsert +@DynamicUpdate +@Entity +public class InqueryImage { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String imageUrl; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "inquery_id") + private Inquery inquery; + + public void setInquery(Inquery inquery){ + if (this.inquery != null) + inquery.getInqueryImageList().remove(this); + this.inquery = inquery; + inquery.getInqueryImageList().add(this); + } +} diff --git a/src/main/java/zipdabang/server/domain/member/Member.java b/src/main/java/zipdabang/server/domain/member/Member.java index 02a9a3f..ec8a7e8 100644 --- a/src/main/java/zipdabang/server/domain/member/Member.java +++ b/src/main/java/zipdabang/server/domain/member/Member.java @@ -104,6 +104,9 @@ public class Member extends BaseEntity { @OneToMany(mappedBy = "member", cascade = CascadeType.ALL) private List fcmTokenList; + @OneToMany(mappedBy = "member", cascade = CascadeType.ALL) + private List inqueryList; + public void setProfileUrl(String profileUrl) { this.profileUrl = profileUrl; diff --git a/src/main/java/zipdabang/server/repository/memberRepositories/InqueryImageRepository.java b/src/main/java/zipdabang/server/repository/memberRepositories/InqueryImageRepository.java new file mode 100644 index 0000000..11c455f --- /dev/null +++ b/src/main/java/zipdabang/server/repository/memberRepositories/InqueryImageRepository.java @@ -0,0 +1,7 @@ +package zipdabang.server.repository.memberRepositories; + +import org.springframework.data.jpa.repository.JpaRepository; +import zipdabang.server.domain.member.InqueryImage; + +public interface InqueryImageRepository extends JpaRepository { +} diff --git a/src/main/java/zipdabang/server/repository/memberRepositories/InqueryRepository.java b/src/main/java/zipdabang/server/repository/memberRepositories/InqueryRepository.java new file mode 100644 index 0000000..4f88795 --- /dev/null +++ b/src/main/java/zipdabang/server/repository/memberRepositories/InqueryRepository.java @@ -0,0 +1,12 @@ +package zipdabang.server.repository.memberRepositories; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.jpa.repository.JpaRepository; +import zipdabang.server.domain.member.Inquery; +import zipdabang.server.domain.member.Member; + +public interface InqueryRepository extends JpaRepository { + + Page findByMember(Member member, PageRequest pageRequest); +} diff --git a/src/main/java/zipdabang/server/service/MemberService.java b/src/main/java/zipdabang/server/service/MemberService.java index c633731..63607db 100644 --- a/src/main/java/zipdabang/server/service/MemberService.java +++ b/src/main/java/zipdabang/server/service/MemberService.java @@ -1,6 +1,9 @@ package zipdabang.server.service; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; import zipdabang.server.domain.Category; +import zipdabang.server.domain.member.Inquery; import zipdabang.server.domain.enums.DeregisterType; import zipdabang.server.domain.member.Member; import zipdabang.server.domain.member.Terms; @@ -40,9 +43,13 @@ public interface MemberService { String tempLoginService(); + + Inquery createInquery(Member member, MemberRequestDto.InqueryDto request); + + Page findInquery(Member member, Integer page); public void memberDeregister(Member member, MemberRequestDto.DeregisterDto request); public Long saveDeregisterInfo(String phoneNum, MemberRequestDto.DeregisterDto request); public void inactivateMember(Member member); public void saveDeregisterReasons(Long deregisterId, List deregisterTypeList); - } +} diff --git a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java index 9488e73..2271700 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java @@ -2,6 +2,10 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Sort; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -25,6 +29,10 @@ import zipdabang.server.repository.TermsRepository; import zipdabang.server.redis.service.RedisService; import zipdabang.server.repository.CategoryRepository; +import zipdabang.server.repository.memberRepositories.FcmTokenRepository; +import zipdabang.server.repository.memberRepositories.InqueryRepository; +import zipdabang.server.repository.memberRepositories.MemberRepository; +import zipdabang.server.repository.memberRepositories.PreferCategoryRepository; import zipdabang.server.repository.memberRepositories.*; import zipdabang.server.service.MemberService; import zipdabang.server.utils.dto.OAuthJoin; @@ -60,10 +68,15 @@ public class MemberServiceImpl implements MemberService { private final RedisService redisService; private final FcmTokenRepository fcmTokenRepository; + + private final InqueryRepository inqueryRepository; private final AmazonS3Manager s3Manager; private final DeregisterRepository deregisterRepository; private final DeregisterReasonRepository deregisterReasonRepository; + @Value("${paging.size}") + private Integer pageSize; + @Override @Transactional public OAuthResult.OAuthResultDto SocialLogin(MemberRequestDto.OAuthRequestDto request,String type) { @@ -192,6 +205,29 @@ public String tempLoginService() { return tokenProvider.createTempAccessToken(Arrays.asList(new SimpleGrantedAuthority("GUEST"))); } + @Override + @Transactional + public Inquery createInquery(Member member, MemberRequestDto.InqueryDto request) { + Inquery inquery = MemberConverter.toInquery(request); + List inqueryImageList = null; + if(request.getImageList() != null) + if(request.getImageList().size() > 0) { + inqueryImageList = MemberConverter.toInqueryImage(request.getImageList()); + inqueryImageList.forEach(inqueryImage -> inqueryImage.setInquery(inquery)); + } + inquery.setMember(member); + return inqueryRepository.save(inquery); + } + + @Override + public Page findInquery(Member member, Integer page) { + page -= 1; + Page inqueries = inqueryRepository.findByMember(member, PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "createdAt"))); + if(inqueries.getTotalPages() <= page) + throw new MemberException(Code.OVER_PAGE_INDEX_ERROR); + return inqueries; + } + @Override @Transactional(readOnly = false) public OAuthJoin.OAuthJoinDto joinInfoComplete(MemberRequestDto.MemberInfoDto request, String type){ diff --git a/src/main/java/zipdabang/server/utils/converter/TimeConverter.java b/src/main/java/zipdabang/server/utils/converter/TimeConverter.java index fa6571d..71bbc10 100644 --- a/src/main/java/zipdabang/server/utils/converter/TimeConverter.java +++ b/src/main/java/zipdabang/server/utils/converter/TimeConverter.java @@ -12,7 +12,7 @@ @RequiredArgsConstructor public class TimeConverter { - public String ConvertTime(LocalDateTime time) { + public static String ConvertTime(LocalDateTime time) { LocalDateTime currentTime = LocalDateTime.now(); String result = null; diff --git a/src/main/java/zipdabang/server/validation/annotation/CheckPage.java b/src/main/java/zipdabang/server/validation/annotation/CheckPage.java new file mode 100644 index 0000000..05b1b60 --- /dev/null +++ b/src/main/java/zipdabang/server/validation/annotation/CheckPage.java @@ -0,0 +1,17 @@ +package zipdabang.server.validation.annotation; + +import zipdabang.server.validation.validator.CheckPageValidator; + +import javax.validation.Constraint; +import javax.validation.Payload; +import java.lang.annotation.*; + +@Documented +@Constraint(validatedBy = CheckPageValidator.class) +@Target( { ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER }) +@Retention(RetentionPolicy.RUNTIME) +public @interface CheckPage { + String message() default "해당하는 페이지가 존재하지 않습니다."; + Class[] groups() default {}; + Class[] payload() default {}; +} diff --git a/src/main/java/zipdabang/server/validation/validator/CheckPageValidator.java b/src/main/java/zipdabang/server/validation/validator/CheckPageValidator.java new file mode 100644 index 0000000..0fe8b86 --- /dev/null +++ b/src/main/java/zipdabang/server/validation/validator/CheckPageValidator.java @@ -0,0 +1,29 @@ +package zipdabang.server.validation.validator; + +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; +import zipdabang.server.base.Code; +import zipdabang.server.domain.member.Member; +import zipdabang.server.validation.annotation.CheckPage; + +import javax.validation.ConstraintValidator; +import javax.validation.ConstraintValidatorContext; + +@Component +@RequiredArgsConstructor +public class CheckPageValidator implements ConstraintValidator { + @Override + public void initialize(CheckPage constraintAnnotation) { + ConstraintValidator.super.initialize(constraintAnnotation); + } + + @Override + public boolean isValid(Integer value, ConstraintValidatorContext context) { + if(value < 1 || value == null) { + context.disableDefaultConstraintViolation(); + context.buildConstraintViolationWithTemplate(Code.UNDER_PAGE_INDEX_ERROR.toString()).addConstraintViolation(); + return false; + } + return true; + } +} diff --git a/src/main/java/zipdabang/server/web/controller/MemberRestController.java b/src/main/java/zipdabang/server/web/controller/MemberRestController.java index 0e81d9b..1143996 100644 --- a/src/main/java/zipdabang/server/web/controller/MemberRestController.java +++ b/src/main/java/zipdabang/server/web/controller/MemberRestController.java @@ -1,6 +1,7 @@ package zipdabang.server.web.controller; import com.fasterxml.jackson.core.JsonProcessingException; +import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.data.domain.Page; import org.springframework.http.MediaType; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PatchMapping; @@ -25,12 +27,15 @@ import zipdabang.server.converter.MemberConverter; import zipdabang.server.converter.RootConverter; import zipdabang.server.domain.Category; +import zipdabang.server.domain.member.Inquery; import zipdabang.server.domain.member.Member; import zipdabang.server.redis.domain.RefreshToken; import zipdabang.server.redis.service.RedisService; import zipdabang.server.service.MemberService; import zipdabang.server.sms.service.SmsService; import zipdabang.server.utils.dto.OAuthJoin; +import zipdabang.server.validation.annotation.CheckPage; +import zipdabang.server.validation.annotation.CheckTempMember; import zipdabang.server.validation.annotation.CheckDeregister; import zipdabang.server.web.dto.requestDto.MemberRequestDto; import zipdabang.server.web.dto.responseDto.MemberResponseDto; @@ -40,6 +45,7 @@ import zipdabang.server.utils.dto.OAuthResult; import zipdabang.server.web.dto.responseDto.RootResponseDto; +import javax.validation.Valid; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -334,6 +340,32 @@ public ResponseDto tempLogin() { return ResponseDto.of(MemberConverter.toTempLoginDto(memberService.tempLoginService())); } + @Operation(summary = "🎪figma[더보기 - 오류 신고 및 신고하기] 오류 신고하기 API ✔️🔑", description = "오류 신고하기 API 입니다.") + @Parameters({ + @Parameter(name = "member", hidden = true), + }) + @PostMapping(value = "/members/inquiries",consumes ={ MediaType.MULTIPART_FORM_DATA_VALUE } ) + public ResponseDto createInquery(@CheckTempMember @AuthMember Member member, @ModelAttribute @Valid MemberRequestDto.InqueryDto request){ + Inquery inquery = memberService.createInquery(member, request); + return ResponseDto.of(MemberConverter.toMemberInqueryResultDto(inquery)); + } + + @Operation(summary = "🎪[더보기 - 오류 신고및 신고하기5] 내가 문의 한 오류 모아보기 (페이징 포함) ✔️🔑", description = "내가 신고한 오류 모아보기 입니다.") + @GetMapping("/members/inquiries") + @Parameters({ + @Parameter(name = "member", hidden = true), + @Parameter(name = "page", description = "페이지 번호, 1부터 시작") + }) + @ApiResponses({ + @ApiResponse(responseCode = "2000", description = "OK 성공, access Token과 refresh 토큰을 반환함"), + @ApiResponse(responseCode = "4054", description = "BAD_REQEUST , 페이지 번호가 없거나 0 이하", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + @ApiResponse(responseCode = "4055", description = "BAD_REQEUST , 페이지 번호가 초과함", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + + }) + public ResponseDto showInquery(@CheckTempMember @AuthMember Member member, @RequestParam(name = "page",required = true) @CheckPage Integer page){ + Page inqueryPage = memberService.findInquery(member, page); + return ResponseDto.of(MemberConverter.toInqueryListDto(inqueryPage)); + } @Operation(summary = "[figma 더보기 - 회원 탈퇴] 회원 탈퇴 API ✔️", description = "회원 탈퇴 API입니다.
테스트를 위해 임시로 해당 유저의 상세주소를 \"TEST\" 로 설정하면(상세정보 수정 API - zipCode) 탈퇴 불가능한 경우로 처리되도록 해놨습니다.
deregisterTypes 종류
"+ "- NOTHING_TO_BUY(\"사고싶은 물건이 없어요.\"),
" + "- DISINTERESTED(\"앱을 이용하지 않아요.\"),
" + @@ -354,7 +386,4 @@ public ResponseDto deregister(@CheckDeregiste return ResponseDto.of(MemberConverter.toMemberStatusDto(member.getMemberId(), "deregister")); } - - - } diff --git a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java index 0f92086..ed9fd3d 100644 --- a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java +++ b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java @@ -5,8 +5,10 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; import java.util.List; +import org.springframework.lang.Nullable; import org.springframework.web.multipart.MultipartFile; import zipdabang.server.domain.enums.DeregisterType; import zipdabang.server.web.dto.responseDto.MemberResponseDto; @@ -151,6 +153,21 @@ public static class IssueTokenDto{ String refreshToken; } +<<<<<<< HEAD + @Getter @Setter + public static class InqueryDto{ + + @NotBlank + String email; + + @NotBlank @Size(max = 20) + String title; + + @NotBlank @Size(max = 500) + String body; + + @Nullable + List imageList; @Getter @Setter public static class DeregisterDto { diff --git a/src/main/java/zipdabang/server/web/dto/responseDto/MemberResponseDto.java b/src/main/java/zipdabang/server/web/dto/responseDto/MemberResponseDto.java index 622da69..5090f60 100644 --- a/src/main/java/zipdabang/server/web/dto/responseDto/MemberResponseDto.java +++ b/src/main/java/zipdabang/server/web/dto/responseDto/MemberResponseDto.java @@ -154,4 +154,35 @@ public static class MemberPreferCategoryDto{ } + @Builder + @Getter + @AllArgsConstructor(access = AccessLevel.PROTECTED) + @NoArgsConstructor(access = AccessLevel.PROTECTED) + public static class MemberInqueryResultDto{ + private Long id; + private LocalDateTime created_at; + } + + @Builder + @Getter + @AllArgsConstructor(access = AccessLevel.PROTECTED) + @NoArgsConstructor(access = AccessLevel.PROTECTED) + public static class InqueryPreviewDto{ + Long id; + String title; + String createdAt; + } + + @Builder + @Getter + @AllArgsConstructor(access = AccessLevel.PROTECTED) + @NoArgsConstructor(access = AccessLevel.PROTECTED) + public static class InqueryListDto{ + List inqueryList; + Long totalElements; + Integer currentPageElements; + Integer totalPage; + Boolean isFirst; + Boolean isLast; + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 00bb558..9c063a3 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -12,11 +12,11 @@ spring: enabled: always ## # local redis -# redis: -# host: localhost - redis: - host: zipdabang-redis.osattk.ng.0001.apn2.cache.amazonaws.com + host: localhost + +# redis: +# host: zipdabang-redis.osattk.ng.0001.apn2.cache.amazonaws.com batch: jdbc: initialize-schema: always @@ -62,6 +62,7 @@ cloud: zipdabang-recipe-thumbNail: recipe/thumbnail zipdabang-recipe-steps : recipe/steps zipdabang-proifile : user + zipdabang-inquery : inquery # zipdabang-facilities : facilities user-default-image: ${USER_DEFAULT_IMAGE} region: