规则配置
parent
50b910bf25
commit
c7989bec9a
|
|
@ -45,10 +45,15 @@ public class Dict extends BaseEntity implements Serializable {
|
|||
@OneToMany(mappedBy = "dict",cascade={CascadeType.PERSIST,CascadeType.REMOVE})
|
||||
private List<DictDetail> dictDetails;
|
||||
|
||||
@ApiModelProperty(value = "代码")
|
||||
private String code;
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "类型;0普通,1规则")
|
||||
private String type;
|
||||
}
|
||||
|
|
@ -60,10 +60,20 @@ public class DictController {
|
|||
return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@GetMapping(value = "/queryRule")
|
||||
@PreAuthorize("@el.check('dict:list')")
|
||||
public ResponseEntity<Object> queryRule(DictQueryCriteria resources, Pageable pageable){
|
||||
resources.setType("1");
|
||||
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@GetMapping
|
||||
@PreAuthorize("@el.check('dict:list')")
|
||||
public ResponseEntity<Object> queryDict(DictQueryCriteria resources, Pageable pageable){
|
||||
resources.setType("0");
|
||||
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ public class DictDto extends BaseDTO implements Serializable {
|
|||
|
||||
private List<DictDetailDto> dictDetails;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
private String type;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,4 +27,7 @@ public class DictQueryCriteria {
|
|||
|
||||
@Query(blurry = "name,description")
|
||||
private String blurry;
|
||||
|
||||
@Query(type = Query.Type.EQUAL)
|
||||
private String type;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue