@@ -13,4 +13,6 @@ public interface ReplacementInstrumentCooperationDao extends com.ym.mec.common.d
* @return
*/
List<ReplacementInstrumentCooperation> countAllReplacementsInfo();
+
+ ReplacementInstrumentCooperation findByCooperationOrganIdAndTopicId(@Param("cooperationOrganId") Integer cooperationOrganId, @Param("topicId") Integer topicId);
}
@@ -105,6 +105,6 @@ public class ReplacementInstrumentCooperationServiceImpl extends BaseServiceImpl
@Override
public ReplacementInstrumentCooperation findByCooperationOrganIdAndTopicId(Integer cooperationOrganId, Integer topicId) {
- return findByCooperationOrganIdAndTopicId(cooperationOrganId, topicId);
+ return replacementInstrumentCooperationDao.findByCooperationOrganIdAndTopicId(cooperationOrganId, topicId);
@@ -110,5 +110,14 @@
FROM replacement_instrument_activity
GROUP BY cooperation_organ_id_
</select>
+ <select id="findByCooperationOrganIdAndTopicId" resultMap="ReplacementInstrumentCooperation">
+ SELECT *
+ FROM replacement_instrument_cooperation
+ WHERE cooperation_organ_id_ = #{cooperationOrganId}
+ <if test="topicId != null">
+ AND topic_id_ = #{topicId}
+ </if>
+ LIMIT 1
+ </select>
</mapper>