package com.sqx.modules.app.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.app.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * 用户
 */
@Mapper
public interface UserDao extends BaseMapper<UserEntity> {


    List<UserEntity> selectUserPage(@Param("search") String search, @Param("sex") Integer sex, @Param("platform") String platform,
                                     @Param("sysPhone") String sysPhone, @Param("status") Integer status, @Param("member") Integer member,
                                     @Param("inviterCode") String inviterCode, @Param("userName") String userName,
                                     @Param("invitationCode") String invitationCode, @Param("startTime") String startTime,
                                     @Param("endTime") String endTime,@Param("qdCode") String qdCode,@Param("sysUserName") String sysUserName,Integer vipType);

    List<UserEntity> userListExcel(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("userEntity") UserEntity userEntity);

    int queryInviterCount(@Param("inviterCode") String inviterCode);

    int queryUserCount(@Param("type") int type, @Param("date") String date,String platform,String qdCode);

    Double queryPayMoney(@Param("type") int type, @Param("date") String date,String qdCode);

    List<Map<String, Object>> queryCourseOrder(@Param("type") int type, @Param("start") String start, @Param("end") String end,Long sysUserId);

    int userMessage( String date, int type,String qdCode,Integer vipType);

    int insertUser(UserEntity userEntity);

    List<UserEntity> selectInviteUserList(String userName,String phone);

    int selectUserOnLineCount(String qdCode);

    int updateUserClientIdIsNull(String clientid);


}
