package com.thhy.materials.modules.biz.gpshis.service.impl; import com.thhy.materials.modules.biz.gpshis.entity.GpsHistory; import com.thhy.materials.modules.biz.gpshis.mapper.GpsHistoryMapper; import com.thhy.materials.modules.biz.gpshis.service.GpsHistoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.List; /** * 服务实现类 * @author zhang_xiao_bo * @since 2023-08-26 19:34:33 */ @Service public class GpsHistoryServiceImpl implements GpsHistoryService { @Autowired private GpsHistoryMapper gpsHistoryMapper; public GpsHistory get(Serializable id){ return gpsHistoryMapper.queryById(id); } public List findList(GpsHistory gpsHistory){ return gpsHistoryMapper.findList(gpsHistory); } /** * 增加和修改 * @param gpsHistory */ @Transactional public void addGpsHistory(GpsHistory gpsHistory){ if(gpsHistory.getId() == null){ //增加操作 gpsHistoryMapper.insert(gpsHistory); }else{ //修改操作 gpsHistoryMapper.update(gpsHistory); } } /** * 修改 * @param gpsHistory */ public void update(GpsHistory gpsHistory){ gpsHistoryMapper.update(gpsHistory); } /** * 删除 * @param id */ public void delete(Serializable id){ gpsHistoryMapper.deletelogic(id); } }