package com.boot.security.server.controller;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/advertiserManagerController")
public class AdvertiserManagerController {

    @GetMapping("/table")
    @ApiOperation(value = "获取广告商数据")
    @ResponseBody
    public String getAdvertiserData() {
        JSONObject jsonObject = new JSONObject();
        JSONObject item = new JSONObject();
        JSONArray array = new JSONArray();
        item.put("id",1);
        item.put("advertiser","百度联盟");
        item.put("AccumulatedConsumptionAmount",100000);
        item.put("leader","高飞");
        item.put("yesterdayConsumptionAmount",5000);
        item.put("viewData","曝光X1");
        array.add(item);
        jsonObject.put("code",0);
        jsonObject.put("msg","");
        jsonObject.put("count",1);
        jsonObject.put("data",array);
        return jsonObject.toJSONString();
    }
}
