【修改】 修改windows网络设置传值由List改成对象

This commit is contained in:
MSI\letre
2025-07-07 19:53:59 +08:00
parent 925d4c2ad2
commit 454625ec26
3 changed files with 15 additions and 19 deletions

View File

@@ -122,7 +122,7 @@ public class AutoController {
* @return String
*/
@PostMapping("/judgementForEdgeDummyToJson")
public Result<String> judgementForEdgeDummyToJson(@RequestBody List<StuInfoVo> stuInfoVo){
public Result<String> judgementForEdgeDummyToJson(@RequestBody StuInfoVo stuInfoVo){
return Result.success(autoForWinEdgeSettingService.autoForEdgeToJson(stuInfoVo));
}
/**

View File

@@ -11,7 +11,7 @@ import java.util.List;
*/
public interface AutoForWinEdgeSettingService {
String autoForEdgeToJson(List<StuInfoVo> stuInfoVo);
String autoForEdgeToJson(StuInfoVo stuInfoVo);
BigDecimal autoForEdge(StuInfoVo stuInfoVo) throws IOException;
}

View File

@@ -48,25 +48,21 @@ public class AutoForWinEdgeSettingServiceImpl implements AutoForWinEdgeSettingSe
* @return 是否通过
*/
@Override
public String autoForEdgeToJson(List<StuInfoVo> stuInfoVo) {
public String autoForEdgeToJson(StuInfoVo stuInfoVo) {
// 写入到文件夹
for (StuInfoVo infoVo : stuInfoVo) {
// 试题ID
String quId = infoVo.getQuestionId();
String edgeAnswerKey = infoVo.getEdgeAnswerKeys();
String edgeAnswerValue = infoVo.getEdgeAnswerValues();
String quId = stuInfoVo.getQuestionId();
String edgeAnswerKey = stuInfoVo.getEdgeAnswerKeys();
String edgeAnswerValue = stuInfoVo.getEdgeAnswerValues();
// 保存ID路径
String filePath = infoVo.getFilePath();
String filePath = stuInfoVo.getFilePath();
File file = new File(filePath + "/"+ quId +"@EdgeDummy.json");
if (!file.exists()) {
LogFileUtils.createFile(filePath + "/"+ quId +"@EdgeDummy.json");
}
Map<String, String> map = new HashMap<>();
map.put(edgeAnswerKey, edgeAnswerValue);
writeMapToJson(map, filePath + "/"+ quId +"@EdgeDummy.json");
}
return "成功";
return writeMapToJson(map, filePath + "/"+ quId +"@EdgeDummy.json");
}
@Override