TConditionAccessoryMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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.TConditionAccessoryMapper">
  6. <resultMap type="TConditionAccessory" id="TConditionAccessoryResult">
  7. <result property="fId" column="f_id" />
  8. <result property="fPid" column="f_pid" />
  9. <result property="fOrgId" column="f_org_id" />
  10. <result property="fLineno" column="f_lineno" />
  11. <result property="fName" column="f_name" />
  12. <result property="fDesc" column="f_desc" />
  13. <result property="fUrl" column="f_url" />
  14. <result property="fStatus" column="f_status" />
  15. <result property="fThumbnailUrl" column="f_thumbnail_url" />
  16. <result property="delFlag" column="del_flag" />
  17. <result property="createBy" column="create_by" />
  18. <result property="createTime" column="create_time" />
  19. <result property="updateBy" column="update_by" />
  20. <result property="updateTime" column="update_time" />
  21. <result property="remark" column="remark" />
  22. </resultMap>
  23. <sql id="selectTConditionAccessoryVo">
  24. select f_id, f_pid, f_org_id, f_lineno, f_name, f_desc, f_url, f_status, f_thumbnail_url, del_flag, create_by, create_time, update_by, update_time, remark from t_condition_accessory
  25. </sql>
  26. <select id="selectTConditionAccessoryList" parameterType="TConditionAccessory" resultMap="TConditionAccessoryResult">
  27. <include refid="selectTConditionAccessoryVo"/>
  28. <where>
  29. <if test="fPid != null "> and f_pid = #{fPid}</if>
  30. <if test="fOrgId != null "> and f_org_id = #{fOrgId}</if>
  31. <if test="fLineno != null "> and f_lineno = #{fLineno}</if>
  32. <if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
  33. <if test="fDesc != null and fDesc != ''"> and f_desc = #{fDesc}</if>
  34. <if test="fUrl != null and fUrl != ''"> and f_url = #{fUrl}</if>
  35. <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
  36. <if test="fThumbnailUrl != null and fThumbnailUrl != ''"> and f_thumbnail_url = #{fThumbnailUrl}</if>
  37. </where>
  38. </select>
  39. <select id="selectTConditionAccessoryById" parameterType="Long" resultMap="TConditionAccessoryResult">
  40. <include refid="selectTConditionAccessoryVo"/>
  41. where f_id = #{fId}
  42. </select>
  43. <insert id="insertTConditionAccessory" parameterType="TConditionAccessory" useGeneratedKeys="true" keyProperty="fId">
  44. insert into t_condition_accessory
  45. <trim prefix="(" suffix=")" suffixOverrides=",">
  46. <if test="fPid != null">f_pid,</if>
  47. <if test="fOrgId != null">f_org_id,</if>
  48. <if test="fLineno != null">f_lineno,</if>
  49. <if test="fName != null">f_name,</if>
  50. <if test="fDesc != null">f_desc,</if>
  51. <if test="fUrl != null">f_url,</if>
  52. <if test="fStatus != null">f_status,</if>
  53. <if test="fThumbnailUrl != null">f_thumbnail_url,</if>
  54. <if test="delFlag != null">del_flag,</if>
  55. <if test="createBy != null">create_by,</if>
  56. <if test="createTime != null">create_time,</if>
  57. <if test="updateBy != null">update_by,</if>
  58. <if test="updateTime != null">update_time,</if>
  59. <if test="remark != null">remark,</if>
  60. </trim>
  61. <trim prefix="values (" suffix=")" suffixOverrides=",">
  62. <if test="fPid != null">#{fPid},</if>
  63. <if test="fOrgId != null">#{fOrgId},</if>
  64. <if test="fLineno != null">#{fLineno},</if>
  65. <if test="fName != null">#{fName},</if>
  66. <if test="fDesc != null">#{fDesc},</if>
  67. <if test="fUrl != null">#{fUrl},</if>
  68. <if test="fStatus != null">#{fStatus},</if>
  69. <if test="fThumbnailUrl != null">#{fThumbnailUrl},</if>
  70. <if test="delFlag != null">#{delFlag},</if>
  71. <if test="createBy != null">#{createBy},</if>
  72. <if test="createTime != null">#{createTime},</if>
  73. <if test="updateBy != null">#{updateBy},</if>
  74. <if test="updateTime != null">#{updateTime},</if>
  75. <if test="remark != null">#{remark},</if>
  76. </trim>
  77. </insert>
  78. <update id="updateTConditionAccessory" parameterType="TConditionAccessory">
  79. update t_condition_accessory
  80. <trim prefix="SET" suffixOverrides=",">
  81. <if test="fPid != null">f_pid = #{fPid},</if>
  82. <if test="fOrgId != null">f_org_id = #{fOrgId},</if>
  83. <if test="fLineno != null">f_lineno = #{fLineno},</if>
  84. <if test="fName != null">f_name = #{fName},</if>
  85. <if test="fDesc != null">f_desc = #{fDesc},</if>
  86. <if test="fUrl != null">f_url = #{fUrl},</if>
  87. <if test="fStatus != null">f_status = #{fStatus},</if>
  88. <if test="fThumbnailUrl != null">f_thumbnail_url = #{fThumbnailUrl},</if>
  89. <if test="delFlag != null">del_flag = #{delFlag},</if>
  90. <if test="createBy != null">create_by = #{createBy},</if>
  91. <if test="createTime != null">create_time = #{createTime},</if>
  92. <if test="updateBy != null">update_by = #{updateBy},</if>
  93. <if test="updateTime != null">update_time = #{updateTime},</if>
  94. <if test="remark != null">remark = #{remark},</if>
  95. </trim>
  96. where f_id = #{fId}
  97. </update>
  98. <delete id="deleteTConditionAccessoryById" parameterType="Long">
  99. delete from t_condition_accessory where f_id = #{fId}
  100. </delete>
  101. <delete id="deleteTConditionAccessoryByIds" parameterType="String">
  102. delete from t_condition_accessory where f_id in
  103. <foreach item="fId" collection="array" open="(" separator="," close=")">
  104. #{fId}
  105. </foreach>
  106. </delete>
  107. </mapper>