package cn.com.goldenwater.dcproj.service.impl.rsvr; import cn.com.goldenwater.dcproj.dao.BisInspPresSafeDao; import cn.com.goldenwater.dcproj.model.BisInspPresSafe; import cn.com.goldenwater.dcproj.param.BisInspPresSafeParam; import cn.com.goldenwater.dcproj.service.BisInspPresSafeService; import cn.com.goldenwater.core.service.AbstractCrudService; import com.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import cn.com.goldenwater.id.util.UuidUtil; import java.util.List; import java.util.Date; /** * @author lhc * @date 2021-3-13 */ @Service @Transactional public class BisInspPresSafeServiceImpl extends AbstractCrudService implements BisInspPresSafeService { @Autowired private BisInspPresSafeDao bisInspPresSafeDao; public BisInspPresSafeServiceImpl(BisInspPresSafeDao bisInspPresSafeDao) { super(bisInspPresSafeDao); this.bisInspPresSafeDao = bisInspPresSafeDao; } @Override public int insert(BisInspPresSafe bisInspPresSafe) { String uuid = UuidUtil.uuid(); // 生成uuid bisInspPresSafe.setId(uuid); bisInspPresSafe.setInTm(new Date()); bisInspPresSafe.setUpTm(new Date()); return this.bisInspPresSafeDao.insert(bisInspPresSafe); } @Override public int update(BisInspPresSafe bisInspPresSafe) { bisInspPresSafe.setUpTm(new Date()); return this.bisInspPresSafeDao.update(bisInspPresSafe); } @Override public int delete(String id) { return this.bisInspPresSafeDao.delete(id); } }