Browse Source

Merge branch 'seokpi' of wangfan/adweb3-server into master

wangfan 1 month ago
parent
commit
8a7c4100e6

+ 25 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/dto/ComprehensiveStatistics.java

@@ -7,6 +7,15 @@ import lombok.Data;
  */
 @Data
 public class ComprehensiveStatistics {
+    /** 套餐名称 */
+    private String planName;
+
+    /** 套餐类型 - 是否SEO */
+    private String planType;
+
+    /** 套餐关键词 */
+    private Integer planKeywordNum;
+
     /** 套餐指定词 */
     private Integer planAppointKeywordNum;
 
@@ -22,12 +31,28 @@ public class ComprehensiveStatistics {
     /** 指定词 */
     private Integer appointKeywordNum;
 
+    /** 已达标指定词 */
+    private Integer achievedAppointKeywordNum;
+
     /** 长尾词 */
     private Integer longTailKeywordNum;
 
+    /** 已达标长尾词 */
+    private Integer achievedLongTailKeywordNum;
+
     /** 外链数 */
     private Integer outerLinkNum;
 
     /** 文章数 */
     private Integer articleNum;
+
+    /** 关键词数量及达标数量 */
+    @Data
+    public static class KeywordRankStats {
+        /** 1 指定词 2 长尾词 */
+        private Integer keywordType;
+
+        private Integer keywordNum;
+        private Integer achievedKeywordNum;
+    }
 }

+ 54 - 18
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/mapper/SeoKeywordsMapper.java

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.adweb.seo.dto.ComprehensiveStatistics;
 import org.jeecg.modules.adweb.seo.entity.SeoKeywords;
 import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;
 import org.jeecg.modules.adweb.seo.vo.RankInfoVO;
@@ -14,17 +16,19 @@ import java.util.List;
 /**
  * @Description: 关键词
  * @Author: jeecg-boot
- * @Date:   2024-10-15
+ * @Date: 2024-10-15
  * @Version: V1.0
  */
 public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
     /**
      * 根据站点和套餐id
+     *
      * @param siteCode
      * @param subscriptionId
      * @return
      */
-    List<String> getKeywordsLastSevenDays(String siteCode, String subscriptionId, Integer keywordType);
+    List<String> getKeywordsLastSevenDays(
+            String siteCode, String subscriptionId, Integer keywordType);
 
     /**
      * 查询关键词排名数据
@@ -32,7 +36,13 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
      * @param siteCode siteCode
      * @return 当日排名在前n页的数量
      */
-    RankInfoVO queryKeywordNumByRankRange(@Param("siteCode") String siteCode, @Param("subscriptionId") String subscriptionId, @Param("rankStart") Integer rankStart, @Param("rankEnd") Integer rankEnd, @Param("dateStr") String dateStr, @Param("keywordType") String keywordType);
+    RankInfoVO queryKeywordNumByRankRange(
+            @Param("siteCode") String siteCode,
+            @Param("subscriptionId") String subscriptionId,
+            @Param("rankStart") Integer rankStart,
+            @Param("rankEnd") Integer rankEnd,
+            @Param("dateStr") String dateStr,
+            @Param("keywordType") String keywordType);
 
     /**
      * 根据站点code获取关键词达标标准
@@ -47,19 +57,20 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
      *
      * @return 关键词列表
      */
-    IPage<SeoKeywords> getKeywordList(IPage<SeoKeywords> page,
-                                      Integer rankStart,
-                                      Integer rankEnd,
-                                      boolean isCustomer,
-                                      String keyword,
-                                      String siteCode,
-                                      Integer keywordType,
-                                      String datesStr,
-                                      String subscriptionId,
-                                      String column,
-                                      String order,
-                                      String buttonColumn,
-                                      String buttonSort);
+    IPage<SeoKeywords> getKeywordList(
+            IPage<SeoKeywords> page,
+            Integer rankStart,
+            Integer rankEnd,
+            boolean isCustomer,
+            String keyword,
+            String siteCode,
+            Integer keywordType,
+            String datesStr,
+            String subscriptionId,
+            String column,
+            String order,
+            String buttonColumn,
+            String buttonSort);
 
     /**
      * 获取当日需要DateForSEO Serp查询的关键词列表
@@ -70,6 +81,7 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
 
     /**
      * 关键词管理列表数据
+     *
      * @param page
      * @param siteCode
      * @param keywords
@@ -82,10 +94,21 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
      * @param keywordRank
      * @return
      */
-    IPage<SeoKeywords> getPageList(Page<SeoKeywords> page, String siteCode, String keywords, String subscriptionId, String lastSearchTime, String createTime, Integer keywordType, String column, String order, Integer keywordRank);
+    IPage<SeoKeywords> getPageList(
+            Page<SeoKeywords> page,
+            String siteCode,
+            String keywords,
+            String subscriptionId,
+            String lastSearchTime,
+            String createTime,
+            Integer keywordType,
+            String column,
+            String order,
+            Integer keywordRank);
 
     /**
      * 关键词管理列表数据
+     *
      * @param page
      * @param siteCode
      * @param keywords
@@ -98,7 +121,20 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
      * @param keywordRank
      * @return
      */
-    IPage<SeoKeywords> getPageListByCreateTime(Page<SeoKeywords> page, String siteCode, String keywords, String subscriptionId, String lastSearchTime, String createTime, Integer keywordType, String column, String order, Integer keywordRank);
+    IPage<SeoKeywords> getPageListByCreateTime(
+            Page<SeoKeywords> page,
+            String siteCode,
+            String keywords,
+            String subscriptionId,
+            String lastSearchTime,
+            String createTime,
+            Integer keywordType,
+            String column,
+            String order,
+            Integer keywordRank);
 
     List<SeoPlanSubscription> getSubscriptionIdBySiteCode(String siteCode);
+
+    List<ComprehensiveStatistics.KeywordRankStats> getKeywordsRankStats(
+            String siteCode, int targetRank);
 }

