package com.yeejoin.amos.boot.module.tdc.biz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.tdc.api.entity.SubmitRecord;
import com.yeejoin.amos.boot.module.tdc.api.mapper.SubmitRecordMapper;
import com.yeejoin.amos.boot.module.tdc.api.service.SubmitRecordService;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;


/**
 * @author DELL
 */
@Service
public class SubmitRecordServiceImpl extends ServiceImpl<SubmitRecordMapper, SubmitRecord> implements SubmitRecordService {

    @Override
    public int saveSubmitRecord(SubmitRecord submitRecord) {
        return this.baseMapper.insert(submitRecord);
    }

    @Override
    public SubmitRecord updateById(Long sequenceNbr, String batchNo) {
        SubmitRecord submitRecord = this.getById(sequenceNbr);
        submitRecord.setBatchNo(batchNo);
        this.updateById(submitRecord);
        return submitRecord;
    }
}
