package com.ruoyi.member.service;

import java.util.List;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.member.domain.MemberUser;
import com.ruoyi.member.vo.MemberUserVO;

/**
 * 会员Service接口
 *
 * @author pqz
 * @date 2025-03-17
 */
public interface IMemberUserService extends IService<MemberUser> {

    /**
     * 分页列表查询
     *
     * @param pageReqVO {@link MemberUserVO}
     * @param page      分页参数
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.member.domain.MemberUser>
     * @author PQZ
     * @date 15:32 2025/3/17
     **/
    IPage<MemberUserVO> queryListPage(MemberUserVO pageReqVO, Page<MemberUserVO> page);

    /**
     * 根据用户表id获取通告主信息
     *
     * @param userId 用户表id
     * @return com.ruoyi.member.vo.MemberUserVO
     * @author PQZ
     * @date 11:42 2025/3/21
     **/
    MemberUserVO announcerDetail(Long userId);



    /**
     * 获取博主详情
     *
     * @param userId 用户表id
     * @return com.ruoyi.member.vo.MemberUserVO
     * @author PQZ
     * @date 10:41 2025/3/22
     **/
    MemberUserVO bloggerDetail(Long userId);

    /**
     * 通过用户id查询用户详情信息
     *
     * @param userId 用户id
     * @return com.ruoyi.member.vo.MemberUserVO
     * @author PQZ
     * @date 11:40 2025/4/9
     **/
    MemberUserVO queryByUserId(Long userId,String userType);

    /**
     * 微信授权登陆
     *
     * @param openid        TODO
     * @param decryptResult TODO
     * @return java.lang.String
     * @author vinjor-M
     * @date 15:55 2025/3/26
     **/
    String wxLogin(String openid, String decryptResult,String unionId);

    /**
     * uniApp保存会员信息
     * @author PQZ
     * @date 14:54 2025/4/9
     * @param memberUser {@link MemberUserVO}
    **/
    void uniSaveMember(MemberUserVO memberUser);

    /**
     * 微信授权登陆
     *
     * @return java.lang.String
     * @author vinjor-M
     * @date 15:55 2025/3/26
     **/
    String gzhLogin(String wxOpenId,  JSONObject userInfo);
    void sendNewGift() throws Exception;
    /**
     * 判断是否领取过新人好礼
     */
    Object isGetGift();

}
