|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.jw.base.endpoint.interfacemg;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.jw.base.service.interfacemg.BaseUserInterfaceService;
|
|
|
import com.yihu.jw.entity.interfacemg.BaseThirdUserDO;
|
|
@ -16,6 +17,9 @@ import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 第三方接口配置管理
|
|
|
*/
|
|
@ -49,8 +53,15 @@ public class BaseUserInterfaceEndpoint extends EnvelopRestEndpoint {
|
|
|
public Envelop userInterfaceStandardSaveAndUpdate (
|
|
|
@ApiParam(name = "jsonData", value = "第三方接口标准信息配置实体", required = false)
|
|
|
@RequestParam(value = "jsonData", required = false) String jsonData) throws Exception {
|
|
|
BaseThirdUserInterfaceStandardDO baseThirdUserInterfaceStandardDO = toEntity(jsonData, BaseThirdUserInterfaceStandardDO.class);
|
|
|
return success(baseUserInterfaceService.userInterfaceStandardsaveAndUpdate(baseThirdUserInterfaceStandardDO));
|
|
|
JSONArray array = JSONArray.parseArray(jsonData);
|
|
|
List<BaseThirdUserInterfaceStandardDO> interfaceStandardDOList = new ArrayList<>();
|
|
|
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
JSONObject object = array.getJSONObject(i);
|
|
|
BaseThirdUserInterfaceStandardDO baseThirdUserInterfaceStandardDO = toEntity(object.toJSONString(), BaseThirdUserInterfaceStandardDO.class);
|
|
|
interfaceStandardDOList.add(baseThirdUserInterfaceStandardDO);
|
|
|
}
|
|
|
return success(baseUserInterfaceService.userInterfaceStandardsaveAndUpdate(interfaceStandardDOList));
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseRequestMapping.UserInterface.userInterfaceLogsaveAndUpdate)
|
|
@ -96,11 +107,13 @@ public class BaseUserInterfaceEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "condition", required = false) String condition,
|
|
|
@ApiParam(name = "userInterfaceId", value = "接口id", required = false)
|
|
|
@RequestParam(value = "userInterfaceId", required = false) String userInterfaceId,
|
|
|
@ApiParam(name = "stdDatasetId", value = "数据集id", required = false)
|
|
|
@RequestParam(value = "stdDatasetId", required = false) String stdDatasetId,
|
|
|
@ApiParam(name = "page", value = "页数", required = false)
|
|
|
@RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "size", value = "页码", required = false)
|
|
|
@RequestParam(value = "size", required = false) Integer size) throws Exception {
|
|
|
return success(baseUserInterfaceService.selectUserInterfaceStandardByCondition(condition,userInterfaceId,page,size));
|
|
|
return success(baseUserInterfaceService.selectUserInterfaceStandardByCondition(condition,userInterfaceId,stdDatasetId,page,size));
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.UserInterface.selectUserInterfaceLogByCondition)
|