mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
订单重置配置
This commit is contained in:
parent
a96cc3b518
commit
2b7fcc998a
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Shop;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\BusinessGoodsSku;
|
use App\Models\BusinessGoodsSku;
|
||||||
|
use App\Models\DeveloperConfig;
|
||||||
use App\Models\GoodsSku;
|
use App\Models\GoodsSku;
|
||||||
use App\Models\Shop;
|
use App\Models\Shop;
|
||||||
use App\Http\Resources\ShopsResource;
|
use App\Http\Resources\ShopsResource;
|
||||||
@ -255,4 +256,15 @@ class ShopsController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function orderReset(Request $request)
|
||||||
|
{
|
||||||
|
DeveloperConfig::query()->updateOrCreate([
|
||||||
|
'key' => DeveloperConfig::$ORDER_RESET_TIME,
|
||||||
|
], [
|
||||||
|
'value' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response($this->res, $this->res['httpCode']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
app/Models/DeveloperConfig.php
Normal file
12
app/Models/DeveloperConfig.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class DeveloperConfig extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
|
public static $ORDER_RESET_TIME = 'order_reset_time';
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateDeveloperConfigsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
if (Schema::hasTable('developer_configs')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Schema::create('developer_configs', function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
$table->string('key')->comment('配置项名称');
|
||||||
|
$table->string('value')->comment('配置项值');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('developer_configs');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -70,6 +70,11 @@ return [
|
|||||||
'name' => '上新导入',
|
'name' => '上新导入',
|
||||||
'parent_id' => 2,
|
'parent_id' => 2,
|
||||||
],
|
],
|
||||||
|
'order.reset_count' => [
|
||||||
|
'id' => 201,
|
||||||
|
'name' => '订单重置',
|
||||||
|
'parent_id' => 2,
|
||||||
|
],
|
||||||
// 商品种类
|
// 商品种类
|
||||||
'GOODS_TYPE' => [
|
'GOODS_TYPE' => [
|
||||||
'id' => 3,
|
'id' => 3,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user