其他分享
首页 > 其他分享> > Sharding Sphere如何配置,把两表连接导致的笛卡尔集的效果去掉

Sharding Sphere如何配置,把两表连接导致的笛卡尔集的效果去掉

作者:互联网

#绑定表示例
spring.shardingsphere.sharding.binding-tables[0]=user,t_dict
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.roy.shardingDemo.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

    @Select("select u.user_id,u.username,d.uvalue ustatus from user u left join t_dict d on u.ustatus = d.ustatus")
    public List<User> queryUserStatus();
}

 

标签:两表,BaseMapper,List,Sphere,ustatus,user,Sharding,import,dict
来源: https://blog.csdn.net/qq_39368007/article/details/115385571