MObjectInfoCtrl.java
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.ui.ctrl;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import com.ui.model.req.MObjectInfoReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* Created by yoho on 2016/6/16.
*/
@RestController
@RequestMapping(value = "/mobject")
public class MObjectInfoCtrl {
@Autowired
HttpRestClient httpRestClient;
//前台提供currentpage,pagesize,isType,typeIds,hostIps
@RequestMapping(value = "/query", method = RequestMethod.POST)
public BaseResponse queryAllMObjectInfo(@RequestBody MObjectInfoReq request) {
BaseResponse response = httpRestClient.defaultPost("/mobject/query", request, BaseResponse.class);
return response;
}
//前台提供mo_id
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public BaseResponse deleteMObjectInfo(@RequestBody MObjectInfoReq request) {
BaseResponse response = httpRestClient.defaultPost("/mobject/delete", request, BaseResponse.class);
return response;
}
//前台提供 mo_id,mo_name,mo_typeId,mo_hostIP,mo_tags,mo_url
@RequestMapping(value = "/update", method = RequestMethod.POST)
public BaseResponse updateMObjectInfo(@RequestBody MObjectInfoReq request) {
BaseResponse response = httpRestClient.defaultPost("/mobject/update", request, BaseResponse.class);
return response;
}
//前台提供 mo_name,mo_typeId,mo_hostIp,mo_tags,mo_url
@RequestMapping(value = "/add", method = RequestMethod.POST)
public BaseResponse addMObjectInfo(@RequestBody MObjectInfoReq request) {
BaseResponse response = httpRestClient.defaultPost("/mobject/add", request, BaseResponse.class);
return response;
}
}