Commit eb4494af authored by zhangc's avatar zhangc

commit

parent cbba0314
......@@ -26,7 +26,7 @@ public interface ApiInterfaceMapper extends BaseMapper<ApiInterface> {
* @param query
* @return
*/
IPage<ApiInterface> listApiInterfaceInfo(IPage<ApiInterface> page, @Param("ew") Wrapper<ApiInterface> query);
IPage<ApiInterface > listApiInterfaceInfo(IPage<ApiInterface > page, @Param("ew") Wrapper<ApiInterface > query);
/**
* 查询API详情信息
......
......@@ -45,7 +45,7 @@ public interface ApiInterfaceService {
* @param req
* @return
*/
IPage<ApiInterface> listApiInterface(ApiInterfaceInfoListReq req);
IPage<ApiInterface > listApiInterface(ApiInterfaceInfoListReq req);
/**
* 查询API详情
......
......@@ -15,6 +15,7 @@ import com.jz.dm.mapper.ApiInterfaceMapper;
import com.jz.dm.models.domian.ApiAuth;
import com.jz.dm.models.domian.ApiInterface;
import com.jz.dm.models.domian.ApiInterfaceCustom;
import com.jz.dm.models.dto.ApiCallDataDto;
import com.jz.dm.models.req.api.ApiInterfaceDetailReq;
import com.jz.dm.models.req.api.ApiInterfaceInfoListReq;
import com.jz.dm.service.ApiInterfaceService;
......@@ -59,9 +60,9 @@ public class ApiInterfaceServiceImpl implements ApiInterfaceService {
* @return
*/
@Override
public IPage<ApiInterface> listApiInterface(ApiInterfaceInfoListReq req) {
IPage<ApiInterface> page = new Page<>(req.getPageNum(), req.getPageSize());
QueryWrapper<ApiInterface> query = new QueryWrapper<>();
public IPage<ApiInterface > listApiInterface(ApiInterfaceInfoListReq req) {
IPage<ApiInterface > page = new Page<>(req.getPageNum(), req.getPageSize());
QueryWrapper<ApiInterface > query = new QueryWrapper<>();
/*if (StringUtils.isNotBlank(req.getApiKey())){
query.eq("api_key",req.getApiKey());
}*/
......
......@@ -11,12 +11,12 @@
<select id="listApiInterfaceInfo" resultType="com.jz.dm.models.domian.ApiInterface">
SELECT ai.*,
/* ai.id AS id,
/* ai.id AS id,
ai.api_key AS apiKey,
ai.join_type AS joinType,
ai.create_user AS createUser,*/
COUNT(ar.id) AS callStat,
SUM(ar.request_time) AS requestTimeStat
SUM(ar.request_consuming) AS requestTimeStat
FROM t_api_interface AS ai
LEFT JOIN t_api_req_log AS ar ON ai.api_key =ar.api_key
AND ar.is_deleted =0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment