dever пре 7 година
родитељ
комит
f949119fab
2 измењених фајлова са 25 додато и 1 уклоњено
  1. 11 0
      tm/lib/Controller/EventsController.class.php
  2. 14 1
      tm/lib/Module/User.class.php

+ 11 - 0
tm/lib/Controller/EventsController.class.php

@@ -368,13 +368,24 @@ class EventsController extends Controller {
 		$this->setOutput('newUserExpData', $newUserExpData);
 
 		//138****1234 的用户 2018.4.20 15:10 获得 某某某某活动 奖品。
+		$objEvents = new LotteryEvents ();
 		foreach ($data as $k => $v) {
 
 			if (isset($v['pic'])) {
 				$data[$k]['pic'] = explode(',', $v['pic']);
 			}
 
+			if ($v['events_id']) {
+				$d = $objEvents->findIdsBy(array('events_id' => $v['events_id']));
+				$t = $objLotteryUserExpress -> gets($tmpUserExpIds);
+				$eventsData = array_pop($t);
+			}
+
 			$type = isset($eventsData['type']) ? $eventsData['type'] : $eventsData[$v['events_id']]['type'];
+
+			if (!$type) {
+
+			}
 			
 			$data[$k]['user'] = array();
 			$data[$k]['user']['cdate'] = date('Y.m.d H:i', isset($v['winners_time']) ? $v['winners_time'] : $v['create_time']);

+ 14 - 1
tm/lib/Module/User.class.php

@@ -74,7 +74,20 @@ class User {
 	 * 为当前用户分配一个头像
 	 */
 	public function setAvatar() {
-		$ids = $this->objDUserInfo -> findIdsBy(array());
+
+		$total = 1000;
+		$limit = 0;
+		$state = true;
+		while($state) {
+			$state = $this->setAvatarLimit($limit, $total);
+			$limit = $limit + $total;
+		}
+	}
+
+	public function setAvatarLimit($limit, $total)
+	{
+		$limit = $limit . ',' . $total;
+		$ids = $this->objDUserInfo -> findIdsBy(array(), $limit);
 		
 		$userData = $this->objDUserInfo -> gets($ids);