PstatModelMapper.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.predict.mapper.PstatModelMapper">
  6. <resultMap type="PstatModel" id="PstatModelResult">
  7. <result property="pstatNo" column="pstat_no"/>
  8. <result property="pstatName" column="pstat_name"/>
  9. <result property="pstatType" column="pstat_type"/>
  10. <result property="dllName" column="dll_name"/>
  11. <result property="processTag" column="process_tag"/>
  12. <result property="relatedParaTable" column="related_para_table"/>
  13. </resultMap>
  14. <sql id="selectPstatModelVo">
  15. select pstat_no, pstat_name, pstat_type, dll_name, process_tag, related_para_table from pstat_model
  16. </sql>
  17. <select id="selectPstatModelList" parameterType="PstatModel" resultMap="PstatModelResult">
  18. select
  19. pm.*,
  20. emi.item_name as "processTagName"
  21. from
  22. pstat_model pm
  23. left join enum_menu_item emi on emi.item_val = pm.process_tag and emi.menu_no = 121
  24. <where>
  25. <if test="pstatNo != null ">and pm.pstat_no = #{pstatNo}</if>
  26. <if test="pstatName != null and pstatName != ''">and pm.pstat_name like concat(concat('%', #{pstatName}),
  27. '%')
  28. </if>
  29. <if test="pstatType != null ">and pm.pstat_type = #{pstatType}</if>
  30. <if test="dllName != null and dllName != ''">and pm.dll_name like concat(concat('%', #{dllName}), '%')</if>
  31. <if test="processTag != null ">and pm.process_tag = #{processTag}</if>
  32. <if test="relatedParaTable != null ">and pm.related_para_table = #{relatedParaTable}</if>
  33. </where>
  34. </select>
  35. <select id="selectPstatModelById" parameterType="Long" resultMap="PstatModelResult">
  36. <include refid="selectPstatModelVo"/>
  37. where pstat_no = #{pstatNo}
  38. </select>
  39. </mapper>