package com.crunii.micro.feign.client;

import com.crunii.micro.common.dto.PageReq;
import com.crunii.micro.common.dto.PageRsp;
import com.crunii.micro.common.dto.Result;
import com.crunii.micro.domain.entity.main.TsmPropertyValue;
import com.crunii.micro.feign.client.dto.ValueC;
import com.crunii.micro.feign.client.dto.ValueReq;
import com.crunii.micro.feign.client.dto.ValueU;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
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.ResponseBody;

@FeignClient(value = "service-sysmgr")
@Service
public interface PropertyService {

    @ApiOperation(value = "属性值分页")
    @RequestMapping(path = "/auth/PropertyController/pageValue", method = RequestMethod.POST)
    Result<PageRsp<TsmPropertyValue>> pageValue(@RequestBody @ApiParam PageReq<ValueReq> req);


    @ApiOperation(value = "去重创建属性值")
    @RequestMapping(path = "/auth/PropertyController/createValue", method = RequestMethod.POST)
    Result<String> createValue(@RequestBody @ApiParam ValueC valueC);

    @ApiOperation(value = "去重个更新属性值")
    @RequestMapping(path = "/auth/PropertyController/updateValue", method = RequestMethod.POST)
     Result<String> updateValue(@RequestBody @ApiParam ValueU valueU);

}
