You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.7 KiB

package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.CustomerStaffRoleListFormDTO;
import com.epmet.dto.form.LoginUserDetailsFormDTO;
import com.epmet.dto.form.TagCustomerFormDTO;
import com.epmet.dto.result.CustomerStaffRoleListResultDTO;
import com.epmet.dto.result.CustomerStaffRoleResultDTO;
import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.dto.result.TagCustomerResultDTO;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:09
*/
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class)
public interface EpmetUserOpenFeignClient {
/**
* 从缓存中查询已登录用户的基本信息以及角色等相关信息
*
* @return
*/
@PostMapping("/epmetuser/user/loginuserdetails")
Result<LoginUserDetailsResultDTO> getLoginUserDetails(@RequestBody LoginUserDetailsFormDTO dto);
/**
* @param formDTO
* @return
* @Author sun
* @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表
**/
@PostMapping("/epmetuser/staffrole/getcustomerstaffrolelist")
Result<List<CustomerStaffRoleListResultDTO>> getCustomerStaffRoleList(@RequestBody CustomerStaffRoleListFormDTO formDTO);
/**
* 根据staffId查询人员拥有的所有角色信息
*
* @param staffId
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.CustomerStaffRoleResultDTO>>
* @author zhaoqifeng
* @date 2020/6/2 16:11
*/
@PostMapping("/epmetuser/staffrole/staffroles/{staffId}")
Result<List<CustomerStaffRoleResultDTO>> getStaffRoles(@PathVariable String staffId);
/**
* @param staffId
* @return
* @Author sun
* @Description 根据staffId查询工作人员基本信息
**/
@PostMapping("/epmetuser/customerstaff/getcustomerstaff/{staffId}")
Result<CustomerStaffDTO> getCustomerStaff(@PathVariable("staffId") String staffId);
/**
* @param formDTO
* @Description 根据userId获取customerId
* @author zxc
*/
@PostMapping("/epmetuser/user/getcustomeridbyuserid")
Result<TagCustomerResultDTO> getCustomerIdByUserId(@RequestBody TagCustomerFormDTO formDTO);
}