From 88324f3d47dab99da5b4bd9422e50b63b97c242c Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 30 八月 2023 19:51:00 +0800
Subject: [PATCH] fix
---
api/v1/test/supplier.go | 38 +++++++++++++++++++++++++++++++-------
1 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/api/v1/test/supplier.go b/api/v1/test/supplier.go
index 5b9df26..86ec0b0 100644
--- a/api/v1/test/supplier.go
+++ b/api/v1/test/supplier.go
@@ -1,15 +1,15 @@
package test
import (
- "github.com/flipped-aurora/gin-vue-admin/server/global"
- "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
- "github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
- "github.com/flipped-aurora/gin-vue-admin/server/model/test"
- testReq "github.com/flipped-aurora/gin-vue-admin/server/model/test/request"
- "github.com/flipped-aurora/gin-vue-admin/server/service"
- "github.com/flipped-aurora/gin-vue-admin/server/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
+ "srm/global"
+ "srm/model/common/request"
+ "srm/model/common/response"
+ "srm/model/test"
+ testReq "srm/model/test/request"
+ "srm/service"
+ "srm/utils"
)
type SupplierApi struct {
@@ -181,3 +181,27 @@
}, "鑾峰彇鎴愬姛", c)
}
}
+
+// ChangeSupplierStatus 淇敼Supplier鐘舵��
+// @Tags Supplier
+// @Summary 淇敼Supplier鐘舵��
+// @Security ApiKeyAuth
+// @accept application/json
+// @Produce application/json
+// @Param data body testReq.SupplierStatus true "淇敼Supplier鐘舵��"
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"淇敼鎴愬姛"}"
+// @Router /s/changeSupplierStatus [post]
+func (sApi *SupplierApi) ChangeSupplierStatus(c *gin.Context) {
+ var params testReq.SupplierStatus
+ err := c.ShouldBindJSON(¶ms)
+ if err != nil {
+ response.FailWithMessage(err.Error(), c)
+ return
+ }
+ if err := sService.ChangeStatus(params.Id, params.Status); err != nil {
+ global.GVA_LOG.Error("淇敼澶辫触!", zap.Error(err))
+ response.FailWithMessage("淇敼澶辫触", c)
+ } else {
+ response.OkWithMessage("淇敼鎴愬姛", c)
+ }
+}
--
Gitblit v1.8.0