package com.trs.ggzyexchange.service.impl;

import com.trs.ggzyexchange.entity.CqSwIssueBulletin;
import com.trs.ggzyexchange.mapper.CqSwIssueBulletinMapper;
import com.trs.ggzyexchange.service.CqSwIssueBulletinService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 挂牌披露信息 服务实现类
 * </p>
 *
 * @author trs
 * @since 2023-03-03
 */
@Service
public class CqSwIssueBulletinServiceImpl extends ServiceImpl<CqSwIssueBulletinMapper, CqSwIssueBulletin> implements CqSwIssueBulletinService {


    @Autowired
    private CqSwIssueBulletinMapper cqSwIssueBulletinMapper;

    @Override
    public Long maxDataTimeStamp() {
        Long aLong = cqSwIssueBulletinMapper.maxDataTimeStamp();
        try{
            if(!ObjectUtils.isEmpty(aLong)){
                if(aLong != 0){
                    String sLong = ((aLong+"").substring(0,8)) + "000000";
                    aLong = Long.parseLong(sLong);
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return aLong;
    }
}
