package ink.wgink.module.wechat.dao.official.account;

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.dtos.official.account.OfficialAccountUserDTO;
import ink.wgink.module.wechat.pojo.pos.official.account.OfficialAccountUserPO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IAccountOfficialUserDao
 * @Description: 公众号用户
 * @Author: wanggeng
 * @Date: 2021/4/28 6:42 下午
 * @Version: 1.0
 */
@Repository
public interface IOfficialAccountUserDao 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 update(Map<String, Object> params) throws UpdateException;

    /**
     * 修改用户码（邀请码）
     *
     * @param params
     * @throws UpdateException
     */
    void updateUserCode(Map<String, Object> params) throws UpdateException;

    /**
     * 修改初始账号标识
     *
     * @param params
     * @throws UpdateException
     */
    void updateIsInitAccount(Map<String, Object> params) throws UpdateException;

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

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

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

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

}
