| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Http\Controllers;
- use App\Components\AsyncResponse;
- use App\Components\ErrorPush;
- use App\ErrorTemp;
- use App\Feature;
- use App\MaterialBoxModel;
- use App\Owner;
- use App\OwnerFeeDetail;
- use App\OwnerPriceOperation;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Http;
- class TestController extends Controller
- {
- use AsyncResponse,ErrorPush;
- const ASNREFERENCE_2 = 'ASNREFERENCE2';
- private $data = [];
- public function __construct()
- {
- $this->data["active_test"] = "active";
- }
- public function method(Request $request, $method)
- {
- return call_user_func([$this, $method], $request);
- }
- public function lightUp()
- {
- app("CacheShelfService")->lightUp('HAIB1-02-02','3','2');
- }
- public function lightOff()
- {
- $params = [
- "areaCode" => "1004",
- 'locCode' => "HAIB1-02-02",
- 'PTLAction' => 0,
- ];
- $response = Http::post(config('api.haiq.storage.light'), $params);
- return json_decode($response->body());
- }
- public function test()
- {
- MaterialBoxModel::query()->where("id","!=",1)->delete();
- MaterialBoxModel::query()->where("id",1)->update([
- "description" => "单商品料箱"
- ]);
- }
- }
|