2023年4月25日 添加参数,以方便控制日期

This commit is contained in:
bai 2023-04-25 22:29:56 +08:00
parent 27725554f6
commit 6d4828b2ec
1 changed files with 6 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
import org.jeecg.modules.kc.kcMessagelistcopy.entity.KcMessagelistcopy;
@ -37,13 +38,13 @@ public class SyncMessageList extends BaseSync {
*/
public void run(Map<String, Object> param){
// int offsetDay = 1;
// if(param != null){
// if(Boolean.parseBoolean((String)param.get("offsetDay"))){
//
// }
// }
//明天
DateTime now = DateUtil.date();
if(param != null){
if(StringUtils.isNotBlank((String)param.get("nowDay"))){
now = DateUtil.parse((String)param.get("nowDay"), "yyyy-MM-dd");
}
}
//今天下午
String todayStr = now.toDateStr() + " 16:00";
DateTime nextDate = DateUtil.offset(now, DateField.DAY_OF_MONTH, 1);