package com.ho.user.service.impl;


import com.ho.user.entity.IdControl;
import com.ho.user.mapper.IdControlMapper;
import com.ho.user.service.IdControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName IdControlService.java
 * @Description TODO
 * @createTime 2022年09月22日 09:21:00
 */

@Service
public class IdControlServiceImpl implements IdControlService{
    @Autowired
    private IdControlMapper idControlMapper;

    @Override
    public Integer insert(IdControl control) {
        Integer insert = idControlMapper.insert(control);
        return insert;

    }
    @Override
    public IdControl selectCurrentVal(String type) {
        IdControl idControl = idControlMapper.selectCurrentVal(type);
        return idControl;
    }

    @Override
    public void updateCurrentVal(String type,Integer currentVal) {
        idControlMapper.updateCurrentVal(type,currentVal);
    }
}
