浏览代码

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

k.zhang 1 年之前
父节点
当前提交
cfda4a91eb
共有 2 个文件被更改,包括 23 次插入12 次删除
  1. 5 0
      apis/shanghu/merchant.card.go
  2. 18 12
      apis/shanghu/models/card.go

+ 5 - 0
apis/shanghu/merchant.card.go

@@ -134,6 +134,11 @@ func GetMerchantCard(c *gin.Context) {
 	outData.Inventory = merchantCard.Inventory
 	outData.RebateRate = merchantCard.RebateRate
 	outData.CardPrice = merchantCard.CardPrice
+	outData.X = merchantCard.X
+	outData.Y = merchantCard.Y
+	outData.W = merchantCard.W
+	outData.H = merchantCard.H
+	outData.BackgroundImage = merchantCard.BackgroundImage
 
 	app.OK(c, outData, app.Success)
 

+ 18 - 12
apis/shanghu/models/card.go

@@ -28,18 +28,24 @@ type GetMerchantCardRequest struct {
 }
 
 type GetMerchantCardReply struct {
-	MerchantCardName  string `json:"merchant_card_name"`  // 商户卡名称
-	MerchantOpenID    string `json:"merchant_open_id"`    // openid
-	CardProjectData   string `json:"card_project_data"`   // 项目
-	CardPrice         string `json:"card_price"`          // 单价
-	ActivityEndTime   string `json:"activity_end_time"`   // 活动结束时间
-	ActivityStartTime string `json:"activity_start_time"` // 活动开始时间
-	MerchantCardTime  string `json:"merchant_card_time"`  // 商户卡有效期
-	Inventory         int64  `json:"inventory"`           // 库存数量
-	QuotaNum          int64  `json:"quota_num"`           // 限购数量
-	UseRule           string `json:"use_rule"`            // 使用规则
-	Picture           string `json:"picture"`             // 图片
-	RebateRate        int64  `json:"rebate_rate"`
+	MerchantCardName  string          `json:"merchant_card_name"`  // 商户卡名称
+	MerchantOpenID    string          `json:"merchant_open_id"`    // openid
+	CardProjectData   string          `json:"card_project_data"`   // 项目
+	CardPrice         string          `json:"card_price"`          // 单价
+	ActivityEndTime   string          `json:"activity_end_time"`   // 活动结束时间
+	ActivityStartTime string          `json:"activity_start_time"` // 活动开始时间
+	MerchantCardTime  string          `json:"merchant_card_time"`  // 商户卡有效期
+	Inventory         int64           `json:"inventory"`           // 库存数量
+	QuotaNum          int64           `json:"quota_num"`           // 限购数量
+	UseRule           string          `json:"use_rule"`            // 使用规则
+	Picture           string          `json:"picture"`             // 图片
+	RebateRate        int64           `json:"rebate_rate"`
+	BackgroundImage   string          `json:"background_image"` //背景图
+	W                 decimal.Decimal `json:"w"`                // w
+	H                 decimal.Decimal `json:"h"`                // h
+	X                 decimal.Decimal `json:"x"`                // x
+	Y                 decimal.Decimal `json:"y"`                // y
+
 }
 
 // 画布详情