5月28日 第五次团队作业:项目冲刺1

| 这个作业属于哪个课程 | [至诚软工实践F班](https://edu.cnblogs.com/campus/fzzcxy/ZhichengSoftengineeringPracticeFclass) |
| :-----------------: |:---------------: |
| 这个作业要求在哪里| <第五次团队作业:项目冲刺 - 作业 - 至诚软工实践F班 - 班级博客 - 博客园 (cnblogs.com)> |
| 这个作业的目标 | <项目该冲刺了> |

一、小组人员与冲刺分工

小组人员 冲刺安排
叶子圣 后端代码实现
王铮 后端代码实现
苏永威 前端接口
余杨贺 数据库设计
郑世杰 数据库设计
彭威 细节审查

二、项目问题

  • 1.代码能力有限,过于复杂的功能这期间无法完全实现。

  • 2.前后端接口出了问题,知识遗忘严重。

  • 3.无法成功获取书号。

  • 4.临近期末,团队积极性不高。

三、 今日项目进度

  • 1.会议图片

  • 2.commit记录

  • 3.部分功能代码

package com.g.web;

import com.g.bean.Student;
import com.g.service.StudentService;
import com.g.service.impl.StudentServiceImpl;
import com.g.utils.WebUtils;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**

  • @ClassName StudentServlet

  • @Description TODO

  • @Author Yszzz

  • @Date 2021/12/15 21:19

  • @Version 1.0
    */
    public class StudentServlet extends BaseServlet {

    StudentService studentService = new StudentServiceImpl();

    /**

    • @MethodName add

    • @Description 添加学生,完成后重定向到[admin_manager]页面

    • @Date 2021/12/16 16:42

    • @Param [req, resp]

    • @Return void
      **/
      protected void add(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      Student student = WebUtils.copyParamToBean(req.getParameterMap(), new Student());
      studentService.addStudent(student);
      resp.sendRedirect(req.getContextPath() + "/admin/studentServlet?action=list");
      //System.out.println("success");
      }

    /**

    • @MethodName delete

    • @Description 删除学生信息-通过ID

    • @Date 2021/12/16 16:42

    • @Param [req, resp]

    • @Return void
      **/
      protected void delete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      int id = WebUtils.parseInt(req.getParameter("id"), -1);

      studentService.deleteStudentByID(id);

      resp.sendRedirect(req.getContextPath() + "/admin/studentServlet?action=list");

    }

    /**

    • @MethodName update

    • @Description 修改学生数据

    • @Date 2021/12/16 17:31

    • @Param [req, resp]

    • @Return void
      **/
      protected void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      Student student = WebUtils.copyParamToBean(req.getParameterMap(), new Student());

      studentService.updateStudent(student);

      resp.sendRedirect(req.getContextPath() + "/admin/studentServlet?action=list");

    }

    /**

    • @MethodName list

    • @Description 获取所有学生的信息 保存到request域中

    • @Date 2021/12/16 16:41

    • @Param [req, resp]

    • @Return void
      **/
      protected void list(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      List students = studentService.queryStudents();
      req.setAttribute("students", students);
      req.getRequestDispatcher("/pages/admin/admin_manager.jsp").forward(req, resp);

    }

    /**

    • @MethodName getStudent

    • @Description 获取需要修改的学生信息

    • @Date 2021/12/16 16:41

    • @Param [req, resp]

    • @Return void
      **/
      protected void getStudent(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

      int id = WebUtils.parseInt(req.getParameter("id"), -1);

      Student student = studentService.queryStudentByID(id);

      req.setAttribute("student", student);

      req.getRequestDispatcher("/pages/admin/student_edit.jsp").forward(req, resp);

    }

    protected void search(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

     String search = req.getParameter("search");
     String reSearch = req.getParameter("search");
    
     Student student = studentService.queryStudentByIDOrName(search,reSearch);
    
     req.setAttribute("student", student);
    
     req.getRequestDispatcher("/pages/admin/admin_manager.jsp").forward(req, resp);
    

    }
    }

posted on 2022-05-28 21:52  奥利给队  阅读(62)  评论(0编辑  收藏  举报

导航