MallReplyMapper.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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="cn.reghao.tnb.content.app.geo.db.mapper.MallReplyMapper">
  4. <insert id="save" useGeneratedKeys="true" keyProperty="id">
  5. insert into geo_mall_reply
  6. (`id`,`deleted`,`create_time`,`update_time`,`item_type`,`item_id`,`reply_id`,`reply_content`,`append_content`,`extra`,`username`,`avatar_url`)
  7. values
  8. (#{id},#{deleted},#{createTime},#{updateTime},#{itemType},#{itemId},#{replyId},#{replyContent},#{appendContent},#{extra},#{username},#{avatarUrl})
  9. </insert>
  10. <select id="findAll" resultType="cn.reghao.tnb.content.app.geo.model.po.MallReply">
  11. select *
  12. from geo_mall_reply
  13. limit 1000
  14. </select>
  15. <select id="findByItemType" resultType="cn.reghao.tnb.content.app.geo.model.po.MallReply">
  16. select *
  17. from geo_mall_reply
  18. where item_type=#{itemType}
  19. order by id asc
  20. limit 500
  21. </select>
  22. <select id="findByReplyId" resultType="cn.reghao.tnb.content.app.geo.model.po.MallReply">
  23. select *
  24. from geo_mall_reply
  25. where reply_id=#{reply_id}
  26. </select>
  27. <select id="findByItemId" resultType="cn.reghao.tnb.content.app.geo.model.po.MallReply">
  28. select *
  29. from geo_mall_reply
  30. where item_id=#{itemId}
  31. </select>
  32. </mapper>