ftmsorderbillsattachsMapper.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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.orderPlan.mapper.FtmsorderbillsattachsMapper">
  6. <resultMap type="ftmsorderbillsattachs" id="ftmsorderbillsattachsResult">
  7. <result property="id" column="id" />
  8. <result property="pId" column="p_id" />
  9. <result property="orgId" column="org_id" />
  10. <result property="actId" column="act_id" />
  11. <result property="attachUrl" column="attach_url" />
  12. <result property="attachName" column="attach_name" />
  13. <result property="billStatus" column="bill_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="remarks" column="remarks" />
  20. <result property="thumbnailUrl" column="thumbnail_url" />
  21. </resultMap>
  22. <sql id="selectftmsorderbillsattachsVo">
  23. select id, p_id, org_id, act_id, attach_url, attach_name, bill_status, del_flag, create_by, create_time, update_by, update_time, remarks, thumbnail_url from F_TMSORDERBILLSATTACHS
  24. </sql>
  25. <select id="selectftmsorderbillsattachsList" parameterType="ftmsorderbillsattachs"
  26. resultMap="ftmsorderbillsattachsResult">
  27. <include refid="selectftmsorderbillsattachsVo"/>
  28. <where>
  29. <if test="pId != null ">and p_id = #{pId}</if>
  30. <if test="orgId != null ">and org_id = #{orgId}</if>
  31. <if test="actId != null ">and act_id = #{actId}</if>
  32. <if test="attachUrl != null and attachUrl != ''">and attach_url = #{attachUrl}</if>
  33. <if test="attachName != null and attachName != ''">and attach_name like concat('%', #{attachName}, '%')</if>
  34. <if test="billStatus != null ">and bill_status = #{billStatus}</if>
  35. <if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
  36. </where>
  37. </select>
  38. <select id="selectftmsorderbillsattachsById" parameterType="Long" resultMap="ftmsorderbillsattachsResult">
  39. <include refid="selectftmsorderbillsattachsVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertftmsorderbillsattachs" parameterType="ftmsorderbillsattachs" useGeneratedKeys="true"
  43. keyProperty="id">
  44. insert into F_TMSORDERBILLSATTACHS
  45. <trim prefix="(" suffix=")" suffixOverrides=",">
  46. <if test="pId != null">p_id,</if>
  47. <if test="orgId != null">org_id,</if>
  48. <if test="actId != null">act_id,</if>
  49. <if test="attachUrl != null">attach_url,</if>
  50. <if test="attachName != null">attach_name,</if>
  51. <if test="billStatus != null">bill_status,</if>
  52. <if test="delFlag != null">del_flag,</if>
  53. <if test="createBy != null">create_by,</if>
  54. <if test="createTime != null">create_time,</if>
  55. <if test="updateBy != null">update_by,</if>
  56. <if test="updateTime != null">update_time,</if>
  57. <if test="remarks != null">remarks,</if>
  58. <if test="thumbnailUrl != null">thumbnail_url,</if>
  59. </trim>
  60. <trim prefix="values (" suffix=")" suffixOverrides=",">
  61. <if test="pId != null">#{pId},</if>
  62. <if test="orgId != null">#{orgId},</if>
  63. <if test="actId != null">#{actId},</if>
  64. <if test="attachUrl != null">#{attachUrl},</if>
  65. <if test="attachName != null">#{attachName},</if>
  66. <if test="billStatus != null">#{billStatus},</if>
  67. <if test="delFlag != null">#{delFlag},</if>
  68. <if test="createBy != null">#{createBy},</if>
  69. <if test="createTime != null">#{createTime},</if>
  70. <if test="updateBy != null">#{updateBy},</if>
  71. <if test="updateTime != null">#{updateTime},</if>
  72. <if test="remarks != null">#{remarks},</if>
  73. <if test="thumbnailUrl != null">#{thumbnailUrl},</if>
  74. </trim>
  75. </insert>
  76. <update id="updateftmsorderbillsattachs" parameterType="ftmsorderbillsattachs">
  77. update F_TMSORDERBILLSATTACHS
  78. <trim prefix="SET" suffixOverrides=",">
  79. <if test="pId != null">p_id = #{pId},</if>
  80. <if test="orgId != null">org_id = #{orgId},</if>
  81. <if test="actId != null">act_id = #{actId},</if>
  82. <if test="attachUrl != null">attach_url = #{attachUrl},</if>
  83. <if test="attachName != null">attach_name = #{attachName},</if>
  84. <if test="billStatus != null">bill_status = #{billStatus},</if>
  85. <if test="delFlag != null">del_flag = #{delFlag},</if>
  86. <if test="createBy != null">create_by = #{createBy},</if>
  87. <if test="createTime != null">create_time = #{createTime},</if>
  88. <if test="updateBy != null">update_by = #{updateBy},</if>
  89. <if test="updateTime != null">update_time = #{updateTime},</if>
  90. <if test="remarks != null">remarks = #{remarks},</if>
  91. <if test="thumbnailUrl != null">thumbnail_url = #{thumbnailUrl},</if>
  92. </trim>
  93. where id = #{id}
  94. </update>
  95. <delete id="deleteftmsorderbillsattachsById" parameterType="Long">
  96. delete from F_TMSORDERBILLSATTACHS where id = #{id}
  97. </delete>
  98. <delete id="deleteftmsorderbillsattachsByPId" parameterType="Long">
  99. delete from F_TMSORDERBILLSATTACHS where p_id = #{id}
  100. </delete>
  101. <delete id="deleteftmsorderbillsattachs" parameterType="ftmsorderbillsattachs">
  102. delete from F_TMSORDERBILLSATTACHS
  103. <where>
  104. <if test="pId != null ">and p_id = #{pId}</if>
  105. <if test="orgId != null ">and org_id = #{orgId}</if>
  106. <if test="actId != null ">and act_id = #{actId}</if>
  107. <if test="attachUrl != null and attachUrl != ''">and attach_url = #{attachUrl}</if>
  108. <if test="attachName != null and attachName != ''">and attach_name like concat('%', #{attachName}, '%')</if>
  109. <if test="billStatus != null ">and bill_status = #{billStatus}</if>
  110. <if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
  111. </where>
  112. </delete>
  113. <delete id="deleteftmsorderbillsattachsByIds" parameterType="String">
  114. delete from F_TMSORDERBILLSATTACHS where id in
  115. <foreach item="id" collection="array" open="(" separator="," close=")">
  116. #{id}
  117. </foreach>
  118. </delete>
  119. </mapper>