CustomFormBomFieldMapper.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.platform.dao.mapper.custom.CustomFormBomFieldMapper">
  4. <sql id="Base_Column_List">
  5. field
  6. .
  7. id
  8. ,
  9. field.name,
  10. field.filed_name,
  11. field.bom_id,
  12. field.remark,
  13. field.created_user_id,
  14. field.created_user_name,
  15. field.created_time,
  16. field.update_user_id,
  17. field.update_user_name,
  18. field.update_time
  19. </sql>
  20. <sql id="Ref_Column_List">
  21. field
  22. .
  23. name
  24. ,
  25. field.filed_name,
  26. field.bom_id,
  27. field.remark,
  28. </sql>
  29. <sql id="List_Condition">
  30. <if test="id != null and id != ''">
  31. and field.id = #{id}
  32. </if>
  33. <if test="name != null and name != ''">
  34. and field.name = #{name}
  35. </if>
  36. <if test="filedName != null and filedName != ''">
  37. and field.filed_name = #{filedName}
  38. </if>
  39. <if test="bomId != null and bomId != ''">
  40. and field.bom_id = #{bomId}
  41. </if>
  42. <if test="remark != null and remark != ''">
  43. and field.remark = #{remark}
  44. </if>
  45. <if test="createdUserId != null and createdUserId != ''">
  46. and field.created_user_id = #{createdUserId}
  47. </if>
  48. <if test="createdUserName != null and createdUserName != ''">
  49. and field.created_user_name = #{createdUserName}
  50. </if>
  51. <if test="createdTimeStart != null">
  52. and field.created_time <![CDATA[>=]]>; #{createdTimeStart}
  53. </if>
  54. <if test="createdTimeEnd != null">
  55. and field.created_time <![CDATA[<=]]> #{createdTimeEnd}
  56. </if>
  57. <if test="createdTime != null">
  58. and field.created_time = #{createdTime}
  59. </if>
  60. <if test="updateUserId != null and updateUserId != ''">
  61. and field.update_user_id = #{updateUserId}
  62. </if>
  63. <if test="updateUserName != null and updateUserName != ''">
  64. and field.update_user_name = #{updateUserName}
  65. </if>
  66. <if test="updateTimeStart != null">
  67. and field.update_time <![CDATA[>=]]>; #{updateTimeStart}
  68. </if>
  69. <if test="updateTimeEnd != null">
  70. and field.update_time <![CDATA[<=]]> #{updateTimeEnd}
  71. </if>
  72. <if test="updateTime != null">
  73. and field.update_time = #{updateTime}
  74. </if>
  75. <if test="keyword != null and keyword != ''">
  76. and field.id like concat(concat('%',#{keyword}),'%')
  77. </if>
  78. </sql>
  79. <select id="selectList" parameterType="com.platform.dao.dto.custom.CustomFormBomFieldDTO"
  80. resultType="com.platform.dao.vo.query.custom.CustomFormBomFieldVO">
  81. select field.*
  82. from t_custom_form_bom_field as field
  83. <where>
  84. <include refid="List_Condition"/>
  85. </where>
  86. </select>
  87. <select id="selectByCategoryType" parameterType="com.platform.dao.dto.custom.CustomFormBomFieldDTO"
  88. resultType="com.platform.dao.vo.query.custom.CustomFormBomFieldVO">
  89. select field.* from t_custom_form_bom_field as field
  90. join t_custom_form form on field.form_id = form.id
  91. <where>
  92. <if test="type != null and type != ''">
  93. and form.type = #{type}
  94. </if>
  95. <if test="category != null and category != ''">
  96. and form.category = #{category}
  97. </if>
  98. </where>
  99. </select>
  100. </mapper>