package cn.com.ty.lift.ud.userInfo.service;

import cn.com.ty.lift.ud.operation.mapper.entity.VipFeeSettingEntity;
import cn.com.ty.lift.ud.userInfo.controller.query.UserInfoQuery;
import cn.com.ty.lift.ud.userInfo.mapper.entity.*;
import cn.com.ty.lift.ud.userInfo.mapper.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;

import cn.com.xwy.boot.web.dto.RestResponse;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * 用户表 -Service
 * 
 * @author Xson
 * @date 2020-05-09
 */
public interface IUserInfoService extends IService<UserInfoEntity> {

    UserInfoEntity getByUserId(Long id);

    RestResponse getUserInfo(Long id);

    RestResponse getNearUser(UserInfoDto userInfoDto);

    RestResponse listExpert(UserInfoQuery example);

    /**
     * app专家分类列表
     * @param example
     * @return
     */
    RestResponse listGroupExpert(UserInfoQuery example);

    RestResponse addExpert(UserInfoEntity userInfoEntity);

    RestResponse queryAllExpert();

    RestResponse addUser(UserRequest userRequest);

    RestResponse deleteUser(List<Long> ids);

    RestResponse updateUser(UserInfoEntity userInfoEntity);

    RestResponse listUser(UserInfoQuery userInfoQuery);

    void addExpertScore(Integer nowTotalScore, Long id,Integer expertLevel);

    RestResponse toVip(UserVipDto urEntity);

    RestResponse toWhichVip(Long userId);

    RestResponse cancelVip(UserLevelDto userLevelDto);

    RestResponse updateUserBalance(Long id, BigDecimal money);

    /**
     * 更新用户余额
     * 
     * @param userId
     * @param money
     * @return
     */
    RestResponse rechargePayBalance(Long userId, BigDecimal money);

    RestResponse sendRedEnvelope(Long userId, Long redEncelopId);

    UserInfoEntity getUserByMobile(String mobile);

    RestResponse batchSendRedEnvelope(List<String> userId, Long redEncelopId);

    RestResponse noDeleteUser(List<Long> ids);

    RestResponse toVipApp(UserVipDto urEntity);

    void  cancelOverTimeVip();

    VipFeeSettingEntity getVipByUserId(Long UserId);

    /**
     * 判断是否有用户使用该角色
     * @param aLong
     * @return
     */
    List<UserInfoEntity> getByUserLevel(Long aLong);

    void updateUserLevelName(String userLevelName,String OldUserLevelName);

    RestResponse addUserBalance(List<Long> ids);

    /**
     * 查询最新的用户信息和权限
     * @param userId
     * @return
     */
    RestResponse getNewInfo(Long userId);
    
    RestResponse getUserByCompanyId(Long companyId);

    /**
     * 获取专家被打赏次数
     * @param companyId
     * @return
     */
    RestResponse getExpertRewardedCount(Long companyId);

    /**
     * 获取用户打赏清单
     * @param userId
     * @return
     */
    RestResponse getRewardList(Long userId);

    /**
     * 保存vip id
     * @param entity
     * @return
     */
    RestResponse saveVipID(UserInfoEntity entity);
}
