diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java index 2eeaff5..12af83d 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java @@ -22,7 +22,6 @@ import com.elink.esua.epdc.dto.police.result.PoliceResultDTO; import com.elink.esua.epdc.dto.project.form.ProjectListFormDTO; import com.elink.esua.epdc.dto.project.form.ProjectScoreFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; -import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyQuestionFormDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; @@ -382,15 +381,14 @@ public class ApiPropertyController { /** * 心理咨询师详细信息 * - * @param userDetail 用户信息 - * @param formDto 查询参数 + * @param psychologistId 咨询师id * @return com.elink.esua.epdc.commons.tools.utils.Result> * @author zhangyuan * @date 2020/6/8 09:17 */ - @GetMapping("psychology/psychologistInfo") - public Result psychologistInfo(@LoginUser TokenDto userDetail, PsychologistInfoFormDTO formDto) { - return propertyService.psychologistInfo(userDetail, formDto); + @GetMapping("psychology/psychologistInfo/{psychologistId}") + public Result psychologistInfo(@PathVariable("psychologistId") String psychologistId) { + return propertyService.psychologistInfo(psychologistId); } /** diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java index 2990edc..bf8c2b8 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java @@ -19,7 +19,6 @@ import com.elink.esua.epdc.dto.project.form.ProjectScoreFormDTO; import com.elink.esua.epdc.dto.project.result.ProjectDetailResultDTO; import com.elink.esua.epdc.dto.project.result.ProjectListResultDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; -import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyQuestionFormDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; @@ -36,6 +35,7 @@ import com.elink.esua.epdc.feign.fallback.PropertyFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -304,13 +304,13 @@ public interface PropertyFeignClient { /*** * 心理咨询师详细信息 - * @param fromDTO + * @param psychologistId * @return com.elink.esua.epdc.commons.tools.utils.Result> * @author zhangyuan * @date 2020/6/8 9:25 */ - @GetMapping(value = "property/epdc-app/psychology/psychologistInfo", consumes = MediaType.APPLICATION_JSON_VALUE) - Result psychologistInfo(@RequestBody PsychologistInfoFormDTO fromDTO); + @GetMapping(value = "property/epdc-app/psychology/psychologistInfo/{psychologistId}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result psychologistInfo(@PathVariable("psychologistId") String psychologistId); /*** * 提交心理咨询问题 diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java index fe36244..0abfbda 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java @@ -20,7 +20,6 @@ import com.elink.esua.epdc.dto.project.form.ProjectScoreFormDTO; import com.elink.esua.epdc.dto.project.result.ProjectDetailResultDTO; import com.elink.esua.epdc.dto.project.result.ProjectListResultDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; -import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyQuestionFormDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; @@ -175,8 +174,8 @@ public class PropertyFeignClientFallback implements PropertyFeignClient { } @Override - public Result psychologistInfo(PsychologistInfoFormDTO formDto) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "psychologistInfo", formDto); + public Result psychologistInfo(String psychologistId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "psychologistInfo", psychologistId); } @Override diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java index 518ae70..81b0084 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java @@ -23,7 +23,6 @@ import com.elink.esua.epdc.dto.project.form.ProjectScoreFormDTO; import com.elink.esua.epdc.dto.project.result.ProjectDetailResultDTO; import com.elink.esua.epdc.dto.project.result.ProjectListResultDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; -import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyQuestionFormDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; @@ -35,6 +34,7 @@ import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; +import org.springframework.web.bind.annotation.PathVariable; import java.util.List; @@ -296,15 +296,14 @@ public interface PropertyService { Result> listPsychiatrist(TokenDto userDetail, PsychologistFormDTO formDto); /** - * 心理咨询师列表 + * 心理咨询师详细信息 * - * @param userDetail 用户信息 - * @param formDto 查询参数 + * @param psychologistId 咨询师id * @return com.elink.esua.epdc.commons.tools.utils.Result> * @author zhangyuan * @date 2020/6/8 09:15 */ - Result psychologistInfo(TokenDto userDetail, PsychologistInfoFormDTO formDto); + Result psychologistInfo(String psychologistId); /** * 提交心理咨询问题 diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java index f038f62..429d833 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java @@ -29,7 +29,6 @@ import com.elink.esua.epdc.dto.project.form.ProjectScoreFormDTO; import com.elink.esua.epdc.dto.project.result.ProjectDetailResultDTO; import com.elink.esua.epdc.dto.project.result.ProjectListResultDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; -import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyQuestionFormDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; @@ -49,6 +48,7 @@ import com.elink.esua.epdc.service.PropertyService; import com.elink.esua.epdc.utils.UserTagUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.PathVariable; import java.util.List; @@ -344,9 +344,8 @@ public class PropertyServiceImpl implements PropertyService { } @Override - public Result psychologistInfo(TokenDto userDetail, PsychologistInfoFormDTO formDto) { - formDto.setGridId(userDetail.getGridId()); - return propertyFeignClient.psychologistInfo(formDto); + public Result psychologistInfo(String psychologistId) { + return propertyFeignClient.psychologistInfo(psychologistId); } @Override