记得上下班打卡 | git大法好,push需谨慎

Commit 0ef1f56e authored by 张国柄's avatar 张国柄

opt:删除无用类文件;

parent 661818fa
package com.liquidnet.service.adam.common;
import lombok.Data;
@Data
public class EmailEntity {
//发件人
private String fromPerson;
//收件人
private String toPerson;
// 收件人邮箱
private String targetMail;
//主题
private String subject;
//正文
private String content;
}
package com.liquidnet.service.adam.util;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.Date;
public class DateUtil {
/**
* 前端显示转换的时间戳
*
* @param now LocalDate
* LocalDateTime
*/
public static String getVoTimestamp(Object now) {
return getVoTimestamp(now, ZoneOffset.UTC);
}
public static String getVoTimestamp(Object now, ZoneOffset offset) {
if (now == null) {
return null;
}
if (offset == null) {
offset = ZoneOffset.UTC;
}
long l = 0;
if (now instanceof LocalDate) {
l = ((LocalDate) now).atStartOfDay(offset).toInstant().getEpochSecond();
} else if (now instanceof LocalDateTime) {
l = ((LocalDateTime) now).toEpochSecond(offset);
}
return String.valueOf(l);
}
/**
* 获取当天剩余秒数
*
* @param currentDate 当前时间
*/
public static Integer getRemainSecondsOneDay(Date currentDate) {
LocalDateTime midnight = LocalDateTime.ofInstant(currentDate.toInstant(),
ZoneId.systemDefault()).plusDays(1).withHour(0).withMinute(0)
.withSecond(0).withNano(0);
LocalDateTime currentDateTime = LocalDateTime.ofInstant(currentDate.toInstant(),
ZoneId.systemDefault());
long seconds = ChronoUnit.SECONDS.between(currentDateTime, midnight);
return (int) seconds;
}
}
package com.liquidnet.service.adam.util;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo;
/**
* 枚举工具类
*
* @author LiChen
* @date 2020/9/17 2:47 下午
*/
public class PageUtil {
public static Page transferFromPageInfo(PageInfo pageInfo) {
Page page = new Page();
page.setRecords(pageInfo.getList());
page.setTotal(pageInfo.getTotal());
page.setSize(pageInfo.getPageSize());
page.setCurrent(pageInfo.getPageNum());
return page;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment