22 changed files with 390 additions and 32 deletions
@ -0,0 +1,34 @@ |
|||||
|
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.epdc.form.EpdcUserGroupInviteFormDTO; |
||||
|
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
||||
|
import com.elink.esua.epdc.modules.feign.fallback.UserFeignClientFallback; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* 用户模块 |
||||
|
* |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2019/10/23 16:00 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.EPDC_USER_SERVER, fallback = UserFeignClientFallback.class) |
||||
|
public interface UserFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* 社群添加好友列表 |
||||
|
* |
||||
|
* @params [formDto] |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>> |
||||
|
* @author liuchuang |
||||
|
* @since 2019/10/23 16:19 |
||||
|
*/ |
||||
|
@GetMapping("app-user/epdc-app/user/getInviteUserList") |
||||
|
Result<List<EpdcUserGroupInviteResultDTO>> getInviteUserList(EpdcUserGroupInviteFormDTO formDto); |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
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.epdc.form.EpdcUserGroupInviteFormDTO; |
||||
|
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
||||
|
import com.elink.esua.epdc.modules.feign.UserFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2019/10/23 16:01 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class UserFeignClientFallback implements UserFeignClient { |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<EpdcUserGroupInviteResultDTO>> getInviteUserList(EpdcUserGroupInviteFormDTO formDto) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getInviteUserList", formDto); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
package com.elink.esua.epdc.dto.epdc.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* 社群添加好友列表Form DTO |
||||
|
* |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2019/10/23 15:12 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EpdcUserGroupInviteFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3535094231006462718L; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
@NotNull(message = "网格ID不能为空") |
||||
|
private Long gridId; |
||||
|
|
||||
|
/** |
||||
|
* 社群ID |
||||
|
*/ |
||||
|
@NotBlank(message = "社群ID不能为空") |
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 路 |
||||
|
*/ |
||||
|
private String road; |
||||
|
|
||||
|
/** |
||||
|
* 姓氏 |
||||
|
*/ |
||||
|
private String lastName; |
||||
|
|
||||
|
/** |
||||
|
* 已入群或待审核用户ID |
||||
|
*/ |
||||
|
List<String> userIds; |
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
package com.elink.esua.epdc.dto.epdc.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* 成员信息 |
||||
|
* |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2019/10/23 15:17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EpdcUserGroupInviteResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -542091852373464243L; |
||||
|
|
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 用户名 |
||||
|
*/ |
||||
|
private String nickname; |
||||
|
|
||||
|
/** |
||||
|
* 用户头像 |
||||
|
*/ |
||||
|
private String userAvatar; |
||||
|
|
||||
|
/** |
||||
|
* 党员标识(0:否,1:是) |
||||
|
*/ |
||||
|
private String partyMember; |
||||
|
} |
||||
Loading…
Reference in new issue