10 changed files with 156 additions and 261 deletions
@ -1,60 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO; |
|||
import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; |
|||
import com.elink.esua.epdc.dto.psychology.form.PsychologySubmitAnswerFormDTO; |
|||
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.WorkConflictService; |
|||
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.PostMapping; |
|||
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/conflict") |
|||
public class ApiWorkConflictController { |
|||
|
|||
@Autowired |
|||
private WorkConflictService workConflictService; |
|||
|
|||
// /**
|
|||
// * 工作端--待解答的心理咨询问题列表
|
|||
// *
|
|||
// * @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyUnansweredResultDTO >
|
|||
// * @params [formDto]
|
|||
// * @author zhangyuan
|
|||
// * @since 2020/6/9 15:33
|
|||
// */
|
|||
// @GetMapping("psychology/listQuestion")
|
|||
// public Result<List<PsychologyUnansweredResultDTO>> listQuestion(PsychologyUnansweredFormDTO formDto) {
|
|||
// return workPropertyService.listUnansweredQuestion(formDto);
|
|||
// }
|
|||
|
|||
/** |
|||
* 工作端--矛盾纠纷提交 |
|||
* |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @params [formDto] |
|||
* @author zhangyuan |
|||
* @since 2020/6/9 15:33 |
|||
*/ |
|||
@PostMapping("conflict/submit") |
|||
public Result submit(ConflictMediateFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return workConflictService.submit(formDto); |
|||
} |
|||
|
|||
} |
@ -1,59 +0,0 @@ |
|||
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.PsychologySubmitAnswerFormDTO; |
|||
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; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
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 WorkConflictFeignClient { |
|||
|
|||
/*** |
|||
* 工作端--待解答的心理咨询问题列表 |
|||
* @param fromDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListResultDTO > |
|||
* @author zhangyuan |
|||
* @date 2020/6/8 9:25 |
|||
*/ |
|||
@GetMapping(value = "news/epdc-app/psychology/listUnansweredQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(@RequestBody PsychologyUnansweredFormDTO fromDTO); |
|||
|
|||
/*** |
|||
* 工作端--待解答的心理咨询问题列表 |
|||
* @param fromDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerListResultDTO > |
|||
* @author zhangyuan |
|||
* @date 2020/6/8 9:25 |
|||
*/ |
|||
@GetMapping(value = "news/epdc-app/psychology/listMyQuestion", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(@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/submitAnswer", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result submitAnswer(@RequestBody PsychologySubmitAnswerFormDTO fromDTO); |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
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.PsychologySubmitAnswerFormDTO; |
|||
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.WorkConflictFeignClient; |
|||
import com.elink.esua.epdc.feign.WorkPropertyFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zhangyuan |
|||
* @Date 2020/6/9 16:39 |
|||
*/ |
|||
@Component |
|||
public class WorkConflictFeignClientFallback implements WorkConflictFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listUnansweredQuestion", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(PsychologyAnswerFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "listMyQuestion", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result submitAnswer(PsychologySubmitAnswerFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "submitAnswer", formDto); |
|||
} |
|||
|
|||
} |
@ -1,52 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO; |
|||
import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; |
|||
import com.elink.esua.epdc.dto.psychology.form.PsychologySubmitAnswerFormDTO; |
|||
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; |
|||
|
|||
|
|||
/** |
|||
* @author: zhangyuan |
|||
* @Date: 2020/5/12 13:21 |
|||
* @Description: 心理咨询 |
|||
*/ |
|||
public interface WorkConflictService { |
|||
|
|||
/** |
|||
* 工作端--待解答的心理咨询问题列表 |
|||
* |
|||
* @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<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto); |
|||
|
|||
/** |
|||
* 工作端--心理咨询-我回答的问题列表 |
|||
* |
|||
* @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<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(PsychologyAnswerFormDTO formDto); |
|||
|
|||
|
|||
/** |
|||
* 工作端--矛盾纠纷提交 |
|||
* |
|||
* @param formDto 参数 |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author zhangyuan |
|||
* @date 2020/6/8 09:15 |
|||
*/ |
|||
Result submit(ConflictMediateFormDTO formDto); |
|||
|
|||
} |
@ -1,46 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO; |
|||
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.WorkConflictService; |
|||
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 WorkConflictServiceImpl implements WorkConflictService { |
|||
|
|||
@Autowired |
|||
private WorkPropertyFeignClient workPropertyFeignClient; |
|||
|
|||
@Override |
|||
public Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) { |
|||
|
|||
return workPropertyFeignClient.listUnansweredQuestion(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(PsychologyAnswerFormDTO formDto) { |
|||
|
|||
return workPropertyFeignClient.listMyQuestion(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result submit(ConflictMediateFormDTO formDto) { |
|||
|
|||
return workPropertyFeignClient.submit(formDto); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue