浏览代码

公众号计划修改

wangyunpeng 2 月之前
父节点
当前提交
d3505a0e6a

+ 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);
 

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

@@ -228,7 +228,8 @@ 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());
+        List<ContentPlatformGzhPlan> planExistList = planMapperExt.getGzhPlanExists(param.getAccountId(),
+                param.getType(), param.getScene(), param.getId());
         if (CollectionUtils.isNotEmpty(planExistList)) {
             throw new CommonException(ExceptionEnum.GZH_SCENE_PLAN_EXISTS);
         }

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

@@ -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>