This commit is contained in:
tanghc
2021-02-25 15:00:03 +08:00
parent 4b135a62dd
commit 7bae549b30
6 changed files with 99 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ import com.gitee.sop.servercommon.annotation.Open;
import com.gitee.sop.servercommon.bean.OpenContext;
import com.gitee.sop.servercommon.bean.ServiceContext;
import com.gitee.sop.servercommon.exception.ServiceException;
import com.gitee.sop.storyweb.controller.param.ArrayElementParam;
import com.gitee.sop.storyweb.controller.param.CategoryParam;
import com.gitee.sop.storyweb.controller.param.LargeTextParam;
import com.gitee.sop.storyweb.controller.param.MemberInfoGetParam;
@@ -159,6 +160,16 @@ public class Example1001_BaseController {
return result;
}
@ApiOperation(value = "接收数组", notes = "接收数组")
@Open(value = "story.listparam")
@PostMapping(value = "/get/listparam/v1")
public StoryResult listparam(@RequestBody ArrayElementParam story) {
StoryResult result = new StoryResult();
result.setId(11L);
result.setName(JSON.toJSONString(story));
return result;
}
@Open(value = "story.get.large")
@RequestMapping("/get/large/v1")
public StoryResult getStoryLarge(LargeTextParam param) {

View File

@@ -0,0 +1,20 @@
package com.gitee.sop.storyweb.controller.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author tanghc
*/
@Data
public class ArrayElementParam {
@ApiModelProperty(value = "名字", required = true, example = "白雪公主", position = 1)
private String name;
@ApiModelProperty(value = "数组", required = true, dataType = "List", example = "白雪公主", position = 2)
private List<StoryParam> list;
}