Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1bb6aff8b0
@ -940,7 +940,7 @@ class Auth extends BaseController
|
|||||||
if ($code && ($info = app()->make(RoutineQrcodeRepository::class)->getRoutineQrcodeFindType($code))) {
|
if ($code && ($info = app()->make(RoutineQrcodeRepository::class)->getRoutineQrcodeFindType($code))) {
|
||||||
$auth['auth']['spread'] = $info['third_id'];
|
$auth['auth']['spread'] = $info['third_id'];
|
||||||
}
|
}
|
||||||
if (!$user || empty($user['account'])) {
|
if (!$user || empty($user['account']) || empty($user['phone'])) {
|
||||||
$uni = uniqid(true, false) . random_int(1, 100000000);
|
$uni = uniqid(true, false) . random_int(1, 100000000);
|
||||||
$key = 'U' . md5(time() . $uni);
|
$key = 'U' . md5(time() . $uni);
|
||||||
Cache::set('u_try' . $key, ['id' => $authInfo['wechat_user_id'], 'type' => $authInfo['user_type'], 'spread' => $auth['auth']['spread'] ?? 0], 3600);
|
Cache::set('u_try' . $key, ['id' => $authInfo['wechat_user_id'], 'type' => $authInfo['user_type'], 'spread' => $auth['auth']['spread'] ?? 0], 3600);
|
||||||
@ -1696,7 +1696,7 @@ class Auth extends BaseController
|
|||||||
return app('json')->fail('授权已过期,请重新登录');
|
return app('json')->fail('授权已过期,请重新登录');
|
||||||
}
|
}
|
||||||
$user = $repository->wechatUserIdBytUser($auth['id']);
|
$user = $repository->wechatUserIdBytUser($auth['id']);
|
||||||
if (!empty($user['account'])) {
|
if (!empty($user['account']) && !empty($user['phone'])) {
|
||||||
return app('json')->fail('已绑定手机号');
|
return app('json')->fail('已绑定手机号');
|
||||||
}
|
}
|
||||||
$targetUser = $repository->accountByUser($data['phone']);
|
$targetUser = $repository->accountByUser($data['phone']);
|
||||||
|
@ -405,14 +405,14 @@ class StoreOrder extends BaseController
|
|||||||
return app('json')->success($list);
|
return app('json')->success($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取商户押金列表
|
* 获取商户押金列表
|
||||||
*/
|
*/
|
||||||
public function getOrderAutoMarginList($merId){
|
public function getOrderAutoMarginList($merId){
|
||||||
[$page, $limit] = $this->getPage();
|
[$page, $limit] = $this->getPage();
|
||||||
$select= Db::name('financial_record')->where('mer_id',$merId)->where('type',1)
|
$select= Db::name('financial_record')->where('mer_id',$merId)
|
||||||
->where('financial_type','auto_margin')->where('financial_pm',0)
|
->where('financial_type','auto_margin')
|
||||||
->page($page)->limit($limit)->order('financial_record_id','desc')->select();
|
->page($page)->limit($limit)->order('financial_record_id','desc')->select();
|
||||||
return app('json')->success($select);
|
return app('json')->success($select);
|
||||||
|
|
||||||
|
@ -301,10 +301,10 @@ class Merchant extends BaseController
|
|||||||
if (empty($merchantInfo)) {
|
if (empty($merchantInfo)) {
|
||||||
return app('json')->fail('参数错误');
|
return app('json')->fail('参数错误');
|
||||||
}
|
}
|
||||||
$margin = Db::name('MerchantType')->where('mer_type_id', $merchantInfo['type_id'])->value('margin');
|
$merchantInfo['unpaid_margin'] = bcsub($merchantInfo['margin'], $merchantInfo['paid_margin'], 2);
|
||||||
$merchantInfo['unpaid_margin'] = bcsub($margin, $merchantInfo['paid_margin'], 2);
|
if ($merchantInfo['margin'] <= 0) {
|
||||||
if ($merchantInfo['margin'] == 0) {
|
$merchantInfo['unpaid_margin'] = 0;
|
||||||
$merchantInfo['margin'] = $merchantInfo['unpaid_margin'];
|
$merchantInfo['paid_margin'] = 0;
|
||||||
}
|
}
|
||||||
return app('json')->success($merchantInfo);
|
return app('json')->success($merchantInfo);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class AutoUnlockMerchantMoneyListen extends TimerService implements ListenerInte
|
|||||||
public function handle($event): void
|
public function handle($event): void
|
||||||
{
|
{
|
||||||
$this->tick(1000 * 60 * 60, function () {
|
$this->tick(1000 * 60 * 60, function () {
|
||||||
if (time() >= strtotime('today 18:00:00') && time() >= strtotime('today 20:00:00')) {
|
if (time() >= strtotime('today 18:00:00') && time() <= strtotime('today 20:00:00')) {
|
||||||
request()->clearCache();
|
request()->clearCache();
|
||||||
/** @var UserBillRepository $userBill */
|
/** @var UserBillRepository $userBill */
|
||||||
$userBill = app()->make(UserBillRepository::class);
|
$userBill = app()->make(UserBillRepository::class);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user