소스 검색

feat:更新

wangshan 2 년 전
부모
커밋
21307bd63a
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      handler/activity/jyActivityOther.go
  2. 5 1
      services/activity/bidderPlan/services.go

+ 1 - 1
handler/activity/jyActivityOther.go

@@ -41,7 +41,7 @@ func (BP *JyActivity) Questionnaire(userId, phone, answers string) error {
 	}
 	//保存问卷
 	if ok := award.SaveQuestionnaire(userId, phone, answers); ok {
-		if redis.Put(BidderPlanRedis, fmt.Sprintf(QuestionnaireSubmit, userId), 1, BP.cacheLong()) != true {
+		if redis.Put(BidderPlanRedis, fmt.Sprintf(QuestionnaireSubmit, userId), "qs", BP.cacheLong()) != true {
 			return fmt.Errorf("redis de22q 存储异常")
 		}
 		//问卷保存后--赠送7天超级订阅

+ 5 - 1
services/activity/bidderPlan/services.go

@@ -56,7 +56,11 @@ func (act *Activity) Questionnaire() {
 		}
 		//提交答案
 		answers := gconv.String(reqParam["answers"])
-		return activity.MembershipDay.Questionnaire(userId, phone, answers) == nil, nil
+		err = activity.MembershipDay.Questionnaire(userId, phone, answers)
+		if err != nil {
+			return false, err
+		}
+		return true, nil
 	}()
 	if errMsg != nil {
 		log.Printf("Activity Questionnaire  %s error:%s\n", userId, errMsg.Error())