Browse Source

no message

xingzai 1 năm trước cách đây
mục cha
commit
9a66e3a6cb
1 tập tin đã thay đổi với 13 bổ sung0 xóa
  1. 13 0
      models/user_record.go

+ 13 - 0
models/user_record.go

@@ -126,3 +126,16 @@ func GetUserRecordListByMobile(platform int, bindAccount string) (items []*OpenI
 	_, err = orm.NewOrm().Raw(sql, platform).QueryRows(&items)
 	return
 }
+
+func GetWxOpenIdByMobileSliceList(mobiles []string) (items []*OpenIdList, err error) {
+	itemsLen := len(mobiles)
+	if itemsLen == 0 {
+		return
+	}
+	o := orm.NewOrm()
+	sql := `SELECT cr.*,user_id FROM user_record  as c
+			INNER JOIN cygx_user_record AS cr ON cr.union_id = c.union_id
+			WHERE bind_account IN (` + utils.GetOrmInReplace(itemsLen) + `) AND create_platform = 4`
+	_, err = o.Raw(sql, mobiles).QueryRows(&items)
+	return
+}