package com.czg.account.service;

import com.czg.account.dto.shopuser.ShopUserAddDTO;
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
import com.czg.account.entity.ShopUser;
import com.czg.market.entity.SmsPushEventUser;
import com.czg.market.vo.InviteUserVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

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

    /**
     * 返回流水Id
     */
    Long updateMoney(ShopUserMoneyEditDTO shopUserEditDTO);
    /**
     * 会自动获取到用户的主店铺id 然后获取用户信息
     * 获取用户信息
     */
    ShopUser getUserInfo(Long shopId, Long userId);

    /**
     * 获取店铺用户信息
     * 包含会员折扣等信息
     */
    ShopUser getShopUserInfo(Long shopId, long userId);

    /**
     * 获取邀请用户列表
     */
    Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);

    boolean updateInfo(ShopUser shopUser);
    /**
     * 修改会员等级id 不忽略Null值
     */
    void upMemberLevel(Long newMemberLevelId, Long oldMemberLevelId);

    List<ShopUser> selectBirthdayUser(LocalDate current, Long mainShopId, String userType);

    void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal bigDecimal, Integer isOne);

    List<ShopUser> getPushEventUserList(SmsPushEventUser smsPushEventUser);

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