云库增加 AI识图,缓存,我的云库收藏增加安全标志
调用外部API 扣费
This commit is contained in:
1 parent
7c29e57623
commit
150e8644b7
49 files changed
+1069
-28
No files matched your search
@@ -15,8 +15,7 @@ namespace Store.Modules.CloudProduct.Controllers
|
||||
{
|
||||
/// <summary>云商品管理:商品查询、导入、违规上报及搜索索引维护。</summary>
|
||||
[Tags("云商品")]
|
||||
[ApiVersionNeutral]
|
||||
[Route("api/CloudGoods/[action]")]
|
||||
[Route("CloudGoods/[action]")]
|
||||
public class GoodsController : AppControllerBase
|
||||
{
|
||||
private readonly IGoodsService _goodsService;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using MAX.Framework.Conventions;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Store.Framework.Base;
|
||||
using Store.Modules.CloudProduct.Dtos;
|
||||
using Store.Modules.CloudProduct.Services;
|
||||
|
||||
namespace Store.Modules.CloudProduct.Controllers;
|
||||
|
||||
/// <summary>上传图片识别及当前用户的商品安全记录。</summary>
|
||||
[Tags("商品检测"), DefaultHttpPost]
|
||||
[Route("api/CloudGoods/[action]")]
|
||||
public sealed class ProductInspectionController(ProductInspectionService service) : AppControllerBase
|
||||
{
|
||||
[EndpointSummary("识别上传图片中的文字和品牌 Logo")]
|
||||
[RequestFormLimits(ValueLengthLimit = ProductInspectionService.MaxBase64Length)]
|
||||
public Task<string[]> InspectImage(InspectImageRequest request, CancellationToken cancellationToken)
|
||||
=> service.InspectAsync(request, cancellationToken);
|
||||
}
|
||||
@@ -58,6 +58,14 @@ namespace Store.Modules.CloudProduct.Controllers
|
||||
return await _favoritesService.AddFavoritesAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>更新用户已收藏商品的安全结论。</summary>
|
||||
[HttpPost]
|
||||
public async Task<ApiResult> SaveProductSafety(SaveProductSafetyRequest request)
|
||||
{
|
||||
await _favoritesService.SaveProductSafetyAsync(request);
|
||||
return ApiResult.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量取消收藏:删除 user_goods_favorites 记录并同步删除收藏索引文档,返回实际取消的条数。
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user