package com.sqx.modules.goods.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.Result;
import com.sqx.modules.goods.entity.Goods;
import com.sqx.modules.goods.entity.GoodsAttr;

import java.util.List;

public interface GoodsService extends IService<Goods> {

    Result insertGoods(Goods goods);

    Result selectGoodsById(Long goodsId);

    Result selectGoodsList(Long shopId, Double lng, Double lat);

    Result updateGoods(Goods goods);

    Result isFormatAttr(GoodsAttr goodsAttr, String coverImg, String originalPrice, String price);

    Result onlyFormatAttr(String coverImg, String originalPrice, String price);

    Result formatAttr(Long goodsId);

    Result findAttrValue(Long goodsId);

    Result selectShortShop(double lng, double lat, String shopName, Integer page, Integer limit, Long shopId);

    Result selectAllShop(Integer page, Integer limit, String shopName,String region,Integer isActivity);

    Result selectAdminGoodsList(Integer page, Integer limit, Integer classifyId, String goodsName, Integer status, Long shopId, String shopName);

    Result selectAllClassify(Integer page,Integer limit,String shopName, Long shopId);

    Result shopAddGoods(Long shopId, List goodsIdList);

    Result deleteGoodsById(Long goodsId);

    Result selectAllShopList(Long userId);

    Result selectShop(Integer page, Integer limit, Integer screen, Integer shopTypeId, Double lng, Double lat, String impotr,Long activityId);

    Result selectSearch(Integer page, Integer limit, String impotr, Double lng, Double lat);

    Result selectEvaluate(Integer page, Integer limit, Long shopId,String goodsId, Integer grade);

//    Result selectEvaluateByGoodsId(Long goodsId, Integer page, Integer limit);

    Result updateBatchStatus(String goodsIds, Integer status);

    Result deleteBatchIds(String goodsIds);

    Result updateBatchInventory(String goodsIds,Integer inventory);

    Result updateSort(Long goodsId, Integer sort);


    Result selectEvaluateGoodsById(String goodsId,Integer grade, Integer page, Integer limit);
}
