cloud-etl-engine/cloud-etl-server/src/main/java/com/muyu/service/serviceImpl/EngineLevelServiceImpl.java

82 lines
2.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
/**
* @Authorqdm
* @Packagecom.muyu.service.serviceImpl
* @Projectcloud-etl-engine
* @nameEngineLevelServiceImpl
* @Date2024/8/25 18:52
*/
@Service
public class EngineLevelServiceImpl implements EngineLevelService {
@Autowired
EnginLevelMapper enginLevelMapper;
@Override
public List<EngineLevelEntity> selectLevelList() {
List<EngineLevelEntity> lists = enginLevelMapper.selectLevelList();
return lists;
}
@Override
public Result<EngineLevelEntity> insert(EngineLevelEntity engineLevelEntity) {
Integer res = enginLevelMapper.insert(engineLevelEntity);
if (res > 0) {
return Result.success(engineLevelEntity);
}
return Result.error();
}
@Override
public Result<EngineLevelEntity> 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<EngineLevelEntity> selectLevelLists() {
List<EngineLevelEntity> list = enginLevelMapper.lists();
return list;
}
}