瀏覽代碼

add:新增openapi接口鉴权

zoie 6 月之前
父節點
當前提交
9c0c804ccf
共有 4 個文件被更改,包括 11 次插入8 次删除
  1. 1 0
      README.md
  2. 1 1
      app/admin/controller/cooler_box.go
  3. 5 5
      app/admin/controller/ice_locker.go
  4. 4 2
      app/admin/controller/weian.go

+ 1 - 0
README.md

@@ -64,6 +64,7 @@ env GOOS=linux GOARCH=amd64 go build main.go
 
 
 ### 启动服务,也可以用IDE进行调试
+启动冷链 FRPC
 
 ```shell
 # macOS or linux 下使用

+ 1 - 1
app/admin/controller/cooler_box.go

@@ -206,7 +206,7 @@ func (e CoolerBoxController) Delete(c *gin.Context) {
 // @Param data body dto.CoolerBoxBatchInsertReq true "data"
 // @Success 200 {string} string	"{"code": 200, "message": "添加成功"}"
 // @Success 200 {string} string	"{"code": -1, "message": "添加失败"}"
-// @Router /api/cooler-box [post]
+// @Router /api/cooler-box/import [post]
 // @Security Bearer
 func (e CoolerBoxController) BatchInsert(c *gin.Context) {
 	s := service.CoolerBox{}

+ 5 - 5
app/admin/controller/ice_locker.go

@@ -194,16 +194,16 @@ func (e IceLockerController) Delete(c *gin.Context) {
 	e.OK(req.GetId(), "删除成功")
 }
 
-// BatchInsert 批量添加保温箱
-// @Summary 批量添加保温箱
-// @Description 批量添加保温箱
-// @Tags 保温箱
+// BatchInsert 批量添加冷冻柜
+// @Summary 批量添加冷冻柜
+// @Description 批量添加冷冻柜
+// @Tags 冷冻柜
 // @Accept  application/json
 // @Product application/json
 // @Param data body dto.IceLockerBatchInsertReq true "data"
 // @Success 200 {string} string	"{"code": 200, "message": "添加成功"}"
 // @Success 200 {string} string	"{"code": -1, "message": "添加失败"}"
-// @Router /api/CoolerBox [post]
+// @Router /api/ice-locker/import [post]
 // @Security Bearer
 func (e IceLockerController) BatchInsert(c *gin.Context) {
 	s := service.IceLocker{}

+ 4 - 2
app/admin/controller/weian.go

@@ -17,13 +17,13 @@ type WeianController struct {
 	api.Api
 }
 
-// Get 获取维安智配送订单详情
+// GetOrderInfo 获取维安智配送订单详情
 // @Summary 获取维安智配送订单详情
 // @Description 获取维安智配送订单详情
 // @Tags 维安智配送
 // @Param no query string false "订单号"
 // @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
-// @Router /api/waybill [get]
+// @Router /api/weian/orderInfo [get]
 // @Security Bearer
 func (e WeianController) GetOrderInfo(c *gin.Context) {
 	s := service.Waybill{}
@@ -64,6 +64,8 @@ func (e WeianController) GetOrderInfo(c *gin.Context) {
 
 	e.OK(info.Data, "查询成功")
 }
+
+// 测试opeapi鉴权
 func (e WeianController) Test(c *gin.Context) {
 	s := service.Waybill{}
 	err := e.MakeContext(c).