package com.bjtdba.api.apiservice;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;
@EnableFeignClients(clients = UserSevice.class)
@FeignClient(name = "userCenter-service",path = "/userCenter_service")
public interface UserSevice {
    /**
     * 实名认证
     * @param Hmap
     * @param map
     * @return
     * @throws Exception
     */
    @GetMapping("/user/add_certification")
    public Object add_certification(@RequestHeader Map<String,String> Hmap, @RequestParam Map<String,String> map);

    /**
     * 地址添加和修改
     * @param Hmap
     * @param map
     * @return
     */
    //地址
    @PostMapping("/user/address/new_create")
    public  Object addressCreate(@RequestHeader Map<String,String> Hmap,@RequestBody Map<String,String> map);

    /**
     * 删除地址
     * @param Hmap
     * @param id
     * @return
     */
    @PostMapping("/user/address/delete/{id}")
    public Object addresDel(@RequestHeader Map<String,String> Hmap, @PathVariable Integer id);

    /**
     * 地址列表
     * @param Hmap
     * @return
     */
    @GetMapping("/user/address/lst")
    public Object addresslist(@RequestHeader Map<String,String> Hmap);


    /**
     * 获取用户信息
     * @param Hmap
     * @return
     */
    @GetMapping("/user")
    public Object userInfo(@RequestHeader Map<String,String> Hmap);

    @GetMapping("/user/userCommission")
    public Object getUserCommission(@RequestHeader Map<String,String> Hmap);
    /**
     * 添加关注/收藏/验证是否关注
     */

    @PostMapping("/relation/create")
    public Object create(@RequestHeader Map<String,String> Hmap, @RequestBody Map<String,String> map);

    /***
     * 取消关注
     */

    @PostMapping("/relation/delete")
    public Object delete(@RequestHeader Map<String,String> Hmap,@RequestBody Map<String,String> map);

    /**
     * 验证是否关注过
     * @param Hmap
     * @param map
     * @return
     */
    @PostMapping("/relation/query")
    public Object query(@RequestHeader Map<String,String> Hmap, @RequestBody Map<String,String> map);


}
