当前位置:   article > 正文

宿舍管理系统代码详解(操作界面)_宿舍管理系统的前端页面

宿舍管理系统的前端页面

       

目录

一、前端代码

1.样式展示

2.代码详解

<1>主页面列表部分

(1)template部分

(2)script部分

<2>新增页面

(1)template部分

(2)script部分

<3>修改页面

二、后端代码

(1)Servlet层

1.doGet方法

2.doPost方法

3.doGet中的方法

<1>查询学生列表

<2>查询专业列表 

 <3>删除学生

<4>查找所需内容 

(2)model层

(3)Dao层

1.查询学生列表

2.查询专业列表

3.删除学生

4.新增学生

5.查询所需的学生信息

6.修改学生


        在此系统中,操作界面大致相同,本篇将以学生管理的操作页面为例进行代码详解,在其他不同的操作页面有不同的情况下也会进行详解。

一、前端代码

1.样式展示

2.代码详解

<1>主页面列表部分

(1)template部分
  1. <template>
  2. <el-card class="box-card"><!-- 卡片 -->
  3. <div slot="header" class="clearfix">
  4. <span>学生列表</span>
  5. <el-button style="float: right; padding: 3px 0" type="text" @click="openDialog()">
  6. 新增<i class="el-icon-circle-plus-outline el-icon--right"></i>
  7. </el-button>
  8. </div>
  9. <el-table :data="tableList" border :stripe="true" style="width: 100%"><!-- stripe:斑马纹 -->
  10. <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
  11. <el-table-column prop="num" label="学号" width="100" sortable
  12. align="center"></el-table-column><!-- sortable排序 -->
  13. <el-table-column prop="name" label="姓名" width="100" align="center"></el-table-column>
  14. <el-table-column prop="gender" label="性别" width="50" align="center"
  15. :resizable="false"></el-table-column><!-- resizable禁止拖拽 -->
  16. <el-table-column prop="birthday" label="生日" align="center"></el-table-column>
  17. <el-table-column prop="phone" label="电话" align="center"></el-table-column>
  18. <el-table-column prop="mname" label="专业" align="center"></el-table-column>
  19. <el-table-column prop="account" label="操作人" align="center"></el-table-column>
  20. <el-table-column prop="operTime" label="操作时间" align="center" sortable></el-table-column>
  21. <el-table-column label="操作" align="center">
  22. <template slot-scope="scope">
  23. <el-button size="mini" @click="openUpdateDialog(scope.row.id)">编辑</el-button><!-- scope.row获取到你所点击的那一行的数据 -->
  24. <el-button size="mini" type="danger" @click="deletestudent(scope.row.id)">删除</el-button>
  25. </template>
  26. </el-table-column>
  27. </el-table>
  28. <add ref="add"></add><!-- 使用组件 -->
  29. <update ref="update"></update>
  30. </el-card>
  31. </template>

        利用element-UI组件中的布局进行修改,已达到目的要求样式

        注意最后的部分是用来调用新增,修改的组件的

