package com.czg.account.service;

import com.czg.account.dto.shopuser.*;
import com.czg.account.entity.ShopUser;
import com.czg.resp.CzgResult;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.math.BigDecimal;

/**
 * 商户储值会员 服务层。
 *
 * @author Administrator
 * @since 2025-02-08
 */
public interface ShopUserService extends IService<ShopUser> {

    Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount);

    Boolean updateInfo(Long shopId, ShopUserEditDTO shopUserEditDTO);

    /**
     * 返回流水Id
     */
    Long updateMoney(Long shopId, ShopUserMoneyEditDTO shopUserEditDTO);

    ShopUserSummaryDTO getSummary(Long shopId, Integer isVip);

    ShopUser getShopUserInfo(Long shopId, long userId);

    Boolean add(Long shopId, ShopUserAddDTO shopUserAddDTO);

    /**
     * 获取小程序登录用户所有店铺会员信息
     */
    Page<ShopUserVipCardDTO> vipCard(long userInfoId);

    CzgResult<String> getCode(long userInfoId, long shopId);

    boolean join(Long shopId, Long userId, ShopUserAddDTO shopUserAddDTO);

    ShopUserDetailDTO getInfo(Long shopId, long userId);

    ShopUser getDetail(Integer id, Integer userId);
}
