 分类:
    Mybatis
    
    分类:
    Mybatis
方法调用
持久层接口
List<mattersJionDto> queryBuildJoin(@Param("str_rows") String str_rows,@Param("rows") Integer rows,
                                        @Param("pages") Integer pages, @Param("build_Name")String build_Name);mapper的xml
<!--  在mapper的写法  -->
    <select id="queryBuildJoin" resultType="mattersJionDto">
        select <if test="rows!=null">top ${str_rows} </if> b.build_Name,m.matter_Name,m.matter_Number,m.end_time
        from Builds b join Matters m on b.Id=m.build_id
        <where>
            <if test="build_Name!=null">and b.build_Name=#{build_Name}</if>
            <if test="pages!=null">and b.Id not
                in( select top (#{rows}*(#{pages}-1)) Id from Builds order by Id)
            </if>
        </where>
    </select>
评价
    
                    排名
                
                
                    6
                
            
                    文章
                
                
                    6
                
            
                    粉丝
                
                
                    16
                
            
                    评论
                
                
                    8
                
            
            {{item.articleTitle}}
            
    {{item.blogName}} : {{item.content}}
        
            ICP备案  :渝ICP备18016597号-1
        
        
            网站信息:2018-2025TNBLOG.NET
        
        
            技术交流:群号656732739
        
        
            联系我们:contact@tnblog.net
        
        
            公网安备: 50010702506256
50010702506256
        
     50010702506256
50010702506256
         
        
            欢迎加群交流技术
        
     
         
         
        