ee4b0202cb0e7cb99a458d015ee634b11b9edb14.svn-base 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package cn.com.goldenwater.dcproj.service.impl;
  2. import cn.com.goldenwater.dcproj.dao.BisInspWrwsRgstrWtutDao;
  3. import cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut;
  4. import cn.com.goldenwater.dcproj.param.BisInspWrwsRgstrWtutParam;
  5. import cn.com.goldenwater.dcproj.service.BisInspWrwsRgstrWtutService;
  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 2020-9-23
  17. */
  18. @Service
  19. @Transactional
  20. public class BisInspWrwsRgstrWtutServiceImpl extends AbstractCrudService<BisInspWrwsRgstrWtut, BisInspWrwsRgstrWtutParam> implements BisInspWrwsRgstrWtutService {
  21. @Autowired
  22. private BisInspWrwsRgstrWtutDao bisInspWrwsRgstrWtutDao;
  23. public BisInspWrwsRgstrWtutServiceImpl(BisInspWrwsRgstrWtutDao bisInspWrwsRgstrWtutDao) {
  24. super(bisInspWrwsRgstrWtutDao);
  25. this.bisInspWrwsRgstrWtutDao = bisInspWrwsRgstrWtutDao;
  26. }
  27. @Override
  28. public int insert(BisInspWrwsRgstrWtut bisInspWrwsRgstrWtut) {
  29. String uuid = UuidUtil.uuid(); // 生成uuid
  30. bisInspWrwsRgstrWtut.setId(uuid);
  31. bisInspWrwsRgstrWtut.setIntm(new Date());
  32. bisInspWrwsRgstrWtut.setUptm(new Date());
  33. bisInspWrwsRgstrWtut.setDataStat("0");
  34. return this.bisInspWrwsRgstrWtutDao.insert(bisInspWrwsRgstrWtut);
  35. }
  36. @Override
  37. public int update(BisInspWrwsRgstrWtut bisInspWrwsRgstrWtut) {
  38. bisInspWrwsRgstrWtut.setUptm(new Date());
  39. return this.bisInspWrwsRgstrWtutDao.update(bisInspWrwsRgstrWtut);
  40. }
  41. @Override
  42. public int delete(String id) {
  43. return this.bisInspWrwsRgstrWtutDao.delete(id);
  44. }
  45. }