作者 chencheng

0531-11

... ... @@ -350,7 +350,7 @@ class Business extends Base
public function select_performance_all(){
$store_id=$this->store_id;
$user_id = $this->auth->id;
$user_id = 4;
//参数
$param = request()->param();
//验证
... ... @@ -376,4 +376,29 @@ class Business extends Base
$this->success("查询成功",$rows);
}
/**
* 我的红包
*/
public function red_packet(){
$store_id=$this->store_id;
$user_id = $this->auth->id;
//参数
$param = request()->param();
//验证
$r1 = Db::name('verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
//当前店铺下的佣金发放记录
$rows = Db::name('verification_brokerage_record a')
->join("user b","a.send_user_id = b.id","left")
->where(['a.verification_store_id'=>$store_id])
->field("a.commission,a.send_createtime,a.send_result,a.send_reason,b.nickname,b.mobile")
->paginate(20)->each(function($item){
$item['send_createtime'] = !empty($item['send_createtime'])?date("Y-m-d H:i",$item['send_createtime']):'';
$item['send_result'] = $item['send_result'] == 1?'成功':'失败';
return $item;
});
$this->success("查询成功",$rows);
}
}
... ...
... ... @@ -486,7 +486,7 @@ class Wechat extends Api
}
// 发放红包
// 发放红包 单位 分 最低100分,
public function grant_red_packets($pid=0,$order_id=0){
try{
//测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_red_packets
... ...