|
@@ -74,6 +74,14 @@ func (this *UserController) Login() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //更新用户记录信息
|
|
|
|
+ updateParams := make(map[string]interface{})
|
|
|
|
+ updateParams["Mobile"] = req.Mobile
|
|
|
|
+ updateParams["BindAccount"] = req.Mobile
|
|
|
|
+ whereParam := map[string]interface{}{"user_id": user.UserId, "create_platform": 4}
|
|
|
|
+ go models.UpdateByExpr(models.UserRecord{}, whereParam, updateParams)
|
|
|
|
+
|
|
//BindMobile(openId, mobile string, userId, loginType int) (err error) {
|
|
//BindMobile(openId, mobile string, userId, loginType int) (err error) {
|
|
req.Mobile = strings.Trim(req.Mobile, " ")
|
|
req.Mobile = strings.Trim(req.Mobile, " ")
|
|
req.LoginType = 1
|
|
req.LoginType = 1
|
|
@@ -105,6 +113,12 @@ func (this *UserController) Login() {
|
|
br.Msg = "验证码错误,请重新输入"
|
|
br.Msg = "验证码错误,请重新输入"
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ updateParams := make(map[string]interface{})
|
|
|
|
+ updateParams["Email"] = req.Email
|
|
|
|
+ updateParams["BindAccount"] = req.Email
|
|
|
|
+ whereParam := map[string]interface{}{"user_id": user.UserId, "create_platform": 4}
|
|
|
|
+ go models.UpdateByExpr(models.UserRecord{}, whereParam, updateParams)
|
|
|
|
+
|
|
newUserId, err = models.PcBindMobile(unionId, req.Email, userId, req.LoginType)
|
|
newUserId, err = models.PcBindMobile(unionId, req.Email, userId, req.LoginType)
|
|
} else {
|
|
} else {
|
|
br.Msg = "无效的登录方式"
|
|
br.Msg = "无效的登录方式"
|
|
@@ -475,13 +489,13 @@ func (this *UserController) InterviewApplyList() {
|
|
for i := 0; i < lenList; i++ {
|
|
for i := 0; i < lenList; i++ {
|
|
item := list[i]
|
|
item := list[i]
|
|
article := articleMap[item.ArticleId]
|
|
article := articleMap[item.ArticleId]
|
|
- bodySub,_:=services.GetReportContentTextSub(article.Body)
|
|
|
|
|
|
+ bodySub, _ := services.GetReportContentTextSub(article.Body)
|
|
list[i].Title = article.Title
|
|
list[i].Title = article.Title
|
|
list[i].TitleEn = article.TitleEn
|
|
list[i].TitleEn = article.TitleEn
|
|
list[i].UpdateFrequency = article.UpdateFrequency
|
|
list[i].UpdateFrequency = article.UpdateFrequency
|
|
list[i].CreateDate = article.CreateDate
|
|
list[i].CreateDate = article.CreateDate
|
|
list[i].PublishDate = article.PublishDate
|
|
list[i].PublishDate = article.PublishDate
|
|
- list[i].Body=bodySub
|
|
|
|
|
|
+ list[i].Body = bodySub
|
|
list[i].Abstract = article.Abstract
|
|
list[i].Abstract = article.Abstract
|
|
list[i].CategoryName = article.CategoryName
|
|
list[i].CategoryName = article.CategoryName
|
|
list[i].SubCategoryName = article.SubCategoryName
|
|
list[i].SubCategoryName = article.SubCategoryName
|
|
@@ -693,8 +707,12 @@ func (this *UserController) ApplyTryOut() {
|
|
} else {
|
|
} else {
|
|
applyMethod = "潜在客户申请"
|
|
applyMethod = "潜在客户申请"
|
|
}
|
|
}
|
|
- if sellerItem != nil && sellerItem.AdminId > 0 && mobile != "" && sellerItem.OpenId != "" {
|
|
|
|
- go services.SendPermissionApplyTemplateMsg(user.RealName, sellerItem.CompanyName, mobile, sellerItem.OpenId, applyMethod)
|
|
|
|
|
|
+ cnf, _ := models.GetConfigByCode("tpl_msg")
|
|
|
|
+ if cnf != nil {
|
|
|
|
+ openIpItem, _ := models.GetWxUserItemByMobile(cnf.ConfigValue)
|
|
|
|
+ if openIpItem != nil && openIpItem.OpenId != "" {
|
|
|
|
+ go services.SendPermissionApplyTemplateMsg(user.RealName, sellerItem.CompanyName, mobile, openIpItem.OpenId, applyMethod)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, user.UserId, user.CompanyId)
|
|
err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, user.UserId, user.CompanyId)
|
|
@@ -709,3 +727,15 @@ func (this *UserController) ApplyTryOut() {
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Data = sellerMobile
|
|
br.Data = sellerMobile
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//func init() {
|
|
|
|
+// fmt.Println("start")
|
|
|
|
+// realName:="沈涛"
|
|
|
|
+// companyName:="弘则研究"
|
|
|
|
+// mobile:="18767183922"
|
|
|
|
+// openId:="oN0jD1eTfIAf68Y2n24RrvIGXFw4"
|
|
|
|
+// applyMethod:="xxx"
|
|
|
|
+// services.SendPermissionApplyTemplateMsg(realName, companyName, mobile, openId, applyMethod)
|
|
|
|
+// return
|
|
|
|
+// fmt.Println("end")
|
|
|
|
+//}
|