package net.tccn.redim.servlet;

import net.tccn.redim.service.ImFriendService;
import org.redkale.net.http.*;
import org.redkale.service.RetResult;

import javax.annotation.Resource;
import java.util.logging.Logger;

/**
 * @author: liangxianyou at 2018/8/5 23:55.
 */
@WebServlet(value = {"/imx/*"}, comment = "测试servlet")
public class ImServlet extends HttpServlet {

    public Logger log = Logger.getLogger(this.getClass().getSimpleName());

    @Resource
    ImFriendService imFriendService;

    @HttpMapping(url = "/imx/friends", comment = "测试函数")
    public void abc(HttpRequest request, HttpResponse response) {

        String token = request.getParameter("token");

        RetResult jBean = imFriendService.friends(token);
        response.finish(jBean.getResult());
    }

}
