| | |
| | | <if test="user.cardid!=null and user.cardid != ''"> |
| | | and bu.cardid like concat('%', #{user.cardid},'%') |
| | | </if> |
| | | ORDER BY bu.id desc |
| | | <if test="user.sortName!=null and user.sortName!=''"> |
| | | ORDER BY bu.${user.sortName} ${user.sort},bu.id desc |
| | | </if> |
| | | <if test="user.sortName==null or user.sortName==''"> |
| | | ORDER BY bu.id desc |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectUserPage" resultMap="userResultMap"> |
| | |
| | | |
| | | <!--计算保安人员年龄--> |
| | | <select id="getUserAgeById" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | select id,ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(cardid,7,4),0) age,securitynumber,cardid |
| | | select id,real_name realName,ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(cardid,7,4),0) age,securitynumber,cardid |
| | | from |
| | | blade_user |
| | | where |