DeviceContactApiMapper.java 737 B

123456789101112131415
  1. package com.zksy.api.mapper;
  2. import org.apache.ibatis.annotations.Param;
  3. import org.apache.ibatis.annotations.Select;
  4. import java.util.List;
  5. public interface DeviceContactApiMapper {
  6. /** 按台账编码查询维护记录联系人和台账负责人电话,状态表不存储负责人。 */
  7. @Select("SELECT m.maintain_person_phone FROM app_user.equipment_base b "
  8. + "JOIN app_user.equipment_maintain m ON m.equipment_id = b.equipment_id "
  9. + "WHERE b.equipment_code = #{deviceCode} "
  10. + "UNION SELECT b.maintainer_phone FROM app_user.equipment_base b "
  11. + "WHERE b.equipment_code = #{deviceCode}")
  12. List<String> selectPhonesByDeviceCode(@Param("deviceCode") String deviceCode);
  13. }