|
|
@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import shop.alien.entity.store.*;
|
|
|
+import shop.alien.entity.store.vo.StoreDictionaryVo;
|
|
|
import shop.alien.entity.store.vo.StoreMainInfoVo;
|
|
|
import shop.alien.mapper.*;
|
|
|
import shop.alien.storeplatform.service.StorePlatformRenovationService;
|
|
|
@@ -15,6 +17,7 @@ import java.text.SimpleDateFormat;
|
|
|
import java.time.Duration;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -29,6 +32,32 @@ public class StorePlatformRenovationServiceImpl extends ServiceImpl<StoreInfoMap
|
|
|
private final StoreLabelMapper storeLabelMapper;
|
|
|
private final StoreBusinessInfoMapper storeBusinessInfoMapper;
|
|
|
private final StoreImgMapper storeImgMapper;
|
|
|
+ private final StoreDictionaryMapper storeDictionaryMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StoreDictionaryVo> getBusinessSection() {
|
|
|
+ List<StoreDictionary> businessSection = storeDictionaryMapper.selectList(new LambdaQueryWrapper<StoreDictionary>().eq(StoreDictionary::getTypeName, "business_section").ne(StoreDictionary::getDictId, 0));
|
|
|
+ List<StoreDictionaryVo> voList = new ArrayList<>();
|
|
|
+ for (StoreDictionary storeDictionary : businessSection) {
|
|
|
+ StoreDictionaryVo vo = new StoreDictionaryVo();
|
|
|
+ BeanUtils.copyProperties(storeDictionary, vo);
|
|
|
+ voList.add(vo);
|
|
|
+ }
|
|
|
+ return voList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StoreDictionaryVo> getBusinessSectionTypes(String parentId) {
|
|
|
+ StoreDictionary businessSection = storeDictionaryMapper.selectOne(new LambdaQueryWrapper<StoreDictionary>().eq(StoreDictionary::getTypeName, "business_section").eq(StoreDictionary::getDictId, parentId));
|
|
|
+ List<StoreDictionary> storeDictionaries = storeDictionaryMapper.selectList(new LambdaQueryWrapper<StoreDictionary>().eq(StoreDictionary::getParentId, businessSection.getId()));
|
|
|
+ List<StoreDictionaryVo> voList = new ArrayList<>();
|
|
|
+ for (StoreDictionary storeDictionary : storeDictionaries) {
|
|
|
+ StoreDictionaryVo vo = new StoreDictionaryVo();
|
|
|
+ BeanUtils.copyProperties(storeDictionary, vo);
|
|
|
+ voList.add(vo);
|
|
|
+ }
|
|
|
+ return voList;
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public StoreMainInfoVo getDecorationDetail(Integer id) {
|