SelectionCourseSystem/src/edson/web/TeaAction.java

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package edson.web;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

import edson.bean.Course;
import edson.bean.Student;
import edson.bean.Teacher;
import edson.business.serviceImpl.TeaService;
import edson.utils.MD5;
import edson.utils.PageBean;

public class TeaAction extends ActionSupport implements ModelDriven<Teacher>{
	
	
	public TeaService teaService;
	private PageBean pb;
	private Integer num;
	private Teacher tea=new Teacher();
	private String pwd1;
	private String pwd2;

	public String viewMyCourse(){
		try{
			if(num==null)num=1;
			tea=(Teacher) ActionContext.getContext().getSession().get("tea_user");
			
			pb=teaService.findMyCourse(num,tea.getTea_id());
			pb.setPath("/tea_viewMyCourse");
			ActionContext.getContext().getSession().put("pb", pb);
			return "success_viewMyCourse";
		}catch(Exception e){
			e.printStackTrace();
			this.addActionError("操作失败,请稍候尝试!");
			return "error";
		}
	}
	/*
	 * 查看开课信息
	 */
	public String viewMySelection(){
		try{
			if(num==null)num=1;
			tea=(Teacher) ActionContext.getContext().getSession().get("tea_user");
			
			pb=teaService.findMySelection(num,tea.getTea_id());
			pb.setPath("/tea_viewMySelection");
			ActionContext.getContext().getSession().put("pb", pb);
			return "success_viewMySelection";
		}catch(Exception e){
			e.printStackTrace();
			this.addActionError("操作失败,请稍候尝试!");
			return "error";
		}
	}
	
	public String viewTheStu(){
后面还有 95 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。