package com.ks.push.vo;
|
|
import com.ks.push.pojo.DO.BPushFilter;
|
import org.yeshi.utils.StringUtil;
|
import org.yeshi.utils.TimeUtil;
|
|
public class BPushTaskFilterVO {
|
private String versionCodeList;
|
private String uidList;
|
private String deviceList;
|
private String brandNameList;
|
private String startPushTime;
|
private String minActiveTime;
|
private String maxActiveTime;
|
private String minCreateTime;
|
private String maxCreateTime;
|
|
public String getVersionCodeList() {
|
return versionCodeList;
|
}
|
|
public void setVersionCodeList(String versionCodeList) {
|
this.versionCodeList = versionCodeList;
|
}
|
|
public String getUidList() {
|
return uidList;
|
}
|
|
public void setUidList(String uidList) {
|
this.uidList = uidList;
|
}
|
|
public String getDeviceList() {
|
return deviceList;
|
}
|
|
public void setDeviceList(String deviceList) {
|
this.deviceList = deviceList;
|
}
|
|
public String getBrandNameList() {
|
return brandNameList;
|
}
|
|
public void setBrandNameList(String brandNameList) {
|
this.brandNameList = brandNameList;
|
}
|
|
public String getStartPushTime() {
|
return startPushTime;
|
}
|
|
public void setStartPushTime(String startPushTime) {
|
this.startPushTime = startPushTime;
|
}
|
|
public String getMinActiveTime() {
|
return minActiveTime;
|
}
|
|
public void setMinActiveTime(String minActiveTime) {
|
this.minActiveTime = minActiveTime;
|
}
|
|
public String getMaxActiveTime() {
|
return maxActiveTime;
|
}
|
|
public void setMaxActiveTime(String maxActiveTime) {
|
this.maxActiveTime = maxActiveTime;
|
}
|
|
public String getMinCreateTime() {
|
return minCreateTime;
|
}
|
|
public void setMinCreateTime(String minCreateTime) {
|
this.minCreateTime = minCreateTime;
|
}
|
|
public String getMaxCreateTime() {
|
return maxCreateTime;
|
}
|
|
public void setMaxCreateTime(String maxCreateTime) {
|
this.maxCreateTime = maxCreateTime;
|
}
|
|
public static BPushTaskFilterVO create(BPushFilter filter) {
|
BPushTaskFilterVO vo = new BPushTaskFilterVO();
|
if (filter.getBrandNameList() == null) {
|
vo.setBrandNameList("不限");
|
} else {
|
vo.setBrandNameList(StringUtil.concat(filter.getBrandNameList(), ","));
|
}
|
if (filter.getDeviceList() == null) {
|
vo.setDeviceList("不限");
|
} else {
|
vo.setDeviceList(StringUtil.concat(filter.getDeviceList(), ","));
|
}
|
|
if (filter.getUidList() == null) {
|
vo.setUidList("不限");
|
} else {
|
vo.setUidList(StringUtil.concat(filter.getUidList(), ","));
|
}
|
|
if (filter.getVersionCodeList() == null) {
|
vo.setVersionCodeList("不限");
|
} else {
|
vo.setVersionCodeList(StringUtil.concat(filter.getVersionCodeList(), ","));
|
}
|
|
if (filter.getMinCreateTime() != null) {
|
vo.setMinCreateTime(TimeUtil.getGernalTime(filter.getMinCreateTime().getTime(), "yyyy.MM.dd HH:mm"));
|
} else {
|
vo.setMinCreateTime("未设置");
|
}
|
|
|
if (filter.getMaxCreateTime() != null) {
|
vo.setMaxCreateTime(TimeUtil.getGernalTime(filter.getMaxCreateTime().getTime(), "yyyy.MM.dd HH:mm"));
|
} else {
|
vo.setMaxCreateTime("未设置");
|
}
|
|
|
if (filter.getMinActiveTime() != null) {
|
vo.setMinActiveTime(TimeUtil.getGernalTime(filter.getMinActiveTime().getTime(), "yyyy.MM.dd HH:mm"));
|
} else {
|
vo.setMinActiveTime("未设置");
|
}
|
|
|
if (filter.getMaxActiveTime() != null) {
|
vo.setMaxActiveTime(TimeUtil.getGernalTime(filter.getMaxActiveTime().getTime(), "yyyy.MM.dd HH:mm"));
|
} else {
|
vo.setMaxActiveTime("未设置");
|
}
|
|
|
if (filter.getStartPushTime() != null) {
|
vo.setStartPushTime(TimeUtil.getGernalTime(filter.getStartPushTime().getTime(), "yyyy.MM.dd HH:mm"));
|
} else {
|
vo.setStartPushTime("未设置");
|
}
|
|
return vo;
|
}
|
}
|