volume list远程调用web_gfs服务查询volume信息

web_backend_develope
chenlw 9 years ago
parent 4b7ad54b1b
commit 3f5818a414

@ -1,6 +1,8 @@
package com.platform.controller;
import java.beans.IntrospectionException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -11,6 +13,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
@ -30,6 +34,7 @@ import com.platform.entities.PagerOptions;
import com.platform.entities.VolumeEntity;
import com.platform.entities.oracleForm;
import com.platform.entities.volumeMoveForm;
import com.platform.http.gfs.HttpUtils;
import com.platform.service.DataInfoService;
import com.platform.service.ICodeService;
import com.platform.service.IGfsService;
@ -40,6 +45,7 @@ import com.platform.service.IOracleExtractService;
import com.platform.service.OracleStatusService;
import com.platform.service.thread.ThreadExtractOracle;
import com.platform.service.thread.ThreadGainOracleConnect;
import com.platform.utils.Bean2MapUtils;
import com.platform.utils.Configs;
import com.platform.utils.UtilsHelper;
@ -68,7 +74,7 @@ public class DataModelController extends BaseController {
@Resource(name = "logReadService")
private ILogRead logReadService;
public void setDfsImp(DataInfoService dfs) {
this.dfs = dfs;
}
@ -208,10 +214,18 @@ public class DataModelController extends BaseController {
@RequestMapping(value = "/volume/list", method = RequestMethod.POST)
@ResponseBody
public List<VolumeEntity> volumeList() throws Exception {
public String volumeList() throws Exception {
HttpUtils ht = new HttpUtils();
log.debug("-----/volume/list------");
List<VolumeEntity> result = gfsService.getAllVolumes();
return result;
//List<VolumeEntity> result = gfsService.getAllVolumes();
String rest = ht.sendPost("gfs/getAllvolume", null);
// List<VolumeEntity> result = null;
// if (null != rest) {
// System.out.println(rest);
// JSONArray jsondata = JSONArray.fromObject(rest);
// result = (ArrayList<VolumeEntity>) JSONArray.toCollection(jsondata, VolumeEntity.class);
// }
return rest;
}
@RequestMapping(value = "/volume/{name}/move", method = RequestMethod.POST)

Loading…
Cancel
Save