+ 33 - 23
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/mapper/xml/SeoKeywordsMapper.xml

@@ -4,13 +4,13 @@
     <select id="getKeywordsLastSevenDays" resultType="java.lang.String">
         SELECT t1.se_date
         FROM adweb_seo_keywords_serp t1,
-             adweb_seo_keywords t2
+        adweb_seo_keywords t2
         WHERE t2.`status` = 1
-          AND t1.keywords_id = t2.id
-          AND t2.app_key = 'adweb'
-          AND t2.site_code = #{siteCode}
-          AND t2.keyword_type = #{keywordType}
-          AND t2.subscription_id = #{subscriptionId}
+        AND t1.keywords_id = t2.id
+        AND t2.app_key = 'adweb'
+        AND t2.site_code = #{siteCode}
+        AND t2.keyword_type = #{keywordType}
+        AND t2.subscription_id = #{subscriptionId}
         GROUP BY t1.se_date
         ORDER BY t1.se_date DESC
         LIMIT 7
@@ -76,16 +76,16 @@
     </select>
     <select id="getKeywordStandard" resultType="java.lang.Integer">
         SELECT
-            IF(COUNT(*) = 0 OR t1.target IS NULL, 10, t1.target)
+        IF(COUNT(*) = 0 OR t1.target IS NULL, 10, t1.target)
         FROM
-            seo_market_plan t1,
-            adweb_seo_plan_subscription t2,
-            adweb_site t3
+        seo_market_plan t1,
+        adweb_seo_plan_subscription t2,
+        adweb_site t3
         WHERE
-            t2.`status` = 1
-          AND t1.id = t2.plan_id
-          AND t2.site_id = t3.id
-          AND t3.`code` = #{siteCode}
+        t2.`status` = 1
+        AND t1.id = t2.plan_id
+        AND t2.site_id = t3.id
+        AND t3.`code` = #{siteCode}
     </select>
     <select id="getKeywordList" resultType="org.jeecg.modules.adweb.seo.entity.SeoKeywords">
         SELECT
@@ -110,7 +110,7 @@
                 AND #{rankEnd} >= t1.last_rank
             </if>
             AND t1.app_key = 'adweb'
