package com.agri.quartz.task;

import com.agri.system.domain.SysDtuData;
import com.agri.system.service.ISysDtuDataService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component("tempTask")
public class TempTask {

    @Autowired
    private ISysDtuDataService dtuDataService;

    public void ryNoParams()
    {
        dtuDataService.lambdaUpdate()
                .eq(SysDtuData::getImei, "864865085008523")
                .orderByDesc(SysDtuData::getId)
                .last("limit 1")
                .set(SysDtuData::getTime, new Date())
                .set(SysDtuData::getCreateTime, new Date())
                .update();
    }

}
