Commit 11cd5e75 authored by liwei's avatar liwei

修改了首页热门推荐能看到登录人自己的bug

parent c57723b9
...@@ -537,5 +537,11 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> { ...@@ -537,5 +537,11 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
*/ */
@TableField(exist = false) @TableField(exist = false)
private String metaInfo; private String metaInfo;
/**
* 登录人id 用于小程序首页排除当前登录人
*/
@TableField(exist = false)
private Integer loginUserId;
} }
...@@ -220,6 +220,11 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -220,6 +220,11 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
memInfo.setBeginBirthday(computeBirthdayBegin(memInfo.getMaxAge())); memInfo.setBeginBirthday(computeBirthdayBegin(memInfo.getMaxAge()));
memInfo.setEndBirthday(computeBirthdayEnd(memInfo.getMinAge())); memInfo.setEndBirthday(computeBirthdayEnd(memInfo.getMinAge()));
} }
//去除小程序端首页的登录人显示 不能自己热门推荐自己
String loginUserId = CyUserUtil.getAuthenBusinessId();
if (StringUtils.isNotEmpty(loginUserId)){
memInfo.setLoginUserId(Integer.valueOf(loginUserId));
}
return baseMapper.queryMemInfosPaged(paginationUtility,memInfo); return baseMapper.queryMemInfosPaged(paginationUtility,memInfo);
} }
......
...@@ -344,6 +344,9 @@ ...@@ -344,6 +344,9 @@
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and m.create_date &lt;= #{entity.endTime} and m.create_date &lt;= #{entity.endTime}
</if> </if>
<if test="entity.loginUserId !=null and entity.loginUserId != '' ">
and m.user_id != #{entity.loginUserId}
</if>
ORDER BY m.mem_level desc,m.mem_real_authen desc,m.is_recommended desc,m.sort,m.mem_code desc,m.business_id DESC ORDER BY m.mem_level desc,m.mem_real_authen desc,m.is_recommended desc,m.sort,m.mem_code desc,m.business_id DESC
</select> </select>
......
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