package com.ruoyi.demo.service.impl;

import com.ruoyi.demo.entity.Exposure;
import com.ruoyi.demo.mapper.ExposureMapper;
import com.ruoyi.demo.service.ExposureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.time.ZoneId;

@Service
@Transactional
public class ExposureServiceImpl implements ExposureService {
    @Autowired
    ExposureMapper exposureMapper;

    @Override
    public int add(Exposure bo) {
        bo.setCreateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
        return exposureMapper.insert(bo);
    }
}
