package com.aps.core.service.impl; import java.util.List; import com.aps.common.core.utils.DateUtils; import com.aps.common.core.utils.uuid.IdUtils; import com.aps.common.security.utils.SecurityUtils; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.aps.core.mapper.ApsPlantMapper; import com.aps.core.domain.ApsPlant; import com.aps.core.service.IApsPlantService; /** * 工厂管理Service业务层处理 * * @author ruoyi * @date 2025-04-14 */ @Service public class ApsPlantServiceImpl extends ServiceImpl implements IApsPlantService { @Autowired private ApsPlantMapper apsPlantMapper; /** * 查询工厂管理 * * @param id 工厂管理主键 * @return 工厂管理 */ @Override public ApsPlant selectApsPlantById(String id) { return apsPlantMapper.selectApsPlantById(id); } /** * 查询工厂管理列表 * * @param apsPlant 工厂管理 * @return 工厂管理 */ @Override public List selectApsPlantList(ApsPlant apsPlant) { return apsPlantMapper.selectApsPlantList(apsPlant); } /** * 新增工厂管理 * * @param apsPlant 工厂管理 * @return 结果 */ @Override public int insertApsPlant(ApsPlant apsPlant) { apsPlant.setId(IdUtils.fastSimpleUUID()); apsPlant.setCreateTime(DateUtils.getNowDate()); apsPlant.setCreateBy(SecurityUtils.getUsername()); return apsPlantMapper.insertApsPlant(apsPlant); } /** * 修改工厂管理 * * @param apsPlant 工厂管理 * @return 结果 */ @Override public int updateApsPlant(ApsPlant apsPlant) { apsPlant.setUpdateTime(DateUtils.getNowDate()); return apsPlantMapper.updateApsPlant(apsPlant); } /** * 批量删除工厂管理 * * @param ids 需要删除的工厂管理主键 * @return 结果 */ @Override public int deleteApsPlantByIds(String[] ids) { return apsPlantMapper.deleteApsPlantByIds(ids); } /** * 删除工厂管理信息 * * @param id 工厂管理主键 * @return 结果 */ @Override public int deleteApsPlantById(String id) { return apsPlantMapper.deleteApsPlantById(id); } }