17 changed files with 376 additions and 20 deletions
@ -0,0 +1,38 @@ |
|||
package com.epmet.modules.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.UserMessageFormDTO; |
|||
import com.epmet.modules.feign.fallback.EpmetMessageFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description epmet-message服务转发 |
|||
* @author wangc |
|||
* @date 2020.04.29 23:52 |
|||
**/ |
|||
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = EpmetMessageFeignClientFallback.class) |
|||
public interface EpmetMessageFeignClient { |
|||
|
|||
/** |
|||
* @param formDto |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 新增未读消息 |
|||
**/ |
|||
@PostMapping(value = "message/usermessage/saveusermessage", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result saveUserMessage(UserMessageFormDTO formDto); |
|||
|
|||
/** |
|||
* @param msgList |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 热心居民申请给网格长们发送消息 |
|||
**/ |
|||
@PostMapping(value = "message/usermessage/saveusermessagelist", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result saveUserMessageList(List<UserMessageFormDTO> msgList); |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.modules.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.UserMessageFormDTO; |
|||
import com.epmet.modules.feign.EpmetMessageFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @ClassName EpmetMessageFeignClientFallback |
|||
* @Auth wangc |
|||
* @Date 2020-04-29 23:53 |
|||
*/ |
|||
@Component |
|||
public class EpmetMessageFeignClientFallback implements EpmetMessageFeignClient { |
|||
@Override |
|||
public Result saveUserMessage(UserMessageFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessage", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result saveUserMessageList(List<UserMessageFormDTO> msgList) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessageList", msgList); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 特定的角色 特定的员工 |
|||
* @ClassName RolesUsersListFormDTO |
|||
* @Auth wangc |
|||
* @Date 2020-04-29 23:40 |
|||
*/ |
|||
@Data |
|||
public class RolesUsersListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -7375096282690016010L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
* */ |
|||
private String CustomerId; |
|||
|
|||
/** |
|||
* 角色列表 |
|||
* */ |
|||
private List<String> roleKeys; |
|||
|
|||
/** |
|||
* 人员Id列表 |
|||
*/ |
|||
private List<String> userIds; |
|||
} |
Loading…
Reference in new issue