yl-backend/src/main/resources/mapper/CoursesMapper.xml

24 lines
1.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.guwan.backend.mapper.CoursesMapper">
<resultMap id="BaseResultMap" type="com.guwan.backend.pojo.Course">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="title" column="title" jdbcType="VARCHAR"/>
<result property="categoryId" column="category_id" jdbcType="VARCHAR"/>
<result property="categoryName" column="category_name" jdbcType="VARCHAR"/>
<result property="coverImg" column="cover_img" jdbcType="VARCHAR"/>
<result property="studentCount" column="student_count" jdbcType="INTEGER"/>
<result property="rating" column="rating" jdbcType="DECIMAL"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
</resultMap>
<sql id="Base_Column_List">
id,title,category_id,
category_name,cover_img,student_count,
rating,price
</sql>
</mapper>