(2)script部分
  1. <script>
  2. /* 导入其他组件 */
  3. import add from "./add.vue";
  4. import update from "./update.vue";
  5. export default {
  6. components: { //注册组件
  7. add,
  8. update
  9. },
  10. data() {
  11. return {
  12. tableList: []
  13. }
  14. },
  15. methods: {
  16. openDialog() {
  17. //在父组件操作子组件
  18. this.$refs.add.dialogVisible = true;
  19. },
  20. openUpdateDialog(id){
  21. this.$refs.update.dialogVisible = true;
  22. this.$refs.update.findStudentById(id);
  23. },
  24. deletestudent(id) {
  25. this.$confirm('您确定要删除吗?', '提示', {
  26. confirmButtonText: '确定',
  27. cancelButtonText: '取消',
  28. type: 'warning'
  29. }).then(() => {
  30. //向后端发送请求,并返回id到后端
  31. this.$http.get("/api/student?mark=deletestudent&id=" + id).then((resp) => {
  32. if (resp.data.code == 200) {
  33. this.$message({type: 'success',message: '删除成功!'});
  34. this.$router.go(0);
  35. }
  36. })
  37. })
  38. }
  39. },
  40. mounted() {
  41. //打开组件后自动向后端发送一个查询学生列表的请求
  42. this.$http.get("api/student?mark=studentlist").then((resp) => {
  43. if (resp.data.code == 200) {
  44. //接收后端响应的数据
  45. this.tableList = resp.data.result;
  46. //把学生信息显示到数据表格中
  47. }
  48. })
  49. }
  50. }
  51. </script>

       1. 在进行增加和修改的操作时,会弹出一个窗口来进行操作,我们将这部分的代码重新放在一个vue中调用来使用。

        正常的调用其他vue需要重新打开一个新窗口,而此方法可以在原本的额网页基础上弹出浮窗来显示vue中的内容。

        用import...from...来进行调用,并在temp中进行调用

  1. <add ref="add"></add>
  2. <update ref="update"></update>
  3. import add from "./add.vue";
  4. import update from "./update.vue";

        2.openDialog() 用来显示出弹窗,改变dialogVisible的boolean值来使得弹窗显示和消失(点击修改操作时类似)

        3.在进行删除操作时,我们需要获取到当前的id,以id来对数据库内的数据进行删除,而获取方法即:

scope.row.id

         在scope中获取点击的这一行(row)的id

        4.在进行删除操作时,要进行提示,确定用户是否要进行删除操作,删除成功后也要进行提示

  1. deletestudent(id) {
  2. this.$confirm('您确定要删除吗?', '提示', {
  3. confirmButtonText: '确定',
  4. cancelButtonText: '取消',
  5. type: 'warning'
  6. }).then(() => {
  7. //向后端发送请求,并返回id到后端
  8. this.$http.get("/api/student?mark=deletestudent&id=" + id).then((resp) => {
  9. if (resp.data.code == 200) {
  10. this.$message({type: 'success',message: '删除成功!'});
  11. this.$router.go(0);
  12. }
  13. })
  14. })
  15. }

        this.$router.go(0)是为了关闭提示信息的。

''/api/student?mark=deletestudent&id=" + id

是用来与后端连接的,在后端中,给servlet中命名

@WebServlet(urlPatterns = "/api/student")

在前端需要后端的doget或dopost方法时,即可用/api/student来对后端进行连接

但是前端不止需要一个doget方法,所以还需要对每个不同的方法“起名”mark=deletestudent

后端在doget方法中接收不同的Mark,来执行不同的方法。

String mark = req.getParameter("mark");
if (mark.equals("studentlist")) {
    findStudents(req, resp);
}

而有些需要给后端传值,比如上面需要传id值进行查询,就在后面将id值传到后端&id=" + id

后端需要进行接收id,进行查询即可

String id = req.getParameter("id");

        5.mounted()是打开组件就进行的函数操作,将查询学生列表的函数放在其中进行查询,即可直接显示出学生列表

  1. mounted() {
  2. //打开组件后自动向后端发送一个查询学生列表的请求
  3. this.$http.get("api/student?mark=studentlist").then((resp) => {
  4. if (resp.data.code == 200) {
  5. //接收后端响应的数据
  6. this.tableList = resp.data.result;
  7. //把学生信息显示到数据表格中
  8. }
  9. })
  10. }

<2>新增页面

