<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="详情"/></jsp:include>
<form id="formEdit" action="<%=basePath%>/admin/service_provider/doEdit.action" method="post" role="form" class="form-horizontal">
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">资源名称：</label>
        <div class="col-md-7 col-sm-7"> ${busiModel.resourceName}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
<c:if test="${not empty busiModel.interfaceViewModels}">
<c:forEach items="${busiModel.interfaceViewModels}" var="interfaceView">
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">接口地址：</label>
        <div class="col-md-7 col-sm-7">
                ${interfaceView.url}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">支持格式：</label>
        <div class="col-md-7 col-sm-7">
                ${interfaceView.responseFormat}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">请求方式：</label>
        <div class="col-md-7 col-sm-7">
                ${interfaceView.requestMethod}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">请求参数：</label>
        <table id="testaaa" class="table table-hover  table-condensed table-bordered "
               style="width: 70%;margin-left:10%" align="center">
            <thead>
            <tr class="cs01">
                <td>名称</td>
                <td>必填</td>
                <td>数据类型</td>
                <td>说明</td>
            </tr>
            <c:if test="${not empty interfaceView.interfaceInputs}">
                <c:forEach items="${interfaceView.interfaceInputs}" var="interfaceInput">
                    <tr>
                        <td>${interfaceInput.paramName}</td>
                        <td>
                            <c:if test="${interfaceInput.isRequired==0}">必填</c:if>
                            <c:if test="${interfaceInput.isRequired!=0}">非必填</c:if>
                        </td>
                        <td>${interfaceInput.dataType}</td>
                        <td>${interfaceInput.description}</td>
                    </tr>
                </c:forEach>
            </c:if>
            </thead>
        </table>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">返回参数：</label>
        <table  class="table table-hover  table-condensed table-bordered "
               style="width: 70%;margin-left:10%" align="center">
            <thead>
            <tr >
                <td>名称</td>
                <td>数据类型</td>
                <td>说明</td>
            </tr>
            <c:if test="${not empty interfaceView.interfaceInputs}">
                <c:forEach items="${interfaceView.interfaceOutputs}" var="interfaceOutput">
                    <tr>
                        <td>${interfaceOutput.paramName}</td>
                        <td>${interfaceOutput.dataType}</td>
                        <td>${interfaceOutput.description}</td>
                    </tr>
                </c:forEach>
            </c:if>
            </thead>
        </table>
    </div>

</c:forEach>
</c:if>

</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>