ContentPlatformPlanMapperExt.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.ContentPlatformPlanMapperExt">
  4. <select id="getGzhPlanCount" resultType="java.lang.Integer">
  5. select count(*)
  6. from content_platform_gzh_plan
  7. where create_account_id = #{createAccountId}
  8. <if test="param.accountId != null and param.accountId != ''">
  9. and account_id = #{param.accountId}
  10. </if>
  11. <if test="param.publishStage != null and param.publishStage != ''">
  12. and publish_stage = #{param.publishStage}
  13. </if>
  14. <if test="param.createTimestampStart != null and param.createTimestampStart != ''">
  15. and create_timestamp > #{param.createTimestampStart}
  16. </if>
  17. <if test="param.createTimestampEnd != null and param.createTimestampEnd != ''">
  18. and create_timestamp &lt; #{param.createTimestampEnd}
  19. </if>
  20. <if test="param.title != null and param.title != ''">
  21. and id in (select plan_id from content_platform_gzh_plan_video where title like concat('%', #{param.title}, '%'))
  22. </if>
  23. </select>
  24. <select id="getGzhPlanList"
  25. resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPlan">
  26. select *
  27. from content_platform_gzh_plan
  28. where create_account_id = #{createAccountId}
  29. <if test="param.accountId != null and param.accountId != ''">
  30. and account_id = #{param.accountId}
  31. </if>
  32. <if test="param.publishStage != null and param.publishStage != ''">
  33. and publish_stage = #{param.publishStage}
  34. </if>
  35. <if test="param.createTimestampStart != null and param.createTimestampStart != ''">
  36. and create_timestamp > #{param.createTimestampStart}
  37. </if>
  38. <if test="param.createTimestampEnd != null and param.createTimestampEnd != ''">
  39. and create_timestamp &lt; #{param.createTimestampEnd}
  40. </if>
  41. <if test="param.title != null and param.title != ''">
  42. and id in (select plan_id from content_platform_gzh_plan_video where title like concat('%', #{param.title}, '%'))
  43. </if>
  44. order by create_timestamp desc
  45. limit #{offset}, #{pageSize}
  46. </select>
  47. </mapper>