SysQiyejieshaoMapper.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.SysQiyejieshaoMapper">
  6. <resultMap type="SysQiyejieshao" id="SysQiyejieshaoResult">
  7. <result property="id" column="id" />
  8. <result property="qiyejiesho" column="qiyejiesho" />
  9. </resultMap>
  10. <sql id="selectSysQiyejieshaoVo">
  11. select id, qiyejiesho from sys_qiyejieshao
  12. </sql>
  13. <select id="selectSysQiyejieshaoList" parameterType="SysQiyejieshao" resultMap="SysQiyejieshaoResult">
  14. <include refid="selectSysQiyejieshaoVo"/>
  15. <where>
  16. <if test="qiyejiesho != null and qiyejiesho != ''"> and qiyejiesho = #{qiyejiesho}</if>
  17. </where>
  18. order by id desc
  19. </select>
  20. <select id="selectSysQiyejieshaoById" parameterType="Long" resultMap="SysQiyejieshaoResult">
  21. <include refid="selectSysQiyejieshaoVo"/>
  22. where id = #{id}
  23. </select>
  24. <insert id="insertSysQiyejieshao" parameterType="SysQiyejieshao">
  25. insert into sys_qiyejieshao
  26. <trim prefix="(" suffix=")" suffixOverrides=",">
  27. <if test="id != null">id,</if>
  28. <if test="qiyejiesho != null and qiyejiesho != ''">qiyejiesho,</if>
  29. </trim>
  30. <trim prefix="values (" suffix=")" suffixOverrides=",">
  31. <if test="id != null">#{id},</if>
  32. <if test="qiyejiesho != null and qiyejiesho != ''">#{qiyejiesho},</if>
  33. </trim>
  34. </insert>
  35. <update id="updateSysQiyejieshao" parameterType="SysQiyejieshao">
  36. update sys_qiyejieshao
  37. <trim prefix="SET" suffixOverrides=",">
  38. <if test="qiyejiesho != null and qiyejiesho != ''">qiyejiesho = #{qiyejiesho},</if>
  39. </trim>
  40. where id = #{id}
  41. </update>
  42. <delete id="deleteSysQiyejieshaoById" parameterType="Long">
  43. delete from sys_qiyejieshao where id = #{id}
  44. </delete>
  45. <delete id="deleteSysQiyejieshaoByIds" parameterType="String">
  46. delete from sys_qiyejieshao where id in
  47. <foreach item="id" collection="array" open="(" separator="," close=")">
  48. #{id}
  49. </foreach>
  50. </delete>
  51. </mapper>