对政策匹配进行优化

This commit is contained in:
hoteas 2022-05-11 00:44:52 +08:00
parent 7de6a79611
commit 95bfea4feb
2 changed files with 5 additions and 1 deletions

View File

@ -553,7 +553,7 @@ var DeclareCtr = Ctr{
if companyName == company.GetString("name") || company.GetString("name") == "" { if companyName == company.GetString("name") || company.GetString("name") == "" {
that.Db.Update("company", data, Map{"user_id": that.Session("user_id").Data}) that.Db.Update("company", data, Map{"user_id": that.Session("user_id").Data})
} }
if companyName != company.GetString("name") { if companyName != company.GetString("name") || user.GetCeilInt("certification_flag") == 0 {
//扫码绑定后,第一次使用匹配功能,自动进行认证,并更新企业信息 //扫码绑定后,第一次使用匹配功能,自动进行认证,并更新企业信息
if (user.GetCeilInt("certification_flag") == 0 || company.GetString("name") == "") && user.GetCeilInt64("salesman_id") != 0 { if (user.GetCeilInt("certification_flag") == 0 || company.GetString("name") == "") && user.GetCeilInt64("salesman_id") != 0 {
that.Db.Update("user", Map{"certification_flag": 1}, Map{"id": user.GetCeilInt("id")}) that.Db.Update("user", Map{"certification_flag": 1}, Map{"id": user.GetCeilInt("id")})

View File

@ -35,6 +35,10 @@ func main() {
//用户侧访问前设置 //用户侧访问前设置
appIns.SetConnectListener(func(that *Context) (isFinished bool) { appIns.SetConnectListener(func(that *Context) (isFinished bool) {
//发送短信校验 //发送短信校验
that.RespFunc = func() {
fmt.Println(that.Req.Form)
fmt.Println(that.RespData)
}
return isFinished return isFinished
}) })