FunctionInfoMapper.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="com.shkpr.service.bespokegateway.core.mapper.primary.FunctionInfoMapper">
  4. <select id="findAll" resultType="com.shkpr.service.bespokegateway.core.domain.po.FunctionInfo">
  5. select id,
  6. uid,
  7. name,
  8. remark,
  9. param1,
  10. param2,
  11. create_time,
  12. update_time,
  13. disused,
  14. ordering,
  15. puid,
  16. kind
  17. from k4_bs_sys_function_info
  18. </select>
  19. <insert id="upsert">
  20. insert into k4_bs_sys_function_info (uid, "name", remark, update_time, puid)
  21. values (#{uid,jdbcType=VARCHAR},
  22. #{name,jdbcType=VARCHAR},
  23. #{remark,jdbcType=VARCHAR},
  24. localtimestamp(0),
  25. #{puid,jdbcType=VARCHAR})
  26. on conflict (uid) do update set "name" = excluded."name",
  27. remark = excluded.remark,
  28. update_time = excluded.update_time,
  29. puid = excluded.puid
  30. </insert>
  31. <delete id="deleteByUids">
  32. delete from k4_bs_sys_function_info
  33. where uid in
  34. <foreach collection="uids" item="uid" open="(" close=")" separator=",">
  35. #{uid, jdbcType=VARCHAR}
  36. </foreach>
  37. </delete>
  38. </mapper>