package com.muyu.service.serviceImpl; import com.muyu.domain.EngineLevelEntity; import com.muyu.domain.constants.Result; import com.muyu.mapper.EnginLevelMapper; import com.muyu.service.EngineLevelService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Author:qdm * @Package:com.muyu.service.serviceImpl * @Project:cloud-etl-engine * @name:EngineLevelServiceImpl * @Date:2024/8/25 18:52 */ @Service public class EngineLevelServiceImpl implements EngineLevelService { @Autowired EnginLevelMapper enginLevelMapper; @Override public List selectLevelList() { List lists = enginLevelMapper.selectLevelList(); return lists; } @Override public Result insert(EngineLevelEntity engineLevelEntity) { Integer res = enginLevelMapper.insert(engineLevelEntity); if (res > 0) { return Result.success(engineLevelEntity); } return Result.error(); } @Override public Result update(EngineLevelEntity engineLevelEntity) { Integer res = enginLevelMapper.update(engineLevelEntity); if (res > 0) { return Result.success(engineLevelEntity); } return Result.error(); } @Override public Result delete(Integer id) { Integer res = enginLevelMapper.delete(id); if (res > 0) { return Result.success(); } return Result.error(); } @Override public Result deleteBatch(Integer[] ids) { Integer res = enginLevelMapper.deleteBatch(ids); if (res > 0) { return Result.success(); } return Result.error(); } @Override public Result selectById(Integer id) { EngineLevelEntity engineLevelEntity = enginLevelMapper.selectById(id); if (engineLevelEntity != null) { return Result.success(engineLevelEntity); } return Result.error(); } @Override public List selectLevelLists() { List list = enginLevelMapper.lists(); return list; } }