|
@@ -16,6 +16,9 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
@Tag(name = "管理后台 - 优惠劵模板")
|
|
@@ -75,4 +78,14 @@ public class CouponTemplateController {
|
|
|
PageResult<CouponTemplateDO> pageResult = couponTemplateService.getCouponTemplatePage(pageVO);
|
|
|
return success(CouponTemplateConvert.INSTANCE.convertPage(pageResult));
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/list")
|
|
|
+ @Operation(summary = "获得优惠劵模板列表")
|
|
|
+ @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
|
|
+ @PreAuthorize("@ss.hasPermission('promotion:coupon-template:query')")
|
|
|
+ public CommonResult<List<CouponTemplateRespVO>> getCouponTemplateList(@RequestParam("ids") Collection<Long> ids) {
|
|
|
+ List<CouponTemplateDO> list = couponTemplateService.getCouponTemplateList(ids);
|
|
|
+ return success(CouponTemplateConvert.INSTANCE.convertList(list));
|
|
|
+ }
|
|
|
+
|
|
|
}
|