//package com.fzm.mall.server.admin.goods_center.controller;
//
//import com.fzm.mall.server.admin.annotation.AdminLog;
//import com.fzm.mall.server.admin.enums.log.OperateModuleEnum;
//import com.fzm.mall.server.admin.enums.log.OperateTypeEnum;
//import com.fzm.mall.server.admin.goods_center.entity.dto.IntegralExchangeDTO;
//import com.fzm.mall.server.admin.goods_center.service.IIntegralExchangeService;
//import com.fzm.mall.server.admin.home_page.enums.type.AdminTypeEnum;
//import com.fzm.mall.server.admin.home_page.service.IAdminService;
//import com.fzm.mall.server.admin.repo.ResponseFactory;
//import com.fzm.mall.server.admin.repo.ResponseVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import lombok.RequiredArgsConstructor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import javax.validation.Valid;
//
///**
// * @author wangp
// * @date 2021/5/27 10:50
// * @description 发布积分商品
// * @since JDK 1.8
// */
//@Api(tags = "商品中心-发布积分商品")
//@RestController
//@RequestMapping("/releaseIntegralGoods")
//@RequiredArgsConstructor(onConstructor = @__(@Autowired))
//public class ReleaseIntegralGoodsController {
//
//    private final IIntegralExchangeService ieService;
//    private final IAdminService adminService;
//    private final ResponseFactory resFac;
//
//    @ApiOperation(value = "新增")
//    @AdminLog(description = "商品中心-新增积分兑换商品", module = OperateModuleEnum.GOODS_CENTER, opType = OperateTypeEnum.ADD_INTEGRAL)
//    @PostMapping("/releaseIntegral/add")
//    public ResponseVO add(@RequestBody @Valid IntegralExchangeDTO ieDTO, @ApiParam(name = "adminId", value = "管理员id")
//    @RequestHeader String adminId) {
//        adminService.adminAuthCheck(adminId, AdminTypeEnum.PLATFORM_MERCHANT.getType());
//        String merchantId = adminService.getByAdminId(adminId).getMerchantId();
//        ieService.add(ieDTO, merchantId);
//        return resFac.getSimpleSuccessResponse();
//    }
//}
