package org.jeecg.modules.ctop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.ctop.entity.ReleaseRecord;
import org.jeecg.modules.ctop.mapper.ReleaseRecordMapper;
import org.jeecg.modules.ctop.service.IReleaseRecordService;
import org.springframework.stereotype.Service;

/**
 * 发版记录信息
 * @author jeecg-boot
 * @date   2020-06-10
 * @version V1.0
 */
@Service
public class ReleaseRecordServiceImpl extends ServiceImpl<ReleaseRecordMapper, ReleaseRecord> implements IReleaseRecordService {

    @Override
    public ReleaseRecord getLastRecord() {
        QueryWrapper<ReleaseRecord>queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("id").last("limit 1");
        return this.getOne(queryWrapper);
    }
}
