Commit cfab4b23 authored by alex yao's avatar alex yao

fix:npe

parent 6f560271
......@@ -4,7 +4,8 @@ select baap.member_id as member_id,
baap.agent_desc as agent_desc,
baap.agent_avatar as agent_avatar
from biz_member_agent_application_collect bmaac
left join biz_agent_application_publish baap on baap.agent_id = bmaac.agent_id and baap.is_deleted = 'N'
where bmaac.is_deleted = 'N' <<and bmaac.is_collect = :isCollect>>
left join biz_agent_application_publish baap on baap.agent_id = bmaac.agent_id and baap.is_deleted = 'N'
where bmaac.is_deleted = 'N'
<<and bmaac.is_collect = :isCollect>>
<<and bmaac.member_id = :memberId>>
order by baap.created_time desc
\ No newline at end of file
......@@ -124,7 +124,7 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
for (MallAgentApplicationQueryItem item : items) {
BizAgentApplicationMallDto mallDto = BizAgentApplicationMallConvert.itemToDto(item);
// 如果应用上架了
if (CommonConstant.YOrN.Y.equals(mallDto.getIsSale())) {
if (mallDto.getBaseInfo() != null && CommonConstant.YOrN.Y.equals(mallDto.getIsSale())) {
// 设置当前用户是否收藏了
String agentId = mallDto.getBaseInfo().getAgentId();
mallDto.setIsCollect(memberCollectQueryItems.stream().anyMatch(v -> agentId.equals(v.getAgentId())) ? CommonConstant.YOrN.Y : CommonConstant.YOrN.N);
......
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