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 8cd4835..fdbdea0 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 @@ -420,7 +420,7 @@ public class ApiPropertyController { } /** - * 居民端-心理咨询-我的问题列表 + * 居民端-心理咨询-问题列表 * * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListResultDTO > * @params [userDetail, formDto] 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 new file mode 100644 index 0000000..73e1810 --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java @@ -0,0 +1,38 @@ +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; +import com.elink.esua.epdc.service.WorkPropertyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author: qushutong + * @Date: 2020/5/12 11:11 + * @Description: 物业相关 + */ +@RestController +@RequestMapping("work/property") +public class ApiWorkPropertyController { + + @Autowired + private WorkPropertyService workPropertyService; + + /** + * 工作端--待解答的心理咨询问题列表 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyUnansweredResultDTO > + * @params [userDetail, formDto] + * @author liuchuang + * @since 2019/10/22 15:33 + */ + @GetMapping("psychology/listQuestion") + public Result> listQuestion(PsychologyUnansweredFormDTO formDto) { + return workPropertyService.listUnansweredQuestion(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 a2cc957..cde9086 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,14 +18,8 @@ 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.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.psychology.form.*; +import com.elink.esua.epdc.dto.psychology.result.*; 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; @@ -33,7 +27,6 @@ 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 com.elink.esua.epdc.feign.fallback.PropertyFeignClientFallback; -import oracle.jdbc.proxy.annotation.Post; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; @@ -342,4 +335,5 @@ public interface PropertyFeignClient { */ @PostMapping(value = "news/epdc-app/psychology/listQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) Result> listQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO); + } 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 new file mode 100644 index 0000000..8b52558 --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java @@ -0,0 +1,33 @@ +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.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; +import com.elink.esua.epdc.feign.fallback.WorkPropertyFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * 项目模块调用-移动app端 + * @Author zhangyuan + * @Date 2020/6/9 16:39 + */ +@FeignClient(name = ServiceConstant.EPDC_EVENTS_SERVER, fallback = WorkPropertyFeignClientFallback.class, configuration = FeignRequestInterceptor.class) +public interface WorkPropertyFeignClient { + + /*** + * 工作端--待解答的心理咨询问题列表 + * @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/listUnansweredQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> listUnansweredQuestion(@RequestBody PsychologyUnansweredFormDTO fromDTO); +} 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 04cd60f..7e15996 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 @@ -192,4 +192,5 @@ public class PropertyFeignClientFallback implements PropertyFeignClient { public Result> listQuestion(PsychologyAnswerFormDTO formDto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listQuestion", formDto); } + } 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 new file mode 100644 index 0000000..00a0dbc --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java @@ -0,0 +1,24 @@ +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.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; +import com.elink.esua.epdc.feign.WorkPropertyFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @Author LPF + * @Date 2019/11/18 16:39 + */ +@Component +public class WorkPropertyFeignClientFallback implements WorkPropertyFeignClient { + + @Override + public Result> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listUnansweredQuestion", formDto); + } +} 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 f903e8c..518ae70 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 @@ -338,4 +338,5 @@ public interface PropertyService { * @date 2020/6/8 09:15 */ Result> listQuestion(TokenDto userDetail, PsychologyAnswerFormDTO 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 new file mode 100644 index 0000000..40a828b --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java @@ -0,0 +1,26 @@ +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; + +import java.util.List; + + +/** + * @author: zhangyuan + * @Date: 2020/5/12 13:21 + * @Description: 心理咨询 + */ +public interface WorkPropertyService { + + /** + * 工作端--待解答的心理咨询问题列表 + * + * @param formDto 查询参数 + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author zhangyuan + * @date 2020/6/8 09:15 + */ + Result> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto); +} 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 b8996d6..f038f62 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 @@ -2,7 +2,6 @@ package com.elink.esua.epdc.service.impl; import com.elink.esua.epdc.async.WxMaSecCheckTask; import com.elink.esua.epdc.common.token.dto.TokenDto; -import com.elink.esua.epdc.commons.tools.constant.Constant; import com.elink.esua.epdc.commons.tools.constant.NumConstant; import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; @@ -372,4 +371,5 @@ public class PropertyServiceImpl implements PropertyService { formDto.setGridId(userDetail.getGridId()); return propertyFeignClient.listQuestion(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 new file mode 100644 index 0000000..88fa159 --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java @@ -0,0 +1,30 @@ +package com.elink.esua.epdc.service.impl; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO; +import com.elink.esua.epdc.feign.WorkPropertyFeignClient; +import com.elink.esua.epdc.service.WorkPropertyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * @author: zhangyuan + * @Date: 2020/6/9 13:23 + * @Description: 心理咨询 + */ +@Service +public class WorkPropertyServiceImpl implements WorkPropertyService { + + @Autowired + private WorkPropertyFeignClient workPropertyFeignClient; + + @Override + public Result> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) { + + return workPropertyFeignClient.listUnansweredQuestion(formDto); + } +}