Merge branch 'feature/mall_product' of http://117.33.142.185:3000/zenghuapei/cyywl_server into feature/mall_product

pull/12/head
TianYu 2023-06-02 10:46:05 +08:00
commit a6fea11b09
4 changed files with 13 additions and 5 deletions

View File

@ -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)

View File

@ -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();

View File

@ -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<PromoterImportRespVO> importExcel(@RequestParam("file") MultipartFile file,

View File

@ -184,6 +184,12 @@ public class PromoterServiceImpl implements PromoterService {
PromoterImportRespVO respVO = PromoterImportRespVO.builder().createUsernames(new ArrayList<>())
.updateUsernames(new ArrayList<>()).failureUsernames(new LinkedHashMap<>()).build();
Set<String> collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet());
List<String> collect2 = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toList());
if (collect.size() != collect2.size()) {
respVO.getFailureUsernames().put("导入文件电话号码存在重复请检查!", "电话号码" + collect);
return respVO;
}
List<MemberUserDO> list = memberUserService.getByMobileList(collect);
if (!CollectionUtils.isEmpty(list)) {
List<String> collect1 = list.stream().map(MemberUserDO::getMobile).collect(Collectors.toList());