大于号 | > | > |
小于号 | < | < |
与 | & | & |
单引号 | " | ' |
双引号 | ‘ | " |
foreach元素的属性主要有item,index,collection,open,separator,close。
AND t1.img_name IN <foreach collection="imgNames" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> 是否是某个特定字符串 <if test="rankWay==‘byAssessDate‘ ">
<resultMap id="selectMap" type="com.pwl.vcloud.common.entity.UserVO"> <id column="id" property="id" /> <result column="username" property="username" /> <result column="nickname" property="nickname" /> <result column="password" property="password" /> <result column="enabled" property="enabled" /> <result column="email" property="email" /> <result column="userface" property="userface" /> <result column="reg_time" property="regTime" /> <collection property="roleList" ofType="com.pwl.vcloud.common.entity.Roles"> <id column="r_id" property="id"></id> <result column="role_name" property="name"></result> <result column="role_code" property="roleCode"></result> </collection>
</resultMap>
public class UserVO implements Serializable { private Integer id; private String username; private String nickname; private String password; private Integer enabled; private String email; private String userface; private Date regTime; /** * 角色列表 */ private List<Roles> roleList = new ArrayList<>(); //其他 }
原文:https://www.cnblogs.com/lusaisai/p/13295747.html