Keine Beschreibung

TBaseFacilityinfoMapper.xml 1.4KB

1234567891011121314151617181920212223242526272829303132333435
  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.yt.zhylplat.dao.TBaseFacilityinfoMapper">
  4. <select id="pageByBean" resultType="com.yt.zhylplat.entity.TBaseFacilityinfo">
  5. select
  6. fi.*,
  7. fc.F_ParentId as fParentCategoryid,
  8. pfc.F_CategoryName as fParentCategoryName
  9. from
  10. T_Base_FacilityInfo fi
  11. left join
  12. T_Base_FacilityCategory fc on fi.F_CategoryId = fc.F_CategoryId
  13. left join
  14. T_Base_FacilityCategory pfc on fc.F_ParentId = pfc.F_CategoryId
  15. <where>
  16. and fi.F_DeleteFlag = 0
  17. <if test="facilityInfo.fParkid != null and facilityInfo.fParkid > 0">
  18. and fi.F_ParkId = #{facilityInfo.fParkid}
  19. </if>
  20. <if test="facilityInfo.fCategoryid != null and facilityInfo.fCategoryid > 0">
  21. and fi.F_CategoryId = #{facilityInfo.fCategoryid}
  22. </if>
  23. <if test="facilityInfo.fFlag != null">
  24. and fi.F_Flag = #{facilityInfo.fFlag}
  25. </if>
  26. <if test="facilityInfo.fParkname != null and facilityInfo.fParkname != ''">
  27. and fi.F_ParkName like concat('%', #{facilityInfo.fParkname}, '%')
  28. </if>
  29. </where>
  30. order by fi.F_CreateOn desc
  31. </select>
  32. </mapper>