SysWxReplyMessageMediaMapper.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~
  4. ~ Copyright (c) 2018-2025, hnqz All rights reserved.
  5. ~
  6. ~ Redistribution and use in source and binary forms, with or without
  7. ~ modification, are permitted provided that the following conditions are met:
  8. ~
  9. ~ Redistributions of source code must retain the above copyright notice,
  10. ~ this list of conditions and the following disclaimer.
  11. ~ Redistributions in binary form must reproduce the above copyright
  12. ~ notice, this list of conditions and the following disclaimer in the
  13. ~ documentation and/or other materials provided with the distribution.
  14. ~ Neither the name of the pig4cloud.com developer nor the names of its
  15. ~ contributors may be used to endorse or promote products derived from
  16. ~ this software without specific prior written permission.
  17. ~ Author: hnqz
  18. ~
  19. -->
  20. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  21. <mapper namespace="com.qunzhixinxi.hnqz.admin.mapper.SysWxReplyMessageMediaMapper">
  22. <!-- 通用查询映射结果 -->
  23. <resultMap id="baseResultMap" type="com.qunzhixinxi.hnqz.admin.entity.SysWxReplyMessageMedia">
  24. <id column="id" property="id"/>
  25. <result column="media_type" property="mediaType"></result>
  26. <result column="title" property="title"></result>
  27. <result column="introduction" property="introduction"></result>
  28. <result column="content" property="content"></result>
  29. <result column="name" property="name"></result>
  30. <result column="url" property="url"></result>
  31. <result column="wx_media_id" property="wxMediaId"></result>
  32. <result column="sort" property="sort"></result>
  33. <result column="create_time" property="createTime"></result>
  34. <result column="update_time" property="updateTime"></result>
  35. </resultMap>
  36. <!-- 根据SysWxReplyMessage中的messageId查询-->
  37. <select id="listMediaByMessageId" resultMap="baseResultMap">
  38. SELECT
  39. mm.*
  40. FROM
  41. sys_wx_reply_message_media mm
  42. LEFT JOIN sys_wx_reply_message_relation mr ON mr.message_media_id = mm.id
  43. WHERE
  44. mr.message_id = #{messageId}
  45. </select>
  46. </mapper>