Skip to content

Commit

Permalink
Merge pull request #87 from yanyanho/main
Browse files Browse the repository at this point in the history
fix the interface of resume
  • Loading branch information
yanyanho authored Dec 13, 2023
2 parents c55ff51 + 18d6704 commit 4eccf33
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main/java/com/dl/officialsite/member/MemberController.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.dl.officialsite.member;


import com.dl.officialsite.aave.AaveService;
import com.dl.officialsite.common.base.BaseResponse;
import com.dl.officialsite.common.enums.CodeEnums;
import com.dl.officialsite.ipfs.IPFSService;
import org.hibernate.exception.ConstraintViolationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -15,7 +12,6 @@
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
Expand Down Expand Up @@ -55,11 +51,11 @@ BaseResponse getMemberByAddress(@RequestParam String address) {
@RequestMapping(value = "/resume/query", method = RequestMethod.GET)
BaseResponse getMemberResumeByAddress(@RequestParam String address) {

MemberWithTeam member = memberService.getMemberWithTeamInfoByAddress(address);
if (member == null) {
Optional<Member> member = memberRepository.findByAddress(address);
if (!member.isPresent()) {
return BaseResponse.failWithReason("1001", "no user found");
}
return BaseResponse.successWithData(member.getResume());
return BaseResponse.successWithData(member.get().getResume());
}


Expand Down

0 comments on commit 4eccf33

Please sign in to comment.