5 changed files with 204 additions and 0 deletions
@ -0,0 +1,63 @@ |
|||||
|
package com.elink.esua.epdc.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.handleroledept.form.HandleRoleDeptFormDTO; |
||||
|
import com.elink.esua.epdc.dto.rulecategory.form.HandleRoleCategoryFormDTO; |
||||
|
import com.elink.esua.epdc.feign.fallback.EventFeignClientFallback; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.http.MediaType; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: yinzuomei |
||||
|
* @Date: 2019/12/24 09:28 |
||||
|
* @Description: 事件接口 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.EPDC_EVENTS_SERVER, fallback = EventFeignClientFallback.class) |
||||
|
public interface EventFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* @param orgTypeFormDTO |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result |
||||
|
* @Author yinzuomei |
||||
|
* @Description 保存项目处理类型权限 |
||||
|
* @Date 2019/12/24 17:17 |
||||
|
**/ |
||||
|
@PostMapping(value = "events/handlerolecategory/saveOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result saveOrUpdateHandleCategory(HandleRoleCategoryFormDTO orgTypeFormDTO); |
||||
|
|
||||
|
/** |
||||
|
* @param roleId |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.String>> |
||||
|
* @Author yinzuomei |
||||
|
* @Description 查询角色对应的项目处理类型权限 |
||||
|
* @Date 2019/12/24 17:17 |
||||
|
**/ |
||||
|
@GetMapping(value = "events/handlerolecategory/queryCategoryIdList/{roleId}") |
||||
|
Result<List<String>> queryCategoryIdList(@PathVariable("roleId") Long roleId); |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result |
||||
|
* @Author yinzuomei |
||||
|
* @Description 保存角色对应可吹哨部门权限 |
||||
|
* @Date 2019/12/26 14:09 |
||||
|
**/ |
||||
|
@PostMapping(value = "events/handleroledept/saveOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result saveOrUpdateHandleRoleDept(HandleRoleDeptFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* @param roleId |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.Long>> |
||||
|
* @Author yinzuomei |
||||
|
* @Description 查询角色对应可吹哨部门权限 |
||||
|
* @Date 2019/12/26 14:09 |
||||
|
**/ |
||||
|
@GetMapping(value = "events/handleroledept/queryWhistleDeptIdList/{roleId}") |
||||
|
Result<List<Long>> queryWhistleDeptIdList(@PathVariable("roleId") Long roleId); |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.elink.esua.epdc.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.handleroledept.form.HandleRoleDeptFormDTO; |
||||
|
import com.elink.esua.epdc.dto.rulecategory.form.HandleRoleCategoryFormDTO; |
||||
|
import com.elink.esua.epdc.feign.EventFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2019/12/24 9:45 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class EventFeignClientFallback implements EventFeignClient { |
||||
|
|
||||
|
@Override |
||||
|
public Result saveOrUpdateHandleCategory(HandleRoleCategoryFormDTO orgTypeFormDTO) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "saveOrUpdate", orgTypeFormDTO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<String>> queryCategoryIdList(Long roleId) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryCategoryIdList", roleId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result saveOrUpdateHandleRoleDept(HandleRoleDeptFormDTO formDTO) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "saveOrUpdate", formDTO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<Long>> queryWhistleDeptIdList(Long roleId) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryWhistleDeptIdList", roleId); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue