package com.sckw.example.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.sckw.example.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;

@Mapper
public interface SysUserDao {

    /**
     * 账号查询用户信息
     * @param params {account:账号, systemType:系统类别}
     * @return
     */
    @DS("slave_1")
    SysUser findByAccount(Map params);

    @DS("master")
    @Select("SELECT * FROM user limit 1")
    List<SysUser> findUserByAccount(String account);

    @DS("slave_1")
    @Select("SELECT * FROM sys_user limit 10")
    List<Map> findUserByAccount1(String account);

    @DS("slave_1")
    List<Map<String, Object>> findPage(Map<String, Object> params);

    int insert(SysUser sysUser);
}
