ContentPlatformGzhAccountMapperExt.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformGzhAccountMapperExt">
  4. <select id="getGhIdExists"
  5. resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount">
  6. select *
  7. from content_platform_gzh_account
  8. where gh_id = #{ghId}
  9. <if test="id!= null">
  10. and create_account_id != #{id}
  11. </if>
  12. limit 1
  13. </select>
  14. <select id="getCooperateAccountCount" resultType="java.lang.Integer">
  15. select count(1)
  16. from content_platform_gzh_account
  17. where create_account_id = #{createAccountId}
  18. </select>
  19. <select id="getCooperateAccountList"
  20. resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhAccount">
  21. select *
  22. from content_platform_gzh_account
  23. where create_account_id = #{createAccountId}
  24. order by create_timestamp desc
  25. limit #{offset}, #{pageSize}
  26. </select>
  27. <select id="getGzhAccountList" resultType="com.tzld.piaoquan.api.model.vo.contentplatform.GzhAccountItem">
  28. select id, name
  29. from content_platform_gzh_account
  30. where create_account_id = #{createAccountId}
  31. order by create_timestamp desc
  32. </select>
  33. </mapper>