Commit beaf7e85 authored by licc's avatar licc

优化查询遗漏用户数据接口

parent 1b6007f5
......@@ -21,5 +21,7 @@ public interface UserDataMapper extends BaseMapper<UserData> {
Long getBottomMaxId();
Long getUserId(@Param("userId") Long userId);
List<UserData> getBottom(@Param("startNo") Integer startNumber, @Param("endNo") Integer endNo);
}
......@@ -119,4 +119,13 @@
where user_id > #{startNo} and #{endNo} >=user_id
</select>
<select id="getUserId" resultType="java.lang.Long">
select user_id
from
<include refid="table"/>
<where>
user_id=#{userId}
</where>
</select>
</mapper>
......@@ -119,8 +119,8 @@ public class UserDataServiceImpl implements UserDataService {
List<Long> list = new ArrayList<>();
for (Long userId : userIds) {
//判断是否存在统计数据
UserData data = userDataMapper.getByUserId(userId);
if (null == data) {
Long id = userDataMapper.getUserId(userId);
if (null == id) {
list.add(userId);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment