| | |
| | | import com.whyc.mapper.CarCameraMapper; |
| | | import com.whyc.pojo.CarCamera; |
| | | import com.whyc.dto.Login; |
| | | import com.whyc.pojo.CarCameraInf; |
| | | import com.whyc.pojo.Response; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @Service |
| | |
| | | } |
| | | |
| | | //获取门禁状态 |
| | | public Response getCarCameraRt(Login login) { |
| | | public Response getCarCameraRt() { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("ip",login.getIp()); |
| | | wrapper.last("limit 1"); |
| | | CarCameraInf carCameraInf=infMapper.selectOne(wrapper); |
| | | QueryWrapper wrapper1=new QueryWrapper(); |
| | | wrapper1.eq("carCameraId",carCameraInf.getCarcameraId()); |
| | | wrapper1.last("limit 1"); |
| | | CarCamera carCamera=cameraMapper.selectOne(wrapper1); |
| | | return new Response().setII(1,carCamera!=null,carCamera,"获取门禁状态"); |
| | | wrapper.orderByAsc("carcamera_id"); |
| | | List<CarCamera> list=cameraMapper.selectList(wrapper); |
| | | return new Response().setII(1,list!=null,list,"获取门禁状态"); |
| | | } |
| | | } |