| | |
| | | result.append("第" + i + "行:[", "出生日期" + "]不能为空"); |
| | | continue; |
| | | } |
| | | if (!StringUtils.hasLength(appUserImport.getPromotion())) { |
| | | result.append("第" + i + "行:[", "推广权限" + "]不能为空"); |
| | | continue; |
| | | } |
| | | if (!StringUtils.hasLength(appUserImport.getRole())) { |
| | | result.append("第" + i + "行:[", "角色" + "]不能为空"); |
| | | continue; |
| | |
| | | continue; |
| | | } |
| | | |
| | | String promotion = appUserImport.getPromotion(); |
| | | Integer promotionType = "是".equals(promotion) ? 1 : "否".equals(promotion) ? 0 : null; |
| | | if (promotionType == null) { |
| | | result.append("第" + i + "行:[", "推广权限" + "]格式错误"); |
| | | continue; |
| | | } |
| | | |
| | | String birth = appUserImport.getBirth(); |
| | | LocalDate birthday = null; |
| | | try { |
| | |
| | | tAppUser.setGender(gender); |
| | | tAppUser.setBirthday(birthday); |
| | | tAppUser.setUserType(userType); |
| | | tAppUser.setPromotionStatus(promotionType); |
| | | |
| | | if (appUserImport.getReferrerCode() != null) { |
| | | TAppUser referrerUser = appUserService.getOne(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getCode, appUserImport.getReferrerCode()).ne(TAppUser::getStatus, 3).last("LIMIT 1")); |