fix: 修改部门

pull/12/head
tangqian 2023-06-01 18:46:06 +08:00
parent 7f980191d1
commit cf897c2b9c
3 changed files with 11 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

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