You've already forked FrameTour-BE
照片打印,基础
This commit is contained in:
@@ -69,4 +69,19 @@ public class AppPrinterController {
|
||||
printerService.setPhotoCropped(JwtTokenUtil.getWorker().getUserId(), scenicId, id, url);
|
||||
return ApiResponse.success(url);
|
||||
}
|
||||
@PostMapping("/setQuantity/{scenicId}/{id}")
|
||||
public ApiResponse<?> setQuantity(@PathVariable("scenicId") Long scenicId, @PathVariable("id") Long id, @RequestParam("quantity") Integer quantity) {
|
||||
if (quantity == null) {
|
||||
return ApiResponse.fail("请输入数量");
|
||||
}
|
||||
if (quantity < 0) {
|
||||
return ApiResponse.fail("数量不能小于0");
|
||||
}
|
||||
printerService.setPhotoQuantity(JwtTokenUtil.getWorker().getUserId(), scenicId, id, quantity);
|
||||
return ApiResponse.success(null);
|
||||
}
|
||||
@GetMapping("/price/{scenicId}")
|
||||
public ApiResponse<?> queryPrice(@PathVariable("scenicId") Long scenicId) {
|
||||
return ApiResponse.success(printerService.queryPrice(JwtTokenUtil.getWorker().getUserId(), scenicId));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user