package cn.orionsec.ops.dao;

import cn.orionsec.ops.entity.domain.MachineGroupDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

public interface MachineGroupDAO extends BaseMapper<MachineGroupDO> {

    /**
     * 增加排序值
     *
     * @param parentId    parentId
     * @param greaterSort > sort
     * @return effect
     */
    Integer incrementSort(@Param("parentId") Long parentId, @Param("greaterSort") Integer greaterSort);

    /**
     * 增加最大 sort
     *
     * @param parentId parentId
     * @return sort
     */
    Integer getMaxSort(@Param("parentId") Long parentId);

}
