package com.zhongzheng.controller.activity;

import cn.hutool.core.util.StrUtil;
import com.zhongzheng.common.annotation.Log;
import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.domain.AjaxResult;
import com.zhongzheng.common.core.page.TableDataInfo;
import com.zhongzheng.common.enums.BusinessType;
import com.zhongzheng.common.utils.ServletUtils;
import com.zhongzheng.framework.web.service.WxTokenService;
import com.zhongzheng.modules.activity.bo.ActivityAdvertisingAddBo;
import com.zhongzheng.modules.activity.bo.ActivityAdvertisingEditBo;
import com.zhongzheng.modules.activity.bo.ActivityAdvertisingQueryBo;
import com.zhongzheng.modules.activity.service.IActivityAdvertisingService;
import com.zhongzheng.modules.activity.vo.ActivityAdvertisingVo;
import com.zhongzheng.modules.user.entity.ClientLoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * 广告发布储存Controller
 * 
 * @author change
 * @date 2021-05-17
 */
@Api(tags = {"广告发布管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/common/advertising")
public class ActivityAdvertisingController extends BaseController {

    private final IActivityAdvertisingService iActivityAdvertisingService;

    private final com.zhongzheng.framework.web.service.WxTokenService WxTokenService;

    /**
     * 查询广告发布储存列表
     */
    @ApiOperation("查询广告发布储存列表")
    @GetMapping("/list")
    public TableDataInfo<ActivityAdvertisingVo> list(ActivityAdvertisingQueryBo bo) {
        startPage();
        List<ActivityAdvertisingVo> list = iActivityAdvertisingService.queryIssueList(bo);
        return getDataTable(list);
    }
}
