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

import com.alibaba.fastjson.JSONObject;
import com.glsx.common.config.FeignConfiguration;
import com.glsx.common.pojo.MerchantReq;
import com.glsx.common.pojo.OderReceivingReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;



/**
 * 
 * @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= FeignConfiguration.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: getProvider  
	 * @Description: TODO 根据用户id获取服务商的全部信息
	 * @param providerId
	 * @return
	 * JSONObject
	 * @version
	 */
	@RequestMapping( method = RequestMethod.GET, value = "/carservice/usercenter/provider/getProvider")
	JSONObject getProvider(@RequestParam("providerId")Integer providerId);

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

	/**
	 * 
	 * @author zhanghj 
	 * @Title: getMechanicSP  
	 * @Description: TODO 获取技工所属服务商
	 * @param userId
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/getMechanicSP")
	JSONObject getMechanicSP(@RequestParam("userId")Integer userId);

	/**
	 * 
	 * @author zhanghj 
	 * @Title: getOnlineManagerList  
	 * @Description: TODO 获取在线管理员列表
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/getOnlineManagerList")
	JSONObject getOnlineManagerList();
	
	@RequestMapping(method = RequestMethod.POST, value = "/carservice/usercenter/user/sendBiddingOrderNoBidRemindMsg")
	JSONObject sendBiddingOrderNoBidRemindMsg(@RequestParam("orderList")String orderList);

	/**
	 * 
	 * @author zhanghj 
	 * @Title: getServiceListByAreaCode  
	 * @Description: TODO 获取该服务区域内的服务商列表
	 * @param areaCodeList
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/provider/getServiceListByAreaCode")
	JSONObject getServiceListByAreaCode(@RequestParam("areaCodeList")List<Integer> areaCodeList);

	/**
	 * 
	 * @author zhanghj 
	 * @Title: getUserServiceListByUserId  
	 * @Description: TODO 通过userId获取服务商列表
	 * @param userList
	 * @return
	 * JSONObject
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/provider/getUserServiceListByUserId")
	JSONObject getUserServiceListByUserId(@RequestParam("userList")List<Integer> userList);
	
	/**
	 * 
	 * @author zhanghj 
	 * @Title: getUserByUsername  
	 * @Description: TODO 通过用户名获取用户信息
	 * @param username
	 * @return
	 * JSONObject
	 * @version
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/getUserByUsername")
	JSONObject getUserByUsername(@RequestParam("username")String username);

	@RequestMapping(method = RequestMethod.POST, value = "/carservice/usercenter/user/autoRegisterAndLogin")
	JSONObject autoRegisterAndLogin(@RequestBody OderReceivingReq orderReceivingReq);

	/**
	 * 
	 * @author zhanghj 
	 * @Title: saveSysMerchant  
	 * @Description: TODO 创建商户
	 * @param merchantReq
	 * @return
	 * JSONObject
	 * @version
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/carservice/usercenter/user/autoSaveSysMerchant")
	JSONObject autoSaveSysMerchant( @RequestBody MerchantReq merchantReq);

	/**
	 * 
	 *
	 * @author Zheng Xiajun
	 * @Title: saveSysMerchant
	 * @Description: 技工注册自成功自己动登录
	 * @param @param
	 *            merchantReq
	 * @param @return
	 *            设定文件
	 * @return JSONObject 返回类型
	 *
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/user/login")
	JSONObject login(@RequestParam("username") String username, @RequestParam("password") String password,
			@RequestParam("terminalType") Integer terminalType);

	@RequestMapping(method = RequestMethod.GET, value = "/carservice/usercenter/userServiceFee/getUserServiceFeeList")
	JSONObject getUserServiceFeeList(@RequestParam("userId") Integer userId, @RequestParam("serviceCode") String serviceCode);

}