package com.thhy.staff.modules.biz.applyhistory.service.impl; import com.thhy.staff.modules.biz.applyhistory.entity.UserApplyHistory; import com.thhy.staff.modules.biz.applyhistory.mapper.UserApplyHistoryMapper; import com.thhy.staff.modules.biz.applyhistory.service.UserApplyHistoryService; 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-05-29 16:38:12 */ @Service public class UserApplyHistoryServiceImpl implements UserApplyHistoryService { @Autowired private UserApplyHistoryMapper userApplyHistoryMapper; public UserApplyHistory get(Serializable id){ return userApplyHistoryMapper.queryById(id); } public List findList(UserApplyHistory userApplyHistory){ return userApplyHistoryMapper.findList(userApplyHistory); } /** * 增加和修改 * @param userApplyHistory */ @Transactional public void addUserApplyHistory(UserApplyHistory userApplyHistory){ if(userApplyHistory.getRecordId() == null){ //增加操作 userApplyHistoryMapper.insert(userApplyHistory); }else{ //修改操作 userApplyHistoryMapper.update(userApplyHistory); } } /** * 修改 * @param userApplyHistory */ public void update(UserApplyHistory userApplyHistory){ userApplyHistoryMapper.update(userApplyHistory); } /** * 删除 * @param recordId */ public void delete(Serializable recordId){ userApplyHistoryMapper.deletelogic(recordId); } }