package com.sdtool.business.dao;

import com.sdtool.common.entity.mall.MallUser;
import com.sdtool.common.entity.system.LoginUser;
import com.dySweetFishPlugin.sql.dao.*;
import org.rex.RMap;

@SuppressWarnings("rawtypes")
public interface LoginDao extends DaoRepository {

    @Sharding(databaseShardingStrategy = SupplierDataBaseShardingStrategy.class, tableShardingStrategy = SupplierTableShardingStrategy.class)
    @DAOMethod(operator = OperatorType.QUERY, owait = OperatorWait.AWAIT)
    @SqlId(clazz = LoginDao.class, sql = "login", table = "tbUser", params = {1})
    LoginUser login(RMap params, @DatabaseShardingBy String dataSourceId, @TableShardingBy Long supplierCode);

    @Sharding(databaseShardingStrategy = SupplierDataBaseShardingStrategy.class, tableShardingStrategy = SupplierTableShardingStrategy.class)
    @DAOMethod(operator = OperatorType.QUERY, owait = OperatorWait.AWAIT)
    @SqlId(clazz = LoginDao.class, sql = "mallLogin", table = "maMallUser", params = {1})
    MallUser mallLogin(RMap params, @DatabaseShardingBy String dataSourceId, @TableShardingBy Long supplierCode);
}