(1)template部分
  1. <template>
  2. <!-- 新增代码内容是比较多的,建议抽取出来,定义到一个独立的vue文件中
  3. 在列表组件中导入添加组件
  4. -->
  5. <el-dialog title="新增学生" :visible.sync="dialogVisible" width="50%">
  6. <el-form ref="form" label-width="80px">
  7. <el-form-item label="学号">
  8. <el-input v-model="form.num"></el-input>
  9. </el-form-item>
  10. <el-form-item label="姓名">
  11. <el-input v-model="form.name"></el-input>
  12. </el-form-item>
  13. <el-form-item label="性别">
  14. <el-radio-group v-model="form.gender">
  15. <el-radio label="男"></el-radio>
  16. <el-radio label="女"></el-radio>
  17. </el-radio-group>
  18. </el-form-item>
  19. <el-form-item label="生日">
  20. <el-date-picker type="date" placeholder="选择日期" v-model="form.birthday" style="width: 100%;"
  21. value-format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
  22. </el-form-item>
  23. <el-form-item label="电话">
  24. <el-input v-model="form.phone"></el-input>
  25. </el-form-item>
  26. <el-form-item label="地址">
  27. <el-input v-model="form.address"></el-input>
  28. </el-form-item>
  29. <el-form-item label="专业">
  30. <el-select placeholder="请选择" v-model="form.majorid">
  31. <el-option v-for="major in majorlist" :key="major.id" :label="major.name" :value="major.id">
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-form>
  36. <span slot="footer" class="dialog-footer">
  37. <el-button @click="dialogVisible = false">取 消</el-button>
  38. <el-button type="primary" @click="save()">保 存</el-button>
  39. </span>
  40. </el-dialog>
  41. </template>

        利用elem-UI中的表单组件进行修改,添加所需元素。

(2)script部分
  1. <script>
  2. export default {
  3. data() {
  4. return {
  5. pickerOptions: {
  6. disabledDate(time) {
  7. return time.getTime() > Date.now() - 8.64e6; //如果没有后面的-8.64e6就是不可以选择今天的
  8. }
  9. },
  10. dialogVisible: false,
  11. majorlist: [],
  12. form: {
  13. num: "",
  14. name: "",
  15. gender: "",
  16. birthday: "",
  17. phone: "",
  18. majorid: ""
  19. }
  20. }
  21. },
  22. methods: {
  23. save() {
  24. this.$http.post("api/student", jsonToString(this.form)).then((resp) => {
  25. if (resp.data.code == 200) {
  26. this.$message({message:resp.data.desc,type:'success'});
  27. this.dialogVisible = false;
  28. this.$router.go(0);
  29. }
  30. })
  31. }
  32. },
  33. mounted() {
  34. //向后端发送一个请求,查询专业信息
  35. this.$http.get("api/student?mark=majorlist").then((resp) => {
  36. if (resp.data.code == 200) {
  37. this.majorlist = resp.data.result;
  38. }
  39. })
  40. }
  41. }
  42. //将json对象序列化为 键=值&键=值
  43. function jsonToString(form) {
  44. var str = "";
  45. for (var s in form) {
  46. str += s + "=" + form[s] + "&";
  47. }
  48. return str.substring(0, str.length - 1);
  49. }
  50. </script>

        1.pickerOptions中的disabledDate(time)是用来更改时间格式的,因为在后端查询出来的时间指的是从1979到现在的毫秒值,我们需要转换格式将其显示到前端上去。

        2.this.$http.post("api/student", jsonToString(this.form))调用的是后端的dopost方法,将form中的值传给后端进行保存。

        3.在新增中,我们需要知道所有专业信息,将专业信息放在下拉框中,才能新增学生信息时,给学生选定专业。所以我们需要查询专业信息,将查到的信息放在majorlist中,赋到专业下拉框中。

<3>修改页面

        修改页面与新增页面相同,不同的是需要在修改页面中把选中的那个学生的信息显示到修改页面当中,所以需要在点开页面时进行一次查询,将内容赋到页面上去

  1. findStudentById(id){
  2. //向后端发送请求
  3. this.$http.get("api/student?mark=findstudent&id="+id).then((resp) => {
  4. if (resp.data.code == 200) {
  5. this.form=resp.data.result;
  6. }
  7. })
  8. }

        在学生列表(主页面)中,点击编辑按钮,调用openUpdateDialog(scope.row.id)函数,并将获取到的id传到findStudentById(id)中,在编辑页面进行执行,向后端传入id值,利用id查询学生信息,传回到前端中。

二、后端代码

(1)Servlet层

1.doGet方法

  1. @Override
  2. protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  3. System.out.println("student doget");
  4. String mark = req.getParameter("mark");
  5. if (mark.equals("studentlist")) {
  6. findStudents(req, resp);
  7. }
  8. if (mark.equals("majorlist")) {
  9. findMajors(req, resp);
  10. }
  11. if(mark.equals("deletestudent")){
  12. deleteStudent(req,resp);
  13. }
  14. if(mark.equals("findstudent")){
  15. findStudent(req,resp);
  16. }
  17. }

        doget方法:因为前端传回来不同的doget请求,所以将给个请求分到不同的方法中,然后在doget中调用即可。

