- @Update
@Update("<script>update t_user " +
"<set> " +
"<if test='userName != null'> user_name = #{userName},</if>" +
"<if test='userPwd != null'> user_pwd = #{userPwd},</if>" +
"<if test='userRemark != null'> user_remark = #{userRemark},</if>" +
"<if test='userPhone != null'> user_phone = #{userPhone},</if>" +
"<if test='userEmail != null'> user_email = #{userEmail},</if>" +
"</set> " +
"where user_id = #{userId}</script>")
@Select({
"<script>",
"SELECT * ",
"FROM users WHERE id IN",
"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>",
"#{id}",
"</foreach>",
"</script>"
})
List<UserEntity> getUserById(@Param("ids") List<String> ids);