|
@@ -0,0 +1,24 @@
|
|
|
|
|
+<?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="cn.reghao.tnb.file.app.db.mapper.OssConfigMapper">
|
|
|
|
|
+ <insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
+ insert into file_oss_config
|
|
|
|
|
+ (`oss_type`,`endpoint`,`access_key_id`,`access_key_secret`)
|
|
|
|
|
+ values
|
|
|
|
|
+ (#{ossType},#{endpoint},#{accessKeyId},#{accessKeySecret})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <select id="findByAccessKeyId" resultType="cn.reghao.tnb.file.app.model.po.OssConfig">
|
|
|
|
|
+ select *
|
|
|
|
|
+ from file_oss_config
|
|
|
|
|
+ where access_key_id=#{accessKeyId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="findByOssType" resultType="cn.reghao.tnb.file.app.model.po.OssConfig">
|
|
|
|
|
+ select *
|
|
|
|
|
+ from file_oss_config
|
|
|
|
|
+ where oss_type=#{ossType}
|
|
|
|
|
+ limit 1
|
|
|
|
|
+ </select>
|
|
|
|
|
+</mapper>
|