package com.ruoyi.basic.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.basic.mapper.*; import com.ruoyi.basic.pojo.*; import com.ruoyi.basic.service.*; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import java.time.LocalDateTime; @Service @AllArgsConstructor public class IfsInventoryQuantityServiceImpl extends ServiceImpl implements IfsInventoryQuantityService { private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; @Override public int addIfsInventory(IfsInventoryQuantity ifsInventoryQuantity) { ifsInventoryQuantity.setDeclareDate(LocalDateTime.now()); if (ifsInventoryQuantity.getId() ==null){ ifsInventoryQuantity.setState(0); ifsInventoryQuantity.setIsInspect(1); return ifsInventoryQuantityMapper.insert(ifsInventoryQuantity); }else { return ifsInventoryQuantityMapper.updateById(ifsInventoryQuantity); } } @Override public int delIfsInventory(Integer id) { return ifsInventoryQuantityMapper.deleteById(id); } }