Selaa lähdekoodia

yl忘了改啥了

yuliang1112 1 vuosi sitten
vanhempi
commit
38eda168e7
2 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 3 3
      handler/selection_detail.go
  2. 1 1
      service/selection.go

+ 3 - 3
handler/selection_detail.go

@@ -1,10 +1,10 @@
 package handler
 
 import (
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"github.com/sirupsen/logrus"
 	"youngee_b_api/consts"
-	"youngee_b_api/middleware"
 	"youngee_b_api/model/http_model"
 	"youngee_b_api/service"
 	"youngee_b_api/util"
@@ -34,8 +34,8 @@ func (s SelectionDetailHandler) getRequest() interface{} {
 }
 
 func (s SelectionDetailHandler) run() {
-	enterpriseID := middleware.GetSessionAuth(s.ctx).EnterpriseID
-	res, err := service.Selection.GetSelectionDetail(s.ctx, s.req.SelectionId, enterpriseID)
+	fmt.Println("SelectionId:", s.req.SelectionId)
+	res, err := service.Selection.GetSelectionDetail(s.ctx, s.req.SelectionId)
 	if err != nil {
 		logrus.Errorf("[GetSelectionDetail] call Show err:%+v\n", err)
 		util.HandlerPackErrorResp(s.resp, consts.ErrorInternal, "")

+ 1 - 1
service/selection.go

@@ -28,7 +28,7 @@ func (s *selection) GetAllSelection(ctx context.Context, enterpriseID string, pa
 	return SelectionListData, nil
 }
 
-func (s *selection) GetSelectionDetail(ctx *gin.Context, selectionId, enterpriseID string) (*http_model.SelectionDetail, error) {
+func (s *selection) GetSelectionDetail(ctx *gin.Context, selectionId string) (*http_model.SelectionDetail, error) {
 	selectionDetail := http_model.SelectionDetail{}
 	selectionInfo, err := db.GetSelectionInfo(ctx, selectionId)
 	if err != nil {