179c16139c4913e06b736a0c35acd9d55b0bd155.svn-base 1.9 KB

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