2.doPost方法

  1. @Override
  2. protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  3. String id=req.getParameter("id");//新增时,请求中没有id,修改时请求中有id
  4. String num = req.getParameter("num");
  5. String name = req.getParameter("name");
  6. String gender = req.getParameter("gender");
  7. String birthday = req.getParameter("birthday");
  8. String phone = req.getParameter("phone");
  9. String address = req.getParameter("address");
  10. String majorid = req.getParameter("majorid");
  11. String token = req.getHeader("token");
  12. //操作人id
  13. DecodedJWT decodedJWT = JWTUtil.getTokenInfo(token);
  14. int adminid = decodedJWT.getClaim("id").asInt();
  15. //调用dao层,将接收到的数据保存到数据库
  16. StudentDao studentDao = new StudentDao();
  17. Result result;
  18. try {
  19. if(id==null){
  20. studentDao.insertStudent(num, name, gender, birthday, phone, address, majorid, adminid);
  21. }else{
  22. studentDao.updateStudent(id, name, gender, birthday, phone, address, majorid, adminid);
  23. }
  24. result = new Result(200, "保存成功", null);
  25. } catch (SQLException throwables) {
  26. throwables.printStackTrace();
  27. result = new Result<>(500, "保存失败", null);
  28. }
  29. //向前端作出响应
  30. resp.getWriter().print(new ObjectMapper().writeValueAsString(result));
  31. }

        doPost方法中,需要先接收前端传过来的数据(form中的数据),然后根据这些数据进行下一步的操作。

        前端向后端发送的doPost请求也有两种,一种是新增学生内容,将新增的内容传给后端,一种是修改内容,将修改后的内容传给后端。因为两种请求的区别在于有没有传给后端id值,所以只需要在doPost中判断是否接受了id值,来进行不同的方法。

        后端与数据库连接的部分在dao中,所以将方法放在dao中,在Servlet中调用dao中的方法。

3.doGet中的方法

<1>查询学生列表
  1. /*
  2. 查询学生列表
  3. */
  4. public void findStudents(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  5. StudentDao studentDao = new StudentDao();
  6. Result result;
  7. try {
  8. ArrayList<Student> students = studentDao.findStudents();
  9. result = new Result(200, "查询成功", students);
  10. } catch (SQLException throwables) {
  11. throwables.printStackTrace();
  12. result = new Result(500, "系统忙", null);
  13. }
  14. resp.getWriter().print(new ObjectMapper().writeValueAsString(result));
  15. }
<2>查询专业列表 
  1. /*
  2. 查询专业列表
  3. */
  4. public void findMajors(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  5. StudentDao studentDao = new StudentDao();
  6. Result result;
  7. try {
  8. ArrayList<Major> majors = studentDao.findMajors();
  9. result = new Result(200, "查询成功", majors);
  10. } catch (SQLException throwables) {
  11. throwables.printStackTrace();
  12. result = new Result(500, "系统忙", null);
  13. }
  14. resp.getWriter().print(new ObjectMapper().writeValueAsString(result));
  15. }
 <3>删除学生
  1. /*
  2. 删除学生
  3. */
  4. public void deleteStudent(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  5. StudentDao studentDao = new StudentDao();
  6. Result result;
  7. try {
  8. String id = req.getParameter("id");
  9. studentDao.deleteStudent(id);
  10. result = new Result(200, "删除成功", null);
  11. } catch (SQLException throwables) {
  12. throwables.printStackTrace();
  13. result = new Result(500, "系统忙", null);
  14. }
  15. resp.getWriter().print(new ObjectMapper().writeValueAsString(result));
  16. }
