/**
 * Project Name:eis-jxyj-facade
 * File Name:ItemFeign.java
 * Package Name:com.prolog.eis.feign
 * Date:2022年10月10日下午2:07:44
 * Copyright (c) 2022, bluemobi All Rights Reserved.
 *
*/

package com.prolog.eis.feign;

import com.prolog.cs.basic.item.model.vo.ItemBarCodeVO;
import com.prolog.cs.basic.item.model.vo.ItemBaseInfoVO;
import com.prolog.cs.basic.item.model.vo.ItemSyncQueryByIdVO;
import com.prolog.eis.dto.item.ItemSyncVO;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Description: <br/>
 * Date: 2022年10月10日 下午2:07:44 <br/>
 * 
 * @author weiSiYa
 * @version
 * @see
 */
@FeignClient(value = "${prolog.service.item:upcloud-base-item}")
public interface ItemFeign {

    @PostMapping("/itemSync/query")
    RestMessage<Page<ItemSyncVO>> queryItemMst(@RequestBody ItemSyncQueryByIdVO query);

    @GetMapping("/item/basic/list-barcode")
    RestMessage<List<ItemBarCodeVO>> queryItemByBarcode(@RequestParam("barCode") String barCode);

    /**
     * 通过条形码获取商品信息
     * @param barCode
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = "/item/basic/list-barcode")
    RestMessage<List<ItemSyncVO>> getItemByBarcode(@RequestParam("barCode") String barCode);

    /**
     * 根据商品名称模糊查询商品全部信息List
     * @param itemName
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value = "/item/get-by-itemname")
    RestMessage<List<ItemBaseInfoVO>> getItemByName(@RequestParam("itemName") String itemName);
}
