package com.fs.store.service;

import java.util.List;

import com.fs.store.domain.FsStoreOrder;
import com.fs.store.domain.FsStoreOrderItem;
import com.fs.store.domain.FsUser;

import com.fs.store.vo.FsUserListVO;
import com.fs.store.vo.FsUserVO;
import com.fs.store.vo.FsCompanyUserListQueryVO;
import com.fs.store.vo.FsUserShareVO;
import com.fs.store.vo.FsUserTuiVO;

/**
 * 用户Service接口
 *
 * @author fs
 * @date 2022-03-15
 */
public interface IFsUserService
{
    /**
     * 查询用户
     *
     * @param userId 用户ID
     * @return 用户
     */
    public FsUser selectFsUserById(Long userId);

    /**

     * 查询用户
     *
     * @param userId 用户ID
     * @return FSUserVO
     */
    public FsUserVO selectFsUserByUserId(Long userId);

    /**
     * 查询用户列表
     *
     * @param fsUser 用户
     * @return 用户集合
     */
    public List<FsUser> selectFsUserList(FsUser fsUser);

    /**
     * 查询用户列表
     *
     * @param fsUser 用户
     * @return 用户集合
     */
    public List<FsUserListVO> selectFsUserVOList(FsUser fsUser);

    /**
     * 新增用户
     *
     * @param fsUser 用户
     * @return 结果
     */
    public int insertFsUser(FsUser fsUser);

    /**
     * 修改用户
     *
     * @param fsUser 用户
     * @return 结果
     */
    public int updateFsUser(FsUser fsUser);

    /**
     * 批量删除用户
     *
     * @param userIds 需要删除的用户ID
     * @return 结果
     */
    public int deleteFsUserByIds(Long[] userIds);

    /**
     * 删除用户信息
     *
     * @param userId 用户ID
     * @return 结果
     */
    public int deleteFsUserById(Long userId);

    int decIntegral( Long uid,  double usedIntegral);

    int incPayCount(Long userId);

    FsUser selectFsUserByPhone(String phone);

    List<FsCompanyUserListQueryVO> selectFsCompanyUserListQuery(FsUser fsUser);

    List<FsUserTuiVO> selectFsUserTuiList(String userId);

    Long selectFsUserCount(int type,Long companyId);

    void addTuiMoney(FsStoreOrder order, List<FsStoreOrderItem> items);

    void subTuiMoney(FsStoreOrder order);

    void addMoney(FsStoreOrder order);

    FsUser selectFsUserByMaOpenId(String openid);

    FsUser selectFsUserByMpOpenId(String openid);

    FsUser selectFsUserByUnionId(String unionId);


    FsUser selectFsUserByUserCode(String userCode);

    List<FsUserShareVO> selectFsUserShareList(String userId,Integer type);
}
