package com.zcxk.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zcxk.dao.UserRegisterMapper;
import com.zcxk.dto.QueryCondition;
import com.zcxk.entity.UserRegister;
import com.zcxk.service.UserRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户注册(UserRegister)服务实现类
 *
 * @author yjy
 * @since 2020-10-29
 */
@Service("userRegisterService")
public class UserRegisterServiceImpl implements UserRegisterService {
    @Autowired
    private UserRegisterMapper userRegisterMapper;

    /**
     * 新增数据
     *
     * @param userRegister 实例对象
     * @return 实例对象
     */
    @Override
    public int insert(UserRegister userRegister) {
        return this.userRegisterMapper.insert(userRegister);
    }


    /**
     * 通过主键删除数据
     *
     * @param ids 主键
     * @return 是否成功
     */
    @Override
    public int deleteById(Long[] ids) {
        return this.userRegisterMapper.deleteById(ids);
    }

    /**
     * 分页查询
     *
     * @return 对象列表
     */
    @Override
    public IPage<UserRegister> selectPage(UserRegister userRegister, IPage<UserRegister> page) {
        return this.userRegisterMapper.selectPage(page, userRegister);
    }
    /**
     * 根据条件查询
     *
     * @return 实例对象的集合
     */
    @Override
    public List<UserRegister> selectListByCondition(QueryCondition queryCondition) {
        return userRegisterMapper.selectListByCondition(queryCondition);
    }
}