WatchAudioLogMsgMapper.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.fs.watch.mapper.WatchAudioMsgLogMapper">
  6. <resultMap id="BaseResultMap" type="com.fs.watch.domain.WatchAudioMsgLog">
  7. <result property="id" column="id" jdbcType="OTHER" typeHandler="com.fs.watch.handler.UUIDTypeHandler"/>
  8. <result property="deviceId" column="device_id" jdbcType="VARCHAR"/>
  9. <result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
  10. <result property="type" column="type" jdbcType="INTEGER"/>
  11. <result property="status" column="status" jdbcType="INTEGER"/>
  12. <result property="msg" column="msg" jdbcType="VARCHAR"/>
  13. <result property="createTime" column="create_time" jdbcType="VARCHAR"/>
  14. </resultMap>
  15. <sql id="Base_Column_List">
  16. id, device_id, file_url, `type`,`status`, msg, create_time
  17. </sql>
  18. <!-- 单条插入 -->
  19. <insert id="insert" parameterType="com.fs.watch.domain.WatchAudioMsgLog" useGeneratedKeys="false">
  20. INSERT INTO watch.watch_audio_msg_log
  21. <trim prefix="(" suffix=")" suffixOverrides=",">
  22. <if test="data.id != null">
  23. id,
  24. </if>
  25. <if test="data.deviceId != null">
  26. device_id,
  27. </if>
  28. <if test="data.fileUrl != null">
  29. file_url,
  30. </if>
  31. <if test="data.type != null">
  32. `type`,
  33. </if>
  34. <if test="data.status != null">
  35. `status`,
  36. </if>
  37. <if test="data.msg != null">
  38. msg,
  39. </if>
  40. <if test="data.createTime != null">
  41. create_time,
  42. </if>
  43. </trim>
  44. <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
  45. <if test="data.id != null">
  46. #{data.id, typeHandler=com.fs.watch.handler.UUIDTypeHandler},
  47. </if>
  48. <if test="data.deviceId != null">
  49. #{data.deviceId},
  50. </if>
  51. <if test="data.fileUrl != null">
  52. #{data.fileUrl},
  53. </if>
  54. <if test="data.type != null">
  55. #{data.type},
  56. </if>
  57. <if test="data.status != null">
  58. #{data.status},
  59. </if>
  60. <if test="data.msg != null">
  61. #{data.msg},
  62. </if>
  63. <if test="data.createTime != null">
  64. #{data.createTime},
  65. </if>
  66. </trim>
  67. </insert>
  68. </mapper>