【修改】 修改windows网络设置传值由List改成对象
This commit is contained in:
@@ -122,7 +122,7 @@ public class AutoController {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@PostMapping("/judgementForEdgeDummyToJson")
|
@PostMapping("/judgementForEdgeDummyToJson")
|
||||||
public Result<String> judgementForEdgeDummyToJson(@RequestBody List<StuInfoVo> stuInfoVo){
|
public Result<String> judgementForEdgeDummyToJson(@RequestBody StuInfoVo stuInfoVo){
|
||||||
return Result.success(autoForWinEdgeSettingService.autoForEdgeToJson(stuInfoVo));
|
return Result.success(autoForWinEdgeSettingService.autoForEdgeToJson(stuInfoVo));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface AutoForWinEdgeSettingService {
|
public interface AutoForWinEdgeSettingService {
|
||||||
|
|
||||||
String autoForEdgeToJson(List<StuInfoVo> stuInfoVo);
|
String autoForEdgeToJson(StuInfoVo stuInfoVo);
|
||||||
|
|
||||||
BigDecimal autoForEdge(StuInfoVo stuInfoVo) throws IOException;
|
BigDecimal autoForEdge(StuInfoVo stuInfoVo) throws IOException;
|
||||||
}
|
}
|
||||||
|
@@ -48,25 +48,21 @@ public class AutoForWinEdgeSettingServiceImpl implements AutoForWinEdgeSettingSe
|
|||||||
* @return 是否通过
|
* @return 是否通过
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String autoForEdgeToJson(List<StuInfoVo> stuInfoVo) {
|
public String autoForEdgeToJson(StuInfoVo stuInfoVo) {
|
||||||
// 写入到文件夹
|
// 写入到文件夹
|
||||||
for (StuInfoVo infoVo : stuInfoVo) {
|
|
||||||
// 试题ID
|
// 试题ID
|
||||||
String quId = infoVo.getQuestionId();
|
String quId = stuInfoVo.getQuestionId();
|
||||||
String edgeAnswerKey = infoVo.getEdgeAnswerKeys();
|
String edgeAnswerKey = stuInfoVo.getEdgeAnswerKeys();
|
||||||
String edgeAnswerValue = infoVo.getEdgeAnswerValues();
|
String edgeAnswerValue = stuInfoVo.getEdgeAnswerValues();
|
||||||
// 保存ID路径
|
// 保存ID路径
|
||||||
String filePath = infoVo.getFilePath();
|
String filePath = stuInfoVo.getFilePath();
|
||||||
File file = new File(filePath + "/"+ quId +"@EdgeDummy.json");
|
File file = new File(filePath + "/"+ quId +"@EdgeDummy.json");
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
LogFileUtils.createFile(filePath + "/"+ quId +"@EdgeDummy.json");
|
LogFileUtils.createFile(filePath + "/"+ quId +"@EdgeDummy.json");
|
||||||
}
|
}
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put(edgeAnswerKey, edgeAnswerValue);
|
map.put(edgeAnswerKey, edgeAnswerValue);
|
||||||
writeMapToJson(map, filePath + "/"+ quId +"@EdgeDummy.json");
|
return writeMapToJson(map, filePath + "/"+ quId +"@EdgeDummy.json");
|
||||||
}
|
|
||||||
|
|
||||||
return "成功";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user