|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.iflytop.nuclear.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.iflytop.nuclear.model.NuclearCore; |
|
|
|
import com.iflytop.nuclear.model.NuclearStation; |
|
|
|
import com.iflytop.nuclear.service.NuclearCoreService; |
|
|
@ -35,6 +36,16 @@ public class NuclearCoreController { |
|
|
|
return ResponseData.success(res); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/list/{id}") |
|
|
|
public ResponseData getListByStationId(@PathVariable(name = "id") int id) { |
|
|
|
QueryWrapper<NuclearCore> nuclearCoreQueryWrapper = new QueryWrapper<>(); |
|
|
|
nuclearCoreQueryWrapper.eq("station_id", id); |
|
|
|
List<NuclearCore> list = nuclearCoreService.list(nuclearCoreQueryWrapper); |
|
|
|
JSONObject res = new JSONObject(); |
|
|
|
res.put("list", list); |
|
|
|
return ResponseData.success(res); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/add") |
|
|
|
public ResponseData add(@RequestBody Map<String,String> coreInfo) { |
|
|
|
JSONObject res = new JSONObject(); |
|
|
|