package cn.com.goldenwater.dcproj.service.impl; import cn.com.goldenwater.dcproj.dao.BisInspWrwsRgstrWtupDao; import cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup; import cn.com.goldenwater.dcproj.param.BisInspWrwsRgstrWtupParam; import cn.com.goldenwater.dcproj.service.BisInspWrwsRgstrWtupService; import cn.com.goldenwater.core.service.AbstractCrudService; import com.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import cn.com.goldenwater.id.util.UuidUtil; import java.util.List; import java.util.Date; /** * @author lhc * @date 2020-9-23 */ @Service @Transactional public class BisInspWrwsRgstrWtupServiceImpl extends AbstractCrudService implements BisInspWrwsRgstrWtupService { @Autowired private BisInspWrwsRgstrWtupDao bisInspWrwsRgstrWtupDao; public BisInspWrwsRgstrWtupServiceImpl(BisInspWrwsRgstrWtupDao bisInspWrwsRgstrWtupDao) { super(bisInspWrwsRgstrWtupDao); this.bisInspWrwsRgstrWtupDao = bisInspWrwsRgstrWtupDao; } @Override public int insert(BisInspWrwsRgstrWtup bisInspWrwsRgstrWtup) { String uuid = UuidUtil.uuid(); // 生成uuid bisInspWrwsRgstrWtup.setId(uuid); bisInspWrwsRgstrWtup.setIntm(new Date()); bisInspWrwsRgstrWtup.setUptm(new Date()); bisInspWrwsRgstrWtup.setDataStat("0"); return this.bisInspWrwsRgstrWtupDao.insert(bisInspWrwsRgstrWtup); } @Override public int update(BisInspWrwsRgstrWtup bisInspWrwsRgstrWtup) { bisInspWrwsRgstrWtup.setUptm(new Date()); return this.bisInspWrwsRgstrWtupDao.update(bisInspWrwsRgstrWtup); } @Override public int delete(String id) { return this.bisInspWrwsRgstrWtupDao.delete(id); } }