package com.huimv.env.admin.service;

import com.huimv.env.admin.common.utils.Result;
import com.huimv.env.admin.entity.SysAccountMultilevel;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2024-05-06
 */
public interface ISysAccountMultilevelService extends IService<SysAccountMultilevel> {

    Result findUserAccount(String searchStr, int pageNum, int pageSize, Integer userId);

    Result add(SysAccountMultilevel sysAccountMultilevel, Integer userId);

    Result setAccountStatus(List<Integer> ids, Integer status);

    List<Integer> getAllChildId(Integer userId);

    Result listSubordinate(String searchStr, int pageNum, int pageSize, Integer userId);

    Result getLastFarmId(Integer userId);

    Result listSubordinateByFarm(String farmId, Integer userId);

    Result updateUser(HttpServletRequest httpServletRequest, MultipartFile img, String userName, String phone,
                      Integer workPost, String workLocation, String workLocationId, String workName,
                      String papersType, String papersCode) throws IOException;
}
