xingzai 1 anno fa
parent
commit
4d4afc1e06

+ 6 - 0
controllers/activity.go

@@ -1031,6 +1031,12 @@ func (this *ActivityController) SignupAdd() {
 		return
 	}
 	resp.IsResearchSpecial = isResearchSpecial
+	activtyPayTotal := services.GetCygxOrderVirtualAssetdCountTotal(user.Mobile, activityId)
+	if activtyPayTotal > 0 {
+		resp.IsResearchSpecial = false //单场购买的活动设为 false 配合前端样式展示使用
+		resp.IsPayActivity = true
+	}
+
 	if havePower {
 		item := new(models.CygxActivitySignup)
 		item.RegisterPlatform = utils.REGISTER_PLATFORM

+ 2 - 1
models/activity.go

@@ -158,7 +158,8 @@ type ActivityDetail struct {
 	ChartPermissionNameDeputy string                     `description:"副行业名称"`
 	TopTime                   int                        `description:"置顶时间"`
 	LabelKeywordImgLink       string                     `description:"标签关键词ico"`
-	ActivityPrice             float64                    `description:"单场活动价格"`
+	ActivityPrice             float64                    `description:"单场活动现价格"`
+	ActivityPriceOriginal     float64                    `description:"单场活动原价格"`
 }
 
 // 活动详情

+ 1 - 0
models/activity_signup.go

@@ -41,6 +41,7 @@ type SignupStatus struct {
 	GoBindEmail       bool   `description:"是否去绑定邮箱"`
 	IsResearch        bool   `description:"是否属于研选"`
 	IsResearchSpecial bool   `description:"是否属于特殊的研选"`
+	IsPayActivity     bool   `description:"是否是花钱购买的单场活动"`
 }
 type ActivitySingnupRep struct {
 	ActivityId int    `description:"活动id"`

+ 2 - 0
models/order/order.go

@@ -263,6 +263,8 @@ func UpdateCygxOrder(item *CygxOrder, oldOrderCode string) (err error) {
 	updateParams["Source"] = item.Source
 	updateParams["SourceTitle"] = item.SourceTitle
 	updateParams["OutTradeNo"] = item.OutTradeNo
+	updateParams["GoodsMoney"] = item.GoodsMoney
+	updateParams["OrderMoney"] = item.OrderMoney
 	updateParams["ModifyTime"] = item.ModifyTime
 	ptrStructOrTableName := "cygx_order"
 	whereParam := map[string]interface{}{"order_code": oldOrderCode}

+ 2 - 0
services/order.go

@@ -66,6 +66,8 @@ func GetGoodsInfoByActivity(item *models.ActivityDetail) (goodsListResp []*order
 	if item.ActivityPrice > 0 {
 		for k, _ := range goodsList {
 			goodsList[k].CurrentPrice = fmt.Sprint(item.ActivityPrice)
+			goodsList[k].CurrentPrice = fmt.Sprint(item.ActivityPriceOriginal)
+			goodsList[k].PopupPriceMsg = fmt.Sprint("¥", item.ActivityPriceOriginal)
 		}
 	}
 	goodsListResp = goodsList

+ 4 - 0
services/wx_template_msg.go

@@ -472,6 +472,10 @@ func SendNeiRongZuActivitieSignTemplateMsg(user *models.WxUserItem, activityDeta
 		err = errors.New("GetUserRecordListByMobile, Err: " + e.Error() + cnf.ConfigValue)
 		return err
 	}
+	if len(openIdList) == 0 {
+		err = nil
+		return
+	}
 	keyword1 := user.RealName + "--" + user.CompanyName + "(" + sellerItemQy.RealName + ")"
 	keyword2 := user.Mobile
 	keyword3 := time.Now().Format(utils.FormatDateTime)