/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.app.param.UserRegisterParam;
import com.yami.shop.bean.model.User;
import com.yami.shop.bean.po.EnterpriseUserLogPo;
import com.yami.shop.bean.po.EnterpriseUserPo;
import com.yami.shop.bean.vo.EnterpriseUserVo;
import com.yami.shop.bean.vo.UserPointsVO;
import com.yami.shop.common.util.PageParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author lgh on 2018/09/11.
 */
public interface UserService extends IService<User> {

    User getUserByUserId(String userId);

    void setUserLevelBylevelId(Integer level);

    void setUserLevelByGrowth(Integer level, Integer minNeedGrowth, Integer maxNeedGrowth);

    void validate(UserRegisterParam userRegisterParam, String checkRegisterSmsFlag);

    IPage<User> getUserPage(PageParam<User> page, User user);

    /**
     * 获取用户统计列表
     * @param pageParam 分页参数
     * @param user 查询参数
     * @return 用户统计列表
     */
    IPage<UserPointsVO> statisticsList(PageParam<User> pageParam, User user);

    IPage<EnterpriseUserVo> enterpriseUserList(PageParam<EnterpriseUserPo> page, EnterpriseUserPo po);

    void downloadExcelGoods(HttpServletResponse response);

    void uploadExcelGoods(MultipartFile file,String username);

    void addUser(EnterpriseUserPo po);

    void addUser2(EnterpriseUserPo po);

    IPage<EnterpriseUserLogPo> enterpriseUserLogList(PageParam<EnterpriseUserLogPo> page);

    IPage<User> userList(PageParam<User> page, User user);

    void downloadErrorExcel(HttpServletResponse response, String batchNo);

    void export(EnterpriseUserPo po, HttpServletResponse response);

    Double test(String userId);
}
