package com.czg.market.service;

import com.czg.BaseQueryParam;
import com.czg.market.entity.MkPointsGoods;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.Map;

/**
 * 积分商品设置 服务层。
 *
 * @author ww
 * @since 2025-12-08
 */
public interface MkPointsGoodsService extends IService<MkPointsGoods> {

    Page<MkPointsGoods> getPointsGoodsPage(BaseQueryParam param, Long shopId);

    Map<String, Object> getPointsGoodsPageByUser(Integer page, Integer size, Long shopId, String goodsCategory, Long userId);
    /**
     * 更新商品数量
     *
     * @param id                 商品id
     * @param quantity           库存数量 最终值
     * @param totalExchangeCount 累计兑换数量 最终值
     */
    boolean upNumberById(Long id, Integer quantity, Integer totalExchangeCount);


    void updateGoodsCouponStatus(Long coupon);
}
