68f1194c17ee3479562002ad5b6d4e46c157ea00.svn-base 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package cn.com.goldenwater.dcproj.service.impl.rsvr;
  2. import cn.com.goldenwater.dcproj.dao.BisInspPresSafeDao;
  3. import cn.com.goldenwater.dcproj.model.BisInspPresSafe;
  4. import cn.com.goldenwater.dcproj.param.BisInspPresSafeParam;
  5. import cn.com.goldenwater.dcproj.service.BisInspPresSafeService;
  6. import cn.com.goldenwater.core.service.AbstractCrudService;
  7. import com.github.pagehelper.PageHelper;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Service;
  10. import org.springframework.transaction.annotation.Transactional;
  11. import cn.com.goldenwater.id.util.UuidUtil;
  12. import java.util.List;
  13. import java.util.Date;
  14. /**
  15. * @author lhc
  16. * @date 2021-3-13
  17. */
  18. @Service
  19. @Transactional
  20. public class BisInspPresSafeServiceImpl extends AbstractCrudService<BisInspPresSafe, BisInspPresSafeParam> implements BisInspPresSafeService {
  21. @Autowired
  22. private BisInspPresSafeDao bisInspPresSafeDao;
  23. public BisInspPresSafeServiceImpl(BisInspPresSafeDao bisInspPresSafeDao) {
  24. super(bisInspPresSafeDao);
  25. this.bisInspPresSafeDao = bisInspPresSafeDao;
  26. }
  27. @Override
  28. public int insert(BisInspPresSafe bisInspPresSafe) {
  29. String uuid = UuidUtil.uuid(); // 生成uuid
  30. bisInspPresSafe.setId(uuid);
  31. bisInspPresSafe.setInTm(new Date());
  32. bisInspPresSafe.setUpTm(new Date());
  33. return this.bisInspPresSafeDao.insert(bisInspPresSafe);
  34. }
  35. @Override
  36. public int update(BisInspPresSafe bisInspPresSafe) {
  37. bisInspPresSafe.setUpTm(new Date());
  38. return this.bisInspPresSafeDao.update(bisInspPresSafe);
  39. }
  40. @Override
  41. public int delete(String id) {
  42. return this.bisInspPresSafeDao.delete(id);
  43. }
  44. }