1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
Files
epp/backend/microservice-provider-access-8002/src/main/resources/mybatis/mapper/SettingDao.xml

17 lines
711 B
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.access.dao.SettingDao">
<insert id="updateSetting" parameterType="com.cxyxiaomo.epp.common.pojo.Setting">
INSERT INTO setting (`key`, `value`, `time`)
VALUES (#{key}, #{value}, #{time})
ON DUPLICATE KEY UPDATE
`value` = VALUES(`value`), `time` = VALUES(`time`)
</insert>
<select id="getValueByKey" parameterType="java.lang.String" resultType="com.cxyxiaomo.epp.common.pojo.Setting">
SELECT * FROM setting
WHERE `key` = #{key}
</select>
</mapper>