| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.ydtech.modules.order.controller;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.modules.order.entity.BusinessLicense;
- import com.ydtech.modules.order.service.IdentifyService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.multipart.MultipartFile;
- import java.io.IOException;
- import java.util.Map;
- @RestController
- @RequestMapping("/order/identify")
- @Api(tags = "识别")
- @Slf4j
- public class IdentifyController {
- private final IdentifyService identifyService;
- public IdentifyController(IdentifyService identifyService) {
- this.identifyService = identifyService;
- }
- @PostMapping("/idCard")
- @ApiOperation(value = "身份证正反面识别")
- public HttpResult<Map<String, Object>> idCard(MultipartFile image1, MultipartFile image2) throws IOException {
- return identifyService.idCard(image1, image2);
- }
- @PostMapping("/drivingPermit")
- @ApiOperation(value = "行驶证正反面识别")
- public HttpResult<Map<String, Object>> drivingPermit(MultipartFile image1, MultipartFile image2) throws IOException {
- return identifyService.drivingPermit(image1, image2);
- }
- @PostMapping("/businessLicense")
- @ApiOperation(value = "营业执照识别")
- public HttpResult<BusinessLicense> businessLicense(MultipartFile image1) {
- return identifyService.businessLicense(image1);
- }
- }
|