|
@@ -1,5 +1,6 @@
|
|
|
package com.boman.web.core.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.boman.domain.dto.AjaxResult;
|
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -28,7 +29,12 @@ public class AnkangMaController {
|
|
|
*/
|
|
|
@GetMapping("/info/{idCard}")
|
|
|
public AjaxResult getByIdCard(@PathVariable("idCard") String idCard) {
|
|
|
- return AjaxResult.success("成功", vaccineInfoService.getByIdCard(idCard));
|
|
|
+ final JSONObject info = vaccineInfoService.getByIdCard(idCard);
|
|
|
+ if (info == null) {
|
|
|
+ return AjaxResult.error("档案库中无此人,身份证:" + idCard);
|
|
|
+ }
|
|
|
+
|
|
|
+ return AjaxResult.success("成功", info);
|
|
|
}
|
|
|
|
|
|
|