package com.steerinfo.ems.tsubmitted.service.impl;

import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.framework.service.impl.BaseServiceImpl;
import com.steerinfo.ems.tsubmitted.model.TSubmitted;
import com.steerinfo.ems.tsubmitted.mapper.TSubmittedMapper;
import com.steerinfo.ems.tsubmitted.service.ITSubmittedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.math.BigDecimal;

/**
 * TSubmitted服务实现：
 * @author generator
 * @version 1.0-SNAPSHORT 2022-06-10 04:08
 * 类描述
 * 修订历史：
 * 日期：2022-06-10
 * 作者：generator
 * 参考：
 * 描述：TSubmitted服务实现
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
@Service(value = "tSubmittedService")
public class TSubmittedServiceImpl extends BaseServiceImpl<TSubmitted, String> implements ITSubmittedService {

    @Autowired
    private TSubmittedMapper tSubmittedMapper;

    @Override
    protected IBaseMapper<TSubmitted, String> getMapper() {
        return tSubmittedMapper;
    }

    @Override
    public Integer MaxID(String mouth) {
        Integer maxId = tSubmittedMapper.selectMaxId(mouth);
        if (maxId == null || maxId == 0) {
            maxId = 1;
        } else {
            maxId = maxId + 1;
        }
        return maxId;
    }

    @Override
    public Integer upstate(TSubmitted t) {
        int count = tSubmittedMapper.updateByPrimaryKey(t);
        return count;
    }
}
