mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
2.5.3
This commit is contained in:
@@ -31,7 +31,8 @@ public class ValidatorTest extends TestCase {
|
|||||||
|
|
||||||
|
|
||||||
public void testField() {
|
public void testField() {
|
||||||
Manager manager = new Manager("Jim", 22, Type.TWO, Status.OK);
|
Sub sub = new Sub("sub", Type.ONE);
|
||||||
|
Manager manager = new Manager("Jim", 22, Type.TWO, Status.OK, sub);
|
||||||
Store store = new Store("仓库A", manager, Type.ONE);
|
Store store = new Store("仓库A", manager, Type.ONE);
|
||||||
Goods goods = new Goods("Apple", new BigDecimal(50000), store);
|
Goods goods = new Goods("Apple", new BigDecimal(50000), store);
|
||||||
serviceParamValidator.validateBizParam(goods);
|
serviceParamValidator.validateBizParam(goods);
|
||||||
@@ -93,12 +94,29 @@ public class ValidatorTest extends TestCase {
|
|||||||
|
|
||||||
@NotNull(message = "Manager.status不能为空")
|
@NotNull(message = "Manager.status不能为空")
|
||||||
private Status status;
|
private Status status;
|
||||||
|
|
||||||
|
@NotNull(message = "sub不能为空")
|
||||||
|
private Sub sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
static class Sub {
|
||||||
|
@NotBlank(message = "管理员姓名不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@NotNull(message = "Sub.type不能为空")
|
||||||
|
private Type type;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Type {
|
enum Type {
|
||||||
ONE,TWO
|
ONE,TWO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum SubType {
|
||||||
|
OK,ERR
|
||||||
|
}
|
||||||
|
|
||||||
enum Status {
|
enum Status {
|
||||||
OK, ERROR
|
OK, ERROR
|
||||||
}
|
}
|
||||||
|
@@ -152,6 +152,16 @@ public class AlipayController {
|
|||||||
return story;
|
return story;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiAbility(ignoreValidate = true)
|
||||||
|
@GetMapping("/empinfo/get")
|
||||||
|
@ApiOperation(value="遗留接口", notes = "遗留接口")
|
||||||
|
public StoryResult getEmpInfo() {
|
||||||
|
StoryResult story = new StoryResult();
|
||||||
|
story.setId(1L);
|
||||||
|
story.setName("遗留接口");
|
||||||
|
return story;
|
||||||
|
}
|
||||||
|
|
||||||
// http://localhost:2222/alipay.story.get/
|
// http://localhost:2222/alipay.story.get/
|
||||||
@ApiOperation(value="获取故事信息2", notes = "获取故事信息2的详细信息")
|
@ApiOperation(value="获取故事信息2", notes = "获取故事信息2的详细信息")
|
||||||
@ApiMapping(value = "alipay.story.get")
|
@ApiMapping(value = "alipay.story.get")
|
||||||
|
Reference in New Issue
Block a user