mirror of
https://github.com/niushuai233/DevControl.git
synced 2024-10-27 22:43:20 +08:00
feat: 新增字段更新时间
This commit is contained in:
parent
5c1da90259
commit
5eab389001
@ -21,6 +21,8 @@ public class BaseVO implements Serializable {
|
|||||||
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -52,4 +54,12 @@ public class BaseVO implements Serializable {
|
|||||||
public void setCreateTime(Date createTime) {
|
public void setCreateTime(Date createTime) {
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,11 +83,16 @@ public class Device implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
@Generated(hash = 1723639212)
|
/**
|
||||||
public Device(Long id, Integer order, String deviceName, String deviceType,
|
* 创建时间
|
||||||
String onOff, Integer iconId, String commandPath, String commandStatus,
|
*/
|
||||||
String commandOpen, String commandClose, Integer isDeleted,
|
private String updateTime;
|
||||||
String remark, String createTime) {
|
|
||||||
|
@Generated(hash = 1105838321)
|
||||||
|
public Device(Long id, Integer order, String deviceName, String deviceType, String onOff,
|
||||||
|
Integer iconId, String commandPath, String commandStatus, String commandOpen,
|
||||||
|
String commandClose, Integer isDeleted, String remark, String createTime,
|
||||||
|
String updateTime) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.order = order;
|
this.order = order;
|
||||||
this.deviceName = deviceName;
|
this.deviceName = deviceName;
|
||||||
@ -101,6 +106,7 @@ public class Device implements Serializable {
|
|||||||
this.isDeleted = isDeleted;
|
this.isDeleted = isDeleted;
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
|
this.updateTime = updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Generated(hash = 1469582394)
|
@Generated(hash = 1469582394)
|
||||||
@ -210,4 +216,12 @@ public class Device implements Serializable {
|
|||||||
public void setCommandStatus(String commandStatus) {
|
public void setCommandStatus(String commandStatus) {
|
||||||
this.commandStatus = commandStatus;
|
this.commandStatus = commandStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUpdateTime() {
|
||||||
|
return this.updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(String updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ public class DeviceAddPowerSwitchActivity extends BaseActivity {
|
|||||||
device.setOnOff(OnOffEnum.OFF.getValue());
|
device.setOnOff(OnOffEnum.OFF.getValue());
|
||||||
|
|
||||||
device.setCreateTime(DateUtil.now());
|
device.setCreateTime(DateUtil.now());
|
||||||
|
device.setUpdateTime(DateUtil.now());
|
||||||
device.setOrder(1);
|
device.setOrder(1);
|
||||||
device.setIsDeleted(YesNoEnum.NO.getIntegerValue());
|
device.setIsDeleted(YesNoEnum.NO.getIntegerValue());
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ import android.view.View;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import cc.niushuai.project.devcontrol.R;
|
import cc.niushuai.project.devcontrol.R;
|
||||||
import cc.niushuai.project.devcontrol.base.ui.BaseActivity;
|
import cc.niushuai.project.devcontrol.base.ui.BaseActivity;
|
||||||
import cc.niushuai.project.devcontrol.base.util.CommonUiUtil;
|
import cc.niushuai.project.devcontrol.base.util.CommonUiUtil;
|
||||||
@ -67,6 +69,7 @@ public class PowerSwitchSetParamActivity extends BaseActivity {
|
|||||||
// deviceInfo.setIconId(device.getIconId());
|
// deviceInfo.setIconId(device.getIconId());
|
||||||
deviceInfo.setIsDeleted(device.getIsDeleted());
|
deviceInfo.setIsDeleted(device.getIsDeleted());
|
||||||
deviceInfo.setCreateTime(device.getCreateTime());
|
deviceInfo.setCreateTime(device.getCreateTime());
|
||||||
|
deviceInfo.setUpdateTime(new Date());
|
||||||
DB.getDeviceDao().update(deviceInfo.toDevice());
|
DB.getDeviceDao().update(deviceInfo.toDevice());
|
||||||
|
|
||||||
// 对当前设备引用重新赋值
|
// 对当前设备引用重新赋值
|
||||||
|
@ -231,6 +231,7 @@ public class DeviceInfo extends BaseVO {
|
|||||||
to.setOrder(this.getOrder());
|
to.setOrder(this.getOrder());
|
||||||
to.setIsDeleted(this.getIsDeleted());
|
to.setIsDeleted(this.getIsDeleted());
|
||||||
to.setCreateTime(DateFormatUtil.formatDateTime(this.getCreateTime()));
|
to.setCreateTime(DateFormatUtil.formatDateTime(this.getCreateTime()));
|
||||||
|
to.setUpdateTime(DateFormatUtil.formatDateTime(this.getUpdateTime()));
|
||||||
|
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user