【新增】 学生端查询环境检测列表
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package pc.exam.pp.module.exam.controller.admin.app;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import pc.exam.pp.framework.common.pojo.CommonResult;
|
||||
import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
|
||||
import pc.exam.pp.module.exam.dal.dataobject.app.AppCheckDO;
|
||||
import pc.exam.pp.module.exam.service.app.AppCheckService;
|
||||
import pc.exam.pp.module.exam.service.authorize.AuthorizeService;
|
||||
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
|
||||
import static pc.exam.pp.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 授权信息
|
||||
*
|
||||
* @author pengchen
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/app")
|
||||
@Tag(name = "管理后台 - 学生端环境检测")
|
||||
public class AppCheckController {
|
||||
|
||||
@Resource
|
||||
AppCheckService appCheckService;
|
||||
|
||||
@GetMapping("/getAppCheckList")
|
||||
@PermitAll
|
||||
@TenantIgnore
|
||||
@Operation(summary = "查看学生端需要检测的APP列表", description = "查看学生端需要检测的APP列表")
|
||||
public CommonResult<List<AppCheckDO>> getAppCheckList(){
|
||||
// 使用传入的IP,进行ping,查看是否存在连接,并返回信号的强度
|
||||
return success(appCheckService.getAppList());
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -6,6 +6,7 @@ import jakarta.annotation.Resource;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import pc.exam.pp.framework.common.pojo.CommonResult;
|
||||
import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
|
||||
import pc.exam.pp.module.exam.service.authorize.AuthorizeService;
|
||||
|
||||
import java.net.SocketException;
|
||||
@@ -35,8 +36,8 @@ public class ExamAuthorizeController {
|
||||
|
||||
@GetMapping("/get-mac-address")
|
||||
@PermitAll
|
||||
@TenantIgnore
|
||||
@Operation(summary = "查看运行服务器外网MAC Address", description = "初次激活租户,查看租户电脑外网MAC Address")
|
||||
@Parameter(description = "MAC Address", required = true, example = "1024")
|
||||
public CommonResult<String> getTenantMacAddress() throws SocketException, UnknownHostException {
|
||||
// 使用传入的IP,进行ping,查看是否存在连接,并返回信号的强度
|
||||
return success(authorizeService.getTenantMacAddress());
|
||||
|
@@ -0,0 +1,32 @@
|
||||
package pc.exam.pp.module.exam.dal.dataobject.app;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import pc.exam.pp.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* APP检测表 DO
|
||||
*
|
||||
* @author rwb
|
||||
*/
|
||||
@TableName("exam_app_check")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AppCheckDO {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* app名称
|
||||
*/
|
||||
private String appName;
|
||||
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package pc.exam.pp.module.exam.dal.mysql.app;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import pc.exam.pp.framework.common.pojo.PageResult;
|
||||
import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import pc.exam.pp.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import pc.exam.pp.module.exam.controller.admin.classs.vo.ClassDoReturnVO;
|
||||
import pc.exam.pp.module.exam.controller.admin.classs.vo.ClassNameReturnVO;
|
||||
import pc.exam.pp.module.exam.controller.admin.classs.vo.ClassPageReqVO;
|
||||
import pc.exam.pp.module.exam.dal.dataobject.app.AppCheckDO;
|
||||
import pc.exam.pp.module.exam.dal.dataobject.classs.ClassDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP Mapper
|
||||
*
|
||||
* @author rwb
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppCheckMapper extends BaseMapperX<AppCheckDO> {
|
||||
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
package pc.exam.pp.module.exam.service.app;
|
||||
|
||||
|
||||
import pc.exam.pp.module.exam.dal.dataobject.app.AppCheckDO;
|
||||
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台APP检测查询 Service 接口
|
||||
* APP检测查询
|
||||
*
|
||||
* @author r w b
|
||||
*/
|
||||
public interface AppCheckService {
|
||||
|
||||
/**
|
||||
* 获取哪些APP是需要查询得
|
||||
* @return App检测表
|
||||
*/
|
||||
List<AppCheckDO> getAppList();
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
package pc.exam.pp.module.exam.service.app;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import pc.exam.pp.module.exam.dal.dataobject.app.AppCheckDO;
|
||||
import pc.exam.pp.module.exam.dal.mysql.app.AppCheckMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台APP检测查询 Service 接口实现类
|
||||
* APP检测查询
|
||||
*
|
||||
* @author r w b
|
||||
*/
|
||||
@Service
|
||||
public class AppCheckServiceImpl implements AppCheckService {
|
||||
|
||||
@Resource
|
||||
AppCheckMapper appCheckMapper;
|
||||
|
||||
@Override
|
||||
public List<AppCheckDO> getAppList() {
|
||||
List<AppCheckDO> appList = appCheckMapper.selectList();
|
||||
return appList;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user