Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
shuo.wang
2024-04-28 11:00:07 +08:00
13 changed files with 176 additions and 25 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);
}
}
}