TFeesMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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.basicData.mapper.TFeesMapper">
  6. <resultMap type="TFees" id="TFeesResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fNo" column="f_no"/>
  9. <result property="fName" column="f_name"/>
  10. <result property="fFeetype" column="f_feetype"/>
  11. <result property="fFeeunitid" column="f_feeunitid"/>
  12. <result property="fCurrency" column="f_currency"/>
  13. <result property="fStatus" column="f_status"/>
  14. <result property="delFlag" column="del_flag"/>
  15. <result property="createBy" column="create_by"/>
  16. <result property="createTime" column="create_time"/>
  17. <result property="updateBy" column="update_by"/>
  18. <result property="updateTime" column="update_time"/>
  19. <result property="remark" column="remark"/>
  20. <result property="fDc" column="f_dc"/>
  21. </resultMap>
  22. <sql id="selectTFeesVo">
  23. select f_id, f_no, f_name, f_feetype, f_feeunitid, f_currency, f_status, del_flag, create_by, create_time, update_by, update_time, remark,f_dc from t_fees
  24. </sql>
  25. <select id="selectTFeesList" parameterType="TFees" resultMap="TFeesResult">
  26. <include refid="selectTFeesVo"/>
  27. <where>
  28. <if test="fNo != null and fNo != ''">and f_no like concat('%', #{fNo}, '%')</if>
  29. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  30. <if test="fFeetype != null and fFeetype != ''">and f_feetype = #{fFeetype}</if>
  31. <if test="fFeeunitid != null ">and f_feeunitid = #{fFeeunitid}</if>
  32. <if test="fCurrency != null and fCurrency != ''">and f_currency like concat('%', #{fCurrency}, '%')</if>
  33. <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
  34. <if test="fDc != null and fDc != ''">and f_dc like concat('%', #{fDc}, '%') </if>
  35. </where>
  36. ORDER BY CONVERT(f_name USING gbk) asc
  37. </select>
  38. <select id="selectTFeesById" parameterType="Long" resultMap="TFeesResult">
  39. <include refid="selectTFeesVo"/>
  40. where f_id = #{fId}
  41. </select>
  42. <insert id="insertTFees" parameterType="TFees" useGeneratedKeys="true" keyProperty="fId">
  43. insert into t_fees
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="fNo != null and fNo != ''">f_no,</if>
  46. <if test="fName != null and fName != ''">f_name,</if>
  47. <if test="fFeetype != null">f_feetype,</if>
  48. <if test="fFeeunitid != null">f_feeunitid,</if>
  49. <if test="fCurrency != null">f_currency,</if>
  50. <if test="fStatus != null">f_status,</if>
  51. <if test="delFlag != null">del_flag,</if>
  52. <if test="createBy != null">create_by,</if>
  53. <if test="createTime != null">create_time,</if>
  54. <if test="updateBy != null">update_by,</if>
  55. <if test="updateTime != null">update_time,</if>
  56. <if test="remark != null">remark,</if>
  57. <if test="fDc != null and fDc != ''">f_dc,</if>
  58. </trim>
  59. <trim prefix="values (" suffix=")" suffixOverrides=",">
  60. <if test="fNo != null and fNo != ''">#{fNo},</if>
  61. <if test="fName != null and fName != ''">#{fName},</if>
  62. <if test="fFeetype != null">#{fFeetype},</if>
  63. <if test="fFeeunitid != null">#{fFeeunitid},</if>
  64. <if test="fCurrency != null">#{fCurrency},</if>
  65. <if test="fStatus != null">#{fStatus},</if>
  66. <if test="delFlag != null">#{delFlag},</if>
  67. <if test="createBy != null">#{createBy},</if>
  68. <if test="createTime != null">#{createTime},</if>
  69. <if test="updateBy != null">#{updateBy},</if>
  70. <if test="updateTime != null">#{updateTime},</if>
  71. <if test="remark != null">#{remark},</if>
  72. <if test="fDc != null ">#{fDc},</if>
  73. </trim>
  74. </insert>
  75. <update id="updateTFees" parameterType="TFees">
  76. update t_fees
  77. <trim prefix="SET" suffixOverrides=",">
  78. <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
  79. <if test="fName != null and fName != ''">f_name = #{fName},</if>
  80. <if test="fFeetype != null">f_feetype = #{fFeetype},</if>
  81. <if test="fFeeunitid != null">f_feeunitid = #{fFeeunitid},</if>
  82. <if test="fCurrency != null">f_currency = #{fCurrency},</if>
  83. <if test="fStatus != null">f_status = #{fStatus},</if>
  84. <if test="delFlag != null">del_flag = #{delFlag},</if>
  85. <if test="createBy != null">create_by = #{createBy},</if>
  86. <if test="createTime != null">create_time = #{createTime},</if>
  87. <if test="updateBy != null">update_by = #{updateBy},</if>
  88. <if test="updateTime != null">update_time = #{updateTime},</if>
  89. <if test="remark != null">remark = #{remark},</if>
  90. <if test="fDc != null and fDc != ''">f_dc = #{fDc},</if>
  91. </trim>
  92. where f_id = #{fId}
  93. </update>
  94. <delete id="deleteTFeesById" parameterType="Long">
  95. delete from t_fees where f_id = #{fId}
  96. </delete>
  97. <delete id="deleteTFeesByIds" parameterType="String">
  98. delete from t_fees where f_id in
  99. <foreach item="fId" collection="array" open="(" separator="," close=")">
  100. #{fId}
  101. </foreach>
  102. </delete>
  103. <select id="checkFNoUnique" parameterType="String" resultMap="TFeesResult">
  104. select f_id,f_no from t_fees where f_no = #{fNo} limit 1
  105. </select>
  106. <select id="checkUFNnameUnique" parameterType="String" resultMap="TFeesResult">
  107. select f_id,f_name from t_fees where f_name = #{fAame} limit 1
  108. </select>
  109. </mapper>