Преглед на файлове

Merge branch 'develop' of k.zhang/duoduo into test

k.zhang преди 4 години
родител
ревизия
6b07886eed

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
apis/pdd/pdd.ddk.order.list.increment.get.go


+ 2 - 1
models/mysql/order.go

@@ -22,6 +22,7 @@ type Order struct {
 	Amount                decimal.Decimal `gorm:"column:amount" json:"amount"`
 	Amount1               decimal.Decimal `gorm:"column:amount_1" json:"amount1"`
 	Amount2               decimal.Decimal `gorm:"column:amount_2" json:"amount2"`
+	OrderAmount           decimal.Decimal `gorm:"column:order_amount" json:"orderAmount"`
 }
 
 // TableName sets the insert table name for this struct type
@@ -115,7 +116,7 @@ func (o *Order) GetOrderList(pageSize int, pageIndex int) ([]Order, int, error)
 	table = table.Where("p_id = ?  ", o.PID)
 
 	var count int
-	if err := table.Select("order_id,promotion_amount,p_id,order_status,order_status_desc,goods_name,goods_thumbnail_url,order_group_success_time,amount,amount_1,amount_2,order_sn,DATE_FORMAT(order_create_time,'%Y-%m-%d %H:%i:%s') as order_create_time").Order("id desc").Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil {
+	if err := table.Select("order_id,promotion_amount,p_id,order_status,order_status_desc,goods_name,goods_thumbnail_url,order_group_success_time,amount,amount_1,amount_2,order_sn,DATE_FORMAT(order_create_time,'%Y-%m-%d %H:%i:%s') as order_create_time,order_amount").Order("id desc").Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil {
 		return nil, 0, err
 	}
 	table.Count(&count)

+ 1 - 1
models/pdd/pdd.ddk.order.list.increment.get.go

@@ -38,7 +38,7 @@ type OrderList struct {
 	GroupID                    int64  `json:"group_id"`
 	IsDirect                   int    `json:"is_direct"`
 	MallID                     int    `json:"mall_id"`
-	OrderAmount                int    `json:"order_amount"`
+	OrderAmount                int64  `json:"order_amount"`
 	OrderCreateTime            int64  `json:"order_create_time"`
 	OrderGroupSuccessTime      int64  `json:"order_group_success_time"`
 	OrderID                    string `json:"order_id"`

+ 1 - 0
report/pdd.ddk.order.list.increment.get.go

@@ -90,6 +90,7 @@ func DdkOrder() {
 			sqlData.Amount = decimal.NewFromInt(outData.OrderListGetResponse.OrderList[i].PromotionAmount).Mul(decimal.NewFromFloat(0.005))
 			sqlData.Amount1 = decimal.NewFromInt(outData.OrderListGetResponse.OrderList[i].PromotionAmount).Mul(decimal.NewFromFloat(0.0015))
 			sqlData.Amount1 = decimal.NewFromInt(outData.OrderListGetResponse.OrderList[i].PromotionAmount).Mul(decimal.NewFromFloat(0.001))
+			sqlData.OrderAmount = decimal.NewFromInt(outData.OrderListGetResponse.OrderList[i].OrderAmount).Div(decimal.NewFromInt(100))
 
 			count := sqlData.GetNum()
 			if count <= 0 {