src/com/controller/ClassesController.java
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.apache.ibatis.annotations.Param;
import com.util.PageUtil;
import com.util.UploadUtil;
import com.entity.Major;
import com.service.MajorService;
import com.entity.College;
import com.service.CollegeService;
import com.entity.Classes;
import com.service.ClassesService;
@Controller
@RequestMapping("/qimu")
public class ClassesController {
private static final int rows = 10;
@Autowired
private MajorService majorService;
@Autowired
private CollegeService collegeService;
@Autowired
private ClassesService classesService;
@RequestMapping("classesAdd")
public String majorAdd(Classes classes,HttpServletRequest request,HttpSession session)
{
String where =" and claname='"+classes.getClaname()+"' and maid="+classes.getMaid()+"";
int count=classesService.getTotal(where);
if(count>0)
{
request.setAttribute("msg", "班级已经存在,不能重复添加!");
return "admin/classesManage";
}
else
{
boolean flag= classesService.add(classes);
if(flag==true)
{
request.setAttribute("msg", "班级添加成功");
return "admin/classesManage";
}
else
{
request.setAttribute("msg", "班级添加失败!");
return "admin/classesManage";
后面还有 217 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
