src/main/java/com/system/service/impl/ZuoyeServiceImpl.java

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.system.service.impl;

import com.system.mapper.ZuoyeMapper;
import com.system.po.Zuoye;
import com.system.po.ZuoyeExample;
import com.system.service.ZuoyeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ZuoyeServiceImpl implements ZuoyeService {


    @Autowired
    private ZuoyeMapper courseMapper;


    public void upadteById(Integer id, Zuoye courseCustom) throws Exception {
        courseMapper.updateByPrimaryKey(courseCustom);
    }




    public Boolean save(Zuoye couseCustom) throws Exception {

        return     courseMapper.insert(couseCustom)>0;

    }



    public Zuoye findById(Integer id) throws Exception {
        Zuoye course = courseMapper.selectByPrimaryKey(id);

        return course;
    }



    public List<Zuoye> findByteaID(Integer id) throws Exception {
        ZuoyeExample courseExample = new ZuoyeExample();
        //自定义查询条件
        ZuoyeExample.Criteria criteria = courseExample.createCriteria();
        //根据教师id查选题
        criteria.andTeaidEqualTo(id);
        List<Zuoye> list = courseMapper.selectByExample(courseExample);
        return list;
    }

    public List<Zuoye> findList() throws Exception{
        ZuoyeExample courseExample = new ZuoyeExample();
        //自定义查询条件
        ZuoyeExample.Criteria criteria = courseExample.createCriteria();
        List<Zuoye> list = courseMapper.selectByExample(courseExample);
        return list;
    }
后面还有 3 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。