package cn.com.ctop.toutiao.modules.batch.controller;

import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("ctop/audience")
public class BytedanceAudienceTemplateController {
    @Autowired
    private IByteDanceAdvertiserDataService advertiserDataService;

    @PostMapping("/template/create")
    public Map<String, Object> createAudiencePackageTemplate(HttpServletRequest request, JSONObject data) {
        Map<String, Object> result = new HashMap<>();

        return result;
    }

    @GetMapping("list")
    public Map<String, Object> getAudienceList(@RequestParam(value = "accountId", defaultValue = "") String accountId) {
        return advertiserDataService.advertiserCustomAudienceSelect(accountId);
    }
}
