cigs4/ym-admin/src/main/resources/mapper/SysParamsDao.xml
2023-02-22 15:59:13 +08:00

24 lines
910 B
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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.cnbm.admin.dao.SysParamsDao">
<!-- 根据参数编码查询value -->
<select id="getValueByCode" resultType="String">
select param_value from sys_params where param_code = #{value} AND valid = 1
</select>
<!-- 获取参数编码列表 -->
<select id="getParamCodeList" resultType="String">
select param_code from sys_params where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
AND valid = 1
</select>
<!-- 根据参数编码更新value -->
<update id="updateValueByCode">
update sys_params set param_value = #{paramValue} where param_code = #{paramCode} AND valid = 1
</update>
</mapper>