mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
feat: #10000 测试问题修改
This commit is contained in:
parent
5ebe7b685c
commit
a47fbb2622
@ -12,6 +12,7 @@ class LogsController extends Controller
|
|||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$res = Log::query()
|
$res = Log::query()
|
||||||
|
->orderBy('id', 'desc')
|
||||||
->with(['user:id,name'])
|
->with(['user:id,name'])
|
||||||
->filter()
|
->filter()
|
||||||
->paginate();
|
->paginate();
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class RolesController extends Controller
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$roles = Role::query()->with('permissions')->get()->toArray();
|
$roles = Role::query()->with('permissions')->where('id', '<>', 1)->get()->toArray();
|
||||||
$routes = include(resource_path('lang/zh-CN/permission.php'));
|
$routes = include(resource_path('lang/zh-CN/permission.php'));
|
||||||
foreach ($roles as &$role) {
|
foreach ($roles as &$role) {
|
||||||
$permissions = [];
|
$permissions = [];
|
||||||
|
|||||||
@ -48,6 +48,9 @@ class ShopsController extends Controller
|
|||||||
$shop = new Shop();
|
$shop = new Shop();
|
||||||
$shop->name = $request->name;
|
$shop->name = $request->name;
|
||||||
$shop->plat_id = $request->plat_id;
|
$shop->plat_id = $request->plat_id;
|
||||||
|
if (0 === $request->plat_id) {
|
||||||
|
$shop->status = 2;
|
||||||
|
}
|
||||||
$shop->save();
|
$shop->save();
|
||||||
|
|
||||||
return response($this->res, $this->res['httpCode']);
|
return response($this->res, $this->res['httpCode']);
|
||||||
|
|||||||
@ -45,4 +45,9 @@ class BusinessOrder extends Model
|
|||||||
'nick_name',
|
'nick_name',
|
||||||
'order_sn',
|
'order_sn',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function items()
|
||||||
|
{
|
||||||
|
return $this->hasMany(BusinessOrderItem::class, 'business_order_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,31 @@ class BusinessOrderItem extends Model
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $guarded = [];
|
protected $fillable = [
|
||||||
|
'shop_id',
|
||||||
|
'business_order_id',
|
||||||
|
'already_cancel_number',
|
||||||
|
'cancel_status',
|
||||||
|
'category_name',
|
||||||
|
'external_sku_id',
|
||||||
|
'goods_amount',
|
||||||
|
'goods_cost_price',
|
||||||
|
'goods_id',
|
||||||
|
'goods_name',
|
||||||
|
'goods_number',
|
||||||
|
'goods_price',
|
||||||
|
'goods_purchase_price',
|
||||||
|
'goods_specification',
|
||||||
|
'help_sell_amount',
|
||||||
|
'is_supplier',
|
||||||
|
'need_verification_number',
|
||||||
|
'shipping_status',
|
||||||
|
'sku_id',
|
||||||
|
'sub_order_sn',
|
||||||
|
'theoretically_refund_amount',
|
||||||
|
'thumb_url',
|
||||||
|
'verification_number',
|
||||||
|
];
|
||||||
|
|
||||||
public function order()
|
public function order()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class CreateShopsTable extends Migration
|
|||||||
$table->unsignedInteger('refresh_token_expires_in')->nullable()->comment('refresh_token过期时间段,10表示10秒后过期');
|
$table->unsignedInteger('refresh_token_expires_in')->nullable()->comment('refresh_token过期时间段,10表示10秒后过期');
|
||||||
$table->text('scope')->nullable()->comment('接口列表');
|
$table->text('scope')->nullable()->comment('接口列表');
|
||||||
$table->text('pop_auth_token_create_response')->nullable()->comment('授权认证信息');
|
$table->text('pop_auth_token_create_response')->nullable()->comment('授权认证信息');
|
||||||
$table->string('status')->default(0)->comment('状态');
|
$table->unsignedTinyInteger('status')->default(0)->comment('状态');
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class MenusTableSeeder extends Seeder
|
|||||||
$id = DB::table('menus')->insertGetId(['parent_id' => 0,'code' => 'SYSTEM_MANAGE', 'name' => '系统管理', 'seq' => 3]);
|
$id = DB::table('menus')->insertGetId(['parent_id' => 0,'code' => 'SYSTEM_MANAGE', 'name' => '系统管理', 'seq' => 3]);
|
||||||
DB::table('menus')->insert([
|
DB::table('menus')->insert([
|
||||||
['parent_id' => $id,'code' => 'ROLE_MANAGE', 'name' => '角色管理', 'seq' => 0],
|
['parent_id' => $id,'code' => 'ROLE_MANAGE', 'name' => '角色管理', 'seq' => 0],
|
||||||
['parent_id' => $id,'code' => 'PERMISSION_MANAGE', 'name' => '权限管理', 'seq' => 1],
|
// ['parent_id' => $id,'code' => 'PERMISSION_MANAGE', 'name' => '权限管理', 'seq' => 1],
|
||||||
]);
|
]);
|
||||||
// 系统日志
|
// 系统日志
|
||||||
DB::table('menus')->insertGetId(['parent_id' => 0,'code' => 'SYSTEM_LOG', 'name' => '系统日志', 'seq' => 4]);
|
DB::table('menus')->insertGetId(['parent_id' => 0,'code' => 'SYSTEM_LOG', 'name' => '系统日志', 'seq' => 4]);
|
||||||
|
|||||||
@ -210,16 +210,16 @@ return [
|
|||||||
'name' => '设置权限',
|
'name' => '设置权限',
|
||||||
'parent_id' => 8,
|
'parent_id' => 8,
|
||||||
],
|
],
|
||||||
'PERMISSION_MANAGE' => [
|
// 'PERMISSION_MANAGE' => [
|
||||||
'id' => 9,
|
// 'id' => 9,
|
||||||
'name' => '权限管理',
|
// 'name' => '权限管理',
|
||||||
'parent_id' => 7,
|
// 'parent_id' => 7,
|
||||||
],
|
// ],
|
||||||
'permissions.index' => [
|
// 'permissions.index' => [
|
||||||
'id' => 90,
|
// 'id' => 90,
|
||||||
'name' => '列表',
|
// 'name' => '列表',
|
||||||
'parent_id' => 9,
|
// 'parent_id' => 9,
|
||||||
],
|
// ],
|
||||||
// 系统日志
|
// 系统日志
|
||||||
'SYSTEM_LOG' => [
|
'SYSTEM_LOG' => [
|
||||||
'id' => 10,
|
'id' => 10,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user