package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.UserDO;
import com.iotechn.unimall.data.dto.MessageDTO;
import com.iotechn.unimall.data.dto.UserDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by rize on 2019/7/1.
 */
@Mapper
public interface UserMapper extends BaseMapper<UserDO> {

    UserDTO login(@Param("phone") String phone, @Param("cryptPassword") String cryptPassword);

    List<UserDO> getUserList(
            @Param("id") Long id, @Param("nickname") String nickname,
            @Param("userName") String userName, @Param("gender") Integer gender,
            @Param("status") Integer status, @Param("phone") String phone,@Param("offset") Integer offset,
            @Param("limit") Integer limit);

    Integer countUser(
            @Param("id") Long id, @Param("nickname") String nickname,
            @Param("userName") String userName, @Param("gender") Integer gender,
            @Param("status") Integer status,@Param("phone") String phone);


}
