finished almost all pages of student and teacher.
parent
4a48b675ac
commit
8046e1ec63
@ -0,0 +1,29 @@
|
||||
package com.peteralbus.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peteralbus.dao.ScoreGroupDao;
|
||||
import com.peteralbus.entity.ScoreGroup;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* The type Score group service.
|
||||
* @author peteralbus
|
||||
*/
|
||||
@Service
|
||||
public class ScoreGroupService
|
||||
{
|
||||
@Autowired
|
||||
ScoreGroupDao scoreGroupDao;
|
||||
public int insert(ScoreGroup scoreGroup)
|
||||
{
|
||||
return scoreGroupDao.insert(scoreGroup);
|
||||
}
|
||||
public Boolean getScored(Long teacherId,Long groupId)
|
||||
{
|
||||
QueryWrapper<ScoreGroup> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("teacher_id",teacherId);
|
||||
queryWrapper.eq("group_id",groupId);
|
||||
return scoreGroupDao.selectCount(queryWrapper) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.peteralbus.service;
|
||||
|
||||
import com.peteralbus.dao.ParticipateDao;
|
||||
import com.peteralbus.dao.ScoreStuDao;
|
||||
import com.peteralbus.entity.Participate;
|
||||
import com.peteralbus.entity.ScoreStu;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* The type Score stu service.
|
||||
* @author peteralbus
|
||||
*/
|
||||
@Service
|
||||
public class ScoreStuService
|
||||
{
|
||||
@Autowired
|
||||
ScoreStuDao scoreStuDao;
|
||||
@Autowired
|
||||
ParticipateDao participateDao;
|
||||
public int insert(ScoreStu scoreStu)
|
||||
{
|
||||
if(scoreStuDao.insert(scoreStu)>0)
|
||||
{
|
||||
Participate participate=participateDao.selectById(scoreStu.getParticipationId());
|
||||
participate.setFinished(true);
|
||||
return participateDao.updateById(participate);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: PeterAlbus
|
||||
Date: 2021/12/8
|
||||
Time: 14:28
|
||||
--%>
|
||||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>管理员界面</title>
|
||||
<!-- 引入Vue -->
|
||||
<script src="${pageContext.request.contextPath}/iview/vue.js"></script>
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/iview/styles/iview.css">
|
||||
<!-- 引入组件库 -->
|
||||
<script src="${pageContext.request.contextPath}/iview/iview.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<h1>
|
||||
<shiro:authenticated>已登录!<a href="${pageContext.request.contextPath}/logout">登出</a></shiro:authenticated>
|
||||
</h1>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
user:{
|
||||
username:'',
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.user.username='${user.username}'
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue