1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt">
- <select id="getGzhPlanCount" resultType="java.lang.Integer">
- select count(*)
- from content_platform_gzh_plan
- where create_account_id = #{createAccountId}
- <if test="param.accountId != null and param.accountId != ''">
- and account_id = #{param.accountId}
- </if>
- <if test="param.publishStage != null and param.publishStage != ''">
- and publish_stage = #{param.publishStage}
- </if>
- <if test="param.createTimestampStart != null and param.createTimestampStart != ''">
- and create_timestamp > #{param.createTimestampStart}
- </if>
- <if test="param.createTimestampEnd != null and param.createTimestampEnd != ''">
- and create_timestamp < #{param.createTimestampEnd}
- </if>
- <if test="param.title != null and param.title != ''">
- and id in (select plan_id from content_platform_gzh_plan_video where title like concat('%', #{param.title}, '%'))
- </if>
- </select>
- <select id="getGzhPlanList"
- resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPlan">
- select *
- from content_platform_gzh_plan
- where create_account_id = #{createAccountId}
- <if test="param.accountId != null and param.accountId != ''">
- and account_id = #{param.accountId}
- </if>
- <if test="param.publishStage != null and param.publishStage != ''">
- and publish_stage = #{param.publishStage}
- </if>
- <if test="param.createTimestampStart != null and param.createTimestampStart != ''">
- and create_timestamp > #{param.createTimestampStart}
- </if>
- <if test="param.createTimestampEnd != null and param.createTimestampEnd != ''">
- and create_timestamp < #{param.createTimestampEnd}
- </if>
- <if test="param.title != null and param.title != ''">
- and id in (select plan_id from content_platform_gzh_plan_video where title like concat('%', #{param.title}, '%'))
- </if>
- order by create_timestamp desc
- limit #{offset}, #{pageSize}
- </select>
- </mapper>
|