fg电池监控平台的达梦数据库版本
whycxzp
2024-11-13 9609dca8f43bda2ecc6bcfaf6bfcfd9b2ad1b638
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
<?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.whyc.mapper.PageParamUserMapper" >
 
    <update id="updateList">
        <choose>
            <when test="operationFlag==1">
                <foreach collection="pageParamUserList" item="item" separator=";">
                    update db_app_sys.tb_page_param_user set "show" = 1 where "key" = #{item.key} and user_id = #{item.userId} and type = #{item.type}
                </foreach>
            </when>
            <otherwise>
                <foreach collection="pageParamUserList" item="item" separator=";">
                    update db_app_sys.tb_page_param_user set "show" = 0 where "key" = #{item.key} and user_id = #{item.userId} and type = #{item.type}
                </foreach>
            </otherwise>
        </choose>
 
    </update>
    <update id="updateListII">
        <foreach collection="list" item="item" separator=";">
            update db_app_sys.tb_page_param_user set 'show' = #{item.show} where id = #{item.id}
        </foreach>
    </update>
 
    <update id="setOldRecord">
        update db_app_sys.tb_page_param_user set type = 1 where type is null
    </update>
</mapper>