浏览代码

调查问卷

zouxuan 4 年之前
父节点
当前提交
ae05366c0e

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ReplacementInstrumentCooperationDao.java

@@ -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);
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentCooperationServiceImpl.java

@@ -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);
     }
 }

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/ReplacementInstrumentCooperationMapper.xml

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