# 已经开发完成,联系客服获取

  • 统一异常
  • 统一权限
  • 统一操作

示例代码,跟node一样拥有快速CRUD特性

/**
 * 角色
 */
@CoolRestController(value = "/admin/sys/role", rests = {"add", "delete", "update", "info", "list", "page"})
public class SysRoleController extends BaseController<SysRoleEntity> {
    @Resource
    private SysRoleService sysRoleService;

    @Override
    protected QueryWrapper<SysRoleEntity> init(JSONObject params) {
        setService(sysRoleService);
        return Wrappers.<SysRoleEntity>query()
                .ne("name", "超管")
                .apply(params.get("keyWord")!=null, "(name LIKE {0} or label LIKE {0})", "%" + params.get("keyWord") + "%");
    }

    /**
     * 所有列表
     * @return
     */
    @PostMapping("/allList")
    public R allList(){
        return R.ok();
    }
}