src/com/service/CourseService.java
(完整代码) 931Bpackage com.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import com.dao.CourseDao;
import com.entity.Course;
@Service
public class CourseService {
@Autowired
private CourseDao courseDao;
public boolean add(Course course)
{
return courseDao.insert(course) > 0;
}
public List<Course> getList(String where,int page, int size)
{
return courseDao.getList(where,size*(page-1), size);
}
public boolean delete(int id)
{
return courseDao.deleteByPrimaryKey(id) > 0;
}
public int getTotal(String where)
{
return courseDao.getTotal(where);
}
public Course selectBycourse(Course course)
{
Course course1=courseDao.selectBycourse(course);
return course1;
}
public boolean update(Course course)
{
return courseDao.updateByPrimaryKeySelective(course) > 0;
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
