【修改】 修改windows网络设置传值由List改成对象
This commit is contained in:
@@ -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));
|
||||
}
|
||||
/**
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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();
|
||||
// 保存ID路径
|
||||
String filePath = infoVo.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");
|
||||
// 试题ID
|
||||
String quId = stuInfoVo.getQuestionId();
|
||||
String edgeAnswerKey = stuInfoVo.getEdgeAnswerKeys();
|
||||
String edgeAnswerValue = stuInfoVo.getEdgeAnswerValues();
|
||||
// 保存ID路径
|
||||
String filePath = stuInfoVo.getFilePath();
|
||||
File file = new File(filePath + "/"+ quId +"@EdgeDummy.json");
|
||||
if (!file.exists()) {
|
||||
LogFileUtils.createFile(filePath + "/"+ quId +"@EdgeDummy.json");
|
||||
}
|
||||
|
||||
return "成功";
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put(edgeAnswerKey, edgeAnswerValue);
|
||||
return writeMapToJson(map, filePath + "/"+ quId +"@EdgeDummy.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user