package com.xxl.job.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.scheduletask.entity.XxlJobGroup;

import java.util.List;

public interface XxlJobGroupService extends IService<XxlJobGroup> {

    List<XxlJobGroup> findAll();

    List<XxlJobGroup> findByAddressType(int addressType);

    int create(XxlJobGroup xxlJobGroup);

    int update(XxlJobGroup xxlJobGroup);

    int remove(String id);

    XxlJobGroup load(String id);

    List<XxlJobGroup> pageList(int offset,
                               int pagesize,
                               String appname,
                               String title);

    long pageListCount(int offset,
                      int pagesize,
                      String appname,
                      String title);

    /**
     * 通过Appname查询分组
     *
     * @param appname
     * @return
     */
    List<XxlJobGroup> findByAppname(String appname);

    /**
     * 通过appname修改数据
     *
     * @param xxlJobGroup
     * @return
     */
    int updateByAppname(XxlJobGroup xxlJobGroup);

}

