Administrator
2018-10-30 7bf6a0582c7c62c90ee2ed8a88654f11d0479092
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
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.xinge.PushRecord;
import com.yeshi.fanli.service.inter.push.PushRecordService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import org.yeshi.utils.JsonUtil;
 
import net.sf.json.JSONObject;
 
@Controller
@RequestMapping("admin/new/api/v1/pushRecord")
public class PushRecordAdminController {
    
    
    @Resource
    private PushRecordService pushRecordService;
    
    @RequestMapping(value = "getPushRecordList", method = RequestMethod.POST)
    public void getAll(String title,int type,int page,PrintWriter out){
        List<PushRecord> list = pushRecordService.getPushRecordList(title,type,page);
        int count = pushRecordService.getCount(title,type,page);
        PageEntity pe = new PageEntity(page, Constant.PAGE_SIZE, count);
        JSONObject data = new JSONObject();
        data.put("pe", pe);
        data.put("list", list);
        out.print(JsonUtil.loadTrueResult(data));
    }
    
}