<4>查找所需内容 
  1. private void findStudent(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  2. StudentDao studentDao = new StudentDao();
  3. Result result;
  4. try {
  5. String id = req.getParameter("id");
  6. Student student=studentDao.findstudent(id);
  7. result = new Result(200, "查询1成功", student);
  8. } catch (SQLException throwables) {
  9. throwables.printStackTrace();
  10. result = new Result(500, "系统忙", null);
  11. }
  12. resp.getWriter().print(new ObjectMapper().writeValueAsString(result));
  13. }

(2)model层

        在model层中,需要将所需的数据都表示出来,封装到一个类中,方便后面的调用。

  1. package com.ffyc.dormserver.model;
  2. import com.fasterxml.jackson.annotation.JsonFormat;
  3. import java.sql.Timestamp;
  4. import java.util.Date;
  5. public class Student {
  6. private int id;
  7. private int num;
  8. private String name;
  9. private String gender;
  10. @JsonFormat(pattern ="yyy-MM-dd",timezone = "GMT+8")//后端把对象转为json时,把日期格式化
  11. private Date birthday;
  12. private String phone;
  13. private String mname;
  14. private String address;
  15. private int majorid;
  16. private String account;
  17. @JsonFormat(pattern ="yyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  18. private Date operTime;
  19. public int getId() {
  20. return id;
  21. }
  22. public void setId(int id) {
  23. this.id = id;
  24. }
  25. public int getNum() {
  26. return num;
  27. }
  28. public void setNum(int num) {
  29. this.num = num;
  30. }
  31. public String getName() {
  32. return name;
  33. }
  34. public void setName(String name) {
  35. this.name = name;
  36. }
  37. public String getGender() {
  38. return gender;
  39. }
  40. public void setGender(String gender) {
  41. this.gender = gender;
  42. }
  43. public Date getBirthday() {
  44. return birthday;
  45. }
  46. public void setBirthday(Date birthday) {
  47. this.birthday = birthday;
  48. }
  49. public String getPhone() {
  50. return phone;
  51. }
  52. public void setPhone(String phone) {
  53. this.phone = phone;
  54. }
  55. public String getMname() {
  56. return mname;
  57. }
  58. public void setMname(String mname) {
  59. this.mname = mname;
  60. }
  61. public String getAccount() {
  62. return account;
  63. }
  64. public void setAccount(String account) {
  65. this.account = account;
  66. }
  67. public Date getOperTime() {
  68. return operTime;
  69. }
  70. public void setOperTime(Date operTime) {
  71. this.operTime = operTime;
  72. }
  73. public String getAddress() {
  74. return address;
  75. }
  76. public void setAddress(String address) {
  77. this.address = address;
  78. }
  79. public int getMajorid() {
  80. return majorid;
  81. }
  82. public void setMajorid(int majorid) {
  83. this.majorid = majorid;
  84. }
  85. }

(3)Dao层

        Dao层就是后端与数据库进行连接的地方,所有SQL语句都在这里面

1.查询学生列表

  1. public ArrayList<Student> findStudents() throws SQLException {
  2. ArrayList<Student> students = new ArrayList<>();
  3. PreparedStatement ps = null;
  4. Connection connection = null;
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("SELECT\n" +
  8. "s.id,\n" +
  9. "s.num,\n" +
  10. "s.name,\n" +
  11. "s.gender,\n" +
  12. "s.birthday,\n" +
  13. "s.phone,\n" +
  14. "m.name mname,\n" +
  15. "a.account,\n" +
  16. "s.oper_time\n" +
  17. "FROM student s LEFT JOIN major m ON s.majorid=m.id\n" +
  18. "LEFT JOIN admin a ON s.adminid=a.id");
  19. ResultSet rs = ps.executeQuery();
  20. while (rs.next()) {
  21. Student student = new Student();
  22. student.setId(rs.getInt("id"));
  23. student.setNum(rs.getInt("num"));
  24. student.setName(rs.getString("name"));
  25. student.setGender(rs.getString("gender"));
  26. student.setBirthday(rs.getDate("birthday"));
  27. student.setPhone(rs.getString("phone"));
  28. student.setMname(rs.getString("mname"));
  29. student.setAccount(rs.getString("account"));
  30. student.setOperTime(rs.getTimestamp("oper_time"));
  31. students.add(student);
  32. }
  33. } finally {
  34. JDBCUtil.close(connection, ps);
  35. }
  36. return students;
  37. }

2.查询专业列表

  1. public ArrayList<Major> findMajors() throws SQLException {
  2. ArrayList<Major> majors = new ArrayList<>();
  3. PreparedStatement ps = null;
  4. Connection connection = null;
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("SELECT id,name FROM major");
  8. ResultSet rs = ps.executeQuery();
  9. while (rs.next()) {
  10. Major major = new Major();
  11. major.setId(rs.getInt("id"));
  12. major.setName(rs.getString("name"));
  13. majors.add(major);
  14. }
  15. } finally {
  16. JDBCUtil.close(connection, ps);
  17. }
  18. return majors;
  19. }

3.删除学生

  1. public void deleteStudent(String id) throws SQLException {
  2. System.out.println("deletestudent");
  3. PreparedStatement ps = null;
  4. Connection connection = null;
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("delete from student where id = ?");
  8. ps.setObject(1, id);
  9. ps.executeUpdate();
  10. } finally {
  11. JDBCUtil.close(connection, ps);
  12. }
  13. }

4.新增学生

  1. public boolean insertStudent(String num, String name, String gender, String birthday, String phone, String address, String majorid, int adminid) throws SQLException {
  2. System.out.println("insertstudent");
  3. PreparedStatement ps = null;
  4. Connection connection = null;
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("insert into student (num,name,gender,birthday,phone,address,majorid,adminid,oper_time)values(?,?,?,?,?,?,?,?,now())");
  8. ps.setObject(1, num);
  9. ps.setObject(2, name);
  10. ps.setObject(3, gender);
  11. ps.setObject(4, birthday);
  12. ps.setObject(5, phone);
  13. ps.setObject(6, address);
  14. ps.setObject(7, majorid);
  15. ps.setObject(8, adminid);
  16. ps.executeUpdate();
  17. } finally {
  18. JDBCUtil.close(connection, ps);
  19. }
  20. return true;
  21. }

5.查询所需的学生信息

  1. public Student findstudent(String id) throws SQLException {
  2. PreparedStatement ps = null;
  3. Connection connection = null;
  4. Student student = new Student();
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("SELECT\n" +
  8. "id,\n" +
  9. "num,\n" +
  10. "NAME,\n" +
  11. "gender,\n" +
  12. "birthday,\n" +
  13. "phone,\n" +
  14. "address,\n" +
  15. "majorid\n" +
  16. "FROM student WHERE id = ?");
  17. ps.setObject(1, id);
  18. ResultSet rs = ps.executeQuery();
  19. while (rs.next()) {
  20. student.setId(rs.getInt("id"));
  21. student.setNum(rs.getInt("num"));
  22. student.setName(rs.getString("name"));
  23. student.setGender(rs.getString("gender"));
  24. student.setBirthday(rs.getDate("birthday"));
  25. student.setPhone(rs.getString("phone"));
  26. student.setAddress(rs.getString("address"));
  27. student.setMajorid(rs.getInt("majorid"));
  28. }
  29. } finally {
  30. JDBCUtil.close(connection, ps);
  31. }
  32. return student;
  33. }

6.修改学生

  1. public void updateStudent(String id, String name, String gender, String birthday, String phone, String address, String majorid, int adminid) throws SQLException {
  2. System.out.println("insertstudent");
  3. PreparedStatement ps = null;
  4. Connection connection = null;
  5. try {
  6. connection = JDBCUtil.GetConnection();
  7. ps = connection.prepareStatement("UPDATE student set NAME=?,gender=?,birthday=?,phone=?,address=?,majorid=?,adminid=?,oper_time=NOW() WHERE id=?\n");
  8. ps.setObject(1, name);
  9. ps.setObject(2, gender);
  10. ps.setObject(3, birthday);
  11. ps.setObject(4, phone);
  12. ps.setObject(5, address);
  13. ps.setObject(6, majorid);
  14. ps.setObject(7, adminid);
  15. ps.setObject(8, id);
  16. ps.executeUpdate();
  17. } finally {
  18. JDBCUtil.close(connection, ps);
  19. }
  20. }

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号