src/main/java/com/system/service/impl/DatiServiceImpl.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.system.service.impl;
import com.system.mapper.CollegeMapper;
import com.system.mapper.SelectedcourseMapper;
import com.system.mapper.DatiMapper;
import com.system.po.*;
import com.system.service.DatiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class DatiServiceImpl implements DatiService {
@Autowired
private DatiMapper courseMapper;
public void upadteById(Integer id, Dati courseCustom) throws Exception {
courseMapper.updateByPrimaryKey(courseCustom);
}
public Boolean save(Dati couseCustom) throws Exception {
return courseMapper.insert(couseCustom)>0;
}
public Dati findById(Integer id) throws Exception {
Dati course = courseMapper.selectByPrimaryKey(id);
return course;
}
public List<Dati> findByStuID(Integer id) throws Exception {
DatiExample courseExample = new DatiExample();
//自定义查询条件
DatiExample.Criteria criteria = courseExample.createCriteria();
//根据教师id查选题
criteria.andStuidEqualTo(id);
List<Dati> list = courseMapper.selectByExample(courseExample);
return list;
}
public List<Dati> findByTeaID(Integer id) throws Exception{
List<Dati> list = courseMapper.selectdati(id);
return list;
}
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。