Search in sources :

Example 11 with RestResult

use of com.ibeiliao.deployment.admin.common.RestResult in project Corgi by kevinYin.

the class ListEnvironmentController method delete.

/**
 * save
 */
@ResponseBody
@RequestMapping("save.do")
@MenuResource("保存环境")
public RestResult<Object> delete(int envId, String envName, int onlineFlag) {
    if (StringUtils.isBlank(envName)) {
        return new RestResult<>(ApiCode.PARAMETER_ERROR, "环境名称不能为空");
    }
    ProjectEnv projectEnv = new ProjectEnv();
    projectEnv.setEnvId(envId);
    projectEnv.setEnvName(envName.trim());
    projectEnv.setOnlineFlag(onlineFlag);
    projectEnvService.saveEnv(projectEnv);
    return new RestResult<>(null);
}
Also used : ProjectEnv(com.ibeiliao.deployment.admin.vo.global.ProjectEnv) RestResult(com.ibeiliao.deployment.admin.common.RestResult) MenuResource(com.ibeiliao.deployment.admin.utils.resource.MenuResource) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

RestResult (com.ibeiliao.deployment.admin.common.RestResult)11 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)9 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)9 MenuResource (com.ibeiliao.deployment.admin.utils.resource.MenuResource)8 AdminAccount (com.ibeiliao.deployment.admin.vo.account.AdminAccount)2 DeployHistory (com.ibeiliao.deployment.admin.vo.deploy.DeployHistory)2 GlobalSetting (com.ibeiliao.deployment.admin.vo.global.GlobalSetting)2 ProjectEnv (com.ibeiliao.deployment.admin.vo.global.ProjectEnv)2 ProjectModule (com.ibeiliao.deployment.admin.vo.project.ProjectModule)2 AllowAnonymous (com.ibeiliao.deployment.admin.annotation.authority.AllowAnonymous)1 AdminLog (com.ibeiliao.deployment.admin.annotation.log.AdminLog)1 AdminLoginUser (com.ibeiliao.deployment.admin.context.AdminLoginUser)1 MenuItem (com.ibeiliao.deployment.admin.utils.resource.MenuItem)1 Role (com.ibeiliao.deployment.admin.vo.account.Role)1 Server (com.ibeiliao.deployment.admin.vo.server.Server)1 ServerGroup (com.ibeiliao.deployment.admin.vo.server.ServerGroup)1 TransferResult (com.ibeiliao.deployment.transfer.vo.TransferResult)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1