| | |
| | | <mapper namespace="com.sandu.ximon.dao.mapper.AdminMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.Admin"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="username" column="username" jdbcType="VARCHAR"/> |
| | | <result property="password" column="password" jdbcType="VARCHAR"/> |
| | | <result property="icon" column="icon" jdbcType="VARCHAR"/> |
| | | <result property="email" column="email" jdbcType="VARCHAR"/> |
| | | <result property="mobile" column="mobile" jdbcType="VARCHAR"/> |
| | | <result property="nickName" column="nick_name" jdbcType="VARCHAR"/> |
| | | <result property="note" column="note" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="loginTime" column="login_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="username" column="username" jdbcType="VARCHAR"/> |
| | | <result property="password" column="password" jdbcType="VARCHAR"/> |
| | | <result property="icon" column="icon" jdbcType="VARCHAR"/> |
| | | <result property="email" column="email" jdbcType="VARCHAR"/> |
| | | <result property="mobile" column="mobile" jdbcType="VARCHAR"/> |
| | | <result property="nickName" column="nick_name" jdbcType="VARCHAR"/> |
| | | <result property="note" column="note" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="loginTime" column="login_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | |
| | | nick_name,note,create_time, |
| | | login_time,update_time,status |
| | | </sql> |
| | | <select id="listAdmin" resultType="com.sandu.ximon.dao.bo.AdminBo"> |
| | | SELECT |
| | | t1.*, |
| | | t2.role_id |
| | | FROM |
| | | admin t1 |
| | | LEFT JOIN admin_role_relation t2 ON t1.id = t2.admin_id |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t1.username LIKE CONCAT('%', #{keyword},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |