张天森
2022-10-11 f0e82623c9b60b17210da35deec49d27f79c1383
flower_city/src/main/resources/mapper/GuideEvolveMapper.xml
@@ -19,6 +19,8 @@
        <id     property="fromDepartmentalId"      column="from_departmental_id"      />
        <id     property="videoUrl"      column="video_url"      />
        <id     property="pictureUrl"      column="picture_url"      />
        <id     property="guideOrderNum"      column="guide_order_num"      />
        <id     property="isTimeout"      column="is_timeout"      />
    </resultMap>
@@ -41,7 +43,9 @@
            video_url,
            picture_url,
            create_time,
            update_time
            update_time,
            guide_order_num,
            is_timeout
        FROM
            automessage_guide_evolve a
    </sql>
@@ -73,6 +77,7 @@
        <if test="videoUrl != null and videoUrl != '' ">video_url,</if>
        <if test="pictureUrl != null and pictureUrl != '' ">picture_url,</if>
        <if test="guidOrderNum != null and guidOrderNum != '' ">guide_order_num,</if>
        <if test="isTimeout != null and isTimeout != '' ">is_timeout,</if>
        update_time,
        create_time
        )values(
@@ -90,6 +95,7 @@
        <if test="videoUrl != null and videoUrl != '' ">#{videoUrl},</if>
        <if test="pictureUrl != null and pictureUrl != '' ">#{pictureUrl},</if>
        <if test="guidOrderNum != null and guidOrderNum != '' ">#{guidOrderNum},</if>
        <if test="isTimeout != null and isTimeout != '' ">#{isTimeout},</if>
        sysdate(),
        sysdate()
        )
@@ -111,6 +117,7 @@
            <if test="fromDepartmentalId != null and fromDepartmentalId != '' ">from_departmental_id=#{fromDepartmentalId},</if>
            <if test="videoUrl != null and videoUrl != '' ">video_url=#{videoUrl},</if>
            <if test="pictureUrl != null and pictureUrl != '' ">picture_url=#{pictureUrl},</if>
            <if test="isTimeout != null and isTimeout != '' ">is_timeout=#{isTimeout},</if>
            update_time=sysdate()
        </set>
        where  id= #{Id}
@@ -130,6 +137,24 @@
        select count(id) from automessage_guide_evolve
    </select>
    <!--  首页统计使用 勿动  -->
    <select id="countStatisticsNum" resultType="integer">
        select count(id) from automessage_guide_evolve
        <where>
            <if test="state != null and state != ''">
                and automessage_guide_evolve.state=#{state}
            </if>
            <if test="isTimeout != null and isTimeout != ''">
                and automessage_guide_evolve.is_timeout=#{isTimeout}
            </if>
        </where>
    </select>
</mapper>