TFeeMapper.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.mapper.TFeeMapper">
  6. <resultMap type="TFee" id="TFeeResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fBillno" column="f_billno"/>
  9. <result property="fCtrlcorpid" column="f_ctrlcorpid"/>
  10. <result property="fCorpid" column="f_corpid"/>
  11. <result property="tMblno" column="t_mblno"/>
  12. <result property="fAmtdr" column="f_amtdr"/>
  13. <result property="fAmtcr" column="f_amtcr"/>
  14. <result property="fBilltype" column="f_billtype"/>
  15. <result property="fBillstatus" column="f_billstatus"/>
  16. <result property="fRemarks" column="f_remarks"/>
  17. <result property="fAccbilldate" column="f_accbilldate"/>
  18. <result property="delFlag" column="del_flag"/>
  19. <result property="createBy" column="create_by"/>
  20. <result property="fDeptid" column="f_deptid"/>
  21. <result property="createTime" column="create_time"/>
  22. <result property="updateBy" column="update_by"/>
  23. <result property="updateTime" column="update_time"/>
  24. </resultMap>
  25. <sql id="selectTFeeVo">
  26. select f_id, f_billno, f_ctrlcorpid, f_corpid, t_mblno, f_amtdr, f_amtcr, f_billtype, f_billstatus, f_remarks, f_accbilldate, del_flag, create_by, f_deptid, create_time, update_by, update_time from t_fee
  27. </sql>
  28. <select id="selectTFeeList" parameterType="TFee" resultMap="TFeeResult">
  29. <include refid="selectTFeeVo"/>
  30. <where>
  31. <if test="fBillno != null and fBillno != ''">and f_billno = #{fBillno}</if>
  32. <if test="fCtrlcorpid != null ">and f_ctrlcorpid = #{fCtrlcorpid}</if>
  33. <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
  34. <if test="tMblno != null and tMblno != ''">and t_mblno = #{tMblno}</if>
  35. <if test="fAmtdr != null ">and f_amtdr = #{fAmtdr}</if>
  36. <if test="fAmtcr != null ">and f_amtcr = #{fAmtcr}</if>
  37. <if test="fBilltype != null and fBilltype != ''">and f_billtype = #{fBilltype}</if>
  38. <if test="fBillstatus != null and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
  39. <if test="fRemarks != null and fRemarks != ''">and f_remarks = #{fRemarks}</if>
  40. <if test="fAccbilldate != null ">and f_accbilldate = #{fAccbilldate}</if>
  41. <if test="fDeptid != null ">and f_deptid = #{fDeptid}</if>
  42. </where>
  43. </select>
  44. <select id="selectTFeeById" parameterType="Long" resultMap="TFeeResult">
  45. <include refid="selectTFeeVo"/>
  46. where f_id = #{fId}
  47. </select>
  48. <insert id="insertTFee" parameterType="TFee">
  49. insert into t_fee
  50. <trim prefix="(" suffix=")" suffixOverrides=",">
  51. <if test="fId != null">f_id,</if>
  52. <if test="fBillno != null">f_billno,</if>
  53. <if test="fCtrlcorpid != null">f_ctrlcorpid,</if>
  54. <if test="fCorpid != null">f_corpid,</if>
  55. <if test="tMblno != null">t_mblno,</if>
  56. <if test="fAmtdr != null">f_amtdr,</if>
  57. <if test="fAmtcr != null">f_amtcr,</if>
  58. <if test="fBilltype != null and fBilltype != ''">f_billtype,</if>
  59. <if test="fBillstatus != null and fBillstatus != ''">f_billstatus,</if>
  60. <if test="fRemarks != null">f_remarks,</if>
  61. <if test="fAccbilldate != null">f_accbilldate,</if>
  62. <if test="delFlag != null">del_flag,</if>
  63. <if test="createBy != null">create_by,</if>
  64. <if test="fDeptid != null">f_deptid,</if>
  65. <if test="createTime != null">create_time,</if>
  66. <if test="updateBy != null">update_by,</if>
  67. <if test="updateTime != null">update_time,</if>
  68. </trim>
  69. <trim prefix="values (" suffix=")" suffixOverrides=",">
  70. <if test="fId != null">#{fId},</if>
  71. <if test="fBillno != null">#{fBillno},</if>
  72. <if test="fCtrlcorpid != null">#{fCtrlcorpid},</if>
  73. <if test="fCorpid != null">#{fCorpid},</if>
  74. <if test="tMblno != null">#{tMblno},</if>
  75. <if test="fAmtdr != null">#{fAmtdr},</if>
  76. <if test="fAmtcr != null">#{fAmtcr},</if>
  77. <if test="fBilltype != null and fBilltype != ''">#{fBilltype},</if>
  78. <if test="fBillstatus != null and fBillstatus != ''">#{fBillstatus},</if>
  79. <if test="fRemarks != null">#{fRemarks},</if>
  80. <if test="fAccbilldate != null">#{fAccbilldate},</if>
  81. <if test="delFlag != null">#{delFlag},</if>
  82. <if test="createBy != null">#{createBy},</if>
  83. <if test="fDeptid != null">#{fDeptid},</if>
  84. <if test="createTime != null">#{createTime},</if>
  85. <if test="updateBy != null">#{updateBy},</if>
  86. <if test="updateTime != null">#{updateTime},</if>
  87. </trim>
  88. </insert>
  89. <update id="updateTFee" parameterType="TFee">
  90. update t_fee
  91. <trim prefix="SET" suffixOverrides=",">
  92. <if test="fBillno != null">f_billno = #{fBillno},</if>
  93. <if test="fCtrlcorpid != null">f_ctrlcorpid = #{fCtrlcorpid},</if>
  94. <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
  95. <if test="tMblno != null">t_mblno = #{tMblno},</if>
  96. <if test="fAmtdr != null">f_amtdr = #{fAmtdr},</if>
  97. <if test="fAmtcr != null">f_amtcr = #{fAmtcr},</if>
  98. <if test="fBilltype != null and fBilltype != ''">f_billtype = #{fBilltype},</if>
  99. <if test="fBillstatus != null and fBillstatus != ''">f_billstatus = #{fBillstatus},</if>
  100. <if test="fRemarks != null">f_remarks = #{fRemarks},</if>
  101. <if test="fAccbilldate != null">f_accbilldate = #{fAccbilldate},</if>
  102. <if test="delFlag != null">del_flag = #{delFlag},</if>
  103. <if test="createBy != null">create_by = #{createBy},</if>
  104. <if test="fDeptid != null">f_deptid = #{fDeptid},</if>
  105. <if test="createTime != null">create_time = #{createTime},</if>
  106. <if test="updateBy != null">update_by = #{updateBy},</if>
  107. <if test="updateTime != null">update_time = #{updateTime},</if>
  108. </trim>
  109. where f_id = #{fId}
  110. </update>
  111. <delete id="deleteTFeeById" parameterType="Long">
  112. delete from t_fee where f_id = #{fId}
  113. </delete>
  114. <delete id="deleteTFeeByIds" parameterType="String">
  115. delete from t_fee where f_id in
  116. <foreach item="fId" collection="array" open="(" separator="," close=")">
  117. #{fId}
  118. </foreach>
  119. </delete>
  120. </mapper>