vue代码
axios.post("DebugController/debugInterface",that.fileModal)
.then(function(res) {
that.button_isloading=false;
that.isreadOnly=false;
if (res.data.data!=null)
{
that.headData = JSON.stringify(res.data.data.head);
that.metaData = JSON.stringify(res.data.data.data);
}
else
{
that.$Notice.warning({
title: "查询出现异常,请检查",
desc: ''
});
}
})
.catch(function(err) {
console.log(err)
})
java代码
controller
方法一获得多个参数
@RequestMapping("debugInterface")
@ResponseBody
public ResultObj debugInterface(@RequestBody LinkedHashMap<String,String> params) {
ResultObj result = ResultObj.succeed();
String serverName=params.get("serviceName");
return result;
}
方法二获得单个参数
方法三获得Bean
vue代码
axios.post('RedoController/updateRedoTask', redoCondition)
.then(function(res) {
that.addModifyModal = false
that.$Notice.success({
title: 'Redo任务修改成功。',
});
that.query()
})
.catch(function(err) {
console.log(err)
})
java代码
public void updateRedoTask(RedoConditionBean redoCondition) {
RedoSvcTypeBean redoSvcType = redoCondition.getRedoSvcType();
Date date=new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
redoCondition.setModifyDate(sdf.format(date));
redoConditionMapper.update(redoCondition);
redoSvcTypeMapper.update(redoSvcType);
}
网友评论