fix:证照日期相关和orc

This commit is contained in:
guohb
2024-04-28 10:16:13 +08:00
parent baf6dfd44f
commit 56fb6764b2
9 changed files with 150 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.AliyunService;
import com.cool.store.vo.BusinessLicenseInfoVO;
import com.cool.store.vo.FoodLicenseVO;
import com.cool.store.vo.IdentityCardInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -52,4 +53,15 @@ public class OcrController {
throw new ServiceException(ErrorCodeEnum.BUSINESS_LICENSE_PARSE_FAIL);
}
}
@GetMapping(path = "/getFoodBusinessLicense")
@ApiOperation("根据食营证照解析获取数据")
public ResponseResult<FoodLicenseVO> getFoodLicense(@RequestParam(value = "imageUrl")String imageUrl){
try {
FoodLicenseVO businessLicenseInfo = aliyunService.getFoodLicense(imageUrl);
return ResponseResult.success(businessLicenseInfo);
} catch (Exception e) {
throw new ServiceException(ErrorCodeEnum.FOOD_BUSINESS_LICENSE_PARSE_FAIL);
}
}
}