@ -3,14 +3,17 @@ package order
import (
"errors"
"fmt"
"github.com/golangkit/formatime"
"github.com/shopspring/decimal"
"recook/internal/dbc"
"recook/internal/libs/bean"
"recook/internal/model/order"
goods2 "recook/internal/v2/logic/manage/goods"
"recook/internal/v2/model/recook/after"
"recook/internal/v2/model/recook/goods"
manage "recook/internal/v2/model/recook/order"
"git.oa00.com/go/mysql"
"github.com/golangkit/formatime"
"github.com/shopspring/decimal"
)
var OrderLogic = & orderLogic { }
@ -110,11 +113,14 @@ func (o *orderLogic) Lists(userId, status uint, page bean.Page) (lists []OrderIt
// @Style 导购订单列表
func ( o * orderLogic ) GuideLists ( userId , status uint , page bean . Page ) ( lists [ ] OrderItem , total int ) {
ids := make ( [ ] uint , 0 )
mysql . Db . Table ( ( & order . Profit { } ) . TableName ( ) ) . Where ( "user_id = ?" , userId ) . Group ( "order_id" ) . Pluck ( "order_id" , & ids )
lists = [ ] OrderItem { }
recookOrderInfoModel := & manage . RecookOrderInfoModel { }
query := "share_id = ?"
query := " id in (?) and user_id ! = ?"
//userCoinHistory := user.RecookUserCoinHistory{}
queryArgs := [ ] interface { } { userId}
queryArgs := [ ] interface { } { ids, userId}
if status > 0 {
switch status {
case 1 : // 待发货