1
This commit is contained in:
@@ -261,3 +261,24 @@ func (c *cAdmin) ListAnnotateRecords(ctx context.Context, req *dto.AdminAnnotate
|
||||
func (c *cAdmin) UnfreezeAnnotate(ctx context.Context, req *dto.AdminAnnotateUnfreezeReq) (*dto.AdminAnnotateUnfreezeRes, error) {
|
||||
return service.Annotate.AdminUnfreeze(ctx, req)
|
||||
}
|
||||
|
||||
// ListFalseTargets 假目标上报列表
|
||||
func (c *cAdmin) ListFalseTargets(ctx context.Context, req *dto.AdminFalseTargetListReq) (*dto.AdminFalseTargetListRes, error) {
|
||||
return service.FalseTarget.AdminList(ctx, req)
|
||||
}
|
||||
|
||||
// FalseTargetImage 假目标裁剪图预览(直写响应体)
|
||||
func (c *cAdmin) FalseTargetImage(ctx context.Context, req *dto.AdminFalseTargetImageReq) (*dto.AdminFalseTargetImageRes, error) {
|
||||
path, err := service.FalseTarget.ImageFile(ctx, req.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r := ghttp.RequestFromCtx(ctx)
|
||||
r.Response.ServeFile(path)
|
||||
return &dto.AdminFalseTargetImageRes{}, nil
|
||||
}
|
||||
|
||||
// ReviewFalseTargets 审核假目标上报(通过=入负样本库;拒绝=删文件)
|
||||
func (c *cAdmin) ReviewFalseTargets(ctx context.Context, req *dto.AdminFalseTargetReviewReq) (*dto.AdminFalseTargetReviewRes, error) {
|
||||
return service.FalseTarget.AdminReview(ctx, req)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"observer-server/biz/model/dto"
|
||||
"observer-server/biz/service"
|
||||
)
|
||||
|
||||
// cFalseTarget 假目标上报接口(登录态,手机号取自 token)
|
||||
type cFalseTarget struct{}
|
||||
|
||||
var FalseTarget = &cFalseTarget{}
|
||||
|
||||
// Report 上报假目标(multipart:误报框裁剪图 + 检测框快照)
|
||||
func (c *cFalseTarget) Report(ctx context.Context, req *dto.FalseTargetReportReq) (*dto.FalseTargetReportRes, error) {
|
||||
return service.FalseTarget.AppReport(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user