package com.fdkankan.platform.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fdkankan.common.response.ResultData;
import com.fdkankan.common.user.SSOUser;
import com.fdkankan.platform.goods.entity.CameraDetail;
import com.fdkankan.platform.goods.entity.CameraDetailNumEntity;
import com.fdkankan.platform.user.entity.User;
import com.fdkankan.platform.user.request.RequestCamera;
import com.fdkankan.platform.user.request.RequestUser;
import com.fdkankan.platform.user.vo.ReceiverInfoVo;
import com.fdkankan.platform.user.vo.ResponseCamera;
import com.fdkankan.platform.user.vo.ResponseUser;
import com.fdkankan.platform.user.vo.SSOUserVo;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author 
 * @since 2021-12-24
 */
public interface IUserService extends IService<User> {

    String register(RequestUser user);

    SSOUser getSSOUserByToken(String token);

    User getUserByUserName(String userName);

    SSOUser getSsoUserByUserName(User user,String phoneNum);

    String changePassword(RequestUser user);

    SSOUserVo getUserInfoByUser(Integer cameraType, User dbUser, String token);

    ResponseUser getUserInfoByParam(RequestUser user, String token);
    
    ResponseUser getUserInfoBySsoUserVo(SSOUserVo ssoUserVo) ;

    String uploadHead(RequestUser user,String token)throws Exception;

    String insertAddress(RequestUser user,String token);

    String updateDefaultAddress(RequestUser user, String token);

    ReceiverInfoVo getUserDefaultReceiver(String token);

    String removeAddress(Long param);

    List<ReceiverInfoVo> getReceiverList(String token);

    String updateEmail(RequestUser param, String token);

    String updateNickName(RequestUser user, String token);

    String updateUserDetail(RequestUser user, String token);

    Page<ResponseCamera> getCameraPage(RequestCamera param, String token)  throws Exception;

    List<CameraDetailNumEntity> getCameraTypeNum(Integer type, String token);

    ResponseCamera getCameraDetailByChildName(RequestCamera param, String token);

    HashMap<String, Object> getCameraDetailDeadline(RequestCamera param, String token);

    Integer getCameraDetailNumber(String token);

    List<ResponseCamera> getCameraByUser(RequestCamera param, String token);

    String unbindCamera(Long cameraId, String ids) throws Exception;

    String deleteCooperationUser(RequestCamera camera, CameraDetail cameraDetailEntity)throws Exception;

    String saveCooperationUser(RequestCamera camera, String token) throws Exception;

    ResultData sceneResourceByCameraId(RequestCamera camera);

    SSOUser getSSOUserByUserId(Long userId);

    SSOUser getByNickName(String nickName);

    User getUserByUserId(Long userId);

    Page<ResponseUser> getPageByParam(RequestUser param);

    String updateStatus(Long userId, int status);

    List<User> getUserLikeUserName(String searchKey);

    List<ResponseCamera> findNewAll(Long userId, RequestCamera param) throws Exception;

    ResultData updateDownloadNum(long userId, int downLoadNum);
}
