10 changed files with 180 additions and 8 deletions
@ -0,0 +1,51 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 居民端的行为触发发送消息给政府端的入参 |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2020/4/19 20:54 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SendMsgResi2GovFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1844010483732604630L; |
||||
|
|
||||
|
/** |
||||
|
* 发送人Id resiUser的Id |
||||
|
* */ |
||||
|
private String from; |
||||
|
|
||||
|
/** |
||||
|
* 角色key |
||||
|
* */ |
||||
|
private String roleKey; |
||||
|
|
||||
|
/** |
||||
|
* 消息内容 |
||||
|
* */ |
||||
|
private String msg; |
||||
|
|
||||
|
/** |
||||
|
* 组织Id 可能是agencyId、deptId、gridId |
||||
|
* */ |
||||
|
private String institutionId; |
||||
|
|
||||
|
/** |
||||
|
* 组织标识 1:agency 2:department 3:grid |
||||
|
* */ |
||||
|
private String institutionFlag; |
||||
|
|
||||
|
/** |
||||
|
*客户Id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 等级 1:当前组织下 2:所属机构(agency)下 |
||||
|
* 当institutionFlag为1时,permissionLevel默认为1 |
||||
|
* */ |
||||
|
private String permissionLevel; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.feign; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.CustomerDepartmentDTO; |
||||
|
import com.epmet.dto.CustomerGridDTO; |
||||
|
import com.epmet.feign.fallback.GovOrgFeignClientFallBack; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
|
||||
|
/** |
||||
|
* @Description gov-org服务feginClient 服务间调用 |
||||
|
* @Author wangc |
||||
|
* @Date 2020/3/16 14:48 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class) |
||||
|
public interface GovOrgFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* @param id - gridId |
||||
|
* @return Result<CustomerGridDTO> |
||||
|
* @Author wangc |
||||
|
* @Description 查询网格信息 |
||||
|
* @Date 2020/3/30 10:45 |
||||
|
**/ |
||||
|
@GetMapping("/gov/org/customergrid/{id}") |
||||
|
Result<CustomerGridDTO> getGrid(String id); |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询部门信息 |
||||
|
* @param id |
||||
|
* @author wangc |
||||
|
* @date 2020.04.29 15:02 |
||||
|
*/ |
||||
|
@GetMapping("/gov/org/customerdepartment/{id}") |
||||
|
Result<CustomerDepartmentDTO> getDept(String id); |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.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.CustomerGridDTO; |
||||
|
import com.epmet.feign.GovOrgFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
|
||||
|
@Component |
||||
|
public class GovOrgFeignClientFallBack implements GovOrgFeignClient { |
||||
|
|
||||
|
@Override |
||||
|
public Result<CustomerGridDTO> get(String id) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "get", id); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue