千家信息网

mybatis-oracle(ssi2)批量删除

发表于:2024-11-29 作者:千家信息网编辑
千家信息网最后更新 2024年11月29日,student类package com.test.hou.po;public class Student { private int sid; private String
千家信息网最后更新 2024年11月29日mybatis-oracle(ssi2)批量删除
  1. student类

package com.test.hou.po;public class Student {        private int sid;        private String sname;        private int sage;        public int getSid() {                return sid;        }        public void setSid(int sid) {                this.sid = sid;        }        public String getSname() {                return sname;        }        public void setSname(String sname) {                this.sname = sname;        }        public int getSage() {                return sage;        }        public void setSage(int sage) {                this.sage = sage;        }}

2.StudentAction类

public String batchDeleteStudent(){                List studentslist=studentService.selectStudent();                                studentService.batchDeleteStudent(studentslist);                return "batchinsertstudent";                        }

3.StudentMapperXml类

        delete from student                                         sid =#{item.sid}                                                        


0