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