|
|
@@ -32,8 +32,7 @@ import java.util.List;
|
|
|
@Api(tags = "基础数据")
|
|
|
@RestController
|
|
|
@RequestMapping("/iscs/attribute")
|
|
|
-public class IsSystemAttributeController extends BaseController
|
|
|
-{
|
|
|
+public class IsSystemAttributeController extends BaseController {
|
|
|
@Autowired
|
|
|
private IIsSystemAttributeService isSystemAttributeService;
|
|
|
|
|
|
@@ -44,8 +43,7 @@ public class IsSystemAttributeController extends BaseController
|
|
|
})
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:list')")
|
|
|
@GetMapping("/getIsSystemAttributePage")
|
|
|
- public CommonResult<Page<IsSystemAttribute>> getIsSystemAttributePage(Page<IsSystemAttribute> page, IsSystemAttribute isSystemAttribute)
|
|
|
- {
|
|
|
+ public CommonResult<Page<IsSystemAttribute>> getIsSystemAttributePage(Page<IsSystemAttribute> page, IsSystemAttribute isSystemAttribute) {
|
|
|
Page<IsSystemAttribute> result = isSystemAttributeService.getIsSystemAttributePage(page, isSystemAttribute);
|
|
|
return CommonResult.success(result);
|
|
|
}
|
|
|
@@ -55,8 +53,7 @@ public class IsSystemAttributeController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:export')")
|
|
|
@Log(title = "基础数据", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/exportIsSystemAttribute")
|
|
|
- public void exportIsSystemAttribute(HttpServletResponse response, IsSystemAttribute isSystemAttribute)
|
|
|
- {
|
|
|
+ public void exportIsSystemAttribute(HttpServletResponse response, IsSystemAttribute isSystemAttribute) {
|
|
|
Page<IsSystemAttribute> page = new Page<>();
|
|
|
page.setSize(-1);
|
|
|
page.setCurrent(1);
|
|
|
@@ -70,8 +67,7 @@ public class IsSystemAttributeController extends BaseController
|
|
|
@Parameter(name = "id", description = "id")
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:query')")
|
|
|
@GetMapping(value = "/selectIsSystemAttributeById")
|
|
|
- public CommonResult<IsSystemAttribute> selectIsSystemAttributeById(Long id)
|
|
|
- {
|
|
|
+ public CommonResult<IsSystemAttribute> selectIsSystemAttributeById(Long id) {
|
|
|
return CommonResult.success(isSystemAttributeService.getById(id));
|
|
|
}
|
|
|
|
|
|
@@ -79,8 +75,7 @@ public class IsSystemAttributeController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:add')")
|
|
|
@Log(title = "基础数据", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/insertIsSystemAttribute")
|
|
|
- public CommonResult<Boolean> insertIsSystemAttribute(@RequestBody @Parameter(name = "isSystemAttribute", description = "新增数据类,放到body") IsSystemAttribute isSystemAttribute)
|
|
|
- {
|
|
|
+ public CommonResult<Boolean> insertIsSystemAttribute(@RequestBody @Parameter(name = "isSystemAttribute", description = "新增数据类,放到body") IsSystemAttribute isSystemAttribute) {
|
|
|
return CommonResult.success(isSystemAttributeService.save(isSystemAttribute));
|
|
|
}
|
|
|
|
|
|
@@ -88,19 +83,25 @@ public class IsSystemAttributeController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:edit')")
|
|
|
@Log(title = "基础数据", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/updateIsSystemAttribute")
|
|
|
- public CommonResult<Boolean> updateIsSystemAttribute(@RequestBody @Parameter(name = "isSystemAttribute", description = "修改数据类,放到body") IsSystemAttribute isSystemAttribute)
|
|
|
- {
|
|
|
+ public CommonResult<Boolean> updateIsSystemAttribute(@RequestBody @Parameter(name = "isSystemAttribute", description = "修改数据类,放到body") IsSystemAttribute isSystemAttribute) {
|
|
|
return CommonResult.success(isSystemAttributeService.updateById(isSystemAttribute));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("删除基础数据")
|
|
|
@PreAuthorize("@ss.hasPermi('iscs:attribute:remove')")
|
|
|
@Log(title = "基础数据", businessType = BusinessType.DELETE)
|
|
|
- @PostMapping("/deleteIsSystemAttributeByIds")
|
|
|
- public CommonResult<Boolean> deleteIsSystemAttributeByIds(String ids)
|
|
|
- {
|
|
|
+ @PostMapping("/deleteIsSystemAttributeByIds")
|
|
|
+ public CommonResult<Boolean> deleteIsSystemAttributeByIds(String ids) {
|
|
|
Assert.notBlank(ids, "请选择需要删除的数据!");
|
|
|
Long[] longIds = Convert.toLongArray(ids);
|
|
|
return CommonResult.success(isSystemAttributeService.removeBatchByIds(Arrays.asList(longIds)));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("通过sysAttrKey查询数据")
|
|
|
+ @Parameter(name = "sysAttrKey", description = "参数键名")
|
|
|
+ @GetMapping("/getIsSystemAttributeByKey")
|
|
|
+ public CommonResult<IsSystemAttribute> getIsSystemAttributeByKey(String sysAttrKey) {
|
|
|
+ IsSystemAttribute result = isSystemAttributeService.getIsSystemAttributeByKey(sysAttrKey);
|
|
|
+ return CommonResult.success(result);
|
|
|
+ }
|
|
|
}
|