版本管理过程

版本管理过程

主要代码

在线提交作业:
	Controller层:
		@PostMapping("/upload")
    	@ResponseBody
    public String upload(Model model, @RequestParam("file")MultipartFile file){
        File targetFile = new File(filepath);
        String fileName = null;
        String repeat = null;
        if(!targetFile.exists()){
            targetFile.mkdirs();
        }
        try {
            FileOutputStream out = new FileOutputStream(filepath+file.getOriginalFilename());
            fileName = file.getOriginalFilename();
            System.out.println("文件上传名称:"+file.getOriginalFilename());
            out.write(file.getBytes());
        } catch (Exception e) {
            e.printStackTrace();
        }
	班级学习信息统计:
	Mapper:
	<select id="selectCourseBySidCid" resultMap="CourseMapBySidCid">
        SELECT student.id AS studentId,student.name As studentName,
	class.name As GradeName,course.cname AS ConCname,
	middle_cs.grade_usual,middle_cs.grade_finally, middle_cs.grade_total
        FROM middle_cs,course,class,student
        <where>
            middle_cs.cid=course.cid and student.id=middle_cs.sid 
	and class.id=student.class_id
            <if test="grade != null and grade != ''">
                and class.id = #{grade}
            </if>
            <if test="course != null and course != ''">
                and course.cid= #{course}
            </if>
            <if test="sid !=null and sid != '' ">
                and student.id= #{sid}
            </if>
            <if test="message!= null and message != '' ">
                and student.name=#{sssname}
            </if>
        </where>
    </select>
	Controller层:
	@GetMapping("score")
    public PageInfo<MiddleStudentCourse> findCourseBySid(int num, Integer sid, String sname, Integer grade, Integer course){
        Map map = new HashMap();
        map.put("sid",sid);
    if(sname!=null){
    if(sname.isEmpty()){
        map.put("message",null);
    }
    else {
        map.put("sssname",sname);
        map.put("message",1);
    }}
        map.put("course",course);
        map.put("grade",grade);

        PageHelper.startPage(num,7);
        List<MiddleStudentCourse> list= middleStudentCourseService.findCourseBySidCid(map);
        PageInfo<MiddleStudentCourse> pageInfo =new PageInfo<MiddleStudentCourse>(list);
        return pageInfo ;
    }

版本管理过程

1.使用git。
在这里插入图片描述

2.将项目交给git管理。
在这里插入图片描述

在这里插入图片描述

3.将项目add。
4.将项目commit。
在这里插入图片描述

5.将项目进行push
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值