package com.huimv.receive.service;

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

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

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-10-14
 */
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;

    //导出
    void printAccount(HttpServletResponse httpServletRequest, Map<String, String> paramsMap) throws Exception;

    void updateByUser(SysUser sysUser);
}
