| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.user.UmsAdminLoginLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="admin_id" property="adminId" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="ip" property="ip" /> |
| | | <result column="address" property="address" /> |
| | | <result column="user_agent" property="userAgent" /> |
| | | <id column="id" property="id"/> |
| | | <result column="admin_id" property="adminId"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="ip" property="ip"/> |
| | | <result column="address" property="address"/> |
| | | <result column="user_agent" property="userAgent"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectByCondition" parameterType="com.ycl.dto.log.LogQueryParams" |
| | | resultType="com.ycl.entity.user.vo.UmsAdminLogVO"> |
| | | SELECT t1.*,t2.username as adminId FROM ums_admin_login_log t1 left join ums_admin t2 on t1.admin_id=t2.id |
| | | <where> |
| | | <if test="logQueryParams.content!='' and logQueryParams.content!=null"> |
| | | contain LIKE CONCAT('%',#{logQueryParams.content},'%') |
| | | </if> |
| | | <if test="logQueryParams.operationType!='' and logQueryParams.operationType!=null"> |
| | | and operation_type=#{logQueryParams.operationType} |
| | | </if> |
| | | <if test="logQueryParams.portEquipment!='' and logQueryParams.portEquipment!=null"> |
| | | and user_agent=#{logQueryParams.portEquipment} |
| | | </if> |
| | | <if test="logQueryParams.id!=null"> |
| | | and admin_id=#{logQueryParams.id} |
| | | </if> |
| | | <if test="logQueryParams.startTime!='' and logQueryParams.endTime!=''"> |
| | | and create_time BETWEEN #{logQueryParams.startTime} AND #{logQueryParams.endTime} |
| | | </if> |
| | | </where> |
| | | <if test="logQueryParams.sort != null and logQueryParams.sort == 1"> |
| | | ORDER BY create_time desc |
| | | </if> |
| | | <if test="logQueryParams.sort != null and logQueryParams.sort == 0"> |
| | | ORDER BY create_time asc |
| | | </if> |
| | | </select> |
| | | </mapper> |