You've already forked qlg.tsgz.moe
							
							有点坑
This commit is contained in:
		| @@ -323,6 +323,8 @@ class Orders extends Base{ | ||||
| 		// 验证商品规格是否已选 | ||||
| 		foreach ($carts['carts'] as $v) { | ||||
| 			foreach ($v['list'] as $val) { | ||||
|                 // 坑啊判断下会死嘛 ---- 20200116 | ||||
| 			    if($val['isSpec']!=1)continue; | ||||
| 				$id = Db::name('goods_specs')->where(['shopId'=>$val['shopId'],'goodsId'=>$val['goodsId']])->column('id'); | ||||
| 				if($id && $val['goodsSpecId'] == ''){ | ||||
| 					return WSTReturn("请选择商品规格型号!"); | ||||
|   | ||||
| @@ -189,19 +189,20 @@ class Settlements extends Base | ||||
|         // 1,推荐人获得预获产品券时限上日有消费≥10元为优惠款的50%。 | ||||
|         // refPreProductYdGTMoney     refPreProductYesInSaleScale | ||||
|         // 2,推荐人获得预获产品券时限上日有消费<10元为优惠款的25% refPreProductNoInSaleScale | ||||
|         $m->setTable('user_trees'); | ||||
|         $pid = $m->getField(['uid'=>$shops['userId']],'pid'); | ||||
|         if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId') && 3 != $order->goodsType){//有推荐人并且推荐人状态正常 | ||||
|             $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($pid,'realTotalMoney'); | ||||
|             if($yesterdayBuyMoney >= dataConf('refPreProductYdGTMoney')){//大于设定值 | ||||
|                 $refProductMoney = round($discountMoney * (dataConf('refPreProductYesInSaleScale')*0.01),2);//1 | ||||
|             }else{ | ||||
|                 $refProductMoney = round($discountMoney * (dataConf('refPreProductNoInSaleScale')*0.01),2);//2 | ||||
|             } | ||||
|             if($refProductMoney > 0){ | ||||
|                 Model('common/UserVouchers')->insertVouchersNotice($pid,$orderId,$refProductMoney,0,'交易订单【'.$order->orderNo.'】推荐所得'); | ||||
|             }          | ||||
|         } | ||||
|         // 20200114 -- 说用不上,注释 | ||||
| //        $m->setTable('user_trees'); | ||||
| //        $pid = $m->getField(['uid'=>$shops['userId']],'pid'); | ||||
| //        if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId') && 3 != $order->goodsType){//有推荐人并且推荐人状态正常 | ||||
| //            $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($pid,'realTotalMoney'); | ||||
| //            if($yesterdayBuyMoney >= dataConf('refPreProductYdGTMoney')){//大于设定值 | ||||
| //                $refProductMoney = round($discountMoney * (dataConf('refPreProductYesInSaleScale')*0.01),2);//1 | ||||
| //            }else{ | ||||
| //                $refProductMoney = round($discountMoney * (dataConf('refPreProductNoInSaleScale')*0.01),2);//2 | ||||
| //            } | ||||
| //            if($refProductMoney > 0){ | ||||
| //                Model('common/UserVouchers')->insertVouchersNotice($pid,$orderId,$refProductMoney,0,'交易订单【'.$order->orderNo.'】推荐所得'); | ||||
| //            } | ||||
| //        } | ||||
|         return true; | ||||
|     } | ||||
|     /** | ||||
|   | ||||
| @@ -161,9 +161,9 @@ class Shopping extends Base{ | ||||
| //                      COS('.$lat.'*PI()/180)*COS(lat*PI()/180)*POW(SIN(('.$lng.'*PI()/180-lng*PI()/180)/2),2)))*1000) AS distance'; | ||||
| 			$order = 'distance ASC'; | ||||
|             //纬度 | ||||
| 			$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat'])); | ||||
| 			//$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat'])); | ||||
| 			//经度 | ||||
| 			$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng'])); | ||||
| 			//$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng'])); | ||||
| 			$rs = Db::name('shops s') | ||||
| 							->where($where) | ||||
| 							->field($field) | ||||
|   | ||||
| @@ -7,6 +7,7 @@ use think\Db; | ||||
|  */ | ||||
| class UserVouchers extends Base{ | ||||
|     public function startGiveVouchers(){ | ||||
|         if('127.0.0.1' != $ip = request()->ip(0)  ) return $ip; | ||||
|     	set_time_limit(0); | ||||
|     	$sm = Model('common/SysSummary'); | ||||
|     	$sysData= $sm->getInfo('toPayFast,toPaySlow'); | ||||
|   | ||||
| @@ -104,7 +104,7 @@ class Users extends Base{ | ||||
|                 ->join('user_trees t','u.userId=t.uid') | ||||
|                 ->join('user_lock l','u.userId=l.userId') | ||||
|                 ->where(['t.pid'=>$userId,'u.userStatus'=>0,'u.userLevel'=>$userLevel]) | ||||
|                 ->field('u.userId,u.trueName,u.userPhone,u.userLevel,l.lockReason,l.lockTime,from_unixtime(l.createTime) createTime') | ||||
|                 ->field('u.userId,u.loginName as trueName,u.userPhone,u.userLevel,l.lockReason,l.lockTime,from_unixtime(l.createTime) createTime') | ||||
|                 ->order('l.id DESC,u.userId DESC') | ||||
|                 ->paginate(input('pageSize/d'))->toArray(); | ||||
|         }else{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user