-            AND t1.`status` =  1
+            AND t1.`status` = 1
             <if test="!subscriptionId">
                 AND t1.subscription_id = #{subscriptionId}
             </if>
@@ -174,7 +174,7 @@
         <foreach collection="sideCodes" item="sideCode" open="(" separator="," close=")">
             #{sideCode}
         </foreach>
-        <if test = "keywordType != null">
+        <if test="keywordType != null">
             AND keyword_type = #{keywordType}
         </if>
         AND last_search_time <![CDATA[ <]]> CURDATE()
@@ -315,20 +315,30 @@
             ,last_rank ASC
         </if>
     </select>
+
     <select id="getSubscriptionIdBySiteCode"
             resultType="org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription">
         SELECT
-            t1.id,
-            t1.plan_id
+        t1.id,
+        t1.plan_id
         FROM
-            adweb_seo_plan_subscription t1,
-            adweb_site t2
+        adweb_seo_plan_subscription t1,
+        adweb_site t2
         WHERE
-            t1.site_id = t2.id
+        t1.site_id = t2.id
         AND
-            t1.`status` = 1
+        t1.`status` = 1
         AND
-            t2.`code` = #{siteCode}
+        t2.`code` = #{siteCode}
+    </select>
 
+    <select id="getKeywordsRankStats"
+            resultType="org.jeecg.modules.adweb.seo.dto.ComprehensiveStatistics$KeywordRankStats">
+        SELECT keyword_type, COUNT(*) AS keyword_num,
+        SUM(CASE WHEN last_rank BETWEEN 1 AND #{targetRank} THEN 1 ELSE 0 END) AS achieved_keyword_num
+        FROM adweb_seo_keywords
+        WHERE site_code = #{siteCode} AND status = 1
+        GROUP BY keyword_type
     </select>
+
 </mapper>

+ 78 - 53
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/impl/SeoKeywordsRankServiceImpl.java

@@ -1,5 +1,7 @@
 package org.jeecg.modules.adweb.seo.service.impl;
 
+import static org.jeecg.modules.adweb.seo.dto.ComprehensiveStatistics.KeywordRankStats;
+
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xkcoding.http.util.StringUtil;
 
@@ -49,29 +51,21 @@ import java.util.stream.Collectors;
 @Slf4j
 public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
 
-    @Autowired
-    private IAdwebSiteService adwebSiteService;
+    @Autowired private IAdwebSiteService adwebSiteService;
 
-    @Resource
-    private SysAdwebApi sysAdwebApi;
+    @Resource private SysAdwebApi sysAdwebApi;
 
-    @Autowired
-    private ISiteUserPermissionService siteUserPermissionService;
+    @Autowired private ISiteUserPermissionService siteUserPermissionService;
 
-    @Autowired
-    private ISeoPlanSubscriptionService seoPlanSubscriptionService;
+    @Autowired private ISeoPlanSubscriptionService seoPlanSubscriptionService;
 
-    @Autowired
-    private ISeoKeywordsService seoKeywordsService;
+    @Autowired private ISeoKeywordsService seoKeywordsService;
 
-    @Resource
-    private SeoKeywordsMapper seoKeywordsMapper;
+    @Resource private SeoKeywordsMapper seoKeywordsMapper;
 
-    @Autowired
-    private ISeoKeywordsSerpService seoKeywordsSerpService;
+    @Autowired private ISeoKeywordsSerpService seoKeywordsSerpService;
 
-    @Resource
-    private SubscribePlanMapper subscribePlanMapper;
+    @Resource private SubscribePlanMapper subscribePlanMapper;
 
     @Override
     public List<AdwebSite> getAllSites() {
@@ -82,10 +76,13 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.select(AdwebSite::getId, AdwebSite::getName, AdwebSite::getCode);
         queryWrapper.orderByDesc(AdwebSite::getCreateTime);
-        queryWrapper.eq(AdwebSite::getStatus, AdwebConstant.STATUS).isNull(AdwebSite::getParentGroupCode);
+        queryWrapper
+                .eq(AdwebSite::getStatus, AdwebConstant.STATUS)
+                .isNull(AdwebSite::getParentGroupCode);
         if (sysAdwebApi.isChannelAdmin()) {
             List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
-            List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
+            List<String> codeList =
+                    siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!sysAdwebApi.isAdmin()) {
             List<String> codeList = siteUserPermissionService.getSiteCodeList(sysUser.getId());
@@ -96,9 +93,7 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         return siteList;
     }
 
-    /**
-     * 放入营销方案名称
-     */
+    /** 放入营销方案名称 */
     private void setPlanName(List<AdwebSite> siteList) {
         if (CollectionUtils.isEmpty(siteList)) {
             return;
@@ -110,10 +105,16 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         }
 
         LambdaQueryWrapper<SeoPlanSubscription> historyQueryWrapper = new LambdaQueryWrapper<>();
-        historyQueryWrapper.select(SeoPlanSubscription::getId, SeoPlanSubscription::getPlanId, SeoPlanSubscription::getSiteId, SeoPlanSubscription::getPlanName, SeoPlanSubscription::getPlanType);
+        historyQueryWrapper.select(
+                SeoPlanSubscription::getId,
+                SeoPlanSubscription::getPlanId,
+                SeoPlanSubscription::getSiteId,
+                SeoPlanSubscription::getPlanName,
+                SeoPlanSubscription::getPlanType);
         historyQueryWrapper.in(SeoPlanSubscription::getSiteId, siteIds);
         historyQueryWrapper.eq(SeoPlanSubscription::getStatus, 1);
-        List<SeoPlanSubscription> seoPlanSubscriptions = seoPlanSubscriptionService.list(historyQueryWrapper);
+        List<SeoPlanSubscription> seoPlanSubscriptions =
+                seoPlanSubscriptionService.list(historyQueryWrapper);
         if (CollectionUtils.isEmpty(seoPlanSubscriptions)) {
             return;
         }
@@ -142,8 +143,13 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         // 根据站点code获取站点
         AdwebSite siteByCode = adwebSiteService.getSiteByCode(siteCode);
         // 1.获取套餐数据
-        SubscribePlan subscribePlan = subscribePlanMapper.getSubscribePlanBySiteId(siteByCode.getId());
+        SubscribePlan subscribePlan =
+                subscribePlanMapper.getSubscribePlanBySiteId(siteByCode.getId());
         if (subscribePlan != null) {
+            // 添加套餐信息
+            comprehensiveStatistics.setPlanName(subscribePlan.getPlanName());
+            comprehensiveStatistics.setPlanType(subscribePlan.getMarketType());
+
             // 添加套餐数据
             comprehensiveStatistics.setPlanAppointKeywordNum(subscribePlan.getSpecifyKeyword());
             comprehensiveStatistics.setPlanLongTailKeywordNum(subscribePlan.getLongTailKeyword());
@@ -152,29 +158,35 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         }
         // 添加站点数据
         // 1.获取站点指定词数量
-        LambdaQueryWrapper<SeoKeywords> seoKeywordsQueryWrapper = new LambdaQueryWrapper<>();
-        seoKeywordsQueryWrapper.eq(SeoKeywords::getSiteCode, siteCode);
-        seoKeywordsQueryWrapper.eq(SeoKeywords::getStatus, 1);
-        seoKeywordsQueryWrapper.eq(SeoKeywords::getKeywordType, 1);
-        Long appointKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper);
-        // 2.获取站点关键词数量
-        LambdaQueryWrapper<SeoKeywords> seoKeywordsQueryWrapper1 = new LambdaQueryWrapper<>();
-        seoKeywordsQueryWrapper1.eq(SeoKeywords::getSiteCode, siteCode);
-        seoKeywordsQueryWrapper1.eq(SeoKeywords::getStatus, 1);
-        seoKeywordsQueryWrapper1.eq(SeoKeywords::getKeywordType, 2);
-        Long longTailKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper1);
-        comprehensiveStatistics.setAppointKeywordNum(Math.toIntExact(appointKeywordNum));
-        comprehensiveStatistics.setLongTailKeywordNum(Math.toIntExact(longTailKeywordNum));
+        List<KeywordRankStats> keywordRankStats =
+                seoKeywordsMapper.getKeywordsRankStats(
+                        siteCode,
+                        Optional.ofNullable(subscribePlan.getTarget()).orElse(10)); // 默认排名前10
+        for (KeywordRankStats rankStats : keywordRankStats) {
+            if (rankStats.getKeywordType() == 1) {
+                // 指定词
+                comprehensiveStatistics.setAppointKeywordNum(rankStats.getKeywordNum());
+                comprehensiveStatistics.setAchievedAppointKeywordNum(
+                        rankStats.getAchievedKeywordNum());
+            } else {
+                comprehensiveStatistics.setLongTailKeywordNum(rankStats.getKeywordNum());
+                comprehensiveStatistics.setAchievedLongTailKeywordNum(
+                        rankStats.getAchievedKeywordNum());
+            }
+        }
+
         return comprehensiveStatistics;
     }
 
     @Override
     public Map getRankInfo(String siteCode) throws ParseException {
-        //通过站点code获取站点id
+        // 通过站点code获取站点id
         AdwebSite siteByCode = adwebSiteService.getSiteByCode(siteCode);
-        SeoPlanSubscription seoPlanSubscription = seoPlanSubscriptionService.getCurrentSeoAndSiteSubscription(siteByCode.getId());
-        //通过站点获取订阅id
-        List<SeoRankInfoVO> seoRankInfos = this.getSeoRankInfo(siteCode, seoPlanSubscription.getId());
+        SeoPlanSubscription seoPlanSubscription =
+                seoPlanSubscriptionService.getCurrentSeoAndSiteSubscription(siteByCode.getId());
+        // 通过站点获取订阅id
+        List<SeoRankInfoVO> seoRankInfos =
+                this.getSeoRankInfo(siteCode, seoPlanSubscription.getId());
         Map map = new HashMap<>();
         map.put("appointKeyword", seoRankInfos.get(0));
         map.put("longTailKeyword", seoRankInfos.get(1));
@@ -252,7 +264,8 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         }
 
         // 长尾词
