打折活动管理插件的联系我扣扣2446503032
获取单个打折活动信息 GET /plugins/discount/discounts/{discountId}
不需要认证用户
成功响应Discount结构体
id int string
name string(名称)
type enum{discount,free,global}(类型(discount:限时打折, free:限时免费, global:全站打折))
startTime datetime(活动开始时间)
endTime datetime(活动结束时间)
itemType string(活动对象类型)
itemCount int string(活动对象数量)
globalDiscount int string(全站打折折扣率)
status enum{unstart,finished,running}(活动状态)
打折工具是EduSoho提供给网校的一种促销工具,管理员可以在自己网校中选择一定数量甚至是全站的课程在一定时间内以低于市场价或者免费的形式进行促销活动。
```
技术支持扣扣2446503032publicfunctionsetItemDiscountAction(Request$request,$discountId){$id=$request->request->get('id');$discount=$request->request->get('discount');$this->getDiscountService()->setItemDiscount($id,$discount);return$this->createJsonResponse(true);}publicfunctionsetAllItemsDiscountAction(Request$request,$discountId){$discount=$request->request->get('discount');$this->getDiscountService()->setAllItemsDiscount($discountId,$discount);return$this->createJsonResponse(true);}publicfunctionputItemsAction(Request$request,$discountId){$targetIds=$request->request->get('ids',array());if(empty($targetIds)){return$this->createJsonResponse(true);}$discount=$this->getDiscountService()->putItems($discountId,$targetIds);return$this->createJsonResponse($discount);}
```