Controller.java
1.54 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
package com.huaheng.pc.U8.service;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.page.TableDataInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.text.ParseException;
import java.util.List;
@RestController
@RequestMapping("/u8")
public class Controller extends BaseController {
@Resource
private U8VendorService u8VendorService;
@Resource
private U8CustomerService u8CustomerService;
@Resource
private U8InventoryClassService u8InventoryClassService;
@Resource
private U8InventoryService inventoryService;
@PostMapping("/list")
@ResponseBody
public TableDataInfo list() throws ParseException {
List list = u8VendorService.sync();
return getDataTable(list);
}
@PostMapping("/cus")
@ResponseBody
public TableDataInfo cus() throws ParseException {
List list = u8CustomerService.sync();
return getDataTable(list);
}
@PostMapping("/type")
@ResponseBody
public TableDataInfo type() {
List list = u8InventoryClassService.sync();
return getDataTable(list);
}
@PostMapping("/material")
@ResponseBody
public TableDataInfo material() throws ParseException {
List list = inventoryService.sync();
return getDataTable(list);
}
}