Mapper xml中返回值类型

Posted coco9821

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mapper xml中返回值类型相关的知识,希望对你有一定的参考价值。

Mapper.java文件:

public interface VCSGLRoleUserMapper {

    List getProjectByuser(String psid);
}

 

Mapper.xml文件

    <select id="getProjectByuser" resultType="java.util.List">
        SELECT * FROM (SELECT usr_name, usr_sid, usr_email, usr_gender, rl_name, org_name FROM vCSGLRoleUser where rl_type=1001 and rur_project_sid=#{psid} and rur_source is null
          Union SELECT usr_name, usr_sid, usr_email, usr_gender, rl_name, org_name FROM vCSGLRoleUser where rl_type=1001 and rur_project_sid=#{psid} and rur_source =\'userCenter\') t
          group by t.usr_sid
    </select>

 

以上是关于Mapper xml中返回值类型的主要内容,如果未能解决你的问题,请参考以下文章

Mybatis动态代理开发

mybatis之mapper.xml分析

MyBatis之Mapper XML 文件详解-sql和入参

CRUD和Mapper.xml参数

MyBatis中Mapper的返回值类型

mapper代理查询