|
@@ -15,6 +15,17 @@
|
|
|
where attribute_id = #{attributeId}
|
|
where attribute_id = #{attributeId}
|
|
|
and resource_id = #{resourceId}
|
|
and resource_id = #{resourceId}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
+ <delete id="deleteValueByResourceIdAndNEGroupId">
|
|
|
|
|
+ DELETE
|
|
|
|
|
+ FROM it_resource_value
|
|
|
|
|
+ WHERE resource_id IN
|
|
|
|
|
+ (SELECT tmp.resource_id
|
|
|
|
|
+ from (SELECT rv.resource_id
|
|
|
|
|
+ FROM it_resource_value rv
|
|
|
|
|
+ LEFT join it_resource_attribute ira on rv.attribute_id = ira.attribute_id
|
|
|
|
|
+ WHERE rv.resource_id = #{resourceId}
|
|
|
|
|
+ AND ira.group_id != #{groupId}) tmp);
|
|
|
|
|
+ </delete>
|
|
|
<select id="countByAttributeIds" resultType="java.lang.Integer">
|
|
<select id="countByAttributeIds" resultType="java.lang.Integer">
|
|
|
select count(1) as count
|
|
select count(1) as count
|
|
|
from it_resource_attribute ra
|
|
from it_resource_attribute ra
|