1748153932 11 months ago
commit 8c972ece5c
  1. 4
      app/command/dayValue.php
  2. 1
      app/common/repositories/store/order/StoreOrderRepository.php
  3. 4
      crmeb/jobs/OrderPartnerJob.php
  4. 25
      route/admin/role.php

@ -122,7 +122,7 @@ class dayValue extends Command
$user_temp = bcdiv($temp_value, (string)$num, 2); $user_temp = bcdiv($temp_value, (string)$num, 2);
foreach ($nlv['uid'] as $uk => $uv) { foreach ($nlv['uid'] as $uk => $uv) {
$user = User::getDB()->where('uid', $uv)->find(); $user = User::getDB()->where('uid', $uv)->find();
if($user->pay_price > 0){ //if($user->pay_price > 0){
$user->all_value = bcadd($user->all_value, $user_temp, 2); $user->all_value = bcadd($user->all_value, $user_temp, 2);
$user->save(); $user->save();
$user_log_data[] = [ $user_log_data[] = [
@ -133,7 +133,7 @@ class dayValue extends Command
'memo' => $nlv['alias'] . '贡献值', 'memo' => $nlv['alias'] . '贡献值',
'user_id' => $uv, 'user_id' => $uv,
]; ];
} //}
} }

@ -1309,6 +1309,7 @@ class StoreOrderRepository extends BaseRepository
]; ];
$statusRepository->createSysLog($orderStatus); $statusRepository->createSysLog($orderStatus);
Queue::push(OrderPartnerJob::class, $order->toArray());
} }
if (isset($temp_code)) Queue::push(SendSmsJob::class, ['tempId' => $temp_code, 'id' => $order->order_id]); if (isset($temp_code)) Queue::push(SendSmsJob::class, ['tempId' => $temp_code, 'id' => $order->order_id]);

@ -33,7 +33,7 @@ use app\common\model\store\order\StoreOrderLevel;
class OrderPartnerJob implements JobInterface class OrderPartnerJob implements JobInterface
{ {
public function fire($job,$data) public function fire($job, $data)
{ {
$job->delete(); $job->delete();
file_put_contents('/tmp/debug_partner', '开始处理贡献值订单:' . var_export($data, 1), 8); file_put_contents('/tmp/debug_partner', '开始处理贡献值订单:' . var_export($data, 1), 8);
@ -155,7 +155,6 @@ class OrderPartnerJob implements JobInterface
} }
//订单角色贡献值-30% //订单角色贡献值-30%
$user_value = bcmul($total_price, 0.3, 2); $user_value = bcmul($total_price, 0.3, 2);
if ($user_value > 0) {
$user = User::getDB()->where('uid', $data['uid'])->find(); $user = User::getDB()->where('uid', $data['uid'])->find();
$user->all_value = bcadd($user->all_value, $user_value, 2); $user->all_value = bcadd($user->all_value, $user_value, 2);
//增加生命值 //增加生命值
@ -171,7 +170,6 @@ class OrderPartnerJob implements JobInterface
'memo' => '订单消费贡献值', 'memo' => '订单消费贡献值',
'user_id' => $data['uid'], 'user_id' => $data['uid'],
]; ];
}
//处理合作人角色是否包含此商品品牌 //处理合作人角色是否包含此商品品牌

@ -15,9 +15,9 @@ use app\common\middleware\AdminTokenMiddleware;
use app\common\middleware\AllowOriginMiddleware; use app\common\middleware\AllowOriginMiddleware;
use app\common\middleware\LogMiddleware; use app\common\middleware\LogMiddleware;
Route::group(function () {
//身份规则 Route::group(function () {
//身份规则
Route::group('system/role', function () { Route::group('system/role', function () {
Route::get('lst', '/getList')->name('systemRoleGetList')->option([ Route::get('lst', '/getList')->name('systemRoleGetList')->option([
'_alias' => '身份列表', '_alias' => '身份列表',
@ -49,7 +49,7 @@ Route::group(function () {
'_auth' => true, '_auth' => true,
]); ]);
//Admin管理 //Admin管理
Route::group('system/admin', function () { Route::group('system/admin', function () {
Route::get('lst', '.Admin/getList')->name('systemAdminLst')->option([ Route::get('lst', '.Admin/getList')->name('systemAdminLst')->option([
'_alias' => '管理员列表', '_alias' => '管理员列表',
@ -97,16 +97,16 @@ Route::group(function () {
})->prefix('admin.system.admin')->option([ })->prefix('admin.system.admin')->option([
'_path' => '/setting/systemAdmin', '_path' => '/setting/systemAdmin',
'_auth' => true, '_auth' => true,
'_append'=> [ '_append' => [
[ [
'_name' =>'uploadImage', '_name' => 'uploadImage',
'_path' =>'/setting/systemAdmin', '_path' => '/setting/systemAdmin',
'_alias' => '上传图片', '_alias' => '上传图片',
'_auth' => true, '_auth' => true,
], ],
[ [
'_name' =>'systemAttachmentLst', '_name' => 'systemAttachmentLst',
'_path' =>'/setting/systemAdmin', '_path' => '/setting/systemAdmin',
'_alias' => '图片列表', '_alias' => '图片列表',
'_auth' => true, '_auth' => true,
], ],
@ -135,10 +135,10 @@ Route::group(function () {
'_auth' => true, '_auth' => true,
]); ]);
//合伙人角色
Route::group('partner/role', function () { Route::group('partner/role', function () {
Route::get('list', '.Partner/list')->name('systemPartnerList')->option([ Route::get('list', '.Partner/list')->name('systemPartnerList')->option([
'_alias' => '合作人角色列表', '_alias' => '合作人角色列表',
'_auth' => false,
]); ]);
Route::post('add', '.Partner/add')->name('systemPartnerAdd')->option([ Route::post('add', '.Partner/add')->name('systemPartnerAdd')->option([
'_alias' => '添加合作人角色', '_alias' => '添加合作人角色',
@ -156,13 +156,12 @@ Route::group(function () {
'_alias' => '读取合作人大区', '_alias' => '读取合作人大区',
]); ]);
})->prefix('admin.system.admin')->option([ })->prefix('admin.system.admin')->option([
'_path' => 'self', '_auth' => false,
'_auth' => true,
]); ]);
})->middleware(AllowOriginMiddleware::class) })->middleware(AllowOriginMiddleware::class)
->middleware(AdminTokenMiddleware::class, true) ->middleware(AdminTokenMiddleware::class, true)
->middleware(AdminAuthMiddleware::class) ->middleware(AdminAuthMiddleware::class)
->middleware(LogMiddleware::class); ->middleware(LogMiddleware::class);

Loading…
Cancel
Save