UserClient.java 3.18 KB
package com.glsx.common.feign.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.glsx.common.config.FeignConfig;
import com.glsx.common.constants.ResultObject;



/**
 * 
 * @Title UserClient.java
 * @Package com.glsx.common.feign.client
 * @Description TODO feign的用户客户端
 * @author zhanghj
 * @date 2019年2月1日 上午11:06:44
 * @version 1.0.0
 */
@FeignClient(name="car-service-usercenter", configuration=FeignConfig.class)
public interface UserClient {

	/**
	 * 
	 * @author zhanghj 
	 * @Title: isLogin  
	 * @Description: TODO 用户是否登录
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/isLogin")
	JSONObject isLogin();
	
	/**
	 * 
	 * @author zhanghj 
	 * @Title: getUserById  
	 * @Description: TODO 根据用户id获取用户信息
	 * @param id
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/getUserById")
	JSONObject getUserById(@RequestParam("id")Integer id);
	
	/**
	 * 
	 * @author zhanghj 
	 * @Title: getMerchantById  
	 * @Description: TODO 根据用户id获取商户信息
	 * @param merchantId
	 * @return
	 * ResultObject
	 *
	 */
	@RequestMapping( method = RequestMethod.GET, value = "/carservice/usercenter/user/getMerchantById")
    JSONObject getMerchantById(@RequestParam("merchantId")Integer merchantId);

	/**
	 *
	 * @author duanht
	 * @Title: getServiceById
	 * @Description: TODO 根据用户id获取服务商
	 * @param serviceId
	 * @return
	 * ResultObject
	 *
	 */
	@RequestMapping( method = RequestMethod.GET, value = "/carservice/usercenter/user/getServiceById")
	JSONObject getServiceById(@RequestParam("serviceId")Integer serviceId);

	/**
	 * 
	 * @author zhanghj 
	 * @Title: getMerchantList  
	 * @Description: TODO 获取商户列表
	 * @param id
	 * @param type
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping( method = RequestMethod.GET, value = "/carservice/usercenter/user/getMerchantList")
	JSONObject getMerchantList(@RequestParam("groupId")Integer groupId, @RequestParam("shopName") String shopName);
	
	/**
	 * 
	 * @author zhanghj 
	 * @Title: getMerchantById  
	 * @Description: TODO 根据用户id获取技工信息
	 * @param merchantId
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping( method = RequestMethod.GET, value = "/carservice/usercenter/user/getMechanicById")
    JSONObject getMechanicById(@RequestParam("mechanicId")Integer mechanicId);

	/**
	 *
	 * @author zhanghj
	 * @Title: getUserById
	 * @Description: TODO 根据用户id获取用户公众号openId和名字
	 * @param id
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/getOpenIdAndNameById")
	JSONObject getOpenIdAndNameById(@RequestParam("id")Integer id);

}