Compare commits

..

No commits in common. "afe617a23be6ce254743be9549d3a2d94380417d" and "eb6e59e78348912252cd2ea4152d9126949dd979" have entirely different histories.

4 changed files with 0 additions and 29 deletions

View File

@ -9,8 +9,6 @@ use App\Models\Materiel;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
use App\Services\OperationLogService;
use App\Enums\OperationType;
class MaterielController extends Controller
{
@ -56,8 +54,6 @@ class MaterielController extends Controller
$materiel->updated_by = $user->id;
$materiel->save();
(new OperationLogService())->inLog(OperationType::Create, '', $materiel, $request->input());
return MaterielResource::make(
$materiel->setRelations([
'createdBy' => $user,
@ -96,8 +92,6 @@ class MaterielController extends Controller
$materiel->save();
(new OperationLogService())->inLog(OperationType::Update, '', $materiel, $request->input());
return MaterielResource::make(
$materiel->loadMissing(['createdBy', 'updatedBy'])
);
@ -115,8 +109,6 @@ class MaterielController extends Controller
$materiel->delete();
(new OperationLogService())->inLog(OperationType::Delete, '', $materiel);
return response()->json(null);
}
}

View File

@ -9,8 +9,6 @@ use App\Models\RiceShrimpIndustry;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
use App\Services\OperationLogService;
use App\Enums\OperationType;
class RiceShrimpIndustryController extends Controller
{
@ -55,8 +53,6 @@ class RiceShrimpIndustryController extends Controller
$riceShrimpIndustry->updated_by = $user->id;
$riceShrimpIndustry->save();
(new OperationLogService())->inLog(OperationType::Create, '', $riceShrimpIndustry, $request->input());
return RiceShrimpIndustryResource::make(
$riceShrimpIndustry->setRelations([
'createdBy' => $user,
@ -94,8 +90,6 @@ class RiceShrimpIndustryController extends Controller
$riceShrimpIndustry->save();
(new OperationLogService())->inLog(OperationType::Update, '', $riceShrimpIndustry, $request->input());
return RiceShrimpIndustryResource::make(
$riceShrimpIndustry->loadMissing(['createdBy', 'updatedBy'])
);
@ -113,8 +107,6 @@ class RiceShrimpIndustryController extends Controller
$riceShrimpIndustry->delete();
(new OperationLogService())->inLog(OperationType::Delete, '', $riceShrimpIndustry);
return response()->json(null);
}
}

View File

@ -9,8 +9,6 @@ use App\Models\RiceShrimpPrice;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
use App\Services\OperationLogService;
use App\Enums\OperationType;
class RiceShrimpPriceController extends Controller
{
@ -57,8 +55,6 @@ class RiceShrimpPriceController extends Controller
'updatedBy' => $user,
]);
(new OperationLogService())->inLog(OperationType::Create, '', $riceShrimpPrice, $request->input());
return RiceShrimpPriceResource::make($riceShrimpPrice);
}
@ -89,8 +85,6 @@ class RiceShrimpPriceController extends Controller
$riceShrimpPrice->save();
(new OperationLogService())->inLog(OperationType::Update, '', $riceShrimpPrice, $request->input());
return RiceShrimpPriceResource::make(
$riceShrimpPrice->loadMissing(['createdBy', 'updatedBy'])
);
@ -108,8 +102,6 @@ class RiceShrimpPriceController extends Controller
$riceShrimpPrice->delete();
(new OperationLogService())->inLog(OperationType::Delete, '', $riceShrimpPrice);
return response()->json(null);
}
}

View File

@ -3,8 +3,6 @@
namespace App\Http\Controllers;
use App\Http\Requestes\RestPasswordRequest;
use App\Services\OperationLogService;
use App\Enums\OperationType;
class UserController extends Controller
{
@ -23,9 +21,6 @@ class UserController extends Controller
$user->password = bcrypt($input['password']);
$user->save();
$statusMsg = '修改密码';
(new OperationLogService())->inLog(OperationType::Update, $statusMsg.'-用户【'.$user->name.'】');
//退出所有端
$user->tokens()->delete();