You've already forked FrameTour-BE
feat(mapper): 添加获取用户项目 ID 列表的方法
- 在 StatisticsMapper 接口中新增 getProjectIdListForUser 方法 - 在 StatisticsMapper.xml 中添加对应的 SQL 查询语句 - 该方法用于获取用户在指定时间之前的项目 ID 列表
This commit is contained in:
@@ -93,6 +93,7 @@ public interface StatisticsMapper {
|
||||
int addStatisticsRecord(StatisticsRecordAddReq req);
|
||||
|
||||
List<Long> getBrokerIdListForUser(Long memberId, Date startTime, Date endTime);
|
||||
List<Long> getProjectIdListForUser(Long memberId, Date startTime, Date endTime);
|
||||
|
||||
Long getUserRecentEnterType(Long memberId, Date endTime);
|
||||
|
||||
|
@@ -525,5 +525,10 @@
|
||||
</if>
|
||||
) stats_data
|
||||
</select>
|
||||
<select id="getProjectIdListForUser" resultType="java.lang.Long">
|
||||
select identifier from t_stats_record r left join t_stats s on r.trace_id = s.trace_id where s.member_id = #{memberId}
|
||||
and r.action = 'ENTER_PROJECT' and r.create_time < #{endTime} and r.create_time > #{startTime}
|
||||
order by r.create_time desc limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user