package com.zy.asrs.controller;
|
|
import com.core.annotations.ManagerAuth;
|
import com.core.common.Cools;
|
import com.core.common.R;
|
import com.zy.asrs.service.InboundCameraCaptureService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.Map;
|
|
@RestController
|
public class PhotoController {
|
|
@Autowired
|
private InboundCameraCaptureService inboundCameraCaptureService;
|
|
@GetMapping("/photo/loc/auth")
|
@ManagerAuth
|
public R loc(@RequestParam String locNo) {
|
return R.ok(inboundCameraCaptureService.resolveLocPicUrls(locNo));
|
}
|
|
@PostMapping("/photo/resolve/auth")
|
@ManagerAuth
|
public R resolve(@RequestBody(required = false) Map<String, Object> body,
|
@RequestParam(required = false) String pic) {
|
String value = pic;
|
if (Cools.isEmpty(value) && body != null && body.get("pic") != null) {
|
value = String.valueOf(body.get("pic"));
|
}
|
return R.ok(inboundCameraCaptureService.resolvePicUrls(value));
|
}
|
}
|