package org.springblade.person.feign;

import io.swagger.annotations.ApiParam;
import org.springblade.person.entity.Member;
import org.springblade.person.vo.MemberVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import java.util.List;

/**
 * 会员表--小程序端，app端注册的会员信息 Feign
 *
 * @author lianghanqiang
 * @since 2021-04-23
 */
@FeignClient(value = "cyzh-person",path = "/feign/member")
public interface IMemberClient  {



	/**
	 * 详情
	 */
	@GetMapping("/detail")
    MemberVO detail(@SpringQueryMap Member member);

	/**
	 * 查询 会员表--小程序端，app端注册的会员信息
	 */
	@GetMapping("/list")
    List<MemberVO> list(@SpringQueryMap Member member);



	/**
	 * 新增 会员表--小程序端，app端注册的会员信息
	 */
	@PostMapping("/save")
	boolean save(@Valid @RequestBody Member member);

	/**
	 * 修改 会员表--小程序端，app端注册的会员信息
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody Member member);

	/**
	 * 新增或修改 会员表--小程序端，app端注册的会员信息
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody Member member);


	/**
	 * 删除 会员表--小程序端，app端注册的会员信息
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);


	@GetMapping("/getById")
	Member getById(@RequestParam Long id);
}
