mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-30 19:17:54 +08:00
【其他】日期调整为工具类
This commit is contained in:
parent
ebb5aad829
commit
8963b7f57d
3 changed files with 134 additions and 133 deletions
|
@ -6,6 +6,7 @@ package com.skyeye.mq.job.impl;
|
|||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.skyeye.common.constans.MqConstants;
|
||||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.EmailUtil;
|
||||
import com.skyeye.common.util.ShowMail;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
|
@ -28,12 +29,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: MailAccessDeleteServiceImpl
|
||||
* @Description: 已删除邮件获取
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2021/7/4 21:58
|
||||
*
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
|
@ -62,7 +61,6 @@ public class MailAccessDeleteServiceImpl implements JobMateService{
|
|||
try {
|
||||
// 任务开始
|
||||
jobMateMationService.comMQJobMation(jobId, MqConstants.JOB_TYPE_IS_PROCESSING, "");
|
||||
try{
|
||||
//获取服务器信息
|
||||
Map<String, Object> emailServer = systemFoundationSettingsService.getSystemFoundationSettings();
|
||||
|
||||
|
@ -101,7 +99,7 @@ public class MailAccessDeleteServiceImpl implements JobMateService{
|
|||
&& (re.getMailAddress("to").indexOf(username) > -1 || re.getMailAddress("cc").indexOf(username) > -1 || re.getMailAddress("bcc").indexOf(username) > -1)) {
|
||||
bean = EmailUtil.getEmailMationByUtil(re, message[i]);
|
||||
String rowId = ToolUtil.getSurFaceId();
|
||||
re.setDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
re.setDateFormat(DateUtil.YYYY_MM_DD_HH_MM_SS);
|
||||
bean.put("id", rowId);//id
|
||||
bean.put("emailState", "2");//邮件状态 0.草稿 1.正常 2.已删除
|
||||
re.setAttachPath(basePath);//设置附件保存基础路径
|
||||
|
@ -109,20 +107,22 @@ public class MailAccessDeleteServiceImpl implements JobMateService{
|
|||
beans.add(bean);
|
||||
}
|
||||
if (beans.size() >= 20) {//每20条数据保存一次
|
||||
if(!beans.isEmpty())
|
||||
if (!beans.isEmpty()) {
|
||||
mqUserEmailDao.insertEmailListToServer(beans);
|
||||
if(!enclosureBeans.isEmpty())
|
||||
}
|
||||
if (!enclosureBeans.isEmpty()) {
|
||||
mqUserEmailDao.insertEmailEnclosureListToServer(enclosureBeans);
|
||||
}
|
||||
beans.clear();
|
||||
enclosureBeans.clear();
|
||||
emailHasMail = mqUserEmailDao.queryDeleteEmailListByEmailFromAddress(map);
|
||||
}
|
||||
}
|
||||
if(!beans.isEmpty())
|
||||
if (!beans.isEmpty()) {
|
||||
mqUserEmailDao.insertEmailListToServer(beans);
|
||||
if(!enclosureBeans.isEmpty())
|
||||
}
|
||||
if (!enclosureBeans.isEmpty()) {
|
||||
mqUserEmailDao.insertEmailEnclosureListToServer(enclosureBeans);
|
||||
}finally{
|
||||
}
|
||||
// 任务完成
|
||||
jobMateMationService.comMQJobMation(jobId, MqConstants.JOB_TYPE_IS_SUCCESS, "");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service;
|
||||
|
||||
import com.skyeye.common.object.InputObject;
|
||||
|
|
|
@ -149,7 +149,7 @@ public class HotForumQuartz {
|
|||
*/
|
||||
public static ArrayList<String> pastDay(String time) throws ParseException {
|
||||
ArrayList<String> pastDaysList = new ArrayList<>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(DateUtil.YYYY_MM_DD);
|
||||
Date date = sdf.parse(time);
|
||||
for (int i = 6; i >= 0; i--) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
|
Loading…
Reference in a new issue