TULogMapper.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.sooka.system.mapper.TULogMapper">
  6. <resultMap type="com.sooka.model.bo.TULog" id="TULogResult">
  7. </resultMap>
  8. <sql id="selectTULogVo">
  9. select id, status, remark, del_flag, create_by, create_time, update_by, update_time, login_user, login_name, interfaceinfo_id, interfaceinfo_name, ipaddress, os, platform_interfacetype, browser, param, results, operation_quantity, operation_status, exception_log from t_u_log
  10. </sql>
  11. <parameterMap id="TULog" type="com.sooka.model.bo.TULog"></parameterMap>
  12. <select id="selectTULogList" parameterMap="TULog" resultMap="TULogResult">
  13. <include refid="selectTULogVo"/>
  14. <where>
  15. <if test="status != null and status != ''"> and status = #{status}</if>
  16. <if test="loginUser != null "> and login_user = #{loginUser}</if>
  17. <if test="loginName != null and loginName != ''"> and login_name like concat('%', #{loginName}, '%')</if>
  18. <if test="interfaceinfoId != null and interfaceinfoId != ''"> and interfaceinfo_id = #{interfaceinfoId}</if>
  19. <if test="interfaceinfoName != null and interfaceinfoName != ''"> and interfaceinfo_name like concat('%', #{interfaceinfoName}, '%')</if>
  20. <if test="ipaddress != null and ipaddress != ''"> and ipaddress = #{ipaddress}</if>
  21. <if test="os != null and os != ''"> and os = #{os}</if>
  22. <if test="platformInterfacetype != null and platformInterfacetype != ''"> and platform_interfacetype = #{platformInterfacetype}</if>
  23. <if test="browser != null and browser != ''"> and browser = #{browser}</if>
  24. <if test="param != null and param != ''"> and param = #{param}</if>
  25. <if test="results != null and results != ''"> and results = #{results}</if>
  26. <if test="operationQuantity != null "> and operation_quantity = #{operationQuantity}</if>
  27. <if test="operationStatus != null "> and operation_status = #{operationStatus}</if>
  28. <if test="exceptionLog != null and exceptionLog != ''"> and exception_log = #{exceptionLog}</if>
  29. </where>
  30. </select>
  31. <select id="selectTULogById" parameterType="String" resultMap="TULogResult">
  32. <include refid="selectTULogVo"/>
  33. where id = #{id}
  34. </select>
  35. <insert id="insertTULog" parameterMap="TULog">
  36. insert into t_u_log
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="id != null">id,</if>
  39. <if test="status != null">status,</if>
  40. <if test="remark != null">remark,</if>
  41. <if test="delFlag != null">del_flag,</if>
  42. <if test="createBy != null">create_by,</if>
  43. <if test="createTime != null">create_time,</if>
  44. <if test="updateBy != null">update_by,</if>
  45. <if test="updateTime != null">update_time,</if>
  46. <if test="loginUser != null">login_user,</if>
  47. <if test="loginName != null">login_name,</if>
  48. <if test="interfaceinfoId != null">interfaceinfo_id,</if>
  49. <if test="interfaceinfoName != null">interfaceinfo_name,</if>
  50. <if test="ipaddress != null">ipaddress,</if>
  51. <if test="os != null">os,</if>
  52. <if test="platformInterfacetype != null">platform_interfacetype,</if>
  53. <if test="browser != null">browser,</if>
  54. <if test="param != null">param,</if>
  55. <if test="results != null">results,</if>
  56. <if test="operationQuantity != null">operation_quantity,</if>
  57. <if test="operationStatus != null">operation_status,</if>
  58. <if test="exceptionLog != null">exception_log,</if>
  59. </trim>
  60. <trim prefix="values (" suffix=")" suffixOverrides=",">
  61. <if test="id != null">#{id},</if>
  62. <if test="status != null">#{status},</if>
  63. <if test="remark != null">#{remark},</if>
  64. <if test="delFlag != null">#{delFlag},</if>
  65. <if test="createBy != null">#{createBy},</if>
  66. <if test="createTime != null">#{createTime},</if>
  67. <if test="updateBy != null">#{updateBy},</if>
  68. <if test="updateTime != null">#{updateTime},</if>
  69. <if test="loginUser != null">#{loginUser},</if>
  70. <if test="loginName != null">#{loginName},</if>
  71. <if test="interfaceinfoId != null">#{interfaceinfoId},</if>
  72. <if test="interfaceinfoName != null">#{interfaceinfoName},</if>
  73. <if test="ipaddress != null">#{ipaddress},</if>
  74. <if test="os != null">#{os},</if>
  75. <if test="platformInterfacetype != null">#{platformInterfacetype},</if>
  76. <if test="browser != null">#{browser},</if>
  77. <if test="param != null">#{param},</if>
  78. <if test="results != null">#{results},</if>
  79. <if test="operationQuantity != null">#{operationQuantity},</if>
  80. <if test="operationStatus != null">#{operationStatus},</if>
  81. <if test="exceptionLog != null">#{exceptionLog},</if>
  82. </trim>
  83. </insert>
  84. <update id="updateTULog" parameterMap="TULog">
  85. update t_u_log
  86. <trim prefix="SET" suffixOverrides=",">
  87. <if test="status != null">status = #{status},</if>
  88. <if test="remark != null">remark = #{remark},</if>
  89. <if test="delFlag != null">del_flag = #{delFlag},</if>
  90. <if test="createBy != null">create_by = #{createBy},</if>
  91. <if test="createTime != null">create_time = #{createTime},</if>
  92. <if test="updateBy != null">update_by = #{updateBy},</if>
  93. <if test="updateTime != null">update_time = #{updateTime},</if>
  94. <if test="loginUser != null">login_user = #{loginUser},</if>
  95. <if test="loginName != null">login_name = #{loginName},</if>
  96. <if test="interfaceinfoId != null">interfaceinfo_id = #{interfaceinfoId},</if>
  97. <if test="interfaceinfoName != null">interfaceinfo_name = #{interfaceinfoName},</if>
  98. <if test="ipaddress != null">ipaddress = #{ipaddress},</if>
  99. <if test="os != null">os = #{os},</if>
  100. <if test="platformInterfacetype != null">platform_interfacetype = #{platformInterfacetype},</if>
  101. <if test="browser != null">browser = #{browser},</if>
  102. <if test="param != null">param = #{param},</if>
  103. <if test="results != null">results = #{results},</if>
  104. <if test="operationQuantity != null">operation_quantity = #{operationQuantity},</if>
  105. <if test="operationStatus != null">operation_status = #{operationStatus},</if>
  106. <if test="exceptionLog != null">exception_log = #{exceptionLog},</if>
  107. </trim>
  108. where id = #{id}
  109. </update>
  110. <delete id="deleteTULogById" parameterType="String">
  111. delete from t_u_log where id = #{id}
  112. </delete>
  113. <delete id="deleteTULogByIds" parameterType="String">
  114. delete from t_u_log where id in
  115. <foreach item="id" collection="array" open="(" separator="," close=")">
  116. #{id}
  117. </foreach>
  118. </delete>
  119. </mapper>