From ccf75464534965c47866449b2b4e457a6dadede9 Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期一, 14 十月 2024 14:13:00 +0800 Subject: [PATCH] 定时任务权限修改 --- shasteel-biz/src/main/java/com/iailab/module/shasteel/job/service/impl/ScheduleJobLogServiceImpl.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/service/impl/ScheduleJobLogServiceImpl.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/service/impl/ScheduleJobLogServiceImpl.java new file mode 100644 index 0000000..eb57384 --- /dev/null +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/service/impl/ScheduleJobLogServiceImpl.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.iailab.module.shasteel.job.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.iailab.framework.common.constant.Constant; +import com.iailab.framework.common.page.PageData; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.shasteel.job.dao.ScheduleJobLogDao; +import com.iailab.module.shasteel.job.dto.ScheduleJobLogDTO; +import com.iailab.module.shasteel.job.entity.ScheduleJobLogEntity; +import com.iailab.module.shasteel.job.service.ScheduleJobLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class ScheduleJobLogServiceImpl extends BaseServiceImpl<ScheduleJobLogDao, ScheduleJobLogEntity> implements ScheduleJobLogService { + + @Override + public PageData<ScheduleJobLogDTO> page(Map<String, Object> params) { + IPage<ScheduleJobLogEntity> page = baseDao.selectPage( + getPage(params, Constant.CREATE_DATE, false), + getWrapper(params) + ); + return getPageData(page, ScheduleJobLogDTO.class); + } + + private QueryWrapper<ScheduleJobLogEntity> getWrapper(Map<String, Object> params){ + String jobId = (String)params.get("jobId"); + + QueryWrapper<ScheduleJobLogEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(jobId), "job_id", jobId); + + return wrapper; + } + + @Override + public ScheduleJobLogDTO get(Long id) { + ScheduleJobLogEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, ScheduleJobLogDTO.class); + } + +} \ No newline at end of file -- Gitblit v1.9.3