//package com.gree.mall.manager.controller.marketing;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.gree.mall.manager.bean.marketing.DynamicMaterialsDetailsBean;
//import com.gree.mall.manager.bean.marketing.DynamicMaterialsPageBean;
//import com.gree.mall.manager.helper.ResponseHelper;
//import com.gree.mall.manager.logic.marketing.DynamicMaterialsLogic;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//
//@Api(value = "动态素材", tags = {"动态素材"})
//@RestController
//@RequestMapping(value = "/dynamic/materials", produces = "application/json; charset=utf-8")
//public class DynamicMaterialsController {
//
//
//    @Autowired
//    private DynamicMaterialsLogic dynamicMaterialsLogic;
//
//    @ApiOperation("分页查询动态素材")
//    @GetMapping("/page")
//    public ResponseHelper<IPage<DynamicMaterialsPageBean>> page(
//            HttpServletRequest request,
//            @ApiParam(value = "名称", required = false) @RequestParam(required = false) String name,
//            @ApiParam(value = "页号", required = true) @RequestParam(required = true) Integer pageNum,
//            @ApiParam(value = "页大小", required = true) @RequestParam(required = true) Integer pageSize
//    ) {
//
//        IPage<DynamicMaterialsPageBean> page = dynamicMaterialsLogic.page(request, name, pageNum, pageSize);
//
//        return ResponseHelper.success(page);
//    }
//
//    @ApiOperation("动态素材详情")
//    @GetMapping("/details")
//    public ResponseHelper<DynamicMaterialsDetailsBean> details(
//            HttpServletRequest request,
//            @ApiParam(value = "素材id", required = true) @RequestParam(required = true) String materialsId,
//            @ApiParam(value = "客户名称", required = false) @RequestParam(required = false) String name,
//            @ApiParam(value = "开始时间", required = false) @RequestParam(required = false) String beginTime,
//            @ApiParam(value = "结束时间", required = false) @RequestParam(required = false) String endTime
//    ) {
//
//        DynamicMaterialsDetailsBean details = dynamicMaterialsLogic.details(request, materialsId, name, beginTime, endTime);
//
//        return ResponseHelper.success(details);
//    }
//
//
//    @ApiOperation("批量发消息到企业微信用户")
//    @GetMapping("/sendToEnterpriseWechatWorker")
//    public ResponseHelper<Void> sendToEnterpriseWechatWorker(
//            HttpServletRequest request,
//            @ApiParam(value = "企业微信userid(（多个接收者wechatUserId用‘|’分隔，最多支持1000个 指定为'@all'，则向该企业应用的全部成员发送）)", required = true)
//            @RequestParam(required = true)String wechatUserId,
//            @ApiParam(value = "消息内容 示例:11\n22<a href=\"http://work.weixin.qq.com\">33</a>，44。", required = true)
//            @RequestParam(required = true)String content
//    )  {
//        dynamicMaterialsLogic.sendToEnterpriseWechatWorker(request, wechatUserId, content);
//        return ResponseHelper.success();
//    }
//}
