Pārlūkot izejas kodu

Merge branch 'cygx_10.9' into debug

# Conflicts:
#	controllers/activity.go
#	models/db.go
ziwen 1 gadu atpakaļ
vecāks
revīzija
c4459e315e
3 mainītis faili ar 9 papildinājumiem un 2 dzēšanām
  1. 2 1
      controllers/activity.go
  2. 1 0
      models/db.go
  3. 6 1
      services/activity.go

+ 2 - 1
controllers/activity.go

@@ -1016,7 +1016,7 @@ func (this *ActivityCoAntroller) SignupCancel() {
 			err = errors.New("GetConfigByCode, Err: " + e.Error() + configCode)
 			return
 		}
-		openIdList, e := models.GetUserRecordListByMobile(4, cnf.ConfigValue)
+		openIdList, e := models.GetUserRecordListByMobile(4, cnf.ConfigValue+","+sellerItemQy.Mobile)
 		if e != nil && e.Error() != utils.ErrNoRow() {
 			err = errors.New("GetUserRecordListByMobile, Err: " + e.Error() + cnf.ConfigValue)
 			return
@@ -1042,6 +1042,7 @@ func (this *ActivityCoAntroller) SignupCancel() {
 		err = services.PublicSendTemplateMsg(sendInfo)
 		return
 	}
+
 	go services.YanXuanActivityPointsBillSignupCancel(activityId, uid) // 用户取消报名添加到处理研选扣点
 
 	br.Ret = 200

+ 1 - 0
models/db.go

@@ -156,6 +156,7 @@ func init() {
 		new(CygxTagHistory),
 		new(CygxActivityPointsBill),
 		new(CygxActivityPointsCompany),
+		new(CygxBannerHistory),
 	)
 	// 记录ORM查询日志
 	orm.Debug = true

+ 6 - 1
services/activity.go

@@ -1149,6 +1149,11 @@ func GetActivityonditionList(user *models.WxUserItem, activityTypeId, chartPermi
 
 // 根据用户身份处理活动可见
 func ActivityConditioninitSql(user *models.WxUserItem, condition string, isPower int) (conditionActivity string, err error) {
+	// cygx_10.9 未绑定联系方式的客户可以看到部分活动
+	if user.UserId == 0 {
+		conditionActivity  = ` AND art.publish_status = 1  AND art.visible_range != 1  ` + condition
+		return
+	}
 	condition += `   AND art.publish_status = 1 `
 	conditionActivity = condition
 	//弘则可以查看所有活动
@@ -2198,7 +2203,7 @@ func ActivityUserRemind(user *models.WxUserItem, activityDetail *models.Activity
 			err = errors.New("GetConfigByCode, Err: " + e.Error() + configCode)
 			return
 		}
-		openIdList, e := models.GetUserRecordListByMobile(4, cnf.ConfigValue)
+		openIdList, e := models.GetUserRecordListByMobile(4, cnf.ConfigValue+","+sellerItemQy.Mobile)
 		if e != nil && e.Error() != utils.ErrNoRow() {
 			err = errors.New("GetUserRecordListByMobile, Err: " + e.Error() + cnf.ConfigValue)
 			return err