function savePointBridge (){var channelId = $ ( "#channel_list :selected" ). val ();var pointId = parent . $ ( "#paramId" ). val ();var bridge = {};bridge . pointID = pointId ;bridge . chanID = channelId ;bridge . enabled = $ ( "#chkboxEnabled" ). is ( ':checked' )? 1 : 0 ;bridge . sourceChanID = $ ( "#pntid_channel" ). val ();bridge . sourceDateStart = $ ( "#starttime_point" ). val ();bridge . sourceDateEnd = $ ( "#endtime_point" ). val ();bridge . autoModel = 1 ;$ . ajax ({url : "../../channel/bridge" ,data : JSON . stringify ( bridge ),contentType : "application/json" ,type : "POST" ,success : function ( data ){//alert(data.msg);dialogAlert("系统提示",data.msg);},dataType:"json"});}
private Date sourceDateStart; private Date sourceDateEnd;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") public Date getSourceDateStart() { return sourceDateStart; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") public void setSourceDateStart(Date sourceDateStart) { this.sourceDateStart = sourceDateStart; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") public Date getSourceDateEnd() { return sourceDateEnd; } @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") public void setSourceDateEnd(Date sourceDateEnd) { this.sourceDateEnd = sourceDateEnd; }
http://blog.csdn.net/chenleixing/article/details/43740759从这里学会的,感谢分享~