Prechádzať zdrojové kódy

公众号计划修改

wangyunpeng 2 mesiacov pred
rodič
commit
12b481e4ac

+ 1 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java

@@ -20,6 +20,7 @@ public interface ContentPlatformPlanMapperExt {
                                                 @Param("pageSize") Integer pageSize);
 
     List<ContentPlatformGzhPlan> getGzhPlanExists(@Param("accountId") Long accountId,
+                                                  @Param("type") Integer type,
                                                   @Param("scene") Integer scene,
                                                   @Param("id") Long id);
 

+ 3 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -228,8 +228,9 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
     @Override
     public void gzhPlanSave(GzhPlanSaveParam param) {
         ContentPlatformAccount loginAccount = LoginUserContext.getUser();
-        List<ContentPlatformGzhPlan> planExistList = planMapperExt.getGzhPlanExists(param.getAccountId(), param.getScene(), param.getId());
-        if (CollectionUtils.isNotEmpty(planExistList)) {
+        List<ContentPlatformGzhPlan> planExistList = planMapperExt.getGzhPlanExists(param.getAccountId(),
+                param.getType(), param.getScene(), param.getId());
+        if (CollectionUtils.isNotEmpty(planExistList) && param.getType() != ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal()) {
             throw new CommonException(ExceptionEnum.GZH_SCENE_PLAN_EXISTS);
         }
         if (param.getVideoList().size() > 3) {

+ 5 - 3
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -4,10 +4,10 @@
 
     <insert id="insertGzhPlanReturnId" useGeneratedKeys="true" keyProperty="id">
         insert into content_platform_gzh_plan (`type`, publish_stage, account_id, scene, external_id,
-                                               select_video_type, `status`, stage_publish_status,
+                                               select_video_type, stage_publish_status,
                                                create_account_id, create_timestamp, update_timestamp)
         values (#{record.type}, #{record.publishStage}, #{record.accountId}, #{record.scene}, #{record.externalId},
-                #{record.selectVideoType}, #{record.status}, #{record.stagePublishStatus}, #{record.createAccountId},
+                #{record.selectVideoType}, #{record.stagePublishStatus}, #{record.createAccountId},
                 #{record.createTimestamp}, #{record.updateTimestamp})
     </insert>
 
@@ -79,7 +79,9 @@
         select *
         from content_platform_gzh_plan
         where account_id = #{accountId}
-        and scene = #{scene} and status = 1
+          and scene = #{scene}
+          and type = #{type}
+          and status = 1
         <if test="id != null">
             and id != #{id}
         </if>