| | |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.mall.service.IAdminMallGoodsService; |
| | | import cc.mrbird.febs.mall.vo.AdminHomeDeliverySettingVo; |
| | | import cc.mrbird.febs.mall.vo.AdminMallGoodsCategoryTreeVo; |
| | | import cc.mrbird.febs.mall.vo.AdminMallGoodsTreeVo; |
| | | import cc.mrbird.febs.mall.vo.AdminRangeSettingVo; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | /** |
| | | * 优惠卷列表-新增 |
| | | */ |
| | | @PostMapping("couponRuleAdd") |
| | | @ControllerEndpoint(operation = " 优惠卷列表-新增", exceptionMessage = "操作失败") |
| | | public FebsResponse couponRuleAdd(@RequestBody @Valid CouponRuleAddDto couponRuleAddDto) { |
| | | return adminMallGoodsService.couponRuleAdd(couponRuleAddDto); |
| | | } |
| | | |
| | | /** |
| | | * 优惠卷列表-删除 |
| | | */ |
| | | @GetMapping("couponRuleDel/{id}") |
| | | @ControllerEndpoint(operation = "优惠卷列表-删除", exceptionMessage = "操作失败") |
| | | public FebsResponse couponRuleDel(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return adminMallGoodsService.couponRuleDel(id); |
| | | } |
| | | |
| | | /** |
| | | * 优惠卷列表-上架 |
| | | */ |
| | | @GetMapping("upCoupon/{id}") |
| | | @ControllerEndpoint(operation = " 优惠卷列表-上架", exceptionMessage = "上架失败") |
| | | public FebsResponse upCoupon(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return adminMallGoodsService.upCoupon(id); |
| | | } |
| | | |
| | | /** |
| | | * 优惠卷列表-下架 |
| | | */ |
| | | @GetMapping("downCoupon/{id}") |
| | | @ControllerEndpoint(operation = " 优惠卷列表-下架", exceptionMessage = "下架失败") |
| | | public FebsResponse downCoupon(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return adminMallGoodsService.downCoupon(id); |
| | | } |
| | | |
| | | /** |
| | | * 优惠卷列表-更新 |
| | | */ |
| | | @PostMapping("couponUpdate") |
| | | @ControllerEndpoint(operation = "优惠卷列表-更新", exceptionMessage = "操作失败") |
| | | public FebsResponse couponUpdate(@RequestBody @Valid AdminMallGoodsCouponVo adminMallGoodsCouponVo) { |
| | | return adminMallGoodsService.couponUpdate(adminMallGoodsCouponVo); |
| | | } |
| | | |
| | | |
| | | @GetMapping("coupon/tree") |
| | | public List<AdminMallGoodsCouponTreeVo> couponTree() { |
| | | return adminMallGoodsService.findAdminMallGoodsCouponVoTree(); |
| | | } |
| | | |
| | | @GetMapping(value = "/couponTreeSet") |
| | | public FebsResponse couponTreeSet() { |
| | | return new FebsResponse().success().data(adminMallGoodsService.findAdminMallGoodsCouponVoTreeList()); |
| | | } |
| | | |
| | | |
| | | } |