package com.liangjian.dataplatform.member.service;

import com.liangjian.dataplatform.member.entity.po.secondary.UserPointDesc;
import com.liangjian.dataplatform.member.entity.po.elasticsearch.UserPointLog;
import com.liangjian.dataplatform.member.entity.vo.request.BirdGirdRequest;
import com.liangjian.dataplatform.member.entity.vo.response.BirdGirdTableResponse2;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author: 黄子奇
 * @Date: 2019/11/15
 */
public interface IUserPointLogService {

    UserPointDesc getUserPointDesc();

    boolean setUserPointDesc(UserPointDesc userPointDesc);

    BirdGirdTableResponse2<UserPointLog> queryByCondition(BirdGirdRequest request);

    @Deprecated
    Page<UserPointLog> queryByCondition(String terminal, String terminalCode, String action, Date startTime, Date endTime, Integer page, Integer size);

    Page<UserPointLog> queryBySecretPhone(String secretPhone, Integer page, Integer size);

    Page<UserPointLog> queryBySecretPhoneAndIncrease(String secretPhone, boolean increase, Integer page, Integer size);

    UserPointLog getLastLog(String secretPhone);

    UserPointLog getLastDayLog(String secretPhone);

    List<UserPointLog> getLastDayLogList(String secretPhone);

    Integer getPointBalance(String secretPhone);

    boolean addLog(UserPointLog log);

    List<UserPointLog> queryBySecretPhones(List<String> secretPhones);

    @Deprecated
    List<Map<String,Object>> relatedWithMember(List<Map<String,Object>> members, List<UserPointLog> logs);

    @Deprecated
    List<Map<String,Object>> relatedWithMember(List<Map<String,Object>> members);

    Page<UserPointLog> queryByConditionOneUser(String secretPhone);

    Page<UserPointLog> queryByConditionOneUserV3(String secretPhone,Integer pageIndex,Integer pageSize);

    boolean addPointLog(UserPointLog log);
}
