StandardPointManagementMapper.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.predict.mapper.StandardPointManagementMapper">
  6. <resultMap type="StandardPointManagement" id="StandardPointManagementResult">
  7. <result property="itemType" column="item_type" />
  8. <result property="itemNo" column="item_no" />
  9. <result property="itemName" column="item_name" />
  10. <result property="itemRef" column="item_ref" />
  11. <result property="note" column="note" />
  12. </resultMap>
  13. <sql id="selectStandardPointManagementVo">
  14. select item_type, item_no, item_name, item_ref, note from standard_point_management
  15. </sql>
  16. <select id="selectStandardPointManagementList" parameterType="StandardPointManagement" resultMap="StandardPointManagementResult">
  17. <include refid="selectStandardPointManagementVo"/>
  18. <where>
  19. <if test="itemType != null and itemType != ''"> and item_type like concat(concat('%', #{itemType}), '%')</if>
  20. <if test="itemNo != null "> and item_no = #{itemNo}</if>
  21. <if test="itemName != null and itemName != ''"> and item_name like concat(concat('%', #{itemName}), '%')</if>
  22. <if test="itemRef != null and itemRef != ''"> and item_ref = #{itemRef}</if>
  23. <if test="note != null and note != ''"> and note = #{note}</if>
  24. </where>
  25. </select>
  26. <select id="selectStandardPointManagementById" parameterType="Long" resultMap="StandardPointManagementResult">
  27. <include refid="selectStandardPointManagementVo"/>
  28. where item_no = #{itemNo}
  29. </select>
  30. <insert id="insertStandardPointManagement" parameterType="StandardPointManagement">
  31. insert into standard_point_management
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="itemType != null">item_type,</if>
  34. <if test="itemNo != null">item_no,</if>
  35. <if test="itemName != null">item_name,</if>
  36. <if test="itemRef != null">item_ref,</if>
  37. <if test="note != null">note,</if>
  38. </trim>
  39. <trim prefix="values (" suffix=")" suffixOverrides=",">
  40. <if test="itemType != null">#{itemType},</if>
  41. <if test="itemNo != null">#{itemNo},</if>
  42. <if test="itemName != null">#{itemName},</if>
  43. <if test="itemRef != null">#{itemRef},</if>
  44. <if test="note != null">#{note},</if>
  45. </trim>
  46. </insert>
  47. <update id="updateStandardPointManagement" parameterType="StandardPointManagement">
  48. update standard_point_management
  49. <trim prefix="SET" suffixOverrides=",">
  50. <if test="item_type != null">item_type = #{itemType},</if>
  51. <if test="itemName != null">item_name = #{itemName},</if>
  52. <if test="itemRef != null">item_ref = #{itemRef},</if>
  53. <if test="note != null">note = #{note},</if>
  54. </trim>
  55. where item_no = #{itemNo}
  56. </update>
  57. <delete id="deleteStandardPointManagementById" parameterType="Long">
  58. delete from standard_point_management where item_no = #{itemNo}
  59. </delete>
  60. <delete id="deleteStandardPointManagementByIds" parameterType="String">
  61. delete from standard_point_management where item_no in
  62. <foreach item="itemNo" collection="array" open="(" separator="," close=")">
  63. #{itemNo}
  64. </foreach>
  65. </delete>
  66. </mapper>