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>