mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-04-21 17:17:16 +00:00
refactor(role): align RoleApi endpoints with RoleController
This commit is contained in:
parent
9c8b1b834e
commit
1e8cd0c863
1 changed files with 18 additions and 12 deletions
|
|
@ -1,7 +1,9 @@
|
|||
package com.bgasol.model.system.role.api;
|
||||
|
||||
import com.bgasol.common.constant.value.SystemConfigValues;
|
||||
import com.bgasol.common.core.base.dto.BasePageDto;
|
||||
import com.bgasol.common.core.base.vo.BaseVo;
|
||||
import com.bgasol.common.core.base.vo.PageVo;
|
||||
import com.bgasol.model.system.role.dto.RoleCreateDto;
|
||||
import com.bgasol.model.system.role.dto.RoleUpdateDto;
|
||||
import com.bgasol.model.system.role.entity.RoleEntity;
|
||||
|
|
@ -10,6 +12,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@FeignClient(
|
||||
path = "/" + SystemConfigValues.SERVICE_NAME + "/role",
|
||||
|
|
@ -17,21 +20,24 @@ import java.util.List;
|
|||
contextId = SystemConfigValues.SERVICE_NAME + "-RoleApi"
|
||||
)
|
||||
public interface RoleApi {
|
||||
@PostMapping
|
||||
BaseVo<RoleEntity> save(@RequestBody @Valid RoleCreateDto createDto);
|
||||
@PostMapping("/insert")
|
||||
BaseVo<RoleEntity> insert(@RequestBody @Valid RoleCreateDto createDto);
|
||||
|
||||
@PutMapping
|
||||
BaseVo<RoleEntity> update(@RequestBody @Valid RoleUpdateDto updateDto);
|
||||
@PostMapping("/apply")
|
||||
BaseVo<RoleEntity> apply(@RequestBody @Valid RoleUpdateDto updateDto);
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
BaseVo<Integer[]> delete(@PathVariable("ids") String ids);
|
||||
@PostMapping("/delete")
|
||||
BaseVo<Integer> delete(@RequestBody Set<String> ids);
|
||||
|
||||
@GetMapping("/{id}")
|
||||
BaseVo<RoleEntity> findById(@PathVariable("id") String id);
|
||||
@GetMapping("/{id}/{otherData}")
|
||||
BaseVo<RoleEntity> findById(@PathVariable("id") String id, @PathVariable("otherData") Boolean otherData);
|
||||
|
||||
@GetMapping("/ids/{ids}")
|
||||
BaseVo<List<RoleEntity>> findByIds(@PathVariable String ids);
|
||||
@PostMapping("/get/{otherData}")
|
||||
BaseVo<List<RoleEntity>> findByIds(@RequestBody Set<String> ids, @PathVariable("otherData") Boolean otherData);
|
||||
|
||||
@GetMapping()
|
||||
BaseVo<List<RoleEntity>> findAll();
|
||||
@PostMapping("/page/{otherData}")
|
||||
BaseVo<PageVo<RoleEntity>> findByPage(@RequestBody BasePageDto<RoleEntity> pageDto, @PathVariable("otherData") Boolean otherData);
|
||||
|
||||
@GetMapping("/all/{otherData}")
|
||||
BaseVo<List<RoleEntity>> findAll(@PathVariable("otherData") Boolean otherData);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue