@@ -86,7 +86,7 @@ public class KxsUserTradeServiceImpl extends ServiceImpl<KxsUserTradeMapper, Kxs
private final KxsUserGdTradeMapper kxsUserGdTradeMapper;
private final KxsLkbActTradeMapper kxsLkbActTradeMapper;
- private static Map<Integer, KxsBrand> brandsMap;
+ private Map<Integer, KxsBrand> brandsMap;
@Override
@Async
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kxs.system.api.model.KxsUserMsg;
import com.kxs.system.api.vo.kxsapp.userMsg.UserMsgPageVO;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
/**
* 系统用户消息推送表(KxsUserMsg)表数据库访问层
@@ -16,6 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface KxsUserMsgMapper extends BaseMapper<KxsUserMsg> {
- IPage<UserMsgPageVO> getByPage(Page<UserMsgPageVO> page);
+ IPage<UserMsgPageVO> getByPage(Page<UserMsgPageVO> page, @Param("userId") Long userId);
}
@@ -40,7 +40,8 @@ public class KxsUserMsgServiceImpl extends ServiceImpl<KxsUserMsgMapper, KxsUser
public IPage<UserMsgPageVO> getByPage(Page<UserMsgPageVO> page) {
- return baseMapper.getByPage(page);
+
+ return baseMapper.getByPage(page, SecurityUtils.getUser().getId());
@@ -25,6 +25,7 @@
select id, title, summary, msg_type, push_time, url,bg_pic,read_flag from kxs_user_msg a
<where>
a.del_flag = '0'
+ and user_id = #{userId}
</where>
order by a.create_time desc
</select>