如:ui
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date, (year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date,<![CDATA[(year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age]]>,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})
附:XML转义字符spa
<code |
<xml |
小于号io |
>table |
|
大于号date |
&select |
&方法 |
和 |
' |
’ |
单引号 |
" |
" |
双引号 |
由于这个是xml格式的,因此不容许出现相似“>”这样的字符,可是均可以使用<![CDATA[ ]]>符号进行说明,将此类符号不进行解析。
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date,<![CDATA[(year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age]]>,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})