1.单身 注明2,不注明1,注明不0
2.同城 注明1,不注明0
3.熟人 共同关注2,关注1,被关注0
单身为个人属性同城为,两人结合的属性熟人,发起者与被配对者的属性 me-male, me-famale
字段表示:maleId | femaleId | level
1 foreach(var male in males){
2 foreach(var female in females){
3 var level = male.status + femail.status;
4
5 if(male.city!=null && female.city!=null){
6 if(male.city== female.city){
7 level = level + 2
8 }else
9 {
10 level= level + 0
11 }
12 }
13 }else{
14 level = level + 1;
15 }
16
17 var releation_male = me and male;
18 var relation_female= me and femal;
19 level = level + releation_male + relation_female
20
21 insert into table male.id, female.id, level.
22 }
23 }