From ec6279db90706b6358351a252481401989ffe44b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 9 Jun 2020 16:05:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF--=E5=BF=83=E7=90=86?= =?UTF-8?q?=E5=92=A8=E8=AF=A2-=E6=88=91=E5=9B=9E=E7=AD=94=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=88=97=E8=A1=A8api=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ApiWorkPropertyController.java | 21 ++++++++++++++++--- .../esua/epdc/feign/PropertyFeignClient.java | 10 +++++++-- .../epdc/feign/WorkPropertyFeignClient.java | 13 ++++++++++++ .../WorkPropertyFeignClientFallback.java | 11 ++++++++-- .../epdc/service/WorkPropertyService.java | 12 +++++++++++ .../service/impl/WorkPropertyServiceImpl.java | 8 +++++++ 6 files changed, 68 insertions(+), 7 deletions(-) diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java index 73e1810..3d66c44 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java @@ -1,7 +1,9 @@ package com.elink.esua.epdc.controller; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; import com.elink.esua.epdc.service.WorkPropertyService; import org.springframework.beans.factory.annotation.Autowired; @@ -27,12 +29,25 @@ public class ApiWorkPropertyController { * 工作端--待解答的心理咨询问题列表 * * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyUnansweredResultDTO > - * @params [userDetail, formDto] - * @author liuchuang - * @since 2019/10/22 15:33 + * @params [formDto] + * @author zhangyuan + * @since 2020/6/9 15:33 */ @GetMapping("psychology/listQuestion") public Result> listQuestion(PsychologyUnansweredFormDTO formDto) { return workPropertyService.listUnansweredQuestion(formDto); } + + /** + * 工作端--心理咨询-我回答的问题列表 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerOfMineResultDTO > + * @params [formDto] + * @author zhangyuan + * @since 2020/6/9 15:33 + */ + @GetMapping("psychology/listMyQuestion") + public Result> listMyQuestion(PsychologyAnswerFormDTO formDto) { + return workPropertyService.listMyQuestion(formDto); + } } 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 cde9086..4104f30 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 @@ -18,8 +18,14 @@ import com.elink.esua.epdc.dto.project.form.ProjectListFormDTO; 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.*; -import com.elink.esua.epdc.dto.psychology.result.*; +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; +import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerListResultDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerListUserResultDTO; import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; import com.elink.esua.epdc.dto.topic.form.TopicDetailFormDTO; import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java index 8b52558..a17af58 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java @@ -3,7 +3,9 @@ package com.elink.esua.epdc.feign; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.config.FeignRequestInterceptor; +import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; import com.elink.esua.epdc.feign.fallback.WorkPropertyFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; @@ -30,4 +32,15 @@ public interface WorkPropertyFeignClient { */ @PostMapping(value = "news/epdc-app/psychology/listUnansweredQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) Result> listUnansweredQuestion(@RequestBody PsychologyUnansweredFormDTO fromDTO); + + /*** + * 工作端--待解答的心理咨询问题列表 + * @param fromDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListResultDTO > + * @author zhangyuan + * @date 2020/6/8 9:25 + */ + @PostMapping(value = "news/epdc-app/psychology/listMyQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> listMyQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO); + } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java index 00a0dbc..12e1886 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java @@ -3,7 +3,9 @@ package com.elink.esua.epdc.feign.fallback; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; import com.elink.esua.epdc.feign.WorkPropertyFeignClient; import org.springframework.stereotype.Component; @@ -11,8 +13,8 @@ import org.springframework.stereotype.Component; import java.util.List; /** - * @Author LPF - * @Date 2019/11/18 16:39 + * @Author zhangyuan + * @Date 2020/6/9 16:39 */ @Component public class WorkPropertyFeignClientFallback implements WorkPropertyFeignClient { @@ -21,4 +23,9 @@ public class WorkPropertyFeignClientFallback implements WorkPropertyFeignClient public Result> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listUnansweredQuestion", formDto); } + + @Override + public Result> listMyQuestion(PsychologyAnswerFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listMyQuestion", formDto); + } } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java index 40a828b..f34085f 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java @@ -1,7 +1,9 @@ package com.elink.esua.epdc.service; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; import java.util.List; @@ -23,4 +25,14 @@ public interface WorkPropertyService { * @date 2020/6/8 09:15 */ Result> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto); + + /** + * 工作端--心理咨询-我回答的问题列表 + * + * @param formDto 查询参数 + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author zhangyuan + * @date 2020/6/8 09:15 + */ + Result> listMyQuestion(PsychologyAnswerFormDTO formDto); } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java index 88fa159..8e354f3 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java @@ -1,7 +1,9 @@ package com.elink.esua.epdc.service.impl; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO; import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; import com.elink.esua.epdc.feign.WorkPropertyFeignClient; import com.elink.esua.epdc.service.WorkPropertyService; @@ -27,4 +29,10 @@ public class WorkPropertyServiceImpl implements WorkPropertyService { return workPropertyFeignClient.listUnansweredQuestion(formDto); } + + @Override + public Result> listMyQuestion(PsychologyAnswerFormDTO formDto) { + + return workPropertyFeignClient.listMyQuestion(formDto); + } }