add feature about select device by status
This commit is contained in:
parent
35ebcc1bd3
commit
ef50d5c947
|
@ -12,7 +12,7 @@
|
||||||
<artifactId>xiuos</artifactId>
|
<artifactId>xiuos</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>xiuos</name>
|
<name>xiuos</name>
|
||||||
<description>Demo project for Spring Boot</description>
|
<description>xiuosiot</description>
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -163,6 +163,7 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,4 +26,7 @@ public interface FzDeviceInfoMapper {
|
||||||
|
|
||||||
@Select("select * from fz_device_info where fz_device_type =#{type}")
|
@Select("select * from fz_device_info where fz_device_type =#{type}")
|
||||||
List<FzDeviceInfo> selectByType(@Param("type") String type);
|
List<FzDeviceInfo> selectByType(@Param("type") String type);
|
||||||
|
|
||||||
|
@Select("select * from fz_device_info where fz_device_status =#{status}")
|
||||||
|
List<FzDeviceInfo> selectByStatus(@Param("status") String status);
|
||||||
}
|
}
|
|
@ -11,5 +11,6 @@ public interface FzDeviceInfoService {
|
||||||
int addDevice(FzDeviceInfo fzDeviceInfo);
|
int addDevice(FzDeviceInfo fzDeviceInfo);
|
||||||
int updateDevice(FzDeviceInfo fzDeviceInfo);
|
int updateDevice(FzDeviceInfo fzDeviceInfo);
|
||||||
int deleteDevice(String deviceNo);
|
int deleteDevice(String deviceNo);
|
||||||
|
List<FzDeviceInfo> selectByStatus(String status);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,9 @@ public class FzDeviceInfoServiceImpl implements FzDeviceInfoService {
|
||||||
public int deleteDevice(String deviceNo) {
|
public int deleteDevice(String deviceNo) {
|
||||||
return fzDeviceInfoMapper.deleteByPrimaryKey(deviceNo);
|
return fzDeviceInfoMapper.deleteByPrimaryKey(deviceNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FzDeviceInfo> selectByStatus(String status) {
|
||||||
|
return fzDeviceInfoMapper.selectByStatus(status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue