Browse Source

Merge branch 'lcy' of http://47.107.53.207:3000/traineeCoder001/Bailian-Al

JensionDzero 1 year ago
parent
commit
c87368697d
36 changed files with 1761 additions and 358 deletions
  1. 24 20
      benyun-core/src/main/java/com/ruoyi/benyun/entity/Brand.java
  2. 21 0
      benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandBusiness.java
  3. 19 2
      benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandCity.java
  4. 19 2
      benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandProvince.java
  5. 27 4
      benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandStatistics.java
  6. 29 4
      benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandZone.java
  7. 10 0
      benyun-core/src/main/java/com/ruoyi/benyun/entity/vo/BrandDisItem.java
  8. 14 0
      benyun-core/src/main/java/com/ruoyi/benyun/entity/vo/Info.java
  9. 22 0
      benyun-core/src/main/java/com/ruoyi/benyun/job/BrandStatsiticsJob.java
  10. 14 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandBusinessDao.java
  11. 18 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandCityDao.java
  12. 21 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandDao.java
  13. 2 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandEvolveDao.java
  14. 17 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandProvinceDao.java
  15. 17 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandStatisticsDao.java
  16. 20 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandZoneDao.java
  17. 20 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/StoreDao.java
  18. 2 0
      benyun-core/src/main/java/com/ruoyi/benyun/mapper/StoreWdOpcloseDao.java
  19. 381 326
      benyun-core/src/main/java/com/ruoyi/benyun/service/impl/BrandServiceImpl.java
  20. 26 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandBusinessStat.java
  21. 54 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandCityStat.java
  22. 26 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandEvolveStat.java
  23. 48 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandProvinceStat.java
  24. 86 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandStat.java
  25. 34 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandZoneStat.java
  26. 58 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/StoreWdOpcloseStat.java
  27. 60 0
      benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/Together.java
  28. 32 0
      benyun-core/src/main/resources/mapper/benyun/BrandBusinessMapper.xml
  29. 65 0
      benyun-core/src/main/resources/mapper/benyun/BrandCity2Mapper.xml
  30. 110 0
      benyun-core/src/main/resources/mapper/benyun/BrandDao.xml
  31. 28 0
      benyun-core/src/main/resources/mapper/benyun/BrandEvolveMapper.xml
  32. 64 0
      benyun-core/src/main/resources/mapper/benyun/BrandProvince2Mapper.xml
  33. 97 0
      benyun-core/src/main/resources/mapper/benyun/BrandStatistics2Mapper.xml
  34. 145 0
      benyun-core/src/main/resources/mapper/benyun/BrandZone2Mapper.xml
  35. 104 0
      benyun-core/src/main/resources/mapper/benyun/StoreMapper.xml
  36. 27 0
      benyun-core/src/main/resources/mapper/benyun/StoreWdOpcloseMapper.xml

+ 24 - 20
benyun-core/src/main/java/com/ruoyi/benyun/entity/Brand.java

@@ -1,8 +1,6 @@
 package com.ruoyi.benyun.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -11,66 +9,72 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
-import java.util.Date;
 
 @Data
 @TableName("ddt_brand")
 public class Brand {
-    @TableId("brand_id")
+    @TableField("brand_id")
     private String brandId;
+
     @TableField("brand_img")
     private String brandImg;
+
     @TableField("brand_name")
     private String brandName;
+
     @TableField("industry_code")
     private String industryCode;
+
     @TableField("enterprise_usci")
     private String enterpriseUsci;
+
     @TableField("per_capita_consumption")
-    private Float perCapitaConsumption;
+    private BigDecimal perCapitaConsumption;
+
     @TableField("comment_count")
-    private Long commentCount;
+    private Integer commentCount;
+
     @TableField("score")
-    private Float score;
+    private BigDecimal score;
+
     @TableField("menu_info")
     private String menuInfo;
-    @TableField("index_score")
-    private Float indexScore;
-    @TableField("contact")
-    private String contact;
-    @TableField("telephone")
-    private String telephone;
+
+    @TableField("indes_score")
+    private BigDecimal indexScore;
+
     @TableField("create_date")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime createDate;
+
     @TableField("audit")
-    private Long audit;
-    @TableField("collect_user_id")
-    private String collectUserId;
+    private Integer audit;
+
     @TableField("collect_person")
     private String collectPerson;
+
     @TableField("collect_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime collectTime;
+
     @TableField("enter_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime enterTime;
+
     @TableField("hash")
     private String hash;
+
     @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime updateTime;
-
-    @TableLogic
-    @TableField("show_delete")
-    private int showDelete;
 }

+ 21 - 0
benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandBusiness.java

@@ -0,0 +1,21 @@
+package com.ruoyi.benyun.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("bl_brand_business_statistics")
+public class BrandBusiness {
+    @TableField("brand_id")
+    private String brandId;
+
+    @TableField("brand_name")
+    private String brandName;
+
+    @TableField("business_status")
+    private String businessStatus;
+
+    @TableField("count")
+    private Integer count;
+}

+ 19 - 2
benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandCity.java

@@ -1,5 +1,6 @@
 package com.ruoyi.benyun.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -8,18 +9,34 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 @Data
 @TableName("bl_brand_city_distribution")
 public class BrandCity {
+    @TableField("dis_id")
     private String disId;
+
+    @TableField("brand_id")
     private String brandId;
+
+    @TableField("addr_code")
     private String addrCode;
+
+    @TableField("city")
     private String city;
-    private Float lat;
-    private Float lng;
+
+    @TableField("lat")
+    private BigDecimal lat;
+
+    @TableField("lng")
+    private BigDecimal lng;
+
+    @TableField("dis_count")
     private Integer disCount;
+
+    @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)

+ 19 - 2
benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandProvince.java

@@ -1,5 +1,6 @@
 package com.ruoyi.benyun.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -8,18 +9,34 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 @Data
 @TableName("bl_brand_province_distribution")
 public class BrandProvince {
+    @TableField("dis_id")
     private String disId;
+
+    @TableField("brand_id")
     private String brandId;
+
+    @TableField("addr_code")
     private String addrCode;
+
+    @TableField("province")
     private String province;
-    private Float lat;
-    private Float lng;
+
+    @TableField("lat")
+    private BigDecimal lat;
+
+    @TableField("lng")
+    private BigDecimal lng;
+
+    @TableField("dis_count")
     private Integer disCount;
+
+    @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)

+ 27 - 4
benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandStatistics.java

@@ -1,5 +1,6 @@
 package com.ruoyi.benyun.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -13,15 +14,37 @@ import java.time.LocalDateTime;
 @Data
 @TableName("bl_brand_statistics")
 public class BrandStatistics {
+    @TableField("stat_id")
+    private String statId;
+
+    @TableField("brand_id")
     private String brandId;
+
+    @TableField("brand_name")
     private String brandName;
+
+    @TableField("cover_province_count")
     private int coverProvinceCount;
+
+    @TableField("cover_city_count")
     private int coverCityCount;
+
+    @TableField("cover_zone_count")
     private int coverZoneCount;
-    private int businessCount;
-    private int pauseBusinessCount;
-    private int noBusinessCount;
-    private int total;
+
+    @TableField("business_count")
+    private Integer businessCount;
+
+    @TableField("pause_business_count")
+    private Integer pauseBusinessCount;
+
+    @TableField("no_business_count")
+    private Integer noBusinessCount;
+
+    @TableField("total")
+    private Integer total;
+
+    @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)

+ 29 - 4
benyun-core/src/main/java/com/ruoyi/benyun/entity/BrandZone.java

@@ -1,5 +1,6 @@
 package com.ruoyi.benyun.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -8,22 +9,46 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 @Data
 @TableName("bl_brand_zone_distribution")
 public class BrandZone {
+    @TableField("dis_id")
     private String disId;
+
+    @TableField("brand_id")
     private String brandId;
-    private String industryCode;
+
+    @TableField("brand_name")
+    private String brandName;
+
+    @TableField("addr_code")
     private String addrCode;
+
+    @TableField("province")
     private String province;
+
+    @TableField("city")
     private String city;
+
+    @TableField("zone")
     private String zone;
-    private Float lat;
-    private Float lng;
+
+    @TableField("lat")
+    private BigDecimal lat;
+
+    @TableField("lng")
+    private BigDecimal lng;
+
+    @TableField("dis_count")
     private Integer disCount;
-    private Float avgScore;
+
+    @TableField("avg_score")
+    private BigDecimal avgScore;
+
+    @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)

+ 10 - 0
benyun-core/src/main/java/com/ruoyi/benyun/entity/vo/BrandDisItem.java

@@ -0,0 +1,10 @@
+package com.ruoyi.benyun.entity.vo;
+
+import lombok.Data;
+
+@Data
+public class BrandDisItem {
+    private String code;
+    private String name;
+    private Integer count;
+}

+ 14 - 0
benyun-core/src/main/java/com/ruoyi/benyun/entity/vo/Info.java

@@ -0,0 +1,14 @@
+package com.ruoyi.benyun.entity.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@Data
+public class Info {
+    private String addrCode;
+    private BigDecimal avgScore;
+    private Integer count;
+    private LocalDateTime time;
+}

+ 22 - 0
benyun-core/src/main/java/com/ruoyi/benyun/job/BrandStatsiticsJob.java

@@ -0,0 +1,22 @@
+package com.ruoyi.benyun.job;
+
+import com.ruoyi.benyun.utils.statistics.Together;
+import lombok.extern.slf4j.Slf4j;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class BrandStatsiticsJob implements Job {
+    @Autowired
+    Together together;
+
+    //每月一次
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+        together.start();
+    }
+}

+ 14 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandBusinessDao.java

@@ -0,0 +1,14 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.BrandBusiness;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface BrandBusinessDao extends BaseMapper<BrandBusiness> {
+    List<BrandBusiness> selectByStatistics(@Param("notIns") List<String> notIns);
+    List<String> selectIns();
+}

+ 18 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandCityDao.java

@@ -0,0 +1,18 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.BrandCity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@Mapper
+public interface BrandCityDao extends BaseMapper<BrandCity> {
+    List<BrandCity> searchByBrandId(String brandId);
+    List<BrandCity> searchByBrandIdOrderByCity(String brandId,String month);
+    void insertAll(@Param("cities") List<BrandCity> cities);
+    List<String> selectIns();
+    Integer selectCountByBrandId(String brandId);
+}

+ 21 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandDao.java

@@ -0,0 +1,21 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.Brand;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface BrandDao extends BaseMapper<Brand> {
+    List<Brand> searchAll();
+    List<Brand> searchList(String text);
+    Brand searchById(String brandId);
+    List<Brand> searchByIndustryCodeList(String brandId, String industryCode);
+    void updatePerCapitaConsumptionByBrandId(String brandId);
+    void updateScoreByBrandId(String brandId);
+    void updateCommentCountByBrandId(String brandId);
+    void updateIndexScoreByBrandId(String brandId);
+    List<Brand> searchNotIns(@Param("notIns") List<String> notIns);
+}

+ 2 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandEvolveDao.java

@@ -11,4 +11,6 @@ import java.util.List;
 @Mapper
 public interface BrandEvolveDao extends BaseMapper<BrandEvolve> {
     List<BrandEvolveVo> selectByMulti(@Param("addrCodes") List<String> addrCodes, @Param("typeCodes") List<String> typeCodes, @Param("brandId") String brandId);
+    int insertAll(List<BrandEvolve> evolves);
+    List<BrandEvolve> selectAllByStatistics();
 }

+ 17 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandProvinceDao.java

@@ -0,0 +1,17 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.BrandProvince;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface BrandProvinceDao extends BaseMapper<BrandProvince> {
+    List<BrandProvince> searchByBrandId(String brandId);
+    List<BrandProvince> searchByBrandIdOrderByProvince(String brandId,String month);
+    void insertAll(@Param("provinces") List<BrandProvince> provinces);
+    List<String> selectIns();
+    Integer selectCountByBrandId(String brandId);
+}

+ 17 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandStatisticsDao.java

@@ -0,0 +1,17 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.BrandStatistics;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface BrandStatisticsDao extends BaseMapper<BrandStatistics> {
+    BrandStatistics searchByBrandId(String brandId);
+    List<BrandStatistics> searchList();
+    void insertAll(@Param("brandStatistics") List<BrandStatistics> brandStatistics);
+    List<String> searchStated();
+    BrandStatistics searchByStatistics(@Param("brandId") String brandId);
+}

+ 20 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/BrandZoneDao.java

@@ -0,0 +1,20 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.BrandZone;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface BrandZoneDao extends BaseMapper<BrandZone> {
+    List<BrandZone> searchByBrandId(String brandId);
+    List<BrandZone> searchByMulti(List<String> addrCodes,List<String> industryCodes,List<String> brandIds);
+    void insertAll(@Param("brandZones") List<BrandZone> brandZones);
+    Integer searchProvinceCountByBrandId(String brandId);
+    Integer searchCityCountByBrandId(String brandId);
+    Integer searchZoneCountByBrandId(String brandId);
+    List<String> searchStatedBrandIds(@Param("month") String month);
+    List<BrandZone> searchQuicklyStatistics(@Param("notIns") List<String> notIns);
+}

+ 20 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/StoreDao.java

@@ -0,0 +1,20 @@
+package com.ruoyi.benyun.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.benyun.entity.StoreWd;
+import com.ruoyi.benyun.entity.bo.BrandDisItem;
+import com.ruoyi.benyun.entity.bo.Info;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface StoreDao extends BaseMapper<StoreWd> {
+    List<StoreWd> searchAll();
+    void updateBrandIdByWdId(String brandId, List<String> wdIds);
+    List<BrandDisItem> searchCountOrderByCount(List<String> notIns);
+    List<Info> searchInfoByBrandId(String brandId);
+    Integer searchNomalStatusByBrandId(String brandId);
+    Integer searchPauseStatusByBrandId(String brandId);
+    Integer searchNoStatusByBrandId(String brandId);
+}

+ 2 - 0
benyun-core/src/main/java/com/ruoyi/benyun/mapper/StoreWdOpcloseDao.java

@@ -14,4 +14,6 @@ public interface StoreWdOpcloseDao extends BaseMapper<StoreWdOpclose> {
     List<OpcloseTimeVo> selectWdCloseTimes(@Param("addrCodes") List<String> addrCodes, @Param("typeCodeBys") List<String> typeCodeBys);
     List<OpcloseTimeVo> selectBrandOpenTimes(@Param("brandIds") List<String> brandIds, @Param("addrCodes") List<String> addrCodes, @Param("typeCodeBys") List<String> typeCodeBys);
     List<OpcloseTimeVo> selectBrandCloseTimes(@Param("brandIds") List<String> brandIds, @Param("addrCodes") List<String> addrCodes, @Param("typeCodeBys") List<String> typeCodeBys);
+    List<String> selectIns();
+    List<StoreWdOpclose> selectStatistics(@Param("notIns") List<String> notIns);
 }

+ 381 - 326
benyun-core/src/main/java/com/ruoyi/benyun/service/impl/BrandServiceImpl.java

@@ -78,7 +78,7 @@ public class BrandServiceImpl implements BrandService {
             info.setBrandId(brandId);
             info.setBrandName(brand.getBrandName());
             info.setBrandImg(brand.getBrandImg());
-            info.setIndexScore(brand.getIndexScore());
+//            info.setIndexScore(brand.getIndexScore());
             if (enterprise != null){
                 info.setEnterpriseUsci(enterprise.getEnterpriseUsci());
                 info.setEnterpriseName(enterprise.getEnterpriseName());
@@ -111,9 +111,9 @@ public class BrandServiceImpl implements BrandService {
                 Category category = categoryMapper.searchSubIndustryByCode(brand.getIndustryCode());
                 bp.setIndustryName(category.getName());
             }
-            bp.setPerCapitaConsumption(brand.getPerCapitaConsumption());
-            bp.setCommentCount(brand.getCommentCount());
-            bp.setScore(brand.getScore());
+//            bp.setPerCapitaConsumption(brand.getPerCapitaConsumption());
+//            bp.setCommentCount(brand.getCommentCount());
+//            bp.setScore(brand.getScore());
         }else {
             bp.setIndustryName("****");
             bp.setPerCapitaConsumption(null);
@@ -131,210 +131,265 @@ public class BrandServiceImpl implements BrandService {
 
     @Override
     public List<BrandSimilar> searchSimilarByBrandId(String brandId) {
-//        先查询品牌id得到industryCode
-        Brand brand = brandMapper.searchById(brandId);
-        if (brand == null)
-            return new ArrayList<>();
-//        再根据industryCode得到其他品牌的信息
-        if (brand.getIndustryCode() == null)
-            return new ArrayList<>();
-        List<Brand> brands = brandMapper.searchByIndustryCodeList(brandId, brand.getIndustryCode());
-        if (brands.isEmpty())
-            return new ArrayList<>();
-        List<BrandSimilar> similarList = new ArrayList<>();
-        for (Brand b : brands){
-            BrandSimilar bs = new BrandSimilar();
-            bs.setBrandId(b.getBrandId());
-            bs.setBrandImg(b.getBrandImg());
-            bs.setBrandName(b.getBrandName());
-            bs.setUpdateTime(b.getUpdateTime());
-            similarList.add(bs);
-        }
-        return similarList;
+        return null;
     }
 
     @Override
     public List<BrandStatus> searchStatusByBrandId(String brandId) {
-//        查询状态后拆分
-        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
-        if (statistics == null)
-            return new ArrayList<>();
-        int businessCount = statistics.getBusinessCount();
-        int pauseBusinessCount = statistics.getPauseBusinessCount();
-        int noBusinessCount = statistics.getNoBusinessCount();
-        List<BrandStatus> statuses = new ArrayList<>();
-        if (businessCount != 0){
-            BrandStatus status = new BrandStatus();
-            status.setBusinessStatus("正常");
-            status.setCount(businessCount);
-            statuses.add(status);
-        }
-        if (pauseBusinessCount != 0){
-            BrandStatus status = new BrandStatus();
-            status.setBusinessStatus("暂停");
-            status.setCount(pauseBusinessCount);
-            statuses.add(status);
-        }
-        if (noBusinessCount != 0){
-            BrandStatus status = new BrandStatus();
-            status.setBusinessStatus("尚未营业");
-            status.setCount(noBusinessCount);
-            statuses.add(status);
-        }
-        return statuses;
+        return null;
     }
 
     @Override
     public BrandDistribution searchDistributionByBrandId(String brandId) {
-//        省份:31
-//        城市:342
-//        区县:2989
-//        查询统计并附加信息
-        int province = 31;
-        int city = 342;
-        int zone = 2989;
-        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
-        if (statistics == null)
-            return null;
-        BrandDistribution bd = new BrandDistribution();
-        int cpc = statistics.getCoverProvinceCount();
-        int ccc = statistics.getCoverCityCount();
-        int czc = statistics.getCoverZoneCount();
-        bd.setTotal(statistics.getTotal());
-        bd.setCoverProvinceCount(cpc);
-        float provinceRatio = (float) cpc/province;
-        bd.setCoverProvinceRatio((int)(provinceRatio*100) + "%");
-        bd.setCoverCityCount(ccc);
-        float cityRatio = (float) ccc/city;
-        bd.setCoverCityRatio((int)(cityRatio*100) + "%");
-        bd.setCoverZoneCount(czc);
-        float zoneRatio = (float) czc/zone;
-        bd.setCoverZoneRatio((int)(zoneRatio*100) + "%");
-        return bd;
+        return null;
     }
 
     @Override
     public List<BrandProvinceBo> searchProvinceByBrandId(String brandId) {
-        List<BrandProvince> provinces = brandProvinceMapper.searchByBrandId(brandId);
-        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
-        if (provinces.isEmpty() || statistics == null)
-            return new ArrayList<>();
-        int total = statistics.getTotal();
-        List<BrandProvinceBo> bpbs = new ArrayList<>();
-        for (BrandProvince bp : provinces){
-            int disCount = bp.getDisCount();
-            BrandProvinceBo bpb = new BrandProvinceBo();
-//            bpb.setBrandId(bp.getBrandId());
-            bpb.setCode(bp.getAddrCode());
-            bpb.setName(bp.getProvince());
-            bpb.setLocation(bp.getLat().toString() + "," + bp.getLng().toString());
-            bpb.setCount(disCount);
-            float ratio = (float) disCount/total;
-            bpb.setRatio((ratio*100) + "%");
-            bpb.setUpdateTime(bp.getUpdateTime());
-            bpbs.add(bpb);
-        }
-        return bpbs;
+        return null;
     }
 
     @Override
     public BrandDisCloud searchDisCloudByBrandId(String brandId) {
-        List<BrandCity> brandCities = brandCityMapper.searchByBrandId(brandId);
-        List<BrandZone> brandZones = brandZoneMapper.searchByBrandId(brandId);
-        BrandDisCloud disCloud = new BrandDisCloud();
-        List<BrandDisItem> zoneDis = new ArrayList<>();
-        List<BrandDisItem> cityDis = new ArrayList<>();
-        for (BrandZone bz : brandZones){
-            BrandDisItem bdi = new BrandDisItem();
-            bdi.setCode(bz.getAddrCode());
-            bdi.setName(bz.getZone());
-            bdi.setCount(bz.getDisCount());
-            zoneDis.add(bdi);
-        }
-        for (BrandCity bc : brandCities){
-            BrandDisItem bdi = new BrandDisItem();
-            bdi.setCode(bc.getAddrCode());
-            bdi.setName(bc.getCity());
-            bdi.setCount(bc.getDisCount());
-            cityDis.add(bdi);
-        }
-        disCloud.setZoneDistribution(zoneDis);
-        disCloud.setCityDistribution(cityDis);
-        return disCloud;
+        return null;
     }
 
     @Override
     public PageInfo<List<BrandSearch>> searchListByMulti(ListQueryBody body, String userId) {
-        PageHelper.startPage(body.getPageNum(),body.getPageSize(),true);
-        String text = body.getText();
-        List<String> industryCode = body.getIndustryCode();
-        Integer countDown = null;
-        Integer countUp = null;
-        Integer coverDown = null;
-        Integer coverUp = null;
-        if (body.getWdCount() != null){
-            if (body.getWdCount().size() == 1)
-                countDown = Integer.parseInt(body.getWdCount().get(0));
-            else if (body.getWdCount().size() >= 2){
-                countDown = Integer.parseInt(body.getWdCount().get(0));
-                countUp = Integer.parseInt(body.getWdCount().get(1));
-            }
-        }
-        if (body.getCoverCityCount() != null){
-            if (body.getCoverCityCount().size() == 1){
-                coverDown = Integer.parseInt(body.getCoverCityCount().get(0));
-            }else if (body.getCoverCityCount().size() >= 2){
-                coverDown = Integer.parseInt(body.getCoverCityCount().get(0));
-                coverUp = Integer.parseInt(body.getCoverCityCount().get(1));
-            }
-        }
-//        System.out.println(countDown+","+countUp);
-//        System.out.println(coverDown+","+coverUp);
-        List<BrandSearch> brandSearches = brandMapper.searchSearchByMulti(text, industryCode, countUp, countDown, coverUp, coverDown);
-        if (userId == null || userId.equals("")){
-            for (BrandSearch search : brandSearches){
-                search.setAttention(0);
-            }
-        }else {
-            List<AttentionPool> pools = attentionPoolDao.searchByMulti(null, userId);
-            Map<String ,String> map = new HashMap<>();
-            for (AttentionPool pool : pools){
-                map.put(pool.getBrandId(),"1");
-            }
-            for (BrandSearch search : brandSearches){
-                if (map.get(search.getBrandId()) == null){
-                    search.setAttention(0);
-                }else {
-                    search.setAttention(1);
-                }
-            }
-        }
-        return new PageInfo(brandSearches);
+        return null;
     }
 
     @Override
     public List<BrandTotal> searchTotal(Integer pageSize) {
-        List<BrandStatistics> list = brandStatisticsMapper.searchList();
-        if (list.isEmpty())
-            return new ArrayList<>();
-        List<BrandTotal> tList = new ArrayList<>();
-        if (pageSize == null)
-            pageSize = 10;
-        int index = 0;
-        for (BrandStatistics bs : list){
-            if (index >= pageSize)
-                break;
-            BrandTotal bt = new BrandTotal();
-            bt.setBrandId(bs.getBrandId());
-            bt.setBrandName(bs.getBrandName());
-            bt.setTotal(bs.getTotal());
-            bt.setUpdateTime(bs.getUpdateTime());
-            tList.add(bt);
-            index++;
-        }
-        return tList;
+        return null;
+    }
+
+    @Override
+    public List<BrandGeoLabelBo> searchGeoLabel(String brandId) {
+        return null;
+    }
+
+    @Override
+    public List<BrandOpcloseVo> searchOpenByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
+        return null;
+    }
+
+    @Override
+    public List<BrandOpcloseVo> searchCloseByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
+        return null;
     }
 
+    @Override
+    public List<BrandEvolveVo> searchEvolveByMulti(List<String> addrCodes, List<String> typeCodes, List<String> brandIds) {
+        return null;
+    }
+
+//    @Override
+//    public List<BrandSimilar> searchSimilarByBrandId(String brandId) {
+////        先查询品牌id得到industryCode
+//        Brand brand = brandMapper.searchById(brandId);
+//        if (brand == null)
+//            return new ArrayList<>();
+////        再根据industryCode得到其他品牌的信息
+//        if (brand.getIndustryCode() == null)
+//            return new ArrayList<>();
+//        List<Brand> brands = brandMapper.searchByIndustryCodeList(brandId, brand.getIndustryCode());
+//        if (brands.isEmpty())
+//            return new ArrayList<>();
+//        List<BrandSimilar> similarList = new ArrayList<>();
+//        for (Brand b : brands){
+//            BrandSimilar bs = new BrandSimilar();
+//            bs.setBrandId(b.getBrandId());
+//            bs.setBrandImg(b.getBrandImg());
+//            bs.setBrandName(b.getBrandName());
+//            bs.setUpdateTime(b.getUpdateTime());
+//            similarList.add(bs);
+//        }
+//        return similarList;
+//    }
+
+//    @Override
+//    public List<BrandStatus> searchStatusByBrandId(String brandId) {
+////        查询状态后拆分
+//        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
+//        if (statistics == null)
+//            return new ArrayList<>();
+//        int businessCount = statistics.getBusinessCount();
+//        int pauseBusinessCount = statistics.getPauseBusinessCount();
+//        int noBusinessCount = statistics.getNoBusinessCount();
+//        List<BrandStatus> statuses = new ArrayList<>();
+//        if (businessCount != 0){
+//            BrandStatus status = new BrandStatus();
+//            status.setBusinessStatus("正常");
+//            status.setCount(businessCount);
+//            statuses.add(status);
+//        }
+//        if (pauseBusinessCount != 0){
+//            BrandStatus status = new BrandStatus();
+//            status.setBusinessStatus("暂停");
+//            status.setCount(pauseBusinessCount);
+//            statuses.add(status);
+//        }
+//        if (noBusinessCount != 0){
+//            BrandStatus status = new BrandStatus();
+//            status.setBusinessStatus("尚未营业");
+//            status.setCount(noBusinessCount);
+//            statuses.add(status);
+//        }
+//        return statuses;
+//    }
+
+//    @Override
+//    public BrandDistribution searchDistributionByBrandId(String brandId) {
+////        省份:31
+////        城市:342
+////        区县:2989
+////        查询统计并附加信息
+//        int province = 31;
+//        int city = 342;
+//        int zone = 2989;
+//        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
+//        if (statistics == null)
+//            return null;
+//        BrandDistribution bd = new BrandDistribution();
+//        int cpc = statistics.getCoverProvinceCount();
+//        int ccc = statistics.getCoverCityCount();
+//        int czc = statistics.getCoverZoneCount();
+//        bd.setTotal(statistics.getTotal());
+//        bd.setCoverProvinceCount(cpc);
+//        float provinceRatio = (float) cpc/province;
+//        bd.setCoverProvinceRatio((int)(provinceRatio*100) + "%");
+//        bd.setCoverCityCount(ccc);
+//        float cityRatio = (float) ccc/city;
+//        bd.setCoverCityRatio((int)(cityRatio*100) + "%");
+//        bd.setCoverZoneCount(czc);
+//        float zoneRatio = (float) czc/zone;
+//        bd.setCoverZoneRatio((int)(zoneRatio*100) + "%");
+//        return bd;
+//    }
+
+//    @Override
+//    public List<BrandProvinceBo> searchProvinceByBrandId(String brandId) {
+//        List<BrandProvince> provinces = brandProvinceMapper.searchByBrandId(brandId);
+//        BrandStatistics statistics = brandStatisticsMapper.searchByBrandId(brandId);
+//        if (provinces.isEmpty() || statistics == null)
+//            return new ArrayList<>();
+//        int total = statistics.getTotal();
+//        List<BrandProvinceBo> bpbs = new ArrayList<>();
+//        for (BrandProvince bp : provinces){
+//            int disCount = bp.getDisCount();
+//            BrandProvinceBo bpb = new BrandProvinceBo();
+////            bpb.setBrandId(bp.getBrandId());
+//            bpb.setCode(bp.getAddrCode());
+//            bpb.setName(bp.getProvince());
+//            bpb.setLocation(bp.getLat().toString() + "," + bp.getLng().toString());
+//            bpb.setCount(disCount);
+//            float ratio = (float) disCount/total;
+//            bpb.setRatio((ratio*100) + "%");
+//            bpb.setUpdateTime(bp.getUpdateTime());
+//            bpbs.add(bpb);
+//        }
+//        return bpbs;
+//    }
+
+//    @Override
+//    public BrandDisCloud searchDisCloudByBrandId(String brandId) {
+//        List<BrandCity> brandCities = brandCityMapper.searchByBrandId(brandId);
+//        List<BrandZone> brandZones = brandZoneMapper.searchByBrandId(brandId);
+//        BrandDisCloud disCloud = new BrandDisCloud();
+//        List<BrandDisItem> zoneDis = new ArrayList<>();
+//        List<BrandDisItem> cityDis = new ArrayList<>();
+//        for (BrandZone bz : brandZones){
+//            BrandDisItem bdi = new BrandDisItem();
+//            bdi.setCode(bz.getAddrCode());
+//            bdi.setName(bz.getZone());
+//            bdi.setCount(bz.getDisCount());
+//            zoneDis.add(bdi);
+//        }
+//        for (BrandCity bc : brandCities){
+//            BrandDisItem bdi = new BrandDisItem();
+//            bdi.setCode(bc.getAddrCode());
+//            bdi.setName(bc.getCity());
+//            bdi.setCount(bc.getDisCount());
+//            cityDis.add(bdi);
+//        }
+//        disCloud.setZoneDistribution(zoneDis);
+//        disCloud.setCityDistribution(cityDis);
+//        return disCloud;
+//    }
+
+//    @Override
+//    public PageInfo<List<BrandSearch>> searchListByMulti(ListQueryBody body, String userId) {
+//        PageHelper.startPage(body.getPageNum(),body.getPageSize(),true);
+//        String text = body.getText();
+//        List<String> industryCode = body.getIndustryCode();
+//        Integer countDown = null;
+//        Integer countUp = null;
+//        Integer coverDown = null;
+//        Integer coverUp = null;
+//        if (body.getWdCount() != null){
+//            if (body.getWdCount().size() == 1)
+//                countDown = Integer.parseInt(body.getWdCount().get(0));
+//            else if (body.getWdCount().size() >= 2){
+//                countDown = Integer.parseInt(body.getWdCount().get(0));
+//                countUp = Integer.parseInt(body.getWdCount().get(1));
+//            }
+//        }
+//        if (body.getCoverCityCount() != null){
+//            if (body.getCoverCityCount().size() == 1){
+//                coverDown = Integer.parseInt(body.getCoverCityCount().get(0));
+//            }else if (body.getCoverCityCount().size() >= 2){
+//                coverDown = Integer.parseInt(body.getCoverCityCount().get(0));
+//                coverUp = Integer.parseInt(body.getCoverCityCount().get(1));
+//            }
+//        }
+////        System.out.println(countDown+","+countUp);
+////        System.out.println(coverDown+","+coverUp);
+//        List<BrandSearch> brandSearches = brandMapper.searchSearchByMulti(text, industryCode, countUp, countDown, coverUp, coverDown);
+//        if (userId == null || userId.equals("")){
+//            for (BrandSearch search : brandSearches){
+//                search.setAttention(0);
+//            }
+//        }else {
+//            List<AttentionPool> pools = attentionPoolDao.searchByMulti(null, userId);
+//            Map<String ,String> map = new HashMap<>();
+//            for (AttentionPool pool : pools){
+//                map.put(pool.getBrandId(),"1");
+//            }
+//            for (BrandSearch search : brandSearches){
+//                if (map.get(search.getBrandId()) == null){
+//                    search.setAttention(0);
+//                }else {
+//                    search.setAttention(1);
+//                }
+//            }
+//        }
+//        return new PageInfo(brandSearches);
+//    }
+
+//    @Override
+//    public List<BrandTotal> searchTotal(Integer pageSize) {
+//        List<BrandStatistics> list = brandStatisticsMapper.searchList();
+//        if (list.isEmpty())
+//            return new ArrayList<>();
+//        List<BrandTotal> tList = new ArrayList<>();
+//        if (pageSize == null)
+//            pageSize = 10;
+//        int index = 0;
+//        for (BrandStatistics bs : list){
+//            if (index >= pageSize)
+//                break;
+//            BrandTotal bt = new BrandTotal();
+//            bt.setBrandId(bs.getBrandId());
+//            bt.setBrandName(bs.getBrandName());
+//            bt.setTotal(bs.getTotal());
+//            bt.setUpdateTime(bs.getUpdateTime());
+//            tList.add(bt);
+//            index++;
+//        }
+//        return tList;
+//    }
+
 //    @Override
 //    public BStoreData searchAvgScoreByBrandId(String brandId) {
 //        Brand brand = brandMapper.searchById(brandId);
@@ -368,43 +423,43 @@ public class BrandServiceImpl implements BrandService {
 //        return list;
 //    }
 
-    @Override
-    public List<BrandGeoLabelBo> searchGeoLabel(String brandId) {
-        List<BrandGeoLabelBo> bos = new ArrayList<>();
-
-        // 查询门店
-        QueryWrapper<StoreWd> storeWdQueryWrapper = new QueryWrapper<>();
-        storeWdQueryWrapper.eq("brand_id",brandId);
-        List<StoreWd> storeWds = storeWdDao.selectList(storeWdQueryWrapper);
-        if (storeWds.size() == 0)
-            return bos;
-
-        // 查询门店标签
-        int count = storeWds.size(); // 总数,用于做比率
-        QueryWrapper<WdTopologicalInfo> infoQueryWrapper = new QueryWrapper<>();
-        List<String> wdIds = new ArrayList<>();
-        for (StoreWd storeWd : storeWds){
-            wdIds.add(storeWd.getWdId());
-        }
-        infoQueryWrapper.eq("radius",1000).and(info -> {
-            info.in("center_wd_id",wdIds);
-        });
-        List<WdTopologicalInfo> infos = wdTopologicalInfoDao.selectList(infoQueryWrapper);
-        // 统计标签
-        Map<String,Integer> typeMap = new HashMap<>();
-        for (WdTopologicalInfo info : infos){
-            String tag = info.getTag();
-            String[] tags = tag.split(";");
-            for (String t : tags){
-                String[] split = t.split(":");
-                if (split.length < 2)
-                    continue;
-                if (typeMap.get(split[0]) != null){
-                    typeMap.replace(split[0],typeMap.get(split[0])+Integer.parseInt(split[1]));
-                }
-                typeMap.put(split[0],Integer.parseInt(split[1]));
-            }
-        }
+//    @Override
+//    public List<BrandGeoLabelBo> searchGeoLabel(String brandId) {
+//        List<BrandGeoLabelBo> bos = new ArrayList<>();
+//
+//        // 查询门店
+//        QueryWrapper<StoreWd> storeWdQueryWrapper = new QueryWrapper<>();
+//        storeWdQueryWrapper.eq("brand_id",brandId);
+//        List<StoreWd> storeWds = storeWdDao.selectList(storeWdQueryWrapper);
+//        if (storeWds.size() == 0)
+//            return bos;
+//
+//        // 查询门店标签
+//        int count = storeWds.size(); // 总数,用于做比率
+//        QueryWrapper<WdTopologicalInfo> infoQueryWrapper = new QueryWrapper<>();
+//        List<String> wdIds = new ArrayList<>();
+//        for (StoreWd storeWd : storeWds){
+//            wdIds.add(storeWd.getWdId());
+//        }
+//        infoQueryWrapper.eq("radius",1000).and(info -> {
+//            info.in("center_wd_id",wdIds);
+//        });
+//        List<WdTopologicalInfo> infos = wdTopologicalInfoDao.selectList(infoQueryWrapper);
+//        // 统计标签
+//        Map<String,Integer> typeMap = new HashMap<>();
+//        for (WdTopologicalInfo info : infos){
+//            String tag = info.getTag();
+//            String[] tags = tag.split(";");
+//            for (String t : tags){
+//                String[] split = t.split(":");
+//                if (split.length < 2)
+//                    continue;
+//                if (typeMap.get(split[0]) != null){
+//                    typeMap.replace(split[0],typeMap.get(split[0])+Integer.parseInt(split[1]));
+//                }
+//                typeMap.put(split[0],Integer.parseInt(split[1]));
+//            }
+//        }
 //        Set<String> keySet = typeMap.keySet();
 //        QueryWrapper<TypeBy> typeByQueryWrapper = new QueryWrapper<>();
 //        typeByQueryWrapper.in("type_code_by",keySet).and(typeByQueryWrapper1 -> {
@@ -418,114 +473,114 @@ public class BrandServiceImpl implements BrandService {
 //        typeMap.entrySet()
 //            .stream().sorted(Map.Entry.comparingByValue())
 //            .forEachOrdered(x -> sortMap.put(x.getKey(),x.getValue()));
-        List<Map.Entry<String,Integer>> sortMap = new ArrayList<>(typeMap.entrySet());
-        Collections.sort(sortMap, new Comparator<Map.Entry<String, Integer>>() {
-            @Override
-            public int compare(Map.Entry<String, Integer> t1, Map.Entry<String, Integer> t2) {
-                return t2.getValue().compareTo(t1.getValue()); // 降序
-            }
-        });
-        // 获取前10项
-        List<String> searchList = new ArrayList<>();
-        for (int i=0;i<sortMap.size();i++){
-            // System.out.println(sortMap.get(i).getKey()+" "+sortMap.get(i).getValue());
-            searchList.add(sortMap.get(i).getKey());
-            if (searchList.size() >= 10)
-                break;
-        }
-        // 查询标签
-        QueryWrapper<TypeBy> typeByQueryWrapper = new QueryWrapper<>();
-        typeByQueryWrapper.in("type_code_by",searchList);
-        List<TypeBy> typeByList = typeByDao.selectList(typeByQueryWrapper);
-        // 赋值
-        for (TypeBy typeBy : typeByList){
-            BrandGeoLabelBo bo = new BrandGeoLabelBo();
-            bo.setCode(typeBy.getTypeCodeBy());
-            bo.setTotal(typeMap.get(typeBy.getTypeCodeBy()));
-            if (!typeBy.getSubCategory().equals("")){
-                bo.setName(typeBy.getSubCategory());
-            }else if (!typeBy.getMidCategory().equals("")){
-                bo.setName(typeBy.getMidCategory());
-            }else{
-                bo.setName(typeBy.getBigCategory());
-            }
-            float ratio = (float) bo.getTotal()/count;
-            bo.setRatio((ratio*100) + "%");
-            bos.add(bo);
-        }
-        bos.sort(new Comparator<BrandGeoLabelBo>() {
-            @Override
-            public int compare(BrandGeoLabelBo t1, BrandGeoLabelBo t2) {
-                return t2.getTotal().compareTo(t1.getTotal());
-            }
-        });
-        return bos;
-    }
+//        List<Map.Entry<String,Integer>> sortMap = new ArrayList<>(typeMap.entrySet());
+//        Collections.sort(sortMap, new Comparator<Map.Entry<String, Integer>>() {
+//            @Override
+//            public int compare(Map.Entry<String, Integer> t1, Map.Entry<String, Integer> t2) {
+//                return t2.getValue().compareTo(t1.getValue()); // 降序
+//            }
+//        });
+//        // 获取前10项
+//        List<String> searchList = new ArrayList<>();
+//        for (int i=0;i<sortMap.size();i++){
+//            // System.out.println(sortMap.get(i).getKey()+" "+sortMap.get(i).getValue());
+//            searchList.add(sortMap.get(i).getKey());
+//            if (searchList.size() >= 10)
+//                break;
+//        }
+//        // 查询标签
+//        QueryWrapper<TypeBy> typeByQueryWrapper = new QueryWrapper<>();
+//        typeByQueryWrapper.in("type_code_by",searchList);
+//        List<TypeBy> typeByList = typeByDao.selectList(typeByQueryWrapper);
+//        // 赋值
+//        for (TypeBy typeBy : typeByList){
+//            BrandGeoLabelBo bo = new BrandGeoLabelBo();
+//            bo.setCode(typeBy.getTypeCodeBy());
+//            bo.setTotal(typeMap.get(typeBy.getTypeCodeBy()));
+//            if (!typeBy.getSubCategory().equals("")){
+//                bo.setName(typeBy.getSubCategory());
+//            }else if (!typeBy.getMidCategory().equals("")){
+//                bo.setName(typeBy.getMidCategory());
+//            }else{
+//                bo.setName(typeBy.getBigCategory());
+//            }
+//            float ratio = (float) bo.getTotal()/count;
+//            bo.setRatio((ratio*100) + "%");
+//            bos.add(bo);
+//        }
+//        bos.sort(new Comparator<BrandGeoLabelBo>() {
+//            @Override
+//            public int compare(BrandGeoLabelBo t1, BrandGeoLabelBo t2) {
+//                return t2.getTotal().compareTo(t1.getTotal());
+//            }
+//        });
+//        return bos;
+//    }
 
-    @Override
-    public List<BrandOpcloseVo> searchOpenByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
-        List<String> codes = new ArrayList<>();
-        if (typeCodes != null){
-            for (String code : typeCodes){
-                codes.add(code);
-                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
-                codes.addAll(otherTypeBy);
-            }
-        }else{
-            codes = null;
-        }
-        List<BrandOpcloseVo> vos = storeOpcloseDao.selectOpenByMulti(codes, startTime, endTime);
-        return vos.subList(0, 9);
-    }
+//    @Override
+//    public List<BrandOpcloseVo> searchOpenByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
+//        List<String> codes = new ArrayList<>();
+//        if (typeCodes != null){
+//            for (String code : typeCodes){
+//                codes.add(code);
+//                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
+//                codes.addAll(otherTypeBy);
+//            }
+//        }else{
+//            codes = null;
+//        }
+//        List<BrandOpcloseVo> vos = storeOpcloseDao.selectOpenByMulti(codes, startTime, endTime);
+//        return vos.subList(0, 9);
+//    }
 
-    @Override
-    public List<BrandOpcloseVo> searchCloseByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
-        List<String> codes = new ArrayList<>();
-        if (typeCodes != null){
-            for (String code : typeCodes){
-                codes.add(code);
-                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
-                codes.addAll(otherTypeBy);
-            }
-        }else{
-            codes = null;
-        }
-        List<BrandOpcloseVo> vos = storeOpcloseDao.selectCloseByMulti(codes, startTime, endTime);
-        return vos.subList(0,9);
-    }
+//    @Override
+//    public List<BrandOpcloseVo> searchCloseByMulti(List<String> typeCodes, LocalDateTime startTime, LocalDateTime endTime) {
+//        List<String> codes = new ArrayList<>();
+//        if (typeCodes != null){
+//            for (String code : typeCodes){
+//                codes.add(code);
+//                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
+//                codes.addAll(otherTypeBy);
+//            }
+//        }else{
+//            codes = null;
+//        }
+//        List<BrandOpcloseVo> vos = storeOpcloseDao.selectCloseByMulti(codes, startTime, endTime);
+//        return vos.subList(0,9);
+//    }
 
-    @Override
-    public List<BrandEvolveVo> searchEvolveByMulti(List<String> addrCodes, List<String> typeCodes, List<String> brandIds) {
-        List<String> addrs = new ArrayList<>();
-        if (addrCodes != null){
-            for (String code : addrCodes){
-                addrs.add(code);
-                List<String> otherAddrCode = categoryUtil.getAllOtherAddrCode(code);
-                addrs.addAll(otherAddrCode);
-            }
-        }else{
-            addrs = null;
-        }
-        List<String> types = new ArrayList<>();
-        if (typeCodes != null){
-            for (String code : typeCodes){
-                types.add(code);
-                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
-                types.addAll(otherTypeBy);
-            }
-        }else{
-            types = null;
-        }
-        List<BrandEvolveVo> vos = new ArrayList<>();
-        for (String brandId : brandIds){
-            List<BrandEvolveVo> evolveVos = brandEvolveDao.selectByMulti(addrs, types, brandId);
-            for (int i=0; i<evolveVos.size(); i++){
-                if (i == 0)
-                    continue;
-                evolveVos.get(i).setTotal(evolveVos.get(i-1).getTotal()+evolveVos.get(i).getTotal());
-            }
-            vos.addAll(evolveVos);
-        }
-        return vos;
-    }
+//    @Override
+//    public List<BrandEvolveVo> searchEvolveByMulti(List<String> addrCodes, List<String> typeCodes, List<String> brandIds) {
+//        List<String> addrs = new ArrayList<>();
+//        if (addrCodes != null){
+//            for (String code : addrCodes){
+//                addrs.add(code);
+//                List<String> otherAddrCode = categoryUtil.getAllOtherAddrCode(code);
+//                addrs.addAll(otherAddrCode);
+//            }
+//        }else{
+//            addrs = null;
+//        }
+//        List<String> types = new ArrayList<>();
+//        if (typeCodes != null){
+//            for (String code : typeCodes){
+//                types.add(code);
+//                List<String> otherTypeBy = categoryUtil.getAllOtherTypeBy(code);
+//                types.addAll(otherTypeBy);
+//            }
+//        }else{
+//            types = null;
+//        }
+//        List<BrandEvolveVo> vos = new ArrayList<>();
+//        for (String brandId : brandIds){
+//            List<BrandEvolveVo> evolveVos = brandEvolveDao.selectByMulti(addrs, types, brandId);
+//            for (int i=0; i<evolveVos.size(); i++){
+//                if (i == 0)
+//                    continue;
+//                evolveVos.get(i).setTotal(evolveVos.get(i-1).getTotal()+evolveVos.get(i).getTotal());
+//            }
+//            vos.addAll(evolveVos);
+//        }
+//        return vos;
+//    }
 }

+ 26 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandBusinessStat.java

@@ -0,0 +1,26 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.BrandBusiness;
+import com.ruoyi.benyun.mapper.BrandBusinessDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class BrandBusinessStat {
+    @Autowired
+    BrandBusinessDao brandBusinessDao;
+
+    public void continueInsert(){
+        List<String> ins = brandBusinessDao.selectIns();
+        System.out.println("已经处理:" + ins.size() + "个");
+        List<BrandBusiness> brandBusinesses = brandBusinessDao.selectByStatistics(ins);
+        int i = 0;
+        int total = brandBusinesses.size();
+        for (BrandBusiness business : brandBusinesses){
+            i += brandBusinessDao.insert(business);
+            System.out.println(i + "/" + total);
+        }
+    }
+}

+ 54 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandCityStat.java

@@ -0,0 +1,54 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.Brand;
+import com.ruoyi.benyun.entity.BrandCity;
+import com.ruoyi.benyun.mapper.BrandCityDao;
+import com.ruoyi.benyun.mapper.BrandDao;
+import com.ruoyi.benyun.mapper.BrandZoneDao;
+import com.ruoyi.benyun.mapper.StoreDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.UUID;
+
+@Component
+public class BrandCityStat {
+    @Autowired
+    BrandDao brandDao;
+    @Autowired
+    BrandCityDao brandCityDao;
+    @Autowired
+    BrandZoneDao brandZoneDao;
+    @Autowired
+    StoreDao storeDao;
+
+    public void continueInsert(){
+        List<String> notIns = brandCityDao.selectIns();
+        System.out.println("已处理:" + notIns.size() + "个");
+        List<Brand> brands = brandDao.searchNotIns(notIns);
+        int index = 1;
+        int total = brands.size();
+        for (Brand brand : brands){
+//            统计本月
+            String month = LocalDateTime.now(ZoneId.of("Asia/Shanghai")).format(DateTimeFormatter.ofPattern("yyyy-MM"));
+            List<BrandCity> cities = brandCityDao.searchByBrandIdOrderByCity(brand.getBrandId(),month);
+            if (cities.isEmpty()){
+                System.out.println(index+"/"+total);
+                index++;
+                continue;
+            }
+            for (BrandCity city : cities){
+                city.setDisId(UUID.randomUUID().toString().replace("-",""));
+                city.setBrandId(brand.getBrandId());
+                city.setUpdateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
+            }
+            brandCityDao.insertAll(cities);
+            System.out.println(index+"/"+total);
+            index++;
+        }
+    }
+}

+ 26 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandEvolveStat.java

@@ -0,0 +1,26 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.BrandEvolve;
+import com.ruoyi.benyun.mapper.BrandEvolveDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.UUID;
+
+@Component
+public class BrandEvolveStat {
+    @Autowired
+    BrandEvolveDao brandEvolveDao;
+
+    public void insertAll(){
+        List<BrandEvolve> evolves = brandEvolveDao.selectAllByStatistics();
+        int total = evolves.size();
+        int i = 0;
+        for (BrandEvolve evolve : evolves){
+            evolve.setStatId(UUID.randomUUID().toString().replace("-",""));
+            i += brandEvolveDao.insert(evolve);
+            System.out.println(i+"/"+total);
+        }
+    }
+}

+ 48 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandProvinceStat.java

@@ -0,0 +1,48 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.Brand;
+import com.ruoyi.benyun.entity.BrandProvince;
+import com.ruoyi.benyun.mapper.BrandDao;
+import com.ruoyi.benyun.mapper.BrandProvinceDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.UUID;
+
+@Component
+public class BrandProvinceStat {
+    @Autowired
+    BrandDao brandDao;
+    @Autowired
+    BrandProvinceDao brandProvinceDao;
+
+    public void continueInsert(){
+        List<String> notIns = brandProvinceDao.selectIns();
+        System.out.println("已处理:" + notIns.size() + "个");
+        List<Brand> brands = brandDao.searchNotIns(notIns);
+        int index = 1;
+        int total = brands.size();
+        for (Brand brand : brands){
+//            统计本月
+            String month = LocalDateTime.now(ZoneId.of("Asia/Shanghai")).format(DateTimeFormatter.ofPattern("yyyy-MM"));
+            List<BrandProvince> provinces = brandProvinceDao.searchByBrandIdOrderByProvince(brand.getBrandId(),month);
+            if (provinces.isEmpty()){
+                System.out.println(index+"/"+total);
+                index++;
+                continue;
+            }
+            for (BrandProvince bp : provinces){
+                bp.setDisId(UUID.randomUUID().toString().replace("-",""));
+                bp.setBrandId(brand.getBrandId());
+                bp.setUpdateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
+            }
+            brandProvinceDao.insertAll(provinces);
+            System.out.println(index+"/"+total);
+            index++;
+        }
+    }
+}

+ 86 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandStat.java

@@ -0,0 +1,86 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.benyun.entity.Brand;
+import com.ruoyi.benyun.entity.BrandBusiness;
+import com.ruoyi.benyun.entity.BrandStatistics;
+import com.ruoyi.benyun.mapper.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.List;
+import java.util.UUID;
+
+@Component
+public class BrandStat {
+    @Autowired
+    BrandDao brandMapper;
+    @Autowired
+    BrandZoneDao brandZoneDao;
+    @Autowired
+    StoreDao storeDao;
+    @Autowired
+    BrandStatisticsDao brandStatisticsDao;
+    @Autowired
+    BrandCityDao cityDao;
+    @Autowired
+    BrandProvinceDao provinceDao;
+    @Autowired
+    BrandBusinessDao businessDao;
+
+    public void continueInsertPlus2(){
+//        查询已统计的品牌
+        List<String> notIns = brandStatisticsDao.searchStated();
+        System.out.println("已处理品牌:"+notIns.size()+"个");
+//        处理剩下的
+        List<Brand> brands = brandMapper.searchNotIns(notIns);
+        int index = 0;
+        int total = brands.size();
+        for (Brand brand : brands){
+            BrandStatistics statistics = new BrandStatistics();
+            statistics.setStatId(UUID.randomUUID().toString().replace("-",""));
+            statistics.setBrandId(brand.getBrandId());
+            statistics.setBrandName(brand.getBrandName());
+            statistics.setCoverProvinceCount(provinceDao.selectCountByBrandId(brand.getBrandId()));
+            statistics.setCoverCityCount(cityDao.selectCountByBrandId(brand.getBrandId()));
+            statistics.setCoverZoneCount(brandZoneDao.searchZoneCountByBrandId(brand.getBrandId()));
+
+            QueryWrapper<BrandBusiness> nomalStatusQueryWrapper = new QueryWrapper<>();
+            nomalStatusQueryWrapper.eq("brand_id",brand.getBrandId());
+            nomalStatusQueryWrapper.eq("business_status","正常");
+            BrandBusiness nomalStatus = businessDao.selectOne(nomalStatusQueryWrapper);
+            if (nomalStatus == null)
+                statistics.setBusinessCount(0);
+            else
+                statistics.setBusinessCount(nomalStatus.getCount());
+//            statistics.setBusinessCount(storeDao.searchNomalStatusByBrandId(brand.getBrandId()));
+
+            QueryWrapper<BrandBusiness> pauseStatusQueryWrapper = new QueryWrapper<>();
+            pauseStatusQueryWrapper.eq("brand_id",brand.getBrandId());
+            pauseStatusQueryWrapper.eq("business_status","暂停");
+            BrandBusiness pauseStatus = businessDao.selectOne(pauseStatusQueryWrapper);
+            if (pauseStatus == null)
+                statistics.setPauseBusinessCount(0);
+            else
+                statistics.setPauseBusinessCount(pauseStatus.getCount());
+//            statistics.setPauseBusinessCount(storeDao.searchPauseStatusByBrandId(brand.getBrandId()));
+
+            QueryWrapper<BrandBusiness> noStatusQueryWrapper = new QueryWrapper<>();
+            noStatusQueryWrapper.eq("brand_id",brand.getBrandId());
+            noStatusQueryWrapper.eq("business_status","尚未营业");
+            BrandBusiness noStatus = businessDao.selectOne(noStatusQueryWrapper);
+            if (noStatus == null)
+                statistics.setNoBusinessCount(0);
+            else
+                statistics.setNoBusinessCount(noStatus.getCount());
+//            statistics.setNoBusinessCount(storeDao.searchNoStatusByBrandId(brand.getBrandId()));
+
+            statistics.setTotal(statistics.getBusinessCount() + statistics.getPauseBusinessCount() + statistics.getNoBusinessCount());
+            statistics.setUpdateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
+            index += brandStatisticsDao.insert(statistics);
+            System.out.println(index + "/" + total);
+        }
+    }
+}

+ 34 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/BrandZoneStat.java

@@ -0,0 +1,34 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.BrandZone;
+import com.ruoyi.benyun.mapper.BrandZoneDao;
+import com.ruoyi.benyun.mapper.StoreDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.List;
+import java.util.UUID;
+
+@Component
+public class BrandZoneStat {
+    @Autowired
+    StoreDao storeDao;
+    @Autowired
+    BrandZoneDao brandZoneDao;
+
+    public void continueQuicklyInsert(){
+        List<String> notIns = brandZoneDao.searchStatedBrandIds(null);
+        System.out.println("已经处理:" + notIns.size() + "个品牌");
+        List<BrandZone> zones = brandZoneDao.searchQuicklyStatistics(notIns);
+        int total = zones.size();
+        int i = 0;
+        for (BrandZone zone : zones) {
+            zone.setDisId(UUID.randomUUID().toString().replace("-",""));
+            zone.setUpdateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
+            i += brandZoneDao.insert(zone);
+            System.out.println(i+"/"+total);
+        }
+    }
+}

+ 58 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/StoreWdOpcloseStat.java

@@ -0,0 +1,58 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.entity.StoreWdOpclose;
+import com.ruoyi.benyun.mapper.StoreWdOpcloseDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Component
+public class StoreWdOpcloseStat {
+    @Autowired
+    StoreWdOpcloseDao storeWdOpcloseDao;
+
+    public void continueInsertAll(){
+        // 已分析的门店
+        List<String> ins = storeWdOpcloseDao.selectIns();
+        System.out.println("已处理:" + ins.size() + "个");
+        // 未分析的门店
+        List<StoreWdOpclose> storeWdOpcloses = storeWdOpcloseDao.selectStatistics(ins);
+        int total = storeWdOpcloses.size();
+        int i = 0;
+        for (StoreWdOpclose storeWd : storeWdOpcloses) {
+            if (storeWd.getBusinessTime().equals("24小时营业")) {
+                storeWd.setStartTime("00:00");
+                storeWd.setEndTime("24:00");
+            } else {
+//            String str = "周一至周日:07:00-17:00 18:00-23:00";
+                Pattern pattern = Pattern.compile("\\d{2}:\\d{2}");
+//            Matcher matcher = pattern.matcher(str);
+                Matcher matcher = pattern.matcher(storeWd.getBusinessTime());
+
+                String minTime = null, maxTime = null;
+                while (matcher.find()) {
+                    String time = matcher.group();
+                    if (minTime == null || time.compareTo(minTime) < 0) {
+                        // 如果当前时间小于最小时间,则更新最小时间
+                        minTime = time;
+                    }
+                    if (maxTime == null || time.compareTo(maxTime) > 0) {
+                        // 如果当前时间大于最大时间,则更新最大时间
+                        maxTime = time;
+                    }
+                }
+
+//            System.out.println("最小时间:" + minTime);
+//            System.out.println("最大时间:" + maxTime);
+                storeWd.setStartTime(minTime);
+                storeWd.setEndTime(maxTime);
+                i += storeWdOpcloseDao.insert(storeWd);
+                System.out.println(i + "/" + total);
+            }
+        }
+
+    }
+}

+ 60 - 0
benyun-core/src/main/java/com/ruoyi/benyun/utils/statistics/Together.java

@@ -0,0 +1,60 @@
+package com.ruoyi.benyun.utils.statistics;
+
+import com.ruoyi.benyun.mapper.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class Together {
+    @Autowired
+    StoreWdOpcloseStat opcloseStat;
+    @Autowired
+    StoreWdOpcloseDao opcloseDao;
+    @Autowired
+    BrandZoneStat zoneStat;
+    @Autowired
+    BrandZoneDao zoneDao;
+    @Autowired
+    BrandCityStat cityStat;
+    @Autowired
+    BrandCityDao cityDao;
+    @Autowired
+    BrandProvinceStat provinceStat;
+    @Autowired
+    BrandProvinceDao provinceDao;
+    @Autowired
+    BrandBusinessStat businessStat;
+    @Autowired
+    BrandBusinessDao businessDao;
+    @Autowired
+    BrandStat stat;
+    @Autowired
+    BrandStatisticsDao statisticsDao;
+
+    public void start(){
+        System.out.println("开关时间统计开始······");
+        opcloseDao.delete(null);
+        opcloseStat.continueInsertAll();
+        System.out.println("开关时间统计结束······");
+        System.out.println("品牌区统计开始······");
+        zoneDao.delete(null);
+        zoneStat.continueQuicklyInsert();
+        System.out.println("品牌区统计结束······");
+        System.out.println("品牌市统计开始······");
+        cityDao.delete(null);
+        cityStat.continueInsert();
+        System.out.println("品牌市统计结束······");
+        System.out.println("品牌省统计开始······");
+        provinceDao.delete(null);
+        provinceStat.continueInsert();
+        System.out.println("品牌省统计结束······");
+        System.out.println("品牌营业状态统计开始······");
+        businessDao.delete(null);
+        businessStat.continueInsert();
+        System.out.println("品牌营业状态统计结束······");
+        System.out.println("品牌总体统计开始······");
+        statisticsDao.delete(null);
+        stat.continueInsertPlus2();
+        System.out.println("品牌总体统计结束······");
+    }
+}

+ 32 - 0
benyun-core/src/main/resources/mapper/benyun/BrandBusinessMapper.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandBusinessDao">
+    <select id="selectByStatistics" resultType="com.ruoyi.benyun.entity.BrandBusiness">
+        SELECT
+            brand_id,
+            brand_name,
+            business_status,
+            COUNT(*) count
+        FROM
+            `ddt_store_wd`
+        WHERE brand_id <![CDATA[<>]]> ''
+        AND brand_id IS NOT NULL
+        <if test="notIns != null">
+            <foreach collection="notIns" item="notIn" open="AND brand_id NOT IN (" separator="," close=")">
+                #{notIn,jdbcType=VARCHAR}
+            </foreach>
+        </if>
+        GROUP BY
+            brand_id,
+            brand_name,
+            business_status;
+    </select>
+    <select id="selectIns" resultType="java.lang.String">
+        SELECT DISTINCT
+            brand_id
+        FROM
+            `bl_brand_business_statistics`
+    </select>
+</mapper>

+ 65 - 0
benyun-core/src/main/resources/mapper/benyun/BrandCity2Mapper.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandCityDao">
+    <resultMap type="com.ruoyi.benyun.entity.BrandCity" id="BrandCityResult">
+        <result property="disId" column="dis_id"/>
+        <result property="brandId" column="brand_id"/>
+        <result property="addrCode" column="addr_code"/>
+        <result property="city" column="city"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="disCount" column="dis_count"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insertAll">
+        insert into `bl_brand_city_distribution` values
+        <foreach collection="cities" item="city" separator=",">
+            (#{city.disId},#{city.brandId},#{city.addrCode},#{city.city},#{city.lat},#{city.lng},#{city.disCount},#{city.updateTime})
+        </foreach>
+    </insert>
+    <select id="searchByBrandId" resultMap="BrandCityResult">
+        select * from bl_brand_city_distribution where brand_id = #{brandId}
+    </select>
+    <select id="searchByBrandIdOrderByCity" resultMap="BrandCityResult">
+        SELECT
+            category.addr_code,
+            category.city,
+            lat_gd lat,
+            lng_gd lng,
+            dis_count
+        FROM
+            `ddt_addr_category` category,
+            (
+                SELECT
+                    city,
+                    SUM(dis_count) dis_count
+                FROM
+                    `bl_brand_zone_distribution`
+                WHERE
+                    brand_id = #{brandId}
+                AND DATE_FORMAT(update_time, '%Y-%m') = #{month}
+                GROUP BY
+                    city
+            ) c
+        WHERE
+            category.city = c.city
+          AND district = ''
+          AND c.city <![CDATA[<>]]> ''
+    </select>
+    <select id="selectIns" resultType="java.lang.String">
+        SELECT DISTINCT
+            brand_id
+        FROM
+            `bl_brand_city_distribution`;
+    </select>
+    <select id="selectCountByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*) cover_city_count
+        FROM
+            `bl_brand_city_distribution`
+        WHERE
+            brand_id = #{brandId}
+    </select>
+</mapper>

+ 110 - 0
benyun-core/src/main/resources/mapper/benyun/BrandDao.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandDao">
+    <resultMap type="com.ruoyi.benyun.entity.Brand" id="BrandResult">
+        <result property="brandId" column="brand_id"/>
+        <result property="brandImg" column="brand_img"/>
+        <result property="brandName" column="brand_name"/>
+        <result property="industryCode" column="industry_code"/>
+        <result property="enterpriseUsci" column="enterprise_usci"/>
+        <result property="perCapitaConsumption" column="per_capita_consumption"/>
+        <result property="commentCount" column="comment_count"/>
+        <result property="score" column="score"/>
+        <result property="menuInfo" column="menu_info"/>
+        <result property="indexScore" column="index_score"/>
+        <result property="createDate" column="create_date"/>
+        <result property="audit" column="audit"/>
+        <result property="collectPerson" column="collect_person"/>
+        <result property="collectTime" column="collect_time"/>
+        <result property="enterTime" column="enter_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="hash" column="hash"/>
+    </resultMap>
+    <select id="searchAll" resultMap="BrandResult">
+        select * from ddt_brand
+    </select>
+    <update id="updatePerCapitaConsumptionByBrandId">
+        UPDATE `ddt_brand`
+        SET per_capita_consumption = (
+            SELECT
+                ROUND(
+                            SUM(per_capita_consumption) / COUNT(*),
+                            2
+                    )
+            FROM
+                `ddt_store_wd`
+            WHERE
+                brand_id = #{brandId}
+        )
+        WHERE
+            brand_id = #{brandId};
+    </update>
+    <update id="updateScoreByBrandId">
+        UPDATE `ddt_brand`
+        SET score = (
+            SELECT
+                ROUND(SUM(score) / COUNT(*), 2)
+            FROM
+                `ddt_store_wd`
+            WHERE
+                brand_id = #{brandId}
+        )
+        WHERE
+            brand_id = #{brandId};
+    </update>
+    <update id="updateCommentCountByBrandId">
+        UPDATE `ddt_brand`
+        SET comment_count = (
+            SELECT
+                FLOOR(
+                        SUM(comment_count) / COUNT(*)
+                    )
+            FROM
+                `ddt_store_wd`
+            WHERE
+                brand_id = #{brandId}
+        )
+        WHERE
+            brand_id = #{brandId};
+    </update>
+    <update id="updateIndexScoreByBrandId">
+        UPDATE `ddt_brand`
+        SET index_score = (
+            SELECT
+                ROUND(
+                            SUM(index_score) / COUNT(*),
+                            2
+                    )
+            FROM
+                `ddt_store_wd`
+            WHERE
+                brand_id = #{brandId}
+        )
+        WHERE
+            brand_id = #{brandId};
+    </update>
+    <select id="searchList" resultMap="BrandResult">
+        select * from ddt_brand where brand_name like concat("%",#{text},"%")
+    </select>
+    <select id="searchById" resultMap="BrandResult">
+        select * from ddt_brand where brand_id = #{brandId}
+    </select>
+    <select id="searchByIndustryCodeList" resultMap="BrandResult">
+        select * from ddt_brand where industry_code = #{industryCode} and brand_id <![CDATA[<>]]> #{brandId}
+    </select>
+    <select id="searchNotIns" resultMap="BrandResult">
+        SELECT
+            *
+        FROM
+            `ddt_brand`
+        <where>
+            <if test="notIns != null">
+                <foreach collection="notIns" item="ontIn" open="brand_id NOT IN (" separator="," close=")">
+                    #{ontIn,jdbcType=VARCHAR}
+                </foreach>
+            </if>
+        </where>
+    </select>
+</mapper>

+ 28 - 0
benyun-core/src/main/resources/mapper/benyun/BrandEvolveMapper.xml

@@ -31,4 +31,32 @@
         ORDER BY
             time;
     </select>
+    <insert id="insertAll">
+        insert into `bl_brand_evolve_statistics` values
+        <foreach collection="evolves" item="e" separator=",">
+            (#{e.statId},#{e.brandId},#{e.brandName},#{e.addrCode},#{e.typeCodeBy},#{e.count},#{e.statTime})
+        </foreach>
+    </insert>
+    <select id="selectAllByStatistics" resultType="com.ruoyi.benyun.entity.BrandEvolve">
+        SELECT
+            brand_id,
+            brand_name,
+            addr_code,
+            type_code_by,
+            COUNT(*) count,
+	        DATE_FORMAT(collect_time, '%Y-%m-%d') stat_time
+        FROM
+            `ddt_store_wd` dsw,
+            `ddt_wd_info` dwi
+        WHERE
+            dsw.wd_id = dwi.wd_id
+        GROUP BY
+            brand_id,
+            brand_name,
+            addr_code,
+            type_code_by,
+            stat_time
+        ORDER BY
+            stat_time;
+    </select>
 </mapper>

+ 64 - 0
benyun-core/src/main/resources/mapper/benyun/BrandProvince2Mapper.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandProvinceDao">
+    <resultMap type="com.ruoyi.benyun.entity.BrandProvince" id="BrandProvinceResult">
+        <result property="disId" column="dis_id"/>
+        <result property="brandId" column="brand_id"/>
+        <result property="addrCode" column="addr_code"/>
+        <result property="province" column="province"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="disCount" column="dis_count"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insertAll">
+        insert into `bl_brand_province_distribution` values
+        <foreach collection="provinces" item="prov" separator=",">
+            (#{prov.disId},#{prov.brandId},#{prov.addrCode},#{prov.province},#{prov.lat},#{prov.lng},#{prov.disCount},#{prov.updateTime})
+        </foreach>
+    </insert>
+    <select id="searchByBrandId" resultMap="BrandProvinceResult">
+        select * from bl_brand_province_distribution where brand_id = #{brandId}
+    </select>
+    <select id="searchByBrandIdOrderByProvince" resultMap="BrandProvinceResult">
+        SELECT
+            category.addr_code,
+            category.province,
+            lat_gd lat,
+            lng_gd lng,
+            dis_count
+        FROM
+            `ddt_addr_category` category,
+            (
+                SELECT
+                    province,
+                    SUM(dis_count) dis_count
+                FROM
+                    `bl_brand_zone_distribution`
+                WHERE
+                    brand_id = #{brandId}
+                AND DATE_FORMAT(update_time, '%Y-%m') = #{month}
+                GROUP BY
+                    province
+            ) p
+        WHERE
+            category.province = p.province
+          AND city = ''
+    </select>
+    <select id="selectIns" resultType="java.lang.String">
+        SELECT DISTINCT
+            brand_id
+        FROM
+            `bl_brand_province_distribution`;
+    </select>
+    <select id="selectCountByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*) cover_province_count
+        FROM
+            `bl_brand_province_distribution`
+        WHERE
+            brand_id = #{brandId}
+    </select>
+</mapper>

+ 97 - 0
benyun-core/src/main/resources/mapper/benyun/BrandStatistics2Mapper.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandStatisticsDao">
+    <resultMap type="com.ruoyi.benyun.entity.BrandStatistics" id="BrandStatisticsResult">
+        <result property="brandId" column="brand_id"/>
+        <result property="brandName" column="brand_name"/>
+        <result property="coverProvinceCount" column="cover_province_count"/>
+        <result property="coverCityCount" column="cover_city_count"/>
+        <result property="coverZoneCount" column="cover_zone_count"/>
+        <result property="businessCount" column="business_count"/>
+        <result property="pauseBusinessCount" column="pause_business_count"/>
+        <result property="noBusinessCount" column="no_business_count"/>
+        <result property="total" column="total"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insertAll">
+        insert into `bl_brand_statistics` values
+        <foreach collection="brandStatistics" item="stat" separator=",">
+            (#{stat.brandId},#{stat.brandName},#{stat.coverProvinceCount},#{stat.coverCityCount},#{stat.coverZoneCount},#{stat.businessCount},#{stat.pauseBusinessCount},#{stat.noBusinessCount},#{stat.total},#{stat.updateTime})
+        </foreach>
+    </insert>
+    <select id="searchByBrandId" resultMap="BrandStatisticsResult">
+        select * from bl_brand_statistics where brand_id = #{brandId}
+    </select>
+    <select id="searchList" resultMap="BrandStatisticsResult">
+        select * from bl_brand_statistics order by total desc;
+    </select>
+    <select id="searchStated" resultType="java.lang.String">
+        SELECT DISTINCT
+            brand_id
+        FROM
+            `bl_brand_statistics`
+    </select>
+    <select id="searchByStatistics" resultType="com.ruoyi.benyun.entity.BrandStatistics">
+        SELECT
+            cover_province_count,
+            cover_city_count,
+            cover_zone_count,
+            business_count,
+            pause_business_count,
+            no_business_count
+        FROM
+            (
+                SELECT
+                    COUNT(*) cover_province_count
+                FROM
+                    `bl_brand_province_distribution`
+                WHERE
+                    brand_id = #{brandId}
+            ) province,
+            (
+                SELECT
+                    COUNT(*) cover_city_count
+                FROM
+                    `bl_brand_city_distribution`
+                WHERE
+                    brand_id = #{brandId}
+            ) city,
+            (
+                SELECT
+                    COUNT(*) cover_zone_count
+                FROM
+                    `bl_brand_zone_distribution`
+                WHERE
+                    brand_id = #{brandId}
+            ) zone,
+	(
+		SELECT
+			COUNT(*) business_count
+		FROM
+			`ddt_store_wd`
+		WHERE
+			business_status = '正常'
+		AND brand_id = #{brandId}
+	) nomal,
+	(
+		SELECT
+			COUNT(*) pause_business_count
+		FROM
+			`ddt_store_wd`
+		WHERE
+			business_status = '暂停'
+		AND brand_id = #{brandId}
+	) pause,
+	(
+		SELECT
+			COUNT(*) no_business_count
+		FROM
+			`ddt_store_wd`
+		WHERE
+			business_status = '尚未营业'
+		AND brand_id = #{brandId}
+	) noOpen
+    </select>
+</mapper>

+ 145 - 0
benyun-core/src/main/resources/mapper/benyun/BrandZone2Mapper.xml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.BrandZoneDao">
+    <resultMap type="com.ruoyi.benyun.entity.BrandZone" id="BrandZoneResult">
+        <result property="disId" column="dis_id"/>
+        <result property="brandId" column="brand_id"/>
+<!--        <result property="industryCode" column="industry_code"/>-->
+        <result property="addrCode" column="addr_code"/>
+        <result property="province" column="province"/>
+        <result property="city" column="city"/>
+        <result property="zone" column="zone"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="disCount" column="dis_count"/>
+        <result property="avgScore" column="avg_score"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <resultMap type="com.ruoyi.benyun.entity.BrandProvince" id="ProvinceResult">
+        <result property="disId" column="dis_id"/>
+        <result property="brandId" column="brand_id"/>
+        <result property="addrCode" column="addr_code"/>
+        <result property="province" column="province"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="disCount" column="dis_count"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <resultMap type="com.ruoyi.benyun.entity.BrandCity" id="CityResult">
+        <result property="disId" column="dis_id"/>
+        <result property="brandId" column="brand_id"/>
+        <result property="addrCode" column="addr_code"/>
+        <result property="city" column="city"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="disCount" column="dis_count"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insertAll">
+        insert into `bl_brand_zone_distribution`(dis_id,brand_id,brand_name,addr_code,dis_count,avg_score,update_time) values
+        <foreach collection="brandZones" item="brandZone" separator="," >
+            (#{brandZone.disId},#{brandZone.brandId},#{brandZone.brandName},#{brandZone.addrCode},#{brandZone.disCount},#{brandZone.avgScore},#{brandZone.updateTime})
+        </foreach>
+    </insert>
+    <select id="searchByBrandId" resultMap="BrandZoneResult">
+        select * from bl_brand_zone_distribution where brand_id = #{brandId}
+    </select>
+    <select id="searchByMulti" resultMap="BrandZoneResult">
+        SELECT
+            *
+        FROM
+            `bl_brand_zone_distribution`
+        <trim prefix="where" prefixOverrides="and">
+            <if test="brandIds != null">
+                <foreach collection="brandIds" item="brandId" open="and brand_id IN (" separator="," close=")">
+                    #{brandId,jdbcType=VARCHAR}
+                </foreach>
+            </if>
+            <if test="addrCodes != null">
+                <foreach collection="addrCodes" item="addrCode" open="and addr_code IN (" separator="," close=")">
+                    #{addrCode,jdbcType=VARCHAR}
+                </foreach>
+            </if>
+            <if test="industryCodes != null">
+                <foreach collection="industryCodes" item="industryCode" open="and industry_code IN (" separator="," close=")">
+                    #{industryCode,jdbcType=VARCHAR}
+                </foreach>
+            </if>
+        </trim>
+    </select>
+    <select id="searchProvinceCountByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            (
+                SELECT
+                    province
+                FROM
+                    `bl_brand_zone_distribution`
+                WHERE
+                    brand_id = #{brandId}
+                GROUP BY
+                    province
+            ) province
+    </select>
+    <select id="searchCityCountByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            (
+                SELECT
+                    city
+                FROM
+                    `bl_brand_zone_distribution`
+                WHERE
+                    brand_id = #{brandId}
+                GROUP BY
+                    city
+            ) city
+    </select>
+    <select id="searchZoneCountByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            `bl_brand_zone_distribution`
+        WHERE
+            brand_id = #{brandId}
+    </select>
+    <select id="searchStatedBrandIds" resultType="java.lang.String">
+        SELECT DISTINCT
+            brand_id
+        FROM
+            `bl_brand_zone_distribution`
+        <where>
+            <if test="month != null">
+                DATE_FORMAT(update_time, '%Y-%m') = #{month}
+            </if>
+        </where>
+    </select>
+    <select id="searchQuicklyStatistics" resultMap="BrandZoneResult">
+        SELECT
+            brand_id,
+            brand_name,
+            addr_code,
+            COUNT(*) dis_count,
+            ROUND(AVG(score), 2) avg_score
+        FROM
+            `ddt_store_wd` dsw,
+            `ddt_wd_info` dwi
+        WHERE
+            dsw.wd_id = dwi.wd_id
+        AND brand_id IS NOT NULL
+        AND brand_id <![CDATA[<>]]> ''
+        <if test="notIns != null">
+            <foreach collection="notIns" item="notIn" open="and brand_id not in (" separator="," close=")">
+                #{notIn,jdbcType=VARCHAR}
+            </foreach>
+        </if>
+        GROUP BY
+            brand_id,
+            brand_name,
+            addr_code;
+    </select>
+</mapper>

+ 104 - 0
benyun-core/src/main/resources/mapper/benyun/StoreMapper.xml

@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.benyun.mapper.StoreDao">
+    <resultMap type="com.ruoyi.benyun.entity.StoreWd" id="StoreWdResult">
+        <result property="wdId" column="wd_id"/>
+        <result property="brandId" column="brand_id"/>
+        <result property="brandName" column="brand_name"/>
+        <result property="perCapitaConsumption" column="per_capita_consumption"/>
+        <result property="manageTypeCode" column="manage_type_code"/>
+        <result property="industryCode" column="industry_code"/>
+        <result property="organizationCode" column="organization_code"/>
+        <result property="commentCount" column="comment_count"/>
+        <result property="score" column="score"/>
+        <result property="buyInfo" column="buy_info"/>
+        <result property="indexScore" column="index_socre"/>
+        <result property="businessStatus" column="business_status"/>
+        <result property="businessTime" column="business_time"/>
+        <result property="telephone" column="telephone"/>
+        <result property="contact" column="contact"/>
+    </resultMap>
+    <resultMap type="com.ruoyi.benyun.entity.vo.BrandDisItem" id="StoreOrderByCountResult">
+        <result property="code" column="brand_id"/>
+        <result property="name" column="brand_name"/>
+        <result property="count" column="count"/>
+    </resultMap>
+    <resultMap type="com.ruoyi.benyun.entity.vo.Info" id="InfoResult">
+        <result property="addrCode" column="addr_code"/>
+        <result property="avgScore" column="avg_Score"/>
+        <result property="count" column="count"/>
+    </resultMap>
+    <update id="updateBrandIdByWdId">
+        UPDATE `ddt_store_wd`
+        SET brand_id = #{brandId}
+        WHERE
+        <foreach collection="wdIds" item="wdId" open="wd_id IN (" separator="," close=")">
+            #{wdId,jdbcType=VARCHAR}
+        </foreach>
+    </update>
+    <select id="searchCountOrderByCount" resultMap="StoreOrderByCountResult">
+        SELECT
+        brand_id,
+        brand_name,
+        COUNT(*) count
+        FROM
+        `ddt_store_wd`
+        WHERE
+        brand_id <![CDATA[<>]]> ''
+        <if test="notIns != null">
+            <foreach collection="notIns" item="ontIn" open="AND brand_id NOT IN (" separator="," close=")">
+                #{ontIn,jdbcType=VARCHAR}
+            </foreach>
+        </if>
+        GROUP BY
+        brand_id,brand_name
+        ORDER BY
+        count DESC;
+    </select>
+    <select id="searchInfoByBrandId" resultMap="InfoResult">
+        SELECT
+            addr_code,
+            COUNT(*) count,
+	        ROUND(AVG(score),2) avg_score
+        FROM
+            `ddt_wd_info` wd,
+            `ddt_store_wd` store
+        WHERE
+            wd.wd_id = store.wd_id
+          AND brand_id = #{brandId}
+        GROUP BY
+            addr_code;
+    </select>
+    <select id="searchNomalStatusByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            `ddt_store_wd`
+        WHERE
+            business_status = "正常"
+          AND brand_id = #{brandId}
+    </select>
+    <select id="searchPauseStatusByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            `ddt_store_wd`
+        WHERE
+            business_status = "暂停"
+          AND brand_id = #{brandId}
+    </select>
+    <select id="searchNoStatusByBrandId" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            `ddt_store_wd`
+        WHERE
+            business_status = "尚未营业"
+          AND brand_id = #{brandId}
+    </select>
+    <select id="searchAll" resultMap="StoreWdResult">
+        select * from `ddt_store_wd`
+    </select>
+</mapper>

+ 27 - 0
benyun-core/src/main/resources/mapper/benyun/StoreWdOpcloseMapper.xml

@@ -113,4 +113,31 @@
         ORDER BY
             count DESC;
     </select>
+    <select id="selectIns" resultType="java.lang.String">
+        SELECT
+            wd_id
+        FROM
+            `bl_store_wd_opclose`;
+    </select>
+    <select id="selectStatistics" resultType="com.ruoyi.benyun.entity.StoreWdOpclose">
+        SELECT
+        dwi.wd_id,
+        addr_code,
+        type_code_by,
+        brand_id,
+        brand_name,
+        business_time
+        FROM
+        `ddt_wd_info` dwi,
+        `ddt_store_wd` dsw
+        WHERE
+        dwi.wd_id = dsw.wd_id
+        <if test="notIns != null">
+            <foreach collection="notIns" item="notIn" open="AND dwi.wd_id NOT IN (" separator="," close=")">
+                #{notIn,jdbcType=VARCHAR}
+            </foreach>
+        </if>
+        AND business_time <![CDATA[<>]]> ''
+        AND business_time <![CDATA[<>]]> '[]';
+    </select>
 </mapper>