This commit is contained in:
wangxin
2018-12-18 03:25:37 +06:00
6 changed files with 97 additions and 16 deletions

View File

@@ -256,6 +256,34 @@ public class TrafficStatisticsInfoController extends BaseController {
}
return map;
}
/**
* 间隔5分钟数据
*/
@RequestMapping(value="bandwidthTransThree")
@ResponseBody
public Map bandwidthTransThree(String beginDate,String endDate){
Map<String, Object> fromJsonList = new HashMap<String, Object>();
Map map = new HashMap();
//String url = Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_TWO;
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
//String url="http://192.168.11.78:8080/galaxy/service/log/v1/"+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_THREE;
//String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_BANDWIDTH_TRANS_FOUR;
try {
url=urlAddDate(url,beginDate,endDate);
String string = HttpClientUtil.get(url);
Gson gson = new GsonBuilder().create();
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
logger.debug("bandwidthTransThree服务查询数据成功");
Map result = (Map)fromJsonList.get("data");
return result;
} catch (Exception e) {
e.printStackTrace();
logger.error("带宽详情数据获取错误"+e);
}
return map;
}
/**
* 协议类型详细列表
*/

View File

@@ -173,7 +173,8 @@
group_id,
compile_Id,
cfg_region_code,
user_region
user_region,
port
)values (
#{cfgId,jdbcType=VARCHAR},
#{cfgDesc,jdbcType=VARCHAR},
@@ -202,8 +203,8 @@
#{groupId, jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{cfgRegionCode,jdbcType=INTEGER},
#{userRegion,jdbcType=VARCHAR}
#{userRegion,jdbcType=VARCHAR},
#{port,jdbcType=VARCHAR}
)
</insert>
<update id="update" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
@@ -261,6 +262,9 @@
<if test="port != null and port!=''" >
port=#{port, jdbcType=VARCHAR},
</if>
<if test="direction != null and direction!=''" >
direction=#{direction, jdbcType=INTEGER},
</if>
<if test="ipType != null" >
ip_type=#{ipType, jdbcType=INTEGER},
</if>

View File

@@ -89,7 +89,6 @@ public class PxyObjSpoofingIpPoolService extends BaseService{
setAreaEffectiveIds(entity);
//新增
if(StringUtil.isEmpty(entity.getCfgId())){
entity.initDefaultValue();
entity.setCreatorId(UserUtils.getUser().getId());
entity.setCreateTime(createTime);
//调用服务接口获取compileId