From 5289f01fd533c67a218b39ce857180589f86eafb Mon Sep 17 00:00:00 2001 From: liberhe <411497616@qq.com> Date: Wed, 13 Dec 2023 16:11:58 +0800 Subject: [PATCH] fix the interface of resume --- .../com/dl/officialsite/member/MemberController.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/dl/officialsite/member/MemberController.java b/src/main/java/com/dl/officialsite/member/MemberController.java index f5046435..b6995592 100644 --- a/src/main/java/com/dl/officialsite/member/MemberController.java +++ b/src/main/java/com/dl/officialsite/member/MemberController.java @@ -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; @@ -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; @@ -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 = memberRepository.findByAddress(address); + if (!member.isPresent()) { return BaseResponse.failWithReason("1001", "no user found"); } - return BaseResponse.successWithData(member.getResume()); + return BaseResponse.successWithData(member.get().getResume()); }