package com.jcdm.main.bs.technologyRouteChild.service.impl; import com.jcdm.common.utils.DateUtils; import com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo; import com.jcdm.main.bs.technologyRouteChild.mapper.BsTechnologyRouteChildInfoMapper; import com.jcdm.main.bs.technologyRouteChild.service.IBsTechnologyRouteChildInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import static org.apache.commons.lang3.SystemUtils.getUserName; /** * 工艺路线子信息Service业务层处理 * * @author ruimin * @date 2023-12-09 */ @Service public class BsTechnologyRouteChildInfoServiceImpl implements IBsTechnologyRouteChildInfoService { @Autowired private BsTechnologyRouteChildInfoMapper bsTechnologyRouteChildInfoMapper; /** * 查询工艺路线子信息 * * @param id 工艺路线子信息主键 * @return 工艺路线子信息 */ @Override public BsTechnologyRouteChildInfo selectBsTechnologyRouteChildInfoById(Long id) { return bsTechnologyRouteChildInfoMapper.selectBsTechnologyRouteChildInfoById(id); } /** * 查询工艺路线子信息列表 * * @param bsTechnologyRouteChildInfo 工艺路线子信息 * @return 工艺路线子信息 */ @Override public List selectBsTechnologyRouteChildInfoList(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo) { return bsTechnologyRouteChildInfoMapper.selectBsTechnologyRouteChildInfoList(bsTechnologyRouteChildInfo); } /** * 新增工艺路线子信息 * * @param bsTechnologyRouteChildInfo 工艺路线子信息 * @return 结果 */ @Override public int insertBsTechnologyRouteChildInfo(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo) { bsTechnologyRouteChildInfo.setCreateTime(DateUtils.getNowDate()); bsTechnologyRouteChildInfo.setCreateUser(getUserName()); return bsTechnologyRouteChildInfoMapper.insertBsTechnologyRouteChildInfo(bsTechnologyRouteChildInfo); } /** * 修改工艺路线子信息 * * @param bsTechnologyRouteChildInfo 工艺路线子信息 * @return 结果 */ @Override public int updateBsTechnologyRouteChildInfo(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo) { bsTechnologyRouteChildInfo.setUpdateTime(DateUtils.getNowDate()); bsTechnologyRouteChildInfo.setUpdateUser(getUserName()); return bsTechnologyRouteChildInfoMapper.updateBsTechnologyRouteChildInfo(bsTechnologyRouteChildInfo); } /** * 批量删除工艺路线子信息 * * @param ids 需要删除的工艺路线子信息主键 * @return 结果 */ @Override public int deleteBsTechnologyRouteChildInfoByIds(Long[] ids) { return bsTechnologyRouteChildInfoMapper.deleteBsTechnologyRouteChildInfoByIds(ids); } /** * 删除工艺路线子信息信息 * * @param id 工艺路线子信息主键 * @return 结果 */ @Override public int deleteBsTechnologyRouteChildInfoById(Long id) { return bsTechnologyRouteChildInfoMapper.deleteBsTechnologyRouteChildInfoById(id); } @Override public List selectAllTechnologyRouteByProductCode(String productCode) { return bsTechnologyRouteChildInfoMapper.selectAllTechnologyRouteByProductCode(productCode); } }