zwxi hai 9 meses
pai
achega
f2365db606

+ 2 - 2
controller/public.go

@@ -526,7 +526,7 @@ func BannerGetQRCode(c *gin.Context) {
 	remark := c.Query("Remark")
 	wxUserInfo, err := wx_user.GetByUserId(userId)
 	if err != nil {
-		response.Fail(err.Error(), c)
+		response.Ok(err.Error(), c)
 		return
 	}
 	companyInfo, tmpErr := company.GetByCompanyId(wxUserInfo.CompanyID)
@@ -613,7 +613,7 @@ func ResearchSignUp(c *gin.Context) {
 		return
 	}
 	if count > 0 {
-		response.FailData("报名失败", "该手机号已报名,Err:"+err.Error(), c)
+		response.FailData("报名失败", "该手机号已报名", c)
 		return
 	}
 	ob := &yb_research_signup_statistics.YbResearchSignupStatistics{

+ 1 - 1
models/tables/yb_research_signup_statistics/model.go

@@ -10,6 +10,6 @@ func (m *YbResearchSignupStatistics) Create() (err error) {
 
 // GetBySandboxId 根据沙盘ID查询详情
 func GetSignUpCountByMobileAndBannerId(mobile string, bannerId int) (count int64, err error) {
-	err = global.DEFAULT_MYSQL.Where("mobile = ? and banner_id=? ", mobile, bannerId).Count(&count).Error
+	err = global.DEFAULT_MYSQL.Table("yb_research_signup_statistics").Where("mobile = ? and banner_id=? ", mobile, bannerId).Count(&count).Error
 	return
 }