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.
		
		
		
		
		
			
		
			
				
					
					
						
							162 lines
						
					
					
						
							6.3 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							162 lines
						
					
					
						
							6.3 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.GovStaffRoleDTO;
							 | 
						|
								import com.epmet.dto.UserDTO;
							 | 
						|
								import com.epmet.dto.form.*;
							 | 
						|
								import com.epmet.dto.result.*;
							 | 
						|
								import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
							 | 
						|
								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 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, url = "localhost:8087")
							 | 
						|
								@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class)
							 | 
						|
								public interface EpmetUserOpenFeignClient {
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 从缓存中查询已登录用户的基本信息以及角色等相关信息
							 | 
						|
								     *
							 | 
						|
								     * @return
							 | 
						|
								     */
							 | 
						|
								    @PostMapping(value = "/epmetuser/user/loginuserdetails", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
							 | 
						|
								    Result<LoginUserDetailsResultDTO> getLoginUserDetails(@RequestBody LoginUserDetailsFormDTO dto);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @param formDTO
							 | 
						|
								     * @return
							 | 
						|
								     * @Author sun
							 | 
						|
								     * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表
							 | 
						|
								     **/
							 | 
						|
								    @PostMapping(value = "/epmetuser/staffrole/getcustomerstaffrolelist", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
							 | 
						|
								    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(value = "/epmetuser/user/getcustomeridbyuserid", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
							 | 
						|
								    Result<TagCustomerResultDTO> getCustomerIdByUserId(@RequestBody TagCustomerFormDTO formDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 根据角色id列表批量查询角色信息
							 | 
						|
								     * @param form
							 | 
						|
								     * @return
							 | 
						|
								     */
							 | 
						|
								    @PostMapping(value = "/epmetuser/govstaffrole/getbyids", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
							 | 
						|
								    Result<List<GovStaffRoleResultDTO>> getByIds(@RequestBody GovStaffRoleFormDTO form);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result
							 | 
						|
								     * @param staffResetPwFormDTO
							 | 
						|
								     * @author yinzuomei
							 | 
						|
								     * @description 工作端,修改工作人员密码
							 | 
						|
								     * @Date 2020/7/1 10:37
							 | 
						|
								     **/
							 | 
						|
								    @PostMapping(value = "/epmetuser/customerstaff/resetstaffpassword", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
							 | 
						|
								    Result resetStaffPassword(@RequestBody StaffResetPwFormDTO staffResetPwFormDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 根据客户ID和角色key查询角色信息
							 | 
						|
								     * @param form
							 | 
						|
								     * @return
							 | 
						|
								     */
							 | 
						|
								    @PostMapping("/epmetuser/staffrole/roleofcustomer")
							 | 
						|
								    Result<GovStaffRoleDTO> getRoleOfCustomer(@RequestBody CustomerRoleFormDTO form);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 小程序登陆新增或更新微信用户信息
							 | 
						|
								     * @author sun
							 | 
						|
								     */
							 | 
						|
								    @PostMapping(value = "epmetuser/user/savewxuser")
							 | 
						|
								    Result<UserDTO> saveWxUser(@RequestBody WxUserFormDTO wxUserFormDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @param openId
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.LatestStaffWechatLoginDTO>
							 | 
						|
								     * @Author sun
							 | 
						|
								     * @Description 获取当前微信上次登录的账号信息
							 | 
						|
								     **/
							 | 
						|
								    @GetMapping(value = "epmetuser/staffagencyvisited/getlatest/{openId}")
							 | 
						|
								    Result<StaffLatestAgencyResultDTO> getLatestStaffWechatLoginRecord(@PathVariable("openId") String openId);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @param staffWechatFormDTO
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result
							 | 
						|
								     * @Author sun
							 | 
						|
								     * @Description 手机验证码登录时记录微信openId与当前用户的关系
							 | 
						|
								     **/
							 | 
						|
								    @PostMapping(value = "epmetuser/staffwechat/savestaffwechat", consumes = MediaType.APPLICATION_JSON_VALUE)
							 | 
						|
								    Result saveStaffWechat(@RequestBody StaffWechatFormDTO staffWechatFormDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @param staffLoginHistoryFormDTO
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result
							 | 
						|
								     * @Author sun
							 | 
						|
								     * @Description 保存登录日志
							 | 
						|
								     **/
							 | 
						|
								    @PostMapping(value = "epmetuser/staffagencyvisited/saveStaffLoginRecord", consumes = MediaType.APPLICATION_JSON_VALUE)
							 | 
						|
								    Result saveStaffLoginRecord(StaffLoginAgencyRecordFormDTO staffLoginHistoryFormDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @Author sun
							 | 
						|
								     * @Description 保存登录日志
							 | 
						|
								     */
							 | 
						|
								    @PostMapping("/epmetuser/staffrole/staffroles")
							 | 
						|
								    Result<List<GovStaffRoleDTO>> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * @param userIdList
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.UserBaseInfoResultDTO>>
							 | 
						|
								     * @author yinzuomei
							 | 
						|
								     * @description 传入用户id集合,返回用户的基本信息(包含微信基本信息)
							 | 
						|
								     * @Date 2020/7/22 9:30
							 | 
						|
								     **/
							 | 
						|
								    @PostMapping("/epmetuser/userbaseinfo/queryuserbaseinfo")
							 | 
						|
								    Result<List<UserBaseInfoResultDTO>> queryUserBaseInfo(@RequestBody List<String> userIdList);
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 根据用户ID,查询用户所属角色: 多种身份
							 | 
						|
								     *
							 | 
						|
								     * @param userId
							 | 
						|
								     * @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UserRoleResultDTO>>
							 | 
						|
								     * @Author zhangyong
							 | 
						|
								     * @Date 14:13 2020-07-23
							 | 
						|
								     **/
							 | 
						|
								    @GetMapping(value = "epmetuser/userrole/getuserroleinfobyuserid/{userId}")
							 | 
						|
								    Result<List<UserRoleResultDTO>> getUserRoleInfoByUserId(@PathVariable("userId") String userId);
							 | 
						|
								}
							 | 
						|
								
							 |