UserKeyMapper.xml 1012 B

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.reghao.oss.mgr.db.mapper.UserKeyMapper">
  4. <insert id="save" useGeneratedKeys="true" keyProperty="id">
  5. insert into oss_user_key
  6. (`access_key_id`,`access_key_secret`,`create_by`)
  7. values
  8. (#{accessKeyId},#{accessKeySecret},#{createBy})
  9. </insert>
  10. <update id="updateByCreateBy">
  11. update oss_user_key
  12. set access_key_id=#{accessKeyId},access_key_secret=#{accessKeySecret}
  13. where create_by=#{createBy}
  14. </update>
  15. <select id="findByCreateBy" resultType="cn.reghao.oss.mgr.model.po.UserKey">
  16. select *
  17. from oss_user_key
  18. where create_by=#{createBy}
  19. </select>
  20. <select id="findByAccessKeyId" resultType="cn.reghao.oss.mgr.model.po.UserKey">
  21. select *
  22. from oss_user_key
  23. where access_key_id=#{accessKeyId}
  24. </select>
  25. </mapper>