|
@@ -1,6 +1,7 @@
|
|
|
package com.zhongzheng.modules.base.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
@@ -27,10 +28,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.util.Collection;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -68,6 +66,21 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
|
|
|
return profileTpMapper.selectList(bo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<String> selectAllUseGoods(ProfileTpQueryBo bo) {
|
|
|
+ List<ProfileTpVo> list = profileTpMapper.selectList(bo);
|
|
|
+ List<String> strList = new ArrayList<>();
|
|
|
+ for(int i=0;i<list.size();i++){
|
|
|
+ if(Validator.isNotEmpty(list.get(i).getGoodsIds())){
|
|
|
+ List<String> idList = Arrays.asList(list.get(i).getGoodsIds().split(","));
|
|
|
+ strList.addAll(idList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ LinkedHashSet<String> hashSet = new LinkedHashSet<>(strList);
|
|
|
+ ArrayList<String> listWithoutDuplicates = new ArrayList<>(hashSet);
|
|
|
+ return listWithoutDuplicates;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 实体类转化成视图对象
|
|
|
*
|