后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 line
2.3 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.iformall.mapper.PosActionLogMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.PosActionLog">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="url" jdbcType="VARCHAR" property="url" />
  7. <result column="ip" jdbcType="VARCHAR" property="ip" />
  8. <result column="method" jdbcType="VARCHAR" property="method" />
  9. <result column="start_time" jdbcType="BIGINT" property="startTime" />
  10. <result column="end_time" jdbcType="BIGINT" property="endTime" />
  11. <result column="cost_time" jdbcType="INTEGER" property="costTime" />
  12. <result column="req_json" jdbcType="VARCHAR" property="reqJson" />
  13. <result column="res_json" jdbcType="VARCHAR" property="resJson" />
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`url`,`ip`,`method`,`start_time`,`end_time`,`cost_time`,`req_json`,`res_json`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != url ">
  24. and `url` like concat('%', #{url},'%')
  25. </if>
  26. <if test=" null != ip ">
  27. and `ip` like concat('%', #{ip},'%')
  28. </if>
  29. <if test=" null != method ">
  30. and `method` like concat('%', #{method},'%')
  31. </if>
  32. <if test=" null != startTime ">
  33. and `start_time` = #{startTime}
  34. </if>
  35. <if test=" null != endTime ">
  36. and `end_time` = #{endTime}
  37. </if>
  38. <if test=" null != costTime ">
  39. and `cost_time` = #{costTime}
  40. </if>
  41. <if test=" null != reqJson ">
  42. and `req_json` like concat('%', #{reqJson},'%')
  43. </if>
  44. <if test=" null != resJson ">
  45. and `res_json` like concat('%', #{resJson},'%')
  46. </if>
  47. <if test=" null != ids ">
  48. and id in
  49. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  50. #{idItem}
  51. </foreach>
  52. </if>
  53. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  54. </sql>
  55. <select id="findList" parameterType="com.iformall.domain.po.PosActionLog" resultMap="BaseResultMap">
  56. select <include refid="allColumns" /> from pos_action_log
  57. <include refid="dynamicWhereConditions" />
  58. </select>
  59. </mapper>