package com.yst.ovls.dao;
import com.yst.ovls.entity.Course;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
public interface CourseMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table course
*
* @mbg.generated Mon Jan 07 11:58:20 CST 2019
*/
@Delete({
"delete from course",
"where id = #{id,jdbcType=INTEGER}"
})
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table course
*
* @mbg.generated Mon Jan 07 11:58:20 CST 2019
*/
@Insert({
"insert into course (id, name, ",
"intro, learn_count, ",
"difficulty, score, ",
"image, publish_time, ",
"price, subject_id, ",
"direction_id, learn_time)",
"values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
"#{intro,jdbcType=VARCHAR}, #{learnCount,jdbcType=INTEGER}, ",
"#{difficulty,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, ",
"#{image,jdbcType=VARCHAR}, #{publishTime,jdbcType=TIMESTAMP}, ",
"#{price,jdbcType=INTEGER}, #{subjectId,jdbcType=INTEGER}, ",
"#{directionId,jdbcType=INTEGER}, #{learnTime,jdbcType=INTEGER})"
})
int insert(Course record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table course
*
* @mbg.generated Mon Jan 07 11:58:20 CST 2019
*/
@InsertProvider(type=CourseSqlProvider.class, method="insertSelective")
int insertSelective(Course record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table course
*
* @mbg.generated Mon Jan 07 11:58:20 CST 2019
*/
@Select({
"select",
"id, name, intro, learn_count, difficulty, score, image, publish_time, price, ",
"subject_id, direction_id, learn_time",
"from course",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="intro", property="intro", jdbcType=JdbcType.VARCHAR),
@Result(column="learn_count", property="learnCount", jdbcType=JdbcType.INTEGER),
@Result(column="difficulty", property="difficulty", jdbcType=JdbcType.VARCHAR),
@Result(column="score", property="score", jdbcType=JdbcType.INTEGER),
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
@Result(column="publish_time", property="publishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="price", property="price", jdbcType=JdbcType.INTEGER),
@Result(column="subject_id", property="subjectId", jdbcType=JdbcType.INTEGER),
@Result(column="direction_id", property="directionId", jdbcType=JdbcType.INTEGER),
@Result(column="learn_time", property="learnTime", jdbcType=JdbcType.INTEGER)
})
Course selectByPrimaryKey(Integer id);
/*
* @Description:
* @Author: yanshitong
* @Date: 2019/3/22 22:41
* @Param:[]
* @Return: java.util.List<com.yst.ovls.entity.Course>
* @Exception: 获取所有课程
*/
@Select({
"select",
"c.id, c.name, intro, learn_count, difficulty, score, image, publish_time, price, ",
"s.name subjectName, d.name directionName, learn_time",
"from course c , direction d, subject s",
"where c.subject_id = s.id and c.direction_id=d.id order by c.id"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="intro", property="intro", jdbcType=JdbcType.VARCHAR),
@Result(column="learn_count", property="learnCount", jdbcType=JdbcType.INTEGER),
@Result(column="difficulty", property="difficulty", jdbcType=JdbcType.VARCHAR),
@Result(column="score", property="score", jdbcType=JdbcType.INTEGER),
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
@Result(column="publish_time", property="publishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="price", property="price", jdbcType=JdbcType.INTEGER),
@Result(column="subject_id", property="subjectId", jdbcType=JdbcType.INTEGER),
@Result(column="direction_id", property="directionId", jdbcType=JdbcType.INTEGER),
@Result(column="learn_time", property="learnTime", jdbcType=JdbcType.INTEGER)
})
List<Course> selectCourses();
/**
* 查询免费好课,价格为零,按照评价、访问量排序
*/
@Select({
"select",
"id, name, intro, learn_count, difficulty, score, image, publish_time, price, ",
"subject_id, direction_id, learn_time",
"from course",
"where price = 0",
"order by score desc,learn_count desc"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="intro", property="intro", jdbcType=JdbcType.VARCHAR),
@Result(column="learn_count", property="learnCount", jdbcType=JdbcType.INTEGER),
@Result(column="difficulty", property="difficulty", jdbcType=JdbcType.VARCHAR),
@Result(column="score", property="score", jdbcType=JdbcType.INTEGER),
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
@Result(column="publish_time", property="publishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="price", property="price", jdbcType=JdbcType.INTEGER),
@Result(column="subject_id", property="subjectId", jdbcType=JdbcType.INTEGER),
@Result(column="direction_id", property="directionId", jdbcType=JdbcType.INTEGER),
@Result(column="learn_time", property="learnTime", jdbcType=JdbcType.INTEGER)
})
List<Course> selectFreeCourse();
//模糊查询
@Select({
"select ",
"id, name, intro, learn_count, difficulty, score, image, publish_time, price, ",
"subject_id, direction_id, learn_time",
"from course",
"where name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%') ",
"order by learn_count desc"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="intro", property="intro", jdbcType=JdbcType.VARCHAR),
@Result(column="learn_count", property="learnCount", jdbcType=JdbcType.INTEGER),
@Result(column="difficulty", property="difficulty", jdbcType=JdbcType.VARCHAR),
@Result(column="score", property="score", jdbcType=JdbcType.INTEGER),
@Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
@Result(column="publish_time", property="publishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="price", property="price", jdbcType=JdbcType.INTEGER),
@Result(column="subject_id", property="subjectId", jdbcType=JdbcType.INTEGER),
@Result(column="direction_id", property="directionId", jdbcType=JdbcType.INTEGER),
@Result(column="learn_time", property="learnTime", jdbcType=JdbcType.INTEGER)
})
Lis
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计 在线视频学习系统.zip (1125个子文件)
JDK_API_1_6_zh_CN.CHM 35.12MB
HTML5.CHM 194KB
ORACLE.chm 63KB
amazeui.min.css 249KB
amazeui.min.css 249KB
amazeui.min.css 249KB
bootstrap.css 144KB
bootstrap.css 144KB
lv_course_4.css 139KB
bootstrap_v.css 138KB
bootstrap_v.css 138KB
zym_course_center.css 135KB
a.css 127KB
a.css 127KB
a.css 127KB
lv_course_2.css 125KB
bootstrap.min.css 120KB
bootstrap.min.css 120KB
lv_course_3.css 116KB
mian.css 112KB
mian.css 112KB
mian.css 112KB
qadetailnew-less.css,course_code.css 111KB
qadetailnew-less.css,course_code.css 111KB
qadetailnew-less.css,course_code.css 111KB
mocoplayer.css 95KB
mocoplayer.css 95KB
mocoplayer.css 95KB
qadetailnew-less.css,course_code.css 94KB
lv_course_1.css 91KB
home-less.css 91KB
home-less.css 91KB
content.css 70KB
content.css 70KB
content.css 70KB
lv-base.css 68KB
course_list-v2-less.css 68KB
course_list-v2-less.css 68KB
course_list-v2-less.css 68KB
layui.css 68KB
lv-common-less.css 52KB
moco.min.css 30KB
moco.css 30KB
moco.min.css 30KB
moco.css 30KB
moco.min.css 30KB
moco.css 30KB
moco.min.css 26KB
moco.min.css 26KB
bootstrap-theme.css 26KB
bootstrap-theme.css 26KB
style.css 24KB
bootstrap-theme.min.css 23KB
bootstrap-theme.min.css 23KB
select2.css 19KB
select2.css 19KB
select2.css 19KB
select2.css 19KB
select2.css 19KB
muke.css 16KB
muke.css 16KB
muke.css 16KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
tinymce.css 9KB
default.css 9KB
profile-less.css 8KB
profile-less.css 8KB
profile-less.css 8KB
common-less.css 7KB
common-less.css 7KB
common-less.css 7KB
button.css 7KB
button.css 7KB
button.css 7KB
lv_course_5.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
demo.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
amazeui.cropper.css 5KB
amazeui.cropper.css 5KB
amazeui.cropper.css 5KB
login2.css 5KB
login2.css 5KB
login2.css 5KB
share_style0_16.css 5KB
share_style0_16.css 5KB
share_style0_16.css 5KB
base.css 4KB
willesPlay.css 4KB
willesPlay.css 4KB
共 1125 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
马coder
- 粉丝: 1203
- 资源: 6602
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Pytorch-pytorch深度学习教程之逻辑回归.zip
- Pytorch-pytorch深度学习教程之双向循环网络.zip
- Pytorch-pytorch深度学习教程之卷积神经网络.zip
- Pytorch-pytorch深度学习教程之前馈神经网络.zip
- Pytorch-pytorch深度学习教程之线性回归.zip
- Pytorch-pytorch深度学习教程之基本操作.zip
- 基于QT的地图可视化桌面系统后台数据库为MySQL5.7源码.zip
- 基于simulink的PLL锁相环系统仿真【包括模型,文档,参考文献,操作步骤】
- 基于EM-GMM模型的目标跟踪和异常行为检测matlab仿真【包括程序,注释,参考文献,操作步骤,说明文档】
- 2109010044_胡晨燕_选课管理数据库设计与实现.prj
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功