package com.engine.htsc.fwnrTokmbh.web;

import com.alibaba.fastjson.JSONObject;
import com.engine.common.util.ServiceUtil;
import com.engine.htsc.fwnrTokmbh.service.GetkmbhService;
import com.engine.htsc.fwnrTokmbh.service.impl.GetkmbhServiceImpl;
import weaver.general.BaseBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;

public class FwnrToKmbhAction {

    private GetkmbhService getService() {
        return ServiceUtil.getService(GetkmbhServiceImpl.class);
    }


    @GET
    @Path("/getkmbhbyfwnr")
    @Produces({MediaType.APPLICATION_JSON})
    public String getkmbhByfwnr(@Context HttpServletRequest request, @Context HttpServletResponse response) {
//        *住宿服务*房费
        BaseBean bb = new BaseBean();
        bb.writeLog("===========getkmbhByfwnr==============");
        String fwmc = request.getParameter("fwmc");//服务名称
        return JSONObject.toJSONString(getService().getKmbh(fwmc));
    }
}
