Users:
userid username password
1 venkatesh duggirala venkat
2 venkat D venkat
3 venkat venkat
Friends:
id userid frienduserid isActive
1 1 2 1
1 1 3 1
如果我将id = 2和name = venkat作为参数传递给服务,则需要获取名称以“venkat”开头的所有匹配记录,并且需要将状态消息作为已经是好友的消息。
例如:
<output>
<Response>
<userid>1</userid>
<name>venkatsh duggirala</userid>
<status>already friend</staus>
</Response>
<response>
<userid>3</userid>
<name>venkat</userid>
<status>send friend request</staus>
</Response>
</output>