| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.fzzy.igds.data.BaseResp; |
| | | import com.fzzy.igds.data.IgdsBaseParam; |
| | | import com.fzzy.igds.domain.SnapConf; |
| | | import com.fzzy.igds.mapper.SnapConfMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据ID查询详情 |
| | | * |
| | | * @param id 主键ID |
| | | * @return 实体对象 |
| | | * 获取更新配置数量 |
| | | * @param deptId |
| | | * @param start |
| | | * @param end |
| | | * @return |
| | | */ |
| | | public SnapConf selectById(String id) { |
| | | return snapConfMapper.selectById(id); |
| | | public int getUpdateCount(String deptId, Date start, Date end) { |
| | | |
| | | QueryWrapper<SnapConf> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | if(StringUtils.isNotBlank(deptId)){ |
| | | queryWrapper.eq("dept_id", deptId); |
| | | } |
| | | if (null != start) { |
| | | queryWrapper.ge("update_time", start); |
| | | } |
| | | if (null != end) { |
| | | queryWrapper.le("update_time", end); |
| | | } |
| | | return snapConfMapper.selectCount(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | |
| | | return BaseResp.error("更新失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除指定ID的数据 |
| | | * |
| | | * @param param 要删除的记录 |
| | | * @return 操作结果 |
| | | */ |
| | | public BaseResp deleteData(SnapConf param) { |
| | | return snapConfMapper.deleteById(param) > 0 ? BaseResp.success() : BaseResp.error("删除失败"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新执行时间 |