6
jinlin
2023-11-29 d89ef43c4713adf26f74b796653d1dd15ff1f81a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.zt.modules.sys.dao.SysParamsDao">
 
    <!-- 根据参数编码,查询value -->
    <select id="getValueByCode" resultType="java.lang.String">
        select param_value from SYS_PARAMS where param_code = #{value}
    </select>
 
    <!-- 获取参数编码列表 -->
    <select id="getParamCodeList" resultType="java.lang.String">
        select param_code from SYS_PARAMS where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </select>
 
    <!-- 根据参数编码,更新value -->
    <update id="updateValueByCode">
        update SYS_PARAMS set param_value = #{paramValue},UPDATE_DATE = CURRENT_TIMESTAMP where param_code = #{paramCode}
    </update>
</mapper>