mybatis map文件中 resultMap中column和sql查询结果对应, property和实体private对应
<resultMap id="VideoYcAppResultMap" type="com.video.core.pojo.VideoYcApp" > <id column="CarId" property="carId" jdbcType="BIGINT" />
<id column="VideoId" property="videoId" jdbcType="BIGINT" /> </resultMap>
<sql id="Base_Column_List_Video_App">
c.CarId,v.VideoId,v.Title,v.TotalVisit,v.TotalComment,v.CreatedDate,v.ImageLink,vr.MobileFileLink,Type=2
</sql>
public class VideoYcApp implements Serializable {
private Long carId;
private Long videoId;
private String title; public Long getCarId() {
return carId;
} public void setCarId(Long carId) {
this.carId = carId;
} public Long getVideoId() {
return videoId;
} public void setVideoId(Long videoId) {
this.videoId = videoId;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} }