喻健
2018-11-13 6feaf1324e207ebee22d0e263a8f32061b8374bf
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
package com.yeshi.fanli.controller.admin;
 
import java.io.PrintWriter;
import java.util.List;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
 
import com.yeshi.fanli.entity.system.System;
import com.yeshi.fanli.service.inter.config.SystemService;
import org.yeshi.utils.JsonUtil;
 
import net.sf.json.JSONObject;
 
@Controller
@RequestMapping("admin/new/api/v1/system")
public class SystemAdminController {
    @Resource
    private SystemService systemService;
    
    @RequestMapping(value="/systemList",method=RequestMethod.POST)
    public void getSystems(PrintWriter out){
        List<System> systems = systemService.getSystems();
        JSONObject data = new JSONObject();
        data.put("systemList", systems);
         out.print(JsonUtil.loadTrueResult(data));
    }
    
}