TWarehouseCheckItemsDetailsMapper.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.warehouse.check.mapper.TWarehouseCheckItemsDetailsMapper">
  6. <resultMap type="TWarehouseCheckItemsDetails" id="TWarehouseCheckItemsDetailsResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fCheckFid" column="f_check_fid"/>
  9. <result property="fItemFid" column="f_item_fid"/>
  10. <result property="fPhotoUrl" column="f_photo_url"/>
  11. <result property="fRemark" column="f_remark"/>
  12. <result property="fCreateBy" column="f_create_by"/>
  13. <result property="fCreateTime" column="f_create_time"/>
  14. <result property="fUpdateBy" column="f_update_by"/>
  15. <result property="fUpdateTime" column="f_update_time"/>
  16. <result property="fDelFlag" column="f_del_flag"/>
  17. </resultMap>
  18. <sql id="selectTWarehouseCheckItemsDetailsVo">
  19. select f_id,
  20. f_check_fid,
  21. f_item_fid,
  22. f_photo_url,
  23. f_remark,
  24. f_create_by,
  25. f_create_time,
  26. f_update_by,
  27. f_update_time,
  28. f_del_flag
  29. from t_warehouse_check_items_details
  30. </sql>
  31. <select id="selectTWarehouseCheckItemsDetailsList" parameterType="TWarehouseCheckItemsDetails"
  32. resultMap="TWarehouseCheckItemsDetailsResult">
  33. <include refid="selectTWarehouseCheckItemsDetailsVo"/>
  34. <where>
  35. <if test="fCheckFid != null ">and f_check_fid = #{fCheckFid}</if>
  36. <if test="fItemFid != null ">and f_item_fid = #{fItemFid}</if>
  37. <if test="fPhotoUrl != null and fPhotoUrl != ''">and f_photo_url = #{fPhotoUrl}</if>
  38. <if test="fRemark != null and fRemark != ''">and f_remark = #{fRemark}</if>
  39. <if test="fCreateBy != null ">and f_create_by = #{fCreateBy}</if>
  40. <if test="fCreateTime != null ">and f_create_time = #{fCreateTime}</if>
  41. <if test="fUpdateBy != null ">and f_update_by = #{fUpdateBy}</if>
  42. <if test="fUpdateTime != null ">and f_update_time = #{fUpdateTime}</if>
  43. <if test="fDelFlag != null ">and f_del_flag = #{fDelFlag}</if>
  44. </where>
  45. </select>
  46. <select id="selectTWarehouseCheckItemsDetailsById" parameterType="Long"
  47. resultMap="TWarehouseCheckItemsDetailsResult">
  48. <include refid="selectTWarehouseCheckItemsDetailsVo"/>
  49. where f_id = #{fId}
  50. </select>
  51. <insert id="insertTWarehouseCheckItemsDetails" parameterType="TWarehouseCheckItemsDetails" useGeneratedKeys="true"
  52. keyProperty="fId">
  53. insert into t_warehouse_check_items_details
  54. <trim prefix="(" suffix=")" suffixOverrides=",">
  55. <if test="fCheckFid != null">f_check_fid,</if>
  56. <if test="fItemFid != null">f_item_fid,</if>
  57. <if test="fPhotoUrl != null and fPhotoUrl != ''">f_photo_url,</if>
  58. <if test="fRemark != null">f_remark,</if>
  59. <if test="fCreateBy != null">f_create_by,</if>
  60. <if test="fCreateTime != null">f_create_time,</if>
  61. <if test="fUpdateBy != null">f_update_by,</if>
  62. <if test="fUpdateTime != null">f_update_time,</if>
  63. <if test="fDelFlag != null">f_del_flag,</if>
  64. </trim>
  65. <trim prefix="values (" suffix=")" suffixOverrides=",">
  66. <if test="fCheckFid != null">#{fCheckFid},</if>
  67. <if test="fItemFid != null">#{fItemFid},</if>
  68. <if test="fPhotoUrl != null and fPhotoUrl != ''">#{fPhotoUrl},</if>
  69. <if test="fRemark != null">#{fRemark},</if>
  70. <if test="fCreateBy != null">#{fCreateBy},</if>
  71. <if test="fCreateTime != null">#{fCreateTime},</if>
  72. <if test="fUpdateBy != null">#{fUpdateBy},</if>
  73. <if test="fUpdateTime != null">#{fUpdateTime},</if>
  74. <if test="fDelFlag != null">#{fDelFlag},</if>
  75. </trim>
  76. </insert>
  77. <update id="updateTWarehouseCheckItemsDetails" parameterType="TWarehouseCheckItemsDetails">
  78. update t_warehouse_check_items_details
  79. <trim prefix="SET" suffixOverrides=",">
  80. <if test="fCheckFid != null">f_check_fid = #{fCheckFid},</if>
  81. <if test="fItemFid != null">f_item_fid = #{fItemFid},</if>
  82. <if test="fPhotoUrl != null and fPhotoUrl != ''">f_photo_url = #{fPhotoUrl},</if>
  83. <if test="fRemark != null">f_remark = #{fRemark},</if>
  84. <if test="fCreateBy != null">f_create_by = #{fCreateBy},</if>
  85. <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
  86. <if test="fUpdateBy != null">f_update_by = #{fUpdateBy},</if>
  87. <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
  88. <if test="fDelFlag != null">f_del_flag = #{fDelFlag},</if>
  89. </trim>
  90. where f_id = #{fId}
  91. </update>
  92. <delete id="deleteTWarehouseCheckItemsDetailsById" parameterType="Long">
  93. delete
  94. from t_warehouse_check_items_details
  95. where f_id = #{fId}
  96. </delete>
  97. <delete id="deleteTWarehouseCheckItemsDetailsByIds" parameterType="String">
  98. delete from t_warehouse_check_items_details where f_id in
  99. <foreach item="fId" collection="array" open="(" separator="," close=")">
  100. #{fId}
  101. </foreach>
  102. </delete>
  103. </mapper>