<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fdage.dao.cust.TbLogMapperCust">
  <select id="findList" parameterType="com.fdage.request.RequestLog" resultType="com.fdage.pojo.TbLog">
    select
    a.id, a.user_id as userId, a.type, a.description, a.update_time AS updateTime,
    a.create_time as createTime, b.user_name as userName
    from tb_log a left join tb_user b on a.user_id = b.id
    where 1 = 1
    <if test="type != null">
      and type like CONCAT('%', #{type}, '%')
    </if>
    <if test="description != null">
      and description like CONCAT('%', #{description}, '%')
    </if>
    ORDER BY id desc
  </select>
</mapper>