package com.playlet.web.service.app;

import com.github.pagehelper.PageInfo;
import com.playlet.system.domain.PlayletUser;
import com.playlet.web.req.PlayUserReq;

/**
 * <p>短剧小程序用户service</p>
 * @author clunt
 */
public interface PlayletUserAppService {

    /**
     * @param openid 微信唯一凭证
     * @return 短剧用户
     */
    PlayletUser getByOpenId(String openid, String parentId);

    /**
     * @param playUserReq 手机号登陆
     * @return 结果
     */
    PlayletUser getByPhone(PlayUserReq playUserReq) throws Exception;

    /**
     * @param playUserReq 密码登录
     * @return 结果
     */
    PlayletUser getByPassword(PlayUserReq playUserReq) throws Exception;

    /**
     * @param playletUser 填写用户资料
     */
    void updatePlayletUser(PlayletUser playletUser);

    /**
     * @param playUserReq 用户资料
     */
    void updatePasswordByCode(PlayUserReq playUserReq) throws Exception;

    /**
     * @param playletUser 分页查询列表
     * @return 查询结果
     */
    PageInfo<PlayletUser> getPlayletUserPage(PlayletUser playletUser, Integer pageNum, Integer pageSize);

    PlayletUser onlyLoginByOpenid(String openid);

    PlayletUser addPlayletUser(PlayletUser playletUser) throws Exception;

    void addLoginRecord(Long userId);

}
