예제 #1
0
  /** 关注我的/我关注的用户列表 */
  @SuppressWarnings("unchecked")
  @Override
  public DataGrid dataGridAccount(LvFollow lvFollow, PageHelper ph) {
    List<LvAccount> al = new ArrayList<LvAccount>();

    DataGrid dg = dataGridByType(ph, lvFollow, lvFollowDao);
    List<TlvAccount> l = dg.getRows();
    if (l != null && l.size() > 0) {
      String[] openIds = new String[l.size()];
      int i = 0;
      for (TlvAccount t : l) {
        LvAccount a = new LvAccount();
        MyBeanUtils.copyProperties(t, a, true);
        al.add(a);
        openIds[i++] = t.getOpenId().toString();
      }
      HashMap<Integer, Integer> photoNums = lvAccountPhotoDao.getCountPhotoNum(openIds);
      for (LvAccount a : al) {
        Integer num = photoNums.get(a.getOpenId());
        if (num != null) a.setPhotoNum(num);
      }
    }
    dg.setRows(al);
    return dg;
  }
예제 #2
0
 @Override
 public void edit(JbAssets jbAssets) {
   TjbAssets t = jbAssetsDao.get(TjbAssets.class, jbAssets.getId());
   if (t != null) {
     MyBeanUtils.copyProperties(jbAssets, t, new String[] {"id", "createdatetime"}, true);
   }
 }
예제 #3
0
 @Override
 public void edit(LvFollow lvFollow) {
   TlvFollow t = lvFollowDao.get(TlvFollow.class, lvFollow.getId());
   if (t != null) {
     MyBeanUtils.copyProperties(lvFollow, t, new String[] {"id", "createdatetime"}, true);
     // t.setModifydatetime(new Date());
   }
 }