06bc17c6e127a2db11adf3c0cea7b0b95c0a33b1.svn-base 1.9 KB

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