|
@@ -1,13 +1,18 @@
|
|
|
package com.gree.mall.manager.controller.coupon;
|
|
|
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminWebsitVO;
|
|
|
import com.gree.mall.manager.bean.coupon.*;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
import com.gree.mall.manager.logic.coupon.CouponLogic;
|
|
|
import com.gree.mall.manager.plus.entity.Coupon;
|
|
|
import com.gree.mall.manager.plus.entity.UserCoupon;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -45,6 +50,31 @@ public class CouponController {
|
|
|
return ResponseHelper.success(page);
|
|
|
}
|
|
|
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "优惠券列表")
|
|
|
+ public ResponseHelper<IPage<CouponPageBean>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //IPage<AdminWebsitVO> adminDeptVOIPage = couponLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "优惠券列表导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ // IPage<AdminWebsitVO> adminDeptVOIPage = couponLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ // FieldUtils.exportData(adminDeptVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/detail")
|
|
|
@ApiOperation(value = "券详情")
|
|
|
public ResponseHelper<CouponDetailBean> detail(
|