瀏覽代碼

增加计划信息

xueyiming 8 月之前
父節點
當前提交
d38d645590

+ 3 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/PlanAccountService.java

@@ -1,5 +1,6 @@
 package com.tzld.piaoquan.longarticle.service.local;
 
+import com.tzld.piaoquan.longarticle.model.po.Plan;
 import com.tzld.piaoquan.longarticle.model.po.PlanAccount;
 
 import java.util.List;
@@ -10,6 +11,8 @@ public interface PlanAccountService {
 
     List<PlanAccount> getMatchPlanAccount();
 
+    List<Plan> getPlanList();
+
     void updateMatchStatus(Integer status, Long id);
 
     void updateStatus(Integer status, Long id);

+ 1 - 4
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -3,10 +3,7 @@ package com.tzld.piaoquan.longarticle.service.local.impl;
 import com.alibaba.fastjson.JSON;
 import com.tzld.piaoquan.longarticle.common.enums.ContentStatusEnum;
 import com.tzld.piaoquan.longarticle.common.enums.PublishGzhPushTypeEnum;
-import com.tzld.piaoquan.longarticle.dao.mapper.PlanAccountMapper;
-import com.tzld.piaoquan.longarticle.dao.mapper.PublishContentMapper;
-import com.tzld.piaoquan.longarticle.dao.mapper.PublishMiniprogramMapper;
-import com.tzld.piaoquan.longarticle.dao.mapper.RootSourceMapper;
+import com.tzld.piaoquan.longarticle.dao.mapper.*;
 import com.tzld.piaoquan.longarticle.model.bo.VideoDetail;
 import com.tzld.piaoquan.longarticle.model.dto.*;
 import com.tzld.piaoquan.longarticle.model.po.*;

+ 17 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/PlanAccountServiceImpl.java

@@ -1,14 +1,18 @@
 package com.tzld.piaoquan.longarticle.service.local.impl;
 
 import com.tzld.piaoquan.longarticle.dao.mapper.PlanAccountMapper;
+import com.tzld.piaoquan.longarticle.dao.mapper.PlanMapper;
+import com.tzld.piaoquan.longarticle.model.po.Plan;
 import com.tzld.piaoquan.longarticle.model.po.PlanAccount;
 import com.tzld.piaoquan.longarticle.model.po.PlanAccountExample;
+import com.tzld.piaoquan.longarticle.model.po.PlanExample;
 import com.tzld.piaoquan.longarticle.service.local.PlanAccountService;
 import com.tzld.piaoquan.longarticle.utils.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Service
@@ -17,6 +21,9 @@ public class PlanAccountServiceImpl implements PlanAccountService {
     @Autowired
     private PlanAccountMapper planAccountMapper;
 
+    @Autowired
+    private PlanMapper planMapper;
+
     public void saveOrUpdatePlanAccount(PlanAccount planAccount) {
         PlanAccountExample example = new PlanAccountExample();
         example.createCriteria().andAccountIdEqualTo(planAccount.getAccountId())
@@ -38,6 +45,16 @@ public class PlanAccountServiceImpl implements PlanAccountService {
         return planAccountMapper.selectByExample(example);
     }
 
+    public List<Plan> getPlanList() {
+        PlanExample example = new PlanExample();
+        example.createCriteria().andCreateTimeGreaterThan(DateUtil.getThatDayDate());
+        List<Plan> plans = planMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(plans)) {
+            return new ArrayList<>();
+        }
+        return plans;
+    }
+
 
     @Override
     public void updateMatchStatus(Integer status, Long id) {

+ 2 - 1
long-article-server/src/main/resources/mybatis-generator-config.xml

@@ -61,9 +61,10 @@
 <!--        </table>-->
 <!--        <table tableName="long_articles_root_source_id" domainObjectName="RootSource" alias=""/>-->
 <!--        <table tableName="long_articles_plan_account" domainObjectName="PlanAccount" alias=""/>-->
+            <table tableName="long_articles_plan" domainObjectName="Plan" alias=""/>
 
 <!--                <table tableName="long_articles_publish_content" domainObjectName="PublishContent" alias=""/>-->
-                <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>
+<!--                <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>-->
 
     </context>