fix: 配送点编码重复时返回中文提醒

This commit is contained in:
czl231
2026-08-10 12:33:30 +08:00
parent b7ca0b4aca
commit 4e38ee8021
5 changed files with 125 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ func CreateDelivery(ctx *gin.Context) {
Name: request.Name, Principal: request.Principal, Address: request.Address,
}
if err := impl.DBService.Create(&delivery).Error; err != nil {
infra.Response.Error(ctx, err)
infra.Response.Error(ctx, common.DeliveryCreateError(err))
return
}
common.RespondCreatedResource(ctx, delivery)