-        List<String> dateList = seoKeywordsService.getKeywordsLastSevenDays(siteCode, 2, subscriptionId);
+        List<String> dateList =
+                seoKeywordsService.getKeywordsLastSevenDays(siteCode, 2, subscriptionId);
         String dateStr = "";
         if (CollectionUtils.isNotEmpty(dateList)) {
             for (int i = 0; i < dateList.size(); i++) {
@@ -274,13 +287,18 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
     }
 
     /**
-     * 给列表中的关键字增加排名信息
-     * 根据关键词类型
+     * 给列表中的关键字增加排名信息 根据关键词类型
      *
      * @param keywordList 关键词列表
      */
     @Override
-    public void addRankInfoByIntervalTimeByType(List<SeoKeywords> keywordList, Integer keywordType, String siteCode, String subscriptionId, List<String> dateList) throws Exception {
+    public void addRankInfoByIntervalTimeByType(
+            List<SeoKeywords> keywordList,
+            Integer keywordType,
+            String siteCode,
+            String subscriptionId,
+            List<String> dateList)
+            throws Exception {
         if (CollectionUtils.isEmpty(keywordList)) {
             return;
         }
@@ -298,17 +316,24 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
             }
             datesStr = "(" + datesStr + ")";
         }
-        List<Integer> keywordIds = keywordList.stream().map(SeoKeywords::getId).collect(Collectors.toList());
-        List<SeoKeywordsSerp> serpList = seoKeywordsSerpService.list(new LambdaQueryWrapper<SeoKeywordsSerp>()
-                .in(SeoKeywordsSerp::getKeywordsId, keywordIds)
-                .in(SeoKeywordsSerp::getSeDate, dateList));
+        List<Integer> keywordIds =
+                keywordList.stream().map(SeoKeywords::getId).collect(Collectors.toList());
+        List<SeoKeywordsSerp> serpList =
+                seoKeywordsSerpService.list(
+                        new LambdaQueryWrapper<SeoKeywordsSerp>()
+                                .in(SeoKeywordsSerp::getKeywordsId, keywordIds)
+                                .in(SeoKeywordsSerp::getSeDate, dateList));
         List<SeoKeywordsSerp> noRepeatSerpList = new ArrayList<>();
         Map<String, Integer> serpMap = new HashMap<>();
         if (CollectionUtils.isNotEmpty(serpList)) {
             for (SeoKeywordsSerp seoKeywordsSerp : serpList) {
-                seoKeywordsSerp.setKey(seoKeywordsSerp.getKeywordsId() + "_" + seoKeywordsSerp.getSeDate());
+                seoKeywordsSerp.setKey(
+                        seoKeywordsSerp.getKeywordsId() + "_" + seoKeywordsSerp.getSeDate());
                 if (CollectionUtils.isNotEmpty(noRepeatSerpList)) {
-                    List<SeoKeywordsSerp> have = noRepeatSerpList.stream().filter(o -> o.getKey().equals(seoKeywordsSerp.getKey())).collect(Collectors.toList());
+                    List<SeoKeywordsSerp> have =
+                            noRepeatSerpList.stream()
+                                    .filter(o -> o.getKey().equals(seoKeywordsSerp.getKey()))
+                                    .collect(Collectors.toList());
                     if (CollectionUtils.isEmpty(have)) {
                         serpMap.put(seoKeywordsSerp.getKey(), seoKeywordsSerp.getRankAbsolute());
                         noRepeatSerpList.add(seoKeywordsSerp);
@@ -349,7 +374,7 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
      * 自适应宽度(中文支持)
      *
      * @param sheet
-     * @param size  因为for循环从0开始,size值为 列数-1
+     * @param size 因为for循环从0开始,size值为 列数-1
      */
     @Override
     public void setSizeColumn(Sheet sheet, int size) {
@@ -357,7 +382,7 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
             int columnWidth = sheet.getColumnWidth(columnNum) / 256;
             for (int rowNum = 0; rowNum <= sheet.getLastRowNum(); rowNum++) {
                 Row currentRow;
-                //当前行未被使用过
+                // 当前行未被使用过
                 if (sheet.getRow(rowNum) == null) {
                     currentRow = sheet.createRow(rowNum);
                 } else {

+ 3 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/dto/result/SiteBasicInfo.java

@@ -9,6 +9,9 @@ public class SiteBasicInfo {
     /** 套餐名称 */
     private String planName;
 
+    /** 套餐类型 - 是否SEO */
+    private String planType;
+
     /** 创建时间 */
     private String createTime;
 

+ 2 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/SiteManageService.java

@@ -111,11 +111,12 @@ public class SiteManageService {
             siteBasicInfo.setCreateTime(dateFormat.format(history.getCreateTime()));
         }
 
-        // 套餐名称
+        // 套餐名称及类型
         if (history == null || StringUtils.isEmpty(history.getPlanName())) {
             siteBasicInfo.setPlanName("暂无套餐");
         } else {
             siteBasicInfo.setPlanName(history.getPlanName());
+            siteBasicInfo.setPlanType(history.getPlanType());
         }
 
         // 预计服务到期时间

+ 7 - 7
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/mapper/xml/SubscribePlanMapper.xml

@@ -5,14 +5,14 @@
     <select id="getSubscribePlanBySiteId"
             resultType="org.jeecg.modules.adweb.subscribePlan.entity.SubscribePlan">
         SELECT
-            t1.id,t1.plan_name,specify_keyword,long_tail_keyword,external_links,article
+        t1.id, t1.plan_name, target, specify_keyword, long_tail_keyword, external_links, article
         from
-            adweb_subscribe_plan t1,
-            adweb_seo_plan_subscription t2
+        adweb_subscribe_plan t1,
+        adweb_seo_plan_subscription t2
         where
-            t1.id = t2.plan_id
-            and t1.status = 1
-            and t2.status = 1
-            and t2.site_id = #{siteId}
+        t1.id = t2.plan_id
+        and t1.status = 1
+        and t2.status = 1
+        and t2.site_id = #{siteId}
     </select>
 </mapper>