获取日志增加年月日参数

This commit is contained in:
zzc 2024-08-20 22:21:24 +08:00
parent 46c34efcc1
commit a878b7de90
2 changed files with 6 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class EqDeviceController extends BaseController {
* @return todo
*/
@GetMapping("/getDeviceLogs")
public Map<String, List<EqEquipmentLogVo>> getDeviceLogs(EqAppHomeBo bo,PageQuery pageQuery){
public Map<String, List<EqEquipmentLogVo>> getDeviceLogs(EqAppHomeBo bo,String createdYearDay,PageQuery pageQuery){
if (bo.getEquipmentId() == null) throw new ServiceException("设备ID不能为空");
String zoneId = bo.getZoneId();
if (StringUtils.isEmpty(zoneId)) throw new ServiceException("时区zoneId(如 UTC+08:00)不能为空");
@ -149,6 +149,7 @@ public class EqDeviceController extends BaseController {
EqEquipmentLogBo eqEquipmentLogBo = new EqEquipmentLogBo();
eqEquipmentLogBo.setEquipmentId(bo.getEquipmentId());
BeanUtil.copyProperties(bo, eqEquipmentLogBo);
eqEquipmentLogBo.setCreatedYearDay(createdYearDay);
TableDataInfo<EqEquipmentLogVo> data = logService.queryPageList(eqEquipmentLogBo, pageQuery);
List<EqEquipmentLogVo> rows = data.getRows();
if (CollUtil.isEmpty(rows)) return new HashMap<>();

View File

@ -63,6 +63,7 @@ public class EqEquipmentLogBo extends BaseEntity {
/**
* 状态 eq_status_log_type
*
* 0.停止中 stop
* 1.关闭中 closing
* 2.开启中 openning
@ -87,6 +88,9 @@ public class EqEquipmentLogBo extends BaseEntity {
* 112.门体手动开启提醒
* 113.半开门运行提醒
* 114.门体停止运行提醒
*
* 500.设备离线 offline
* 501.设备在线 online
*/
// @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
private Integer status;