关于如何处理Mybatis参数为对象中包含list情况

1.实体类:

import java.math.BigDecimal;
import java.util.Date;


public class T_13_class_note_optionPo {
    private BigDecimal id;

    private BigDecimal checkItemId;

    private String noteTitle;

    private BigDecimal recordMin;

    private String recordType;

    private BigDecimal lessenScore;

    private BigDecimal timeCount;

    private String timeType;

    private String isAuditing;

    private String auditingType;

    private String selectStudent;

    private String selectType;

    private String isMemo;

    private String isUpload;

    private BigDecimal uploadCount;

private String creator;

    private Date createTime;

    private String modifyMan

    private Date modifyTime;

private List list;


    public BigDecimal getId() {
        return id;
    }


    public void setId(BigDecimal id) {
        this.id = id;
    }


    public BigDecimal getCheckItemId() {
        return checkItemId;
    }


    public void setCheckItemId(BigDecimal checkItemId) {
        this.checkItemId = checkItemId;
    }


    public String getNoteTitle() {
        return noteTitle;
    }


    public void setNoteTitle(String noteTitle) {
        this.noteTitle = noteTitle == null ? null : noteTitle.trim();
    }


    public BigDecimal getRecordMin() {
        return recordMin;
    }


    public void setRecordMin(BigDecimal recordMin) {
        this.recordMin = recordMin;
    }


    public String getRecordType() {
        return recordType;
    }


    public void setRecordType(String recordType) {
        this.recordType = recordType == null ? null : recordType.trim();
    }


    public BigDecimal getLessenScore() {
        return lessenScore;
    }


    public void setLessenScore(BigDecimal lessenScore) {
        this.lessenScore = lessenScore;
    }


    public BigDecimal getTimeCount() {
        return timeCount;
    }


    public void setTimeCount(BigDecimal timeCount) {
        this.timeCount = timeCount;
    }


    public String getTimeType() {
        return timeType;
    }


    public void setTimeType(String timeType) {
        this.timeType = timeType == null ? null : timeType.trim();
    }


    public String getIsAuditing() {
        return isAuditing;
    }


    public void setIsAuditing(String isAuditing) {
        this.isAuditing = isAuditing == null ? null : isAuditing.trim();
    }


    public String getAuditingType() {
        return auditingType;
    }


    public void setAuditingType(String auditingType) {
        this.auditingType = auditingType == null ? null : auditingType.trim();
    }


    public String getSelectStudent() {
        return selectStudent;
    }


    public void setSelectStudent(String selectStudent) {
        this.selectStudent = selectStudent == null ? null : selectStudent.trim();
    }


    public String getSelectType() {
        return selectType;
    }


    public void setSelectType(String selectType) {
        this.selectType = selectType == null ? null : selectType.trim();
    }


    public String getIsMemo() {
        return isMemo;
    }


    public void setIsMemo(String isMemo) {
        this.isMemo = isMemo == null ? null : isMemo.trim();
    }


    public String getIsUpload() {
        return isUpload;
    }


    public void setIsUpload(String isUpload) {
        this.isUpload = isUpload == null ? null : isUpload.trim();
    }


    public BigDecimal getUploadCount() {
        return uploadCount;
    }


    public void setUploadCount(BigDecimal uploadCount) {
        this.uploadCount = uploadCount;
    }


    public String getCreator() {
        return creator;
    }


    public void setCreator(String creator) {
        this.creator = creator == null ? null : creator.trim();
    }


    public Date getCreateTime() {
        return createTime;
    }


    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public String getModifyMan() {
        return modifyMan;
    }


    public void setModifyMan(String modifyMan) {
        this.modifyMan = modifyMan == null ? null : modifyMan.trim();
    }


    public Date getModifyTime() {
        return modifyTime;
    }


    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
}

2.数据库操作:

import org.apache.ibatis.annotations.Param;

mapper接口层:

public List queryClassCheckItemMarkList_note_month(@Param("as") Class_note_optionPo noteOptionPo);

xml:


标红色的位置为特别注意的地方

你可能感兴趣的:(Mybatis)