/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.user.comment.service.impl;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.enums.ScoreLogType;
import com.yami.shop.bean.model.UserExtension;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.service.UserExtensionService;
import com.yami.shop.user.comment.model.UserScoreDetail;
import com.yami.shop.user.comment.model.UserScoreLog;
import com.yami.shop.user.comment.dao.UserScoreLogMapper;
import com.yami.shop.user.comment.service.UserScoreDetailService;
import com.yami.shop.user.comment.service.UserScoreLogService;
import lombok.AllArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Objects;

/**
 * 用户积分记录
 *
 * @author LGH
 * @date 2020-02-26 16:03:14
 */
@Service
@AllArgsConstructor
public class UserScoreLogServiceImpl extends ServiceImpl<UserScoreLogMapper, UserScoreLog> implements UserScoreLogService {

    private final UserScoreLogMapper userScoreLogMapper;

    @Override
    public Integer getConsecutiveDays(String userId) {
        return userScoreLogMapper.getConsecutiveDays(userId);
    }

    @Override
    public Page<UserScoreLog> getPage(PageParam<UserScoreLog> page, UserScoreLog userScoreLog) {
        return userScoreLogMapper.getPage(page,userScoreLog);
    }


}
