diff --git a/app/admin/logic/user/UserLogic.php b/app/admin/logic/user/UserLogic.php index 167aa3c9f..49ef54b36 100644 --- a/app/admin/logic/user/UserLogic.php +++ b/app/admin/logic/user/UserLogic.php @@ -15,6 +15,7 @@ namespace app\admin\logic\user; use app\common\enum\user\UserTerminalEnum; use app\common\logic\BaseLogic; +use app\common\model\store_finance_flow\StoreFinanceFlow; use app\common\model\user\User; use app\common\model\user\UserAddress; use app\common\model\user\UserRecharge; @@ -148,7 +149,7 @@ class UserLogic extends BaseLogic { $field = [ 'id', 'account', 'nickname', 'avatar', 'real_name', - 'sex', 'mobile', 'create_time', 'login_time', 'channel' + 'sex', 'mobile', 'create_time', 'login_time', 'channel','now_money','purchase_funds' ]; $user = User::where(['id' => $userId])->field($field) @@ -156,6 +157,7 @@ class UserLogic extends BaseLogic $user['channel'] = UserTerminalEnum::getTermInalDesc($user['channel']); $user->sex = $user->getData('sex'); + $user['number']=StoreFinanceFlow::where('other_uid',$userId)->where(['status'=>0,'financial_pm'=>1,'type'=>1])->sum('number'); return $user->toArray(); } diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 8d595beba..f542f508d 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -212,7 +212,7 @@ class PayNotifyLogic extends BaseLogic bcscale(2); // $user->now_money = bcadd($user->now_money, $price, 2);//v.1 //更新等级 - if ($price >= 1000) { + if ($price >= 0.01) { $user->user_ship = 1; //v.1 } $user->purchase_funds = bcadd($user->purchase_funds, $price, 2); diff --git a/app/store/controller/user/UserController.php b/app/store/controller/user/UserController.php index 35b8737e5..3ad486640 100644 --- a/app/store/controller/user/UserController.php +++ b/app/store/controller/user/UserController.php @@ -8,7 +8,7 @@ use app\store\controller\BaseAdminController; use app\store\lists\user\UserLists; use app\admin\logic\user\UserLogic; use app\admin\validate\user\UserValidate; - +use app\common\model\user\User; class UserController extends BaseAdminController { @@ -22,7 +22,7 @@ class UserController extends BaseAdminController public function add() { $params = (new UserValidate())->post()->goCheck('storeAdd'); - $result = UserLogic::StoreAdd($params); + UserLogic::StoreAdd($params); if (UserLogic::hasError() ) { return $this->fail(UserLogic::getError()); } @@ -37,4 +37,14 @@ class UserController extends BaseAdminController return $this->success('', $detail); } + public function user_ship(){ + $user_ship=$this->request->post('user_ship',0); + $id=$this->request->post('id',0); + if($user_ship==1){ + return $this->fail('充值会员不能前端设置'); + } + User::where('id',$id)->update(['user_ship'=>$user_ship]); + return $this->success('设置成功'); + } + } \ No newline at end of file