17 changed files with 326 additions and 7 deletions
@ -0,0 +1,46 @@ |
|||
package com.elink.esua.epdc.modules.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.topic.TopicDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicReviewFormDTO; |
|||
import com.elink.esua.epdc.modules.feign.fallback.GroupFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
/** |
|||
* |
|||
* 社群模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/11 10:31 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = GroupFeignClientFallback.class) |
|||
public interface GroupFeignClient { |
|||
|
|||
/** |
|||
* |
|||
* 话题转议题审核回调 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 10:36 |
|||
*/ |
|||
@PostMapping(value = "group/topic/reviewCallback", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result reviewCallback(TopicReviewFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 更新话题状态 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 13:31 |
|||
*/ |
|||
@PostMapping(value = "group/topic/modifyState", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result modifyTopicState(TopicDTO formDto); |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.elink.esua.epdc.modules.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.topic.TopicDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicReviewFormDTO; |
|||
import com.elink.esua.epdc.modules.feign.GroupFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/11 10:31 |
|||
*/ |
|||
@Component |
|||
public class GroupFeignClientFallback implements GroupFeignClient { |
|||
|
|||
@Override |
|||
public Result reviewCallback(TopicReviewFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewCallback", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyTopicState(TopicDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyTopicState", formDto); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.elink.esua.epdc.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* |
|||
* 话题转议题审核 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/11 10:21 |
|||
*/ |
|||
@Data |
|||
public class TopicReviewFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6918129886991865847L; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 处理意见 |
|||
*/ |
|||
private String processingOpinions; |
|||
|
|||
/** |
|||
* 状态 0:讨论中,10:已转议题 |
|||
*/ |
|||
private Integer state; |
|||
} |
Loading…
Reference in new issue