diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/banner/vo/BannerBaseVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/banner/vo/BannerBaseVO.java index 6b4742f02..4e4723764 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/banner/vo/BannerBaseVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/banner/vo/BannerBaseVO.java @@ -27,7 +27,7 @@ public class BannerBaseVO { private String title; @Schema(description = "跳转链接", required = true) - @NotEmpty(message = "跳转链接不能为空") +// @NotEmpty(message = "跳转链接不能为空") private String url; @Schema(description = "图片地址", required = true) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/banner/BannerServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/banner/BannerServiceImpl.java index 88654d228..4d78069ce 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/banner/BannerServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/banner/BannerServiceImpl.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.shop.service.banner; import cn.iocoder.yudao.framework.common.enums.Constants; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.shop.controller.admin.banner.vo.BannerCreateReqVO; import cn.iocoder.yudao.module.shop.controller.admin.banner.vo.BannerPageReqVO; import cn.iocoder.yudao.module.shop.controller.admin.banner.vo.BannerUpdateReqVO; @@ -42,6 +43,7 @@ public class BannerServiceImpl implements BannerService { } // 插入 BannerDO banner = BannerConvert.INSTANCE.convert(createReqVO); + banner.setTenantId(createReqVO.getTenantId()); bannerMapper.insert(banner); // 返回 return banner.getId(); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java index cc67062c4..3529ad176 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/promoter/PromoterController.java @@ -116,10 +116,10 @@ public class PromoterController { } @PostMapping("/import") @Operation(summary = "导入推广员") - @Parameters({ - @Parameter(name = "file", description = "Excel 文件", required = true), - @Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true") - }) +// @Parameters({ +// @Parameter(name = "file", description = "Excel 文件", required = true), +// @Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true") +// }) // @PreAuthorize("@ss.hasPermission('system:user:import')") @TenantIgnore public CommonResult importExcel(@RequestParam("file") MultipartFile file, diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java index 2053e1c97..eae3a3245 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/promoter/PromoterServiceImpl.java @@ -184,6 +184,12 @@ public class PromoterServiceImpl implements PromoterService { PromoterImportRespVO respVO = PromoterImportRespVO.builder().createUsernames(new ArrayList<>()) .updateUsernames(new ArrayList<>()).failureUsernames(new LinkedHashMap<>()).build(); Set collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet()); + List collect2 = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toList()); + if (collect.size() != collect2.size()) { + respVO.getFailureUsernames().put("导入文件电话号码存在重复请检查!", "电话号码" + collect); + return respVO; + } + List list = memberUserService.getByMobileList(collect); if (!CollectionUtils.isEmpty(list)) { List collect1 = list.stream().map(MemberUserDO::getMobile).collect(Collectors.toList());