package ink.wgink.module.wechat.dao.miniapp;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IMiniAppUserDao
 * @Description: 小程序用户
 * @Author: wanggeng
 * @Date: 2021/4/8 5:39 下午
 * @Version: 1.0
 */
@Repository
public interface IMiniAppUserDao extends IInitBaseTable {

    /**
     * 新增
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 更新信息
     *
     * @param params
     * @throws UpdateException
     */
    void updateInfo(Map<String, Object> params) throws UpdateException;

    /**
     * 更新是否初始化账号
     *
     * @param params
     * @throws UpdateException
     */
    void updateIsInitAccount(Map<String, Object> params) throws UpdateException;

    /**
     * 更新用户码
     *
     * @param params
     * @throws UpdateException
     */
    void updateUserCode(Map<String, Object> params) throws UpdateException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<MiniappUserPO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    MiniappUserPO getPO(Map<String, Object> params) throws SearchException;

}
