fix: 【bug-96】管理端,账号审核这里,所属区域跟下一行的销售代表内容重叠了,如果显示不全,多余的展示省略号,鼠标放上去显示完整的区域
区域名称排重
This commit is contained in:
parent
bbb7d71fd4
commit
eb03112af4
|
|
@ -35,10 +35,7 @@ import javax.validation.constraints.NotEmpty;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -121,7 +118,7 @@ public class AppUserController extends ControllerBase {
|
|||
*/
|
||||
@GetMapping("getAreasByCompany")
|
||||
@ApiMark(moduleName = "代理商管理", apiName = "根据公司id获取区域列表",isPublic = true)
|
||||
public ApiResult<List<String>> getAreasByCompany(@Valid @RequestParam @NotNull List<Integer> companyIds){
|
||||
public ApiResult<Collection<String>> getAreasByCompany(@Valid @RequestParam @NotNull List<Integer> companyIds){
|
||||
return ApiResult.success(customerService.getAreas(companyIds));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.nflg.mobilebroken.common.pojo.vo.CompanySimpleVO;
|
|||
import com.nflg.mobilebroken.repository.entity.TBaseCustomer;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -30,5 +31,5 @@ public interface ITBaseCustomerService extends IService<TBaseCustomer> {
|
|||
|
||||
List<CompanySimpleVO> getSimpleCompanysFromAdmin(Integer userId);
|
||||
|
||||
List<String> getAreas(List<Integer> companyIds);
|
||||
Collection<String> getAreas(List<Integer> companyIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -172,7 +173,7 @@ public class AppUserApplyforServiceImpl extends ServiceImpl<AppUserApplyforMappe
|
|||
}
|
||||
vo.setApplyfor(applyforInfo);
|
||||
appUser = appUserService.getById(applyfor.getCreateBy());
|
||||
List<String> areas=customerService.getAreas(Arrays.stream(appUser.getCompanyId().split(",")).map(Integer::parseInt).collect(Collectors.toList()));
|
||||
Collection<String> areas=customerService.getAreas(Arrays.stream(appUser.getCompanyId().split(",")).map(Integer::parseInt).collect(Collectors.toList()));
|
||||
vo.setUser(new AppUserVO()
|
||||
.setAreaName(StrUtil.join(",",areas))
|
||||
.setSalesUserName(appUser.getSalesUserName())
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -105,7 +106,7 @@ public class TBaseCustomerServiceImpl extends ServiceImpl<TBaseCustomerMapper, T
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAreas(List<Integer> companyIds) {
|
||||
public Collection<String> getAreas(List<Integer> companyIds) {
|
||||
return lambdaQuery()
|
||||
.eq(TBaseCustomer::getDelIs, 0)
|
||||
.eq(TBaseCustomer::getEnableState, 1)
|
||||
|
|
@ -114,6 +115,6 @@ public class TBaseCustomerServiceImpl extends ServiceImpl<TBaseCustomerMapper, T
|
|||
.stream()
|
||||
.map(TBaseCustomer::getAreaName)
|
||||
.flatMap(name -> StrUtil.split(name, ",").stream())
|
||||
.collect(Collectors.toList());
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue