|
@@ -350,7 +350,7 @@ class Business extends Base |
|
@@ -350,7 +350,7 @@ class Business extends Base |
350
|
public function select_performance_all(){
|
350
|
public function select_performance_all(){
|
351
|
$store_id=$this->store_id;
|
351
|
$store_id=$this->store_id;
|
352
|
$user_id = $this->auth->id;
|
352
|
$user_id = $this->auth->id;
|
353
|
- $user_id = 4;
|
353
|
+
|
354
|
//参数
|
354
|
//参数
|
355
|
$param = request()->param();
|
355
|
$param = request()->param();
|
356
|
//验证
|
356
|
//验证
|
|
@@ -376,4 +376,29 @@ class Business extends Base |
|
@@ -376,4 +376,29 @@ class Business extends Base |
376
|
$this->success("查询成功",$rows);
|
376
|
$this->success("查询成功",$rows);
|
377
|
}
|
377
|
}
|
378
|
|
378
|
|
|
|
379
|
+ /**
|
|
|
380
|
+ * 我的红包
|
|
|
381
|
+ */
|
|
|
382
|
+ public function red_packet(){
|
|
|
383
|
+ $store_id=$this->store_id;
|
|
|
384
|
+ $user_id = $this->auth->id;
|
|
|
385
|
+
|
|
|
386
|
+ //参数
|
|
|
387
|
+ $param = request()->param();
|
|
|
388
|
+ //验证
|
|
|
389
|
+ $r1 = Db::name('verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
|
|
|
390
|
+ if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
|
|
|
391
|
+ //当前店铺下的佣金发放记录
|
|
|
392
|
+ $rows = Db::name('verification_brokerage_record a')
|
|
|
393
|
+ ->join("user b","a.send_user_id = b.id","left")
|
|
|
394
|
+ ->where(['a.verification_store_id'=>$store_id])
|
|
|
395
|
+ ->field("a.commission,a.send_createtime,a.send_result,a.send_reason,b.nickname,b.mobile")
|
|
|
396
|
+ ->paginate(20)->each(function($item){
|
|
|
397
|
+ $item['send_createtime'] = !empty($item['send_createtime'])?date("Y-m-d H:i",$item['send_createtime']):'';
|
|
|
398
|
+ $item['send_result'] = $item['send_result'] == 1?'成功':'失败';
|
|
|
399
|
+ return $item;
|
|
|
400
|
+ });
|
|
|
401
|
+
|
|
|
402
|
+ $this->success("查询成功",$rows);
|
|
|
403
|
+ }
|
379
|
} |
404
|
} |