package com.yzdx.AiInterviewer.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yzdx.AiInterviewer.entity.LogoEntity; import com.yzdx.AiInterviewer.mapper.InterviewLogoMapper; import com.yzdx.AiInterviewer.service.InterviewLogoService; import com.yzdx.AiInterviewer.utiles.TimeUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class InterviewLogoServiceImpl extends ServiceImpl implements InterviewLogoService { @Autowired private InterviewLogoMapper logoMapper; @Override public List getLogoList(String encoding) { LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(LogoEntity::getEncoding,encoding); List logoList = logoMapper.selectList(queryWrapper); return logoList; } @Override public Integer addAddLogo(String name, String encoding, String image, Integer userId,String filename) { LogoEntity logoEntity=new LogoEntity(); logoEntity.setCreateUser(userId); logoEntity.setCreateTime(TimeUtil.getTime()); logoEntity.setImage(image); logoEntity.setPicName(name); logoEntity.setEncoding(encoding); logoEntity.setFilename(filename); Integer rows = logoMapper.insert(logoEntity); return rows; } @Override public Integer deleteLogoById(Integer id) { Integer rows = logoMapper.deleteById(id); return rows; } }