|
@@ -2,11 +2,14 @@ package com.zhongzheng.controller.goods;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.zhongzheng.common.annotation.Log;
|
|
|
import com.zhongzheng.common.core.controller.BaseController;
|
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.exception.CustomException;
|
|
|
+import com.zhongzheng.common.utils.poi.EasyPoiUtil;
|
|
|
import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
import com.zhongzheng.modules.bank.service.IQuestionService;
|
|
|
import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
|
|
@@ -15,12 +18,14 @@ import com.zhongzheng.modules.goods.bo.*;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.*;
|
|
|
+import com.zhongzheng.modules.top.order.bo.TopOrderQuestionImportBo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -394,4 +399,16 @@ public class GoodsController extends BaseController {
|
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 二建商品更换腾讯
|
|
|
+ */
|
|
|
+ @ApiOperation("二建商品更换腾讯")
|
|
|
+ @PostMapping("/update/recording/url")
|
|
|
+ public AjaxResult<Void> updateRecordUrl(MultipartFile file,String goodsId) {
|
|
|
+ List<SectionImportBo> boList = EasyPoiUtil.importExcel(file,0,1,SectionImportBo.class);
|
|
|
+ if (CollectionUtils.isEmpty(boList)){
|
|
|
+ throw new CustomException("导入文件格式不正确或文件为空,请检查文件!");
|
|
|
+ }
|
|
|
+ return toAjax(iGoodsService.updateRecordUrl(boList,goodsId) ? 1 : 0);
|
|
|
+ }
|
|
|
}
|