You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
package com.platform.controller;
|
|
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import com.platform.entities.PagerOptions;
|
|
import com.platform.service.DataInfoService;
|
|
import com.platform.utils.UtilsHelper;
|
|
|
|
@Controller
|
|
public class DataModelController {
|
|
@Resource(name = "dataInfoService")
|
|
private DataInfoService dfs;
|
|
|
|
public void setDfsImp(DataInfoService dfs) {
|
|
this.dfs = dfs;
|
|
}
|
|
|
|
@RequestMapping("/data.json")
|
|
@ResponseBody
|
|
public ModelMap getAllDataToJson(HttpServletRequest res, HttpServletResponse req) {
|
|
Map<String, String[]> paramMap = res.getParameterMap();
|
|
Set<String> keySet= paramMap.keySet();
|
|
for(String str: keySet){
|
|
System.out.println(str+":"+paramMap.get(str));
|
|
}
|
|
return dfs.getPagerTableData((PagerOptions) UtilsHelper.newObjAndSetAttrsByClass(PagerOptions.class, res));
|
|
}
|
|
}
|