shenzekai il y a 1 an
Parent
commit
84cb8760e7
2 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 1 0
      pack/selection.go
  2. 3 0
      service/selection_service/selection.go

+ 1 - 0
pack/selection.go

@@ -46,6 +46,7 @@ func GormSelectionToHttpSelectionPreview(selectionInfo *gorm_model.YounggeeSelec
 		SettlementAmount: selectionInfo.SettlementAmount,
 		TaskDdl:          selectionInfo.TaskDdl,
 		TaskMode:         selectionInfo.TaskMode,
+		SampleMode:       selectionInfo.SampleMode,
 		Detail:           selectionInfo.Detail,
 		ProductSnap:      selectionInfo.ProductSnap,
 		ProductPhotoSnap: selectionInfo.ProductPhotoSnap,

+ 3 - 0
service/selection_service/selection.go

@@ -4,6 +4,7 @@ import (
 	"context"
 	"encoding/json"
 	"errors"
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"github.com/sirupsen/logrus"
 	"reflect"
@@ -222,6 +223,7 @@ func (*selection) Pay(ctx context.Context, request http_model.PaySelectionReques
 	}
 	// 2. 选品项目状态是否正确
 	selectionInfo, err := db.GetSelectionById(ctx, request.SelectionId)
+	fmt.Printf("校验selection %+v %+v", selectionInfo.SelectionStatus, selectionInfo)
 	if err != nil {
 		return nil, err
 	}
@@ -259,6 +261,7 @@ func (s *selection) GetAllSelection(ctx context.Context, enterpriseID string, pa
 func (s *selection) GetSelectionDetail(ctx *gin.Context, selectionId, enterpriseID string) (*http_model.SelectionDetail, error) {
 	selectionDetail := http_model.SelectionDetail{}
 	selectionInfo, err := db.GetSelectionById(ctx, selectionId)
+
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[selectionDB service] call GetSelectionInfo error,err:%+v", err)
 		return nil, err