18 changed files with 464 additions and 19 deletions
@ -0,0 +1,73 @@ |
|||
package com.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/28 13:36 |
|||
* @Description: |
|||
*/ |
|||
@Data |
|||
public class CompleteRequisiteInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = 1371157927862793721L; |
|||
|
|||
|
|||
@NotBlank(message = "姓名不能为空") |
|||
private String realName; |
|||
|
|||
/*** |
|||
*性别 0女 1男 |
|||
*/ |
|||
@NotBlank(message = "性别不能为空") |
|||
private String sex; |
|||
|
|||
@NotBlank(message = "联系电话电话不能为空") |
|||
private String mobile; |
|||
|
|||
@NotBlank(message = "企业名称不能为空") |
|||
private String enterpriseName; |
|||
|
|||
@NotBlank(message = "统一社会信用代码不能为空") |
|||
private String uniformSocialCreditCode; |
|||
|
|||
@NotBlank(message = "企业地址不能为空") |
|||
private String enterpriseAddress; |
|||
|
|||
@NotBlank(message = "居住网格ID不能为空") |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 企业id(修改时必填) |
|||
*/ |
|||
|
|||
private String id; |
|||
|
|||
@NotBlank(message = "手机号验证码不能为空") |
|||
private String smsCode; |
|||
|
|||
/** |
|||
* 微信code不能为空 |
|||
*/ |
|||
private String wxCode; |
|||
|
|||
/** |
|||
* 微信信息加密向量(用户unionid为空时传入) |
|||
*/ |
|||
private String iv; |
|||
|
|||
/** |
|||
* 微信加密数据(用户unionid为空时传入) |
|||
*/ |
|||
private String encryptedData; |
|||
|
|||
|
|||
private String userId; |
|||
|
|||
|
|||
private String wxUnionId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
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.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.modules.feign.fallback.AdminFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/5 14:44 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class) |
|||
public interface AdminFeignClient { |
|||
|
|||
/** |
|||
* 根据部门ID,获取下属所有网格ID |
|||
* |
|||
* @param pid |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.Long>> |
|||
* @author yujintao |
|||
* @date 2019/9/5 14:49 |
|||
*/ |
|||
@GetMapping("/sys/dept/listGridId/{pid}") |
|||
Result<List<Long>> listGridIdByDeptPid(@PathVariable("pid") Long pid); |
|||
|
|||
/** |
|||
* 根据部门ID获取上级所有部门信息 |
|||
* |
|||
* @param deptId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<ParentAndAllDeptDTO> |
|||
* @author gp |
|||
* @date 2019-11-29 |
|||
*/ |
|||
@GetMapping("/sys/dept/getParentAndAllDept/{deptId}") |
|||
Result<ParentAndAllDeptDTO> getParentAndAllDept(@PathVariable("deptId") String deptId); |
|||
} |
@ -0,0 +1,28 @@ |
|||
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.CompleteRequisiteUserInfoDTO; |
|||
import com.elink.esua.epdc.modules.feign.fallback.UserFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/28 14:41 |
|||
* @Description: 更新用户 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_USER_SERVER, fallback = UserFeignClientFallback.class) |
|||
public interface UserFeignClient { |
|||
|
|||
/*** |
|||
* 更新用户 |
|||
* @param |
|||
* @return Result<List<Long>> |
|||
* @author qushutong |
|||
* @date 2020/2/28 14:43 |
|||
*/ |
|||
@PostMapping("app-user/epdc-app/user/completeRequisiteInfo") |
|||
Result completeRequisiteInfo(@RequestBody CompleteRequisiteUserInfoDTO fromDto); |
|||
} |
@ -0,0 +1,29 @@ |
|||
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.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.modules.feign.AdminFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/5 14:44 |
|||
*/ |
|||
@Component |
|||
public class AdminFeignClientFallback implements AdminFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<Long>> listGridIdByDeptPid(Long pid) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listGridIdByDeptPid", pid); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ParentAndAllDeptDTO> getParentAndAllDept(String depId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", depId); |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
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.CompleteRequisiteUserInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.CompleteRequisiteInfoDTO; |
|||
import com.elink.esua.epdc.modules.feign.UserFeignClient; |
|||
|
|||
public class UserFeignClientFallback implements UserFeignClient { |
|||
|
|||
@Override |
|||
public Result completeRequisiteInfo(CompleteRequisiteUserInfoDTO fromDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "completeRequisiteInfo", fromDto); |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.elink.esua.epdc.dto.epdc.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/28 13:36 |
|||
* @Description: |
|||
*/ |
|||
@Data |
|||
public class CompleteRequisiteUserInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = -6935440742503633316L; |
|||
|
|||
|
|||
private String realName; |
|||
|
|||
|
|||
private String mobile; |
|||
|
|||
private Long deptId; |
|||
|
|||
|
|||
private String userId; |
|||
|
|||
private String dwellingPlace; |
|||
|
|||
private String wxUnionId; |
|||
|
|||
private String nickName; |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue