Browse Source

增加根据videoId查询userId列表

xueyiming 7 months ago
parent
commit
3536907dbb

+ 4 - 0
we-com-server/src/main/java/com/tzld/piaoquan/wecom/dao/mapper/HistoryMessageMapper.java

@@ -3,6 +3,8 @@ package com.tzld.piaoquan.wecom.dao.mapper;
 import com.tzld.piaoquan.wecom.model.po.HistoryMessage;
 import com.tzld.piaoquan.wecom.model.po.HistoryMessageExample;
 import java.util.List;
+import java.util.Set;
+
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -30,4 +32,6 @@ public interface HistoryMessageMapper {
     int updateByPrimaryKeySelective(HistoryMessage record);
 
     int updateByPrimaryKey(HistoryMessage record);
+
+    Set<Long> selectUserIdByVideoId(Long videoId);
 }

+ 7 - 0
we-com-server/src/main/resources/mapper/HistoryMessageMapper.xml

@@ -241,4 +241,11 @@
       create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+  <select id="selectUserIdByVideoId" parameterType="Long" resultType="Long">
+    select
+        user_id
+    from we_com_history_message
+    where video_id = #{videoId}
+  </select>
 </mapper>