package com.lxyer.redim.servlet;

import com.lxyer.base.JBean;
import com.lxyer.redim.service.ImFriendService;
import org.redkale.net.http.*;

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");

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

}
