Ver Fonte

停用不执行

zhaotx há 8 meses atrás
pai
commit
2356512d44

+ 1 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/ZtPolicyMapper.xml

@@ -116,7 +116,7 @@
         from (select * from deepthink.zt_policy_config where is_deleted=0) config
                  left join deepthink.zt_policy_condition cd on config.id = cd.owner_id and cd.owner_type=1
                  left join deepthink.zt_policy_action ac on config.id = ac.owner_id and ac.owner_type=1
-        where config.id = #{policyId}
+        where config.id = #{policyId} and is_deleted=0
     </select>
     <select id="getTargetFilters" resultType="cn.com.ctop.job.bytedance.data.entity.ZtPolicyTargetFilter">
         select policy_config_id, target_dimension, filter_key, filter_value

+ 3 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/ZtPolicyRunServiceImpl.java

@@ -622,6 +622,9 @@ public class ZtPolicyRunServiceImpl implements IZtPolicyRunService {
         ZtPolicy policy = null;
         if (policyId != null){
             policy = ztPolicyConfigMapper.getPolicyDetail(policyId);
+            if (policy.getStatus() == 0){
+                return null;
+            }
             if (policy.getTargetScope()==1){
                 List<ZtPolicyTargetFilter> filterList = ztPolicyConfigMapper.getTargetFilters(policyId);
                 Map<Integer, List<ZtPolicyTargetFilter>> scopeFilterMap =