dingxin 6 years ago
parent
commit
a138a2c72e

+ 6
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java View File

206
             activity.setViewCount(allViewNum);
206
             activity.setViewCount(allViewNum);
207
             tpActivityMapper.updateByPrimaryKeySelective(activity);
207
             tpActivityMapper.updateByPrimaryKeySelective(activity);
208
         }
208
         }
209
-
210
-        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
209
+        TpActivity  tpActivity=new TpActivity();
210
+         tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
211
+        if(null == tpActivity){
212
+            tpActivity = tpActivityMapper.selectActivity(activityId);
213
+        }
211
         TpUser tpUser = tpUserMapper.selectByPrimaryKey(tpActivity.getCreateUser());
214
         TpUser tpUser = tpUserMapper.selectByPrimaryKey(tpActivity.getCreateUser());
212
         if (null != tpUser) {
215
         if (null != tpUser) {
213
             tpActivity.setUserName(tpUser.getUserName());
216
             tpActivity.setUserName(tpUser.getUserName());
620
         ResponseBean responseBean = new ResponseBean();
623
         ResponseBean responseBean = new ResponseBean();
621
         Map<String, Object> parameter = Maps.newHashMap();
624
         Map<String, Object> parameter = Maps.newHashMap();
622
         Page<TpActivity> pageList = PageHelper.startPage(pageNum, paeSize);
625
         Page<TpActivity> pageList = PageHelper.startPage(pageNum, paeSize);
623
-        List<TpActivity> tpActivity = tpActivityMapper.selecttpActivity(userElement.getId(), userElement.getCommunityId());
626
+        List<TpActivity> tpActivity = tpActivityMapper.selecttpActivity(userElement.getUserVerifyId(), userElement.getCommunityId());
624
         parameter.put("list", tpActivity);
627
         parameter.put("list", tpActivity);
625
         parameter.put("total", pageList.getTotal());
628
         parameter.put("total", pageList.getTotal());
626
         responseBean.addSuccess(parameter);
629
         responseBean.addSuccess(parameter);