Newer
Older
huludao / src / main / java / com / newfiber / api / pc / controller / EventsManage / PatroPointInfoController.java
package com.newfiber.api.pc.controller.EventsManage;

import com.newfiber.api.core.bean.ReqBodyObj;
import com.newfiber.api.core.bean.RespBodyObj;
import com.newfiber.api.pc.dao.EventsManage.PatroPointInfoDao;
import com.newfiber.api.pc.model.EventsManage.PatroPointInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author chenhonggang
 * @description
 * @date 2019/6/25
 */
@RestController
public class PatroPointInfoController {
    @Autowired
    private PatroPointInfoDao patroPointInfoDao;
    @PostMapping("getPatroPointInfo")
    public RespBodyObj getPatroPointInfo(@RequestBody ReqBodyObj<Map<String,Integer>> param){
        List<List<PatroPointInfo>> result = new ArrayList<>();
        for(int i=0;i<param.getData().get("num");i++){
            List<PatroPointInfo> point = patroPointInfoDao.getList();
            result.add(point);
        }
        return RespBodyObj.ok(result);
    }
}