puzhibing
2024-03-06 b79d17d163a1f162190cb46d881ab1fd5957c602
cloud-server-other/src/main/java/com/dsh/other/controller/StoreConfigController.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsh.other.entity.HomeModule;
import com.dsh.other.entity.StoreConfig;
import com.dsh.other.feignclient.communityWorldCup.WorldCupStoreClient;
import com.dsh.other.feignclient.communityWorldCup.model.WorldCupStore;
import com.dsh.other.model.StoreConfigVo;
import com.dsh.other.service.IHomeModuleService;
import com.dsh.other.service.StoreConfigService;
@@ -15,6 +17,7 @@
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -34,6 +37,9 @@
    @Autowired
    private IHomeModuleService homeModuleService;
    @Resource
    private WorldCupStoreClient worldCupStoreClient;
@@ -100,16 +106,25 @@
                            storeConfigVo.setBackgroundImage("https://we-park-life.oss-cn-beijing.aliyuncs.com/img/0771fb3bd4de43c08492d0912209e51f.png");
                            break;
                        }
                        case 9: {
                            storeConfigVo.setBackgroundImage("https://we-park-life.oss-cn-beijing.aliyuncs.com/img/0771fb3bd4de43c08492d0912209e51f.png");
                            break;
                        }
                    }
                }
                listVo.add(storeConfigVo);
            }
            List<WorldCupStore> worldCupStoreList = worldCupStoreClient.getWorldCupStoreList(storeId);
            for (WorldCupStore worldCupStore : worldCupStoreList) {
                StoreConfigVo storeConfigVo = new StoreConfigVo();
                storeConfigVo.setId(worldCupStore.getWorldCupId());
                storeConfigVo.setBackgroundImage(worldCupStore.getBackgroundImage());
                storeConfigVo.setType(9);
                storeConfigVo.setIsOpen(worldCupStore.getIsOpen());
                storeConfigVo.setSort(worldCupStore.getSort());
                listVo.add(storeConfigVo);
            }
            //排序
            Collections.sort(listVo, new Comparator<StoreConfigVo>() {
                @Override