TCntrnoMapper.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.shipping.mapper.TCntrnoMapper">
  6. <resultMap type="TCntrno" id="TCntrnoResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fNo" column="f_no"/>
  9. <result property="fTypeid" column="f_typeid"/>
  10. <result property="fOwner" column="f_owner"/>
  11. <result property="fSource" column="f_source"/>
  12. <result property="fRent" column="f_rent"/>
  13. <result property="fUpdatetime" column="f_updatetime"/>
  14. <result property="fUpdateaddress" column="f_updateaddress"/>
  15. <result property="fUpdateef" column="f_updateEF"/>
  16. <result property="fCntrstatus" column="f_cntrstatus"/>
  17. <result property="fStatus" column="f_status"/>
  18. <result property="createBy" column="create_by"/>
  19. <result property="createTime" column="create_time"/>
  20. <result property="updateBy" column="update_by"/>
  21. <result property="updateTime" column="update_time"/>
  22. <result property="remark" column="remark"/>
  23. </resultMap>
  24. <sql id="selectTCntrnoVo">
  25. select f_id, f_no, f_typeid, f_owner, f_source, f_rent, f_updatetime, f_updateaddress, f_updateEF, f_cntrstatus, f_status, create_by, create_time, update_by, update_time, remark from t_cntrno
  26. </sql>
  27. <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
  28. <include refid="selectTCntrnoVo"/>
  29. <where>
  30. <if test="fNo != null and fNo != ''">and f_no = #{fNo}</if>
  31. <if test="fTypeid != null ">and f_typeid = #{fTypeid}</if>
  32. <if test="fOwner != null and fOwner != ''">and f_owner = #{fOwner}</if>
  33. <if test="fSource != null and fSource != ''">and f_source = #{fSource}</if>
  34. <if test="fRent != null and fRent != ''">and f_rent = #{fRent}</if>
  35. <if test="fUpdatetime != null ">and f_updatetime = #{fUpdatetime}</if>
  36. <if test="fUpdateaddress != null and fUpdateaddress != ''">and f_updateaddress = #{fUpdateaddress}</if>
  37. <if test="fUpdateef != null and fUpdateef != ''">and f_updateEF = #{fUpdateef}</if>
  38. <if test="fCntrstatus != null and fCntrstatus != ''">and f_cntrstatus = #{fCntrstatus}</if>
  39. <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
  40. </where>
  41. </select>
  42. <select id="selectTCntrnoById" parameterType="Long" resultMap="TCntrnoResult">
  43. <include refid="selectTCntrnoVo"/>
  44. where f_id = #{fId}
  45. </select>
  46. <insert id="insertTCntrno" parameterType="TCntrno">
  47. insert into t_cntrno
  48. <trim prefix="(" suffix=")" suffixOverrides=",">
  49. <if test="fId != null">f_id,</if>
  50. <if test="fNo != null and fNo != ''">f_no,</if>
  51. <if test="fTypeid != null">f_typeid,</if>
  52. <if test="fOwner != null and fOwner != ''">f_owner,</if>
  53. <if test="fSource != null">f_source,</if>
  54. <if test="fRent != null">f_rent,</if>
  55. <if test="fUpdatetime != null">f_updatetime,</if>
  56. <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress,</if>
  57. <if test="fUpdateef != null and fUpdateef != ''">f_updateEF,</if>
  58. <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus,</if>
  59. <if test="fStatus != null">f_status,</if>
  60. <if test="createBy != null">create_by,</if>
  61. <if test="createTime != null">create_time,</if>
  62. <if test="updateBy != null">update_by,</if>
  63. <if test="updateTime != null">update_time,</if>
  64. <if test="remark != null">remark,</if>
  65. </trim>
  66. <trim prefix="values (" suffix=")" suffixOverrides=",">
  67. <if test="fId != null">#{fId},</if>
  68. <if test="fNo != null and fNo != ''">#{fNo},</if>
  69. <if test="fTypeid != null">#{fTypeid},</if>
  70. <if test="fOwner != null and fOwner != ''">#{fOwner},</if>
  71. <if test="fSource != null">#{fSource},</if>
  72. <if test="fRent != null">#{fRent},</if>
  73. <if test="fUpdatetime != null">#{fUpdatetime},</if>
  74. <if test="fUpdateaddress != null and fUpdateaddress != ''">#{fUpdateaddress},</if>
  75. <if test="fUpdateef != null and fUpdateef != ''">#{fUpdateef},</if>
  76. <if test="fCntrstatus != null and fCntrstatus != ''">#{fCntrstatus},</if>
  77. <if test="fStatus != null">#{fStatus},</if>
  78. <if test="createBy != null">#{createBy},</if>
  79. <if test="createTime != null">#{createTime},</if>
  80. <if test="updateBy != null">#{updateBy},</if>
  81. <if test="updateTime != null">#{updateTime},</if>
  82. <if test="remark != null">#{remark},</if>
  83. </trim>
  84. </insert>
  85. <update id="updateTCntrno" parameterType="TCntrno">
  86. update t_cntrno
  87. <trim prefix="SET" suffixOverrides=",">
  88. <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
  89. <if test="fTypeid != null">f_typeid = #{fTypeid},</if>
  90. <if test="fOwner != null and fOwner != ''">f_owner = #{fOwner},</if>
  91. <if test="fSource != null">f_source = #{fSource},</if>
  92. <if test="fRent != null">f_rent = #{fRent},</if>
  93. <if test="fUpdatetime != null">f_updatetime = #{fUpdatetime},</if>
  94. <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress = #{fUpdateaddress},</if>
  95. <if test="fUpdateef != null and fUpdateef != ''">f_updateEF = #{fUpdateef},</if>
  96. <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus = #{fCntrstatus},</if>
  97. <if test="fStatus != null">f_status = #{fStatus},</if>
  98. <if test="createBy != null">create_by = #{createBy},</if>
  99. <if test="createTime != null">create_time = #{createTime},</if>
  100. <if test="updateBy != null">update_by = #{updateBy},</if>
  101. <if test="updateTime != null">update_time = #{updateTime},</if>
  102. <if test="remark != null">remark = #{remark},</if>
  103. </trim>
  104. where f_id = #{fId}
  105. </update>
  106. <delete id="deleteTCntrnoById" parameterType="Long">
  107. delete from t_cntrno where f_id = #{fId}
  108. </delete>
  109. <delete id="deleteTCntrnoByIds" parameterType="String">
  110. delete from t_cntrno where f_id in
  111. <foreach item="fId" collection="array" open="(" separator="," close=")">
  112. #{fId}
  113. </foreach>
  114. </delete>
  115. <!--批量更新数据状态-->
  116. <update id="updateTcntrnoStatus" parameterType="string">
  117. update t_cntrno
  118. set f_status = F
  119. where f_id in
  120. <foreach item="fId" collection="array" open="(" separator="," close=")">
  121. #{fId}
  122. </foreach>
  123. </update>
  124. </mapper>