44323
2023-09-20 5771c822e99c38f0484559f1f68843979f0df24b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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.dsh.other.mapper.BannerMapper">
 
 
    <update id="changeState">
        update t_banner set
        state = #{state}
        <where>
        <if test="ids != null and questionIds.size()>0">
        AND t_banner.id IN
        <foreach collection="ids" separator="," item="id" open="(" close=")">
            #{id}
        </foreach>
    </if>
        </where>
    </update>
    <select id="listAll" resultType="com.dsh.other.entity.Banner">
        select * from t_banner
        <where>
            <if test="query.advertisementName!=null and query.advertisementName!= ''">
                and t_banner.name like concat('%',#{query.advertisementName},'%')
            </if>
            <if test="query.page!=null and query.page!= ''">
                and t_banner.jumpPage like concat('%',#{query.page},'%')
            </if>
            <if test="query.state!=null and query.state!= ''">
                and t_banner.state = #{query.state}
            </if>
 
        </where>
    </select>
 
</mapper>