Commit 5468ed8a by zhuyajie

1002907小程序首页改版

parent b83553a9
...@@ -328,6 +328,14 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz { ...@@ -328,6 +328,14 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
@Override @Override
public List<AppletBooklistClassifyDTO> getBooklistClassifyByUser(Long wechatUserId) { public List<AppletBooklistClassifyDTO> getBooklistClassifyByUser(Long wechatUserId) {
return appletBooklistClassifyDao.getClassifysByUserId(wechatUserId); List<AppletBooklistClassifyDTO> list = appletBooklistClassifyDao.getClassifysByUserId(wechatUserId);
if (ListUtils.isEmpty(list)){
List<AppletBooklistClassifyDTO> allBooklistClassify = appletBooklistClassifyDao.getAllBooklistClassify(true);
if (ListUtils.isEmpty(allBooklistClassify)){
return new ArrayList<>();
}
list.add(allBooklistClassify.get(0));
}
return list;
} }
} }
...@@ -569,7 +569,15 @@ public class AppletNewsBizImpl implements AppletNewsBiz { ...@@ -569,7 +569,15 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
@Override @Override
public List<AppletNewsClassifyDTO> getNewsClassifyByUser(Long wechatUserId) { public List<AppletNewsClassifyDTO> getNewsClassifyByUser(Long wechatUserId) {
return appletNewsClassifyDao.getClassifysByUserId(wechatUserId); List<AppletNewsClassifyDTO> list = appletNewsClassifyDao.getClassifysByUserId(wechatUserId);
if (ListUtils.isEmpty(list)){
List<AppletNewsClassifyDTO> allNewsClassify = appletNewsClassifyDao.getAllNewsClassify(true);
if (ListUtils.isEmpty(allNewsClassify)) {
return new ArrayList<>();
}
list.add(allNewsClassify.get(0));
}
return list;
} }
} }
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
u.wechat_user_id = #{wechatUserId} u.wechat_user_id = #{wechatUserId}
AND c.show_state = 1 AND c.show_state = 1
ORDER BY ORDER BY
c.seq ASC c.seq ASC, c.id asc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
u.wechat_user_id = #{wechatUserId} u.wechat_user_id = #{wechatUserId}
AND c.show_state = 1 AND c.show_state = 1
ORDER BY ORDER BY
c.seq ASC c.seq ASC, c.id asc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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