BaseCameraManagementMapper.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.ozs.service.mapper.BaseCameraManagementMapper">
  4. <select id="selectCameraManagementList" resultType="com.ozs.service.entity.BaseCameraManagement" parameterType="com.ozs.service.entity.vo.BaseCameraManagementVo">
  5. SELECT
  6. a.id AS id,
  7. a.camera_code AS cameraCode,
  8. a.railway_code AS railwayCode,
  9. a.channel AS channel,
  10. a.dept_id AS deptId,
  11. a.line_dir AS lineDir,
  12. a.install_mile AS installMile,
  13. a.begin_mile AS beginMile,
  14. a.end_mile AS endMile,
  15. a.install_longitude AS installLongitude,
  16. a.install_latitude AS installLatitude,
  17. a.card_num AS cardNum,
  18. a.start_recording AS startRecording,
  19. a.task_id AS taskId,
  20. a.create_time AS createTime
  21. FROM
  22. base_camera_management a
  23. <where>
  24. <if test="railwayCode != null and railwayCode != ''">
  25. and a.railway_code=#{railwayCode}
  26. </if>
  27. <if test="lineDir != null and lineDir != 0">
  28. and a.line_dir =#{lineDir}
  29. </if>
  30. <if test="deptId != null and deptId != 0">
  31. and a.dept_id =#{deptId}
  32. </if>
  33. <if test="beginMile != null and beginMile != 0">
  34. and a.begin_mile &gt;=#{beginMile}
  35. </if>
  36. <if test="endMile != null and endMile != 0">
  37. and a.end_mile &lt;=#{endMile}
  38. </if>
  39. <if test="!dsFlay">
  40. and (
  41. <if test="dsUserId != null and dsUserId != ''">
  42. a.create_by=#{dsUserId} or
  43. </if>
  44. <if test="dsDeptId != null and dsDeptId != 0">
  45. a.dept_id=#{dsDeptId} or
  46. </if>
  47. <if test="dsDeptIds != null">
  48. a.dept_id in
  49. <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index="">
  50. #{item}
  51. </foreach>
  52. </if>
  53. )
  54. </if>
  55. </where>
  56. </select>
  57. </mapper>