8921388c3db00c2a83fed3ccb50529c31bbb77a4.svn-base 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package cn.com.goldenwater.dcproj.service.impl;
  2. import cn.com.goldenwater.dcproj.dao.BisInspWrwxRgstrWtutDao;
  3. import cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWtut;
  4. import cn.com.goldenwater.dcproj.param.BisInspWrwxRgstrWtutParam;
  5. import cn.com.goldenwater.dcproj.service.BisInspWrwxRgstrWtutService;
  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 BisInspWrwxRgstrWtutServiceImpl extends AbstractCrudService<BisInspWrwxRgstrWtut, BisInspWrwxRgstrWtutParam> implements BisInspWrwxRgstrWtutService {
  21. @Autowired
  22. private BisInspWrwxRgstrWtutDao bisInspWrwxRgstrWtutDao;
  23. public BisInspWrwxRgstrWtutServiceImpl(BisInspWrwxRgstrWtutDao bisInspWrwxRgstrWtutDao) {
  24. super(bisInspWrwxRgstrWtutDao);
  25. this.bisInspWrwxRgstrWtutDao = bisInspWrwxRgstrWtutDao;
  26. }
  27. @Override
  28. public int insert(BisInspWrwxRgstrWtut bisInspWrwxRgstrWtut) {
  29. String uuid = UuidUtil.uuid(); // 生成uuid
  30. bisInspWrwxRgstrWtut.setId(uuid);
  31. bisInspWrwxRgstrWtut.setIntm(new Date());
  32. bisInspWrwxRgstrWtut.setUptm(new Date());
  33. bisInspWrwxRgstrWtut.setDataStat("0");
  34. return this.bisInspWrwxRgstrWtutDao.insert(bisInspWrwxRgstrWtut);
  35. }
  36. @Override
  37. public int update(BisInspWrwxRgstrWtut bisInspWrwxRgstrWtut) {
  38. bisInspWrwxRgstrWtut.setUptm(new Date());
  39. return this.bisInspWrwxRgstrWtutDao.update(bisInspWrwxRgstrWtut);
  40. }
  41. @Override
  42. public int delete(String id) {
  43. return this.bisInspWrwxRgstrWtutDao.delete(id);
  44. }
  45. }