feat: db update
This commit is contained in:
commit
e0dcdee366
@ -6,6 +6,8 @@ public interface VideoSertvice {
|
|||||||
|
|
||||||
void startOnline(Long userId, Long lectureId) throws SQLException;
|
void startOnline(Long userId, Long lectureId) throws SQLException;
|
||||||
|
|
||||||
|
void stopOnline(Long userId, Long lectureId) throws SQLException;
|
||||||
|
|
||||||
boolean isRoomAccessible(Long lectureId, Long userId);
|
boolean isRoomAccessible(Long lectureId, Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@ -17,6 +18,7 @@ public class VideoServiceImpl implements VideoSertvice{
|
|||||||
|
|
||||||
private final LectureService lectureService;
|
private final LectureService lectureService;
|
||||||
private final RegistrationService registrationService;
|
private final RegistrationService registrationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startOnline(Long userId, Long lectureId) throws SQLException {
|
public void startOnline(Long userId, Long lectureId) throws SQLException {
|
||||||
|
|
||||||
@ -24,8 +26,12 @@ public class VideoServiceImpl implements VideoSertvice{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRoomAccessible(Long lectureId, Long userId) {
|
public void stopOnline(Long userId, Long lectureId) throws SQLException {
|
||||||
|
lectureService.changeState(lectureId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRoomAccessible(Long lectureId, Long userId) {
|
||||||
|
|
||||||
|
|
||||||
LectureDetailResponse lecture = lectureService.findLectureById(userId, userId);
|
LectureDetailResponse lecture = lectureService.findLectureById(userId, userId);
|
||||||
@ -34,12 +40,9 @@ public class VideoServiceImpl implements VideoSertvice{
|
|||||||
RegistrationStatus registrationStatus = registrationService.getStatus(userId, lectureId);
|
RegistrationStatus registrationStatus = registrationService.getStatus(userId, lectureId);
|
||||||
|
|
||||||
|
|
||||||
if(registrationStatus==RegistrationStatus.ACCEPTED && lecture.isOnline())
|
if (registrationStatus == RegistrationStatus.ACCEPTED && lecture.isOnline()) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,17 @@
|
|||||||
spring.application.name=edufocus
|
spring.application.name=edufocus
|
||||||
server.port=8080
|
server.port=8080
|
||||||
|
|
||||||
server.ssl.enabled=false
|
server.ssl.enabled=false
|
||||||
server.servlet.context-path=${CONTEXT_PATH}
|
server.servlet.context-path=${CONTEXT_PATH}
|
||||||
|
|
||||||
# openvidu
|
# openvidu
|
||||||
#server.port=${SERVER_PORT:6080}
|
#server.port=${SERVER_PORT:6080}
|
||||||
|
|
||||||
|
|
||||||
# LiveKit configuration
|
# LiveKit configuration
|
||||||
livekit.api.key=${LIVEKIT_API_KEY:devkey}
|
livekit.api.key=${LIVEKIT_API_KEY:devkey}
|
||||||
livekit.api.secret=${LIVEKIT_API_SECRET:secret}
|
livekit.api.secret=${LIVEKIT_API_SECRET:secret}
|
||||||
# JWT Salt (??? ?? ???? ???)
|
# JWT Salt (??? ?? ???? ???)
|
||||||
|
|
||||||
jwt.salt=${SALT}
|
jwt.salt=${SALT}
|
||||||
|
|
||||||
# Access Token ?? ?? (??? ??)
|
# Access Token ?? ?? (??? ??)
|
||||||
#jwt.access-token.expiretime=3600000
|
#jwt.access-token.expiretime=3600000
|
||||||
|
|
||||||
jwt.access-token.expiretime=3000000
|
jwt.access-token.expiretime=3000000
|
||||||
|
|
||||||
# Refresh Token ?? ?? (??? ??)
|
# Refresh Token ?? ?? (??? ??)
|
||||||
jwt.refresh-token.expiretime=504000000
|
jwt.refresh-token.expiretime=504000000
|
||||||
#jwt.refresh-token.expiretime=4000
|
#jwt.refresh-token.expiretime=4000
|
||||||
@ -28,21 +20,13 @@ spring.datasource.url=${DATA_SOURCE_URL}
|
|||||||
spring.datasource.username=${USER_NAME}
|
spring.datasource.username=${USER_NAME}
|
||||||
spring.datasource.password=${USER_PASSWORD}
|
spring.datasource.password=${USER_PASSWORD}
|
||||||
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
||||||
|
|
||||||
spring.jpa.database=mysql
|
spring.jpa.database=mysql
|
||||||
spring.jpa.hibernate.ddl-auto=create
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
|
|
||||||
|
|
||||||
management.endpoints.web.exposure.include=health,info
|
management.endpoints.web.exposure.include=health,info
|
||||||
management.endpoint.health.show-details=always
|
management.endpoint.health.show-details=always
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
spring.rabbitmq.host=${RABBITMQ_HOST}
|
spring.rabbitmq.host=${RABBITMQ_HOST}
|
||||||
spring.rabbitmq.port=${RABBITMQ_PORT}
|
spring.rabbitmq.port=${RABBITMQ_PORT}
|
||||||
spring.rabbitmq.username=${RABBITMQ_USERNAME}
|
spring.rabbitmq.username=${RABBITMQ_USERNAME}
|
||||||
spring.rabbitmq.password=${RABBITMQ_PASSWORD}
|
spring.rabbitmq.password=${RABBITMQ_PASSWORD}
|
||||||
|
|
||||||
|
|
||||||
image.path=${IMAGE_PATH}
|
image.path=${IMAGE_PATH}
|
Loading…
Reference in New Issue
Block a user