package cn.reghao.tnb.content.app.config.shard;

import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;

import java.util.Collection;

/**
 * @author reghao
 * @date 2022-03-15 21:01:01
 */
public class ModuloShardingTableAlgorithm implements PreciseShardingAlgorithm<String> {
    @Override
    public String doSharding(Collection<String> var1, PreciseShardingValue<String> var2) {
        return "qq_mobile_$->{qq % 4}";
    }
}
