MPJQueryWrapper 用法

 // 创建QueryWrapper对象
            MPJQueryWrapper queryWrapper = new MPJQueryWrapper<>();

         // 设置要查询的字段
            queryWrapper.select("u.nick_name", "u.avatar_url")
                    .select("wu.nick_name as relayToUserName", "ta.content as relayParentContent")
                    .select("we.*");

           // 设置左连接
            queryWrapper.leftJoin("web_user u we.user_id = u.user_id")
                    .leftJoin("web_user wu we.reply_user_id = wu.user_id")
                    .leftJoin("web_evaluation ta we.relay_to_id_two = ta.evaluation_id");

            // 设置查询条件
            queryWrapper.isNotNull("we.reply_user_id")
                    .eq("we.status", 0)
                    .eq("we.del_flag", 0)
                    .eq("we.relay_to_id", 20);

             // 执行查询
            List> result = webEvaluationMapper.selectMaps(queryWrapper);

你可能感兴趣的:(java,前端,服务器)