package com.seer.teach.pay.admin.sys.service.impl;

import cn.dev33.satoken.stp.StpUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seer.teach.common.enums.CoinConfigEnableEnum;
import com.seer.teach.common.enums.ResultCodeEnum;
import com.seer.teach.common.utils.AssertUtils;
import com.seer.teach.pay.admin.sys.service.IAdminCoinConfigService;
import com.seer.teach.pay.entity.CoinConfigEntity;
import com.seer.teach.pay.mapper.CoinConfigMapper;
import com.seer.teach.pay.service.ICoinConfigService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 学豆配置表 服务实现类
 * </p>
 *
 * @author Wang
 * @since 2025-06-17
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class AdminCoinConfigServiceImpl implements IAdminCoinConfigService {

    private final ICoinConfigService coinConfigService;

    @Override
    public boolean create(CoinConfigEntity coinConfigEntity) {
        return coinConfigService.create(coinConfigEntity);
    }

    @Override
    public boolean update(CoinConfigEntity coinConfigEntity) {
        return coinConfigService.update(coinConfigEntity);
    }

    @Override
    public List<CoinConfigEntity> list() {
        return coinConfigService.list();
    }

    @Override
    public CoinConfigEntity getById(Integer id) {
        return coinConfigService.getById( id);
    }

    @Override
    public boolean delete(Integer id) {
        return coinConfigService.removeById( id);
    }
}