package com.yc.education.service.impl;

import com.yc.education.mapper.PrizeMapper;
import com.yc.education.mapper.UserMapper;
import com.yc.education.model.Prize;
import com.yc.education.model.User;
import com.yc.education.service.PrizeService;
import com.yc.education.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author QuZhangJing
 * @Date 2019/4/1 15:08
 * @Version 1.0
 */
@Service
public class PrizeServiceImpl extends BaseService<Prize> implements PrizeService {

    @Autowired
    PrizeMapper prizeMapper;

    @Override
    public List<Prize> getAll() {
        return prizeMapper.getAll();
    }

    @Override
    public void updatePrize(String pname) {
        prizeMapper.updatePrize(pname);
    }

    @Override
    public Integer getLv(Integer id) {
        return prizeMapper.getLv(id);
    }

    @Override
    public Integer delPrize(Integer id) {
        return prizeMapper.delPrize(id);
    }

    public Prize queryPrizeById(Integer id){
        return prizeMapper.queryPrizeById(id);
    }

    @Override
    public void updatePrizeByPid(Prize prize) {
        prizeMapper.updatePrizeByPid(prize);
    }

    @Override
    public void addPrize(Prize prize) {
        prizeMapper.addPrize(prize);
    }

}
