|
@@ -25,10 +25,12 @@ import org.springframework.stereotype.Service;
|
|
|
public class DmpDeviceCommandServiceImpl extends AbstractCrudService<DmpDeviceCommandMapper, DmpDeviceCommand> implements DmpDeviceCommandService {
|
|
|
|
|
|
@Override
|
|
|
- public CommonPage<DmpDeviceCommand> deviceCommandRecord(Integer commandStatus, String startTime, String endTime, Integer pageNum, Integer pageSize){
|
|
|
+ public CommonPage<DmpDeviceCommand> deviceCommandRecord(Integer commandStatus,String productCode,String deviceId, String startTime, String endTime, Integer pageNum, Integer pageSize){
|
|
|
IPage<DmpDeviceCommand> page = new Page<>(pageNum,pageSize);
|
|
|
LambdaQueryWrapper<DmpDeviceCommand> queryWrapper = Wrappers.lambdaQuery();
|
|
|
queryWrapper.eq(commandStatus != null,DmpDeviceCommand::getCommandStatus,commandStatus)
|
|
|
+ .like(StringUtils.isNotBlank(productCode),DmpDeviceCommand::getProductCode,productCode)
|
|
|
+ .like(StringUtils.isNotBlank(deviceId),DmpDeviceCommand::getDeviceId,deviceId)
|
|
|
.between(StringUtils.isNotBlank(startTime)&&StringUtils.isNotBlank(endTime),DmpDeviceCommand::getCreatedTime,startTime,endTime)
|
|
|
.eq(DmpDeviceCommand::getTenantId, SecurityUtils.getTenantId())
|
|
|
.orderByDesc(DmpDeviceCommand::getId);
|