操作volume,brick后,从web_gfs请求volume的最新信息,并返回

web_backend_develope
chenlw 9 years ago
parent 7a31b17c3b
commit f5182557b2

@ -15,6 +15,7 @@ import com.base.BaseController;
import com.platform.entities.VolumeEntity;
import com.platform.entities.VolumeForm;
import com.platform.entities.VolumeInitEntity;
import com.platform.http.gfs.HttpUtils;
import com.platform.service.IVolumeService;
import com.platform.utils.Configs;
import com.platform.utils.ThreadVolume;
@ -28,10 +29,11 @@ public class VolumeController extends BaseController{
@Resource(name = "volumeService")
private IVolumeService volumeService;
HttpUtils ht = new HttpUtils();
@RequestMapping(value = "/volume/update", method = RequestMethod.POST)
@ResponseBody
public void volumeUpdate(HttpServletRequest res, HttpServletResponse req,
public String volumeUpdate(HttpServletRequest res, HttpServletResponse req,
@RequestBody VolumeEntity form) throws Exception {
Configs.CONSOLE_LOGGER.error("/oracle/update");
int rest = volumeService.save(form);
@ -41,12 +43,14 @@ public class VolumeController extends BaseController{
else {
req.setStatus(500);
}
String result = ht.sendPost("gfs/getAllvolume", null);
new ThreadVolumeImm("ThreadVolumeImm-in-VolumeController-update").start();
return result;
}
@RequestMapping(value = "/volume/delete", method = RequestMethod.POST)
@ResponseBody
public void volumeDelete(HttpServletRequest res, HttpServletResponse req,
public String volumeDelete(HttpServletRequest res, HttpServletResponse req,
@RequestBody VolumeEntity entity) throws Exception {
Configs.CONSOLE_LOGGER.error("/oracle/delete");
int rest = volumeService.delete(entity);
@ -56,7 +60,9 @@ public class VolumeController extends BaseController{
else {
req.setStatus(500);
}
String result = ht.sendPost("gfs/getAllvolume", null);
new ThreadVolumeImm("ThreadVolumeImm-in-VolumeController-delete").start();
return result;
}
}

Loading…
Cancel
Save