package com.flossom.miniProgram.service.impl;


import com.flossom.common.core.domain.entity.WxUserIntegralLog;
import com.flossom.common.core.domain.entity.WxUserMember;
import com.flossom.common.core.mapper.WxUserIntegralLogMapper;
import com.flossom.common.security.utils.SecurityUtils;
import com.flossom.miniProgram.service.IWxUserIntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxUserIntegralServiceImpl implements IWxUserIntegralService {

    @Autowired
    private WxUserIntegralLogMapper wxUserIntegralLogMapper;

    @Override
    public List<WxUserIntegralLog> obtainUserIntegral() {
        WxUserMember wxUserMember = SecurityUtils.getLoginUser().getWxUserMember();
        return wxUserIntegralLogMapper.obtainUserIntegral(wxUserMember.getId());
    }
}
