puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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.FrequentlyAskedQuestionsMapper">
 
 
    <update id="changeState">
        update t_frequently_asked_questions set
        state = #{type}
        <where>
            <if test="questionIds != null and questionIds.size()>0">
                AND t_frequently_asked_questions.id IN
                <foreach collection="questionIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
        </where>
    </update>
    <select id="getInfo" resultType="com.dsh.other.entity.FrequentlyAskedQuestions">
        select * from t_frequently_asked_questions where id = #{id}
    </select>
</mapper>