Browse Source

问题列表接口

feature/yujt_analysisHomeChange
zhangyuan 5 years ago
parent
commit
267a39c3de
  1. 31
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java
  2. 23
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java
  3. 13
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java
  4. 25
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java
  5. 17
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java

31
epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java

@ -23,9 +23,12 @@ 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;
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.TopicListFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
@ -385,7 +388,7 @@ public class ApiPropertyController {
* @author zhangyuan
* @date 2020/6/8 09:17
*/
@GetMapping("psychology/listPsychiatrist")
@GetMapping("psychology/psychologistInfo")
public Result<PsychologistInfoResultDTO> psychologistInfo(@LoginUser TokenDto userDetail, PsychologistInfoFormDTO formDto) {
return propertyService.psychologistInfo(userDetail, formDto);
}
@ -402,4 +405,30 @@ public class ApiPropertyController {
public Result submitQuestion(@LoginUser TokenDto userDetail, @RequestBody PsychologyQuestionFormDTO formDto) {
return propertyService.submitQuestion(userDetail, formDto);
}
/**
* 居民端-心理咨询-我的问题列表
*
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListUserResultDTO >
* @params [userDetail, formDto]
* @author liuchuang
* @since 2019/10/22 15:33
*/
@GetMapping("psychology/listUserQuestion")
public Result<PsychologyAnswerListUserResultDTO> listUserQuestion(@LoginUser TokenDto userDetail, @RequestBody PsychologyAnswerFormDTO formDto) {
return propertyService.listUserQuestion(userDetail, formDto);
}
/**
* 居民端-心理咨询-我的问题列表
*
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListResultDTO >
* @params [userDetail, formDto]
* @author liuchuang
* @since 2019/10/22 15:33
*/
@GetMapping("psychology/listQuestion")
public Result<PsychologyAnswerListResultDTO> listQuestion(@LoginUser TokenDto userDetail, @RequestBody PsychologyAnswerFormDTO formDto) {
return propertyService.listQuestion(userDetail, formDto);
}
}

23
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java

@ -20,9 +20,12 @@ 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.topic.form.TopicCloseFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicDetailFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
@ -319,4 +322,24 @@ public interface PropertyFeignClient {
*/
@PostMapping(value = "news/epdc-app/psychology/submitQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submitQuestion(@RequestBody PsychologyQuestionFormDTO fromDTO);
/***
* 居民端-心理咨询-我的问题列表
* @param fromDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListUserResultDTO >
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@PostMapping(value = "news/epdc-app/psychology/listUserQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PsychologyAnswerListUserResultDTO> listUserQuestion(@RequestBody PsychologyAnswerFormDTO 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/listQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PsychologyAnswerListResultDTO> listQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO);
}

13
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java

@ -21,9 +21,12 @@ 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.topic.form.TopicCloseFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicDetailFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
@ -179,4 +182,14 @@ public class PropertyFeignClientFallback implements PropertyFeignClient {
public Result submitQuestion(PsychologyQuestionFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "submitQuestion", formDto);
}
@Override
public Result<PsychologyAnswerListUserResultDTO> listUserQuestion(PsychologyAnswerFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listUserQuestion", formDto);
}
@Override
public Result<PsychologyAnswerListResultDTO> listQuestion(PsychologyAnswerFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listQuestion", formDto);
}
}

25
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java

@ -24,9 +24,12 @@ 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.topic.form.TopicCloseFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
@ -313,4 +316,26 @@ public interface PropertyService {
* @date 2020/6/8 09:15
*/
Result submitQuestion(TokenDto userDetail, PsychologyQuestionFormDTO formDto);
/**
* 居民端-心理咨询-我的问题列表
*
* @param userDetail 用户信息
* @param formDto 查询参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.PsychologyAnswerListUserResultDTO>>
* @author zhangyuan
* @date 2020/6/8 09:15
*/
Result<PsychologyAnswerListUserResultDTO> listUserQuestion(TokenDto userDetail, PsychologyAnswerFormDTO formDto);
/**
* 居民端-心理咨询-问题列表
*
* @param userDetail 用户信息
* @param formDto 查询参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.PsychologyAnswerListResultDTO>>
* @author zhangyuan
* @date 2020/6/8 09:15
*/
Result<PsychologyAnswerListResultDTO> listQuestion(TokenDto userDetail, PsychologyAnswerFormDTO formDto);
}

17
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java

@ -31,9 +31,12 @@ 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.topic.form.TopicCloseFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicDetailFormDTO;
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
@ -355,4 +358,18 @@ public class PropertyServiceImpl implements PropertyService {
formDto.setAnswerNum(NumConstant.ZERO);
return propertyFeignClient.submitQuestion(formDto);
}
@Override
public Result<PsychologyAnswerListUserResultDTO> listUserQuestion(TokenDto userDetail, PsychologyAnswerFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setGridId(userDetail.getGridId());
return propertyFeignClient.listUserQuestion(formDto);
}
@Override
public Result<PsychologyAnswerListResultDTO> listQuestion(TokenDto userDetail, PsychologyAnswerFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setGridId(userDetail.getGridId());
return propertyFeignClient.listQuestion(formDto);
}
}

Loading…
Cancel
Save