9afb598eb300dbd3e18bbfcff4e8b05e30cb3c33.svn-base 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package cn.com.goldenwater.dcproj.service.impl.fjpjmgdp;
  2. import cn.com.goldenwater.core.service.AbstractCrudService;
  3. import cn.com.goldenwater.dcproj.dao.AttFjpjmgdpBaseDao;
  4. import cn.com.goldenwater.dcproj.model.AttFjpjmgdpBase;
  5. import cn.com.goldenwater.dcproj.param.AttFjpjmgdpBaseParam;
  6. import cn.com.goldenwater.dcproj.service.AttFjpjmgdpBaseService;
  7. import cn.com.goldenwater.id.util.UuidUtil;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Service;
  10. import org.springframework.transaction.annotation.Transactional;
  11. import java.util.Date;
  12. /**
  13. * @author lhc
  14. * @date 2023-11-8
  15. */
  16. @Service
  17. @Transactional
  18. public class AttFjpjmgdpBaseServiceImpl extends AbstractCrudService<AttFjpjmgdpBase, AttFjpjmgdpBaseParam> implements AttFjpjmgdpBaseService {
  19. @Autowired
  20. private AttFjpjmgdpBaseDao attFjpjmgdpBaseDao;
  21. public AttFjpjmgdpBaseServiceImpl(AttFjpjmgdpBaseDao attFjpjmgdpBaseDao) {
  22. super(attFjpjmgdpBaseDao);
  23. this.attFjpjmgdpBaseDao = attFjpjmgdpBaseDao;
  24. }
  25. @Override
  26. public int insert(AttFjpjmgdpBase attFjpjmgdpBase) {
  27. String uuid = UuidUtil.uuid(); // 生成uuid
  28. attFjpjmgdpBase.setId(uuid);
  29. attFjpjmgdpBase.setIntm(new Date());
  30. attFjpjmgdpBase.setUptm(new Date());
  31. attFjpjmgdpBase.setDataStat("0");
  32. if(null == attFjpjmgdpBase.getIsCnfm() ){
  33. attFjpjmgdpBase.setIsCnfm("1");
  34. }
  35. return this.attFjpjmgdpBaseDao.insert(attFjpjmgdpBase);
  36. }
  37. @Override
  38. public int update(AttFjpjmgdpBase attFjpjmgdpBase) {
  39. attFjpjmgdpBase.setUptm(new Date());
  40. return this.attFjpjmgdpBaseDao.update(attFjpjmgdpBase);
  41. }
  42. @Override
  43. public int delete(String id) {
  44. return this.attFjpjmgdpBaseDao.delete(id);
  45. }
  46. @Override
  47. public AttFjpjmgdpBase getObjId(String objId) {
  48. return attFjpjmgdpBaseDao.getObjId(objId);
  49. }
  50. }