Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4d494e0a
authored
Jul 19, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
供应商入驻页面迁移
parent
d538d0ee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
6 deletions
app/Http/Controllers/Api/ChainApiController.php
app/Http/Controllers/ChainController.php
app/Http/Transformers/ChainTransformer.php
app/Http/routes.php
app/Model/ChainModel.php
config/field.php
app/Http/Controllers/Api/ChainApiController.php
View file @
4d494e0a
...
@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Api;
...
@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Api;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Controller
;
use
App\Http\Services\LogService
;
use
App\Http\Services\LogService
;
use
App\Http\Services\
SupplierApply
Service
;
use
App\Http\Services\
Chain
Service
;
use
App\Http\Services\SupplierExaminationService
;
use
App\Http\Services\SupplierExaminationService
;
use
App\Http\Transformers\SupplierLogTransformer
;
use
App\Http\Transformers\SupplierLogTransformer
;
use
App\Http\Validators\SupplierExaminationValidator
;
use
App\Http\Validators\SupplierExaminationValidator
;
...
@@ -24,10 +24,10 @@ class ChainApiController extends Controller
...
@@ -24,10 +24,10 @@ class ChainApiController extends Controller
}
}
//获取列表
//获取列表
public
function
Get
SupplierApply
List
(
$request
)
public
function
Get
Chain
List
(
$request
)
{
{
$service
=
new
SupplierApply
Service
();
$service
=
new
Chain
Service
();
$list
=
$service
->
get
SupplierApply
List
(
$request
->
all
());
$list
=
$service
->
get
Chain
List
(
$request
->
all
());
$this
->
response
(
0
,
'ok'
,
$list
[
'data'
],
$list
[
'total'
]);
$this
->
response
(
0
,
'ok'
,
$list
[
'data'
],
$list
[
'total'
]);
}
}
}
}
app/Http/Controllers/ChainController.php
View file @
4d494e0a
...
@@ -43,6 +43,7 @@ class ChainController extends Controller
...
@@ -43,6 +43,7 @@ class ChainController extends Controller
public
function
ChainList
(
$request
)
public
function
ChainList
(
$request
)
{
{
$this
->
data
[
'title'
]
=
'供应商申请列表'
;
$this
->
data
[
'title'
]
=
'供应商申请列表'
;
$this
->
data
[
'view'
]
=
'ChainList'
;
return
$this
->
view
(
'供应商申请列表'
);
return
$this
->
view
(
'供应商申请列表'
);
}
}
}
}
\ No newline at end of file
app/Http/Transformers/ChainTransformer.php
View file @
4d494e0a
...
@@ -15,6 +15,8 @@ class ChainTransformer
...
@@ -15,6 +15,8 @@ class ChainTransformer
$redis
=
new
RedisModel
();
$redis
=
new
RedisModel
();
foreach
(
$list
as
&
$item
)
{
foreach
(
$list
as
&
$item
)
{
$item
[
'create_time'
]
=
$item
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$item
[
'create_time'
])
:
''
;
$item
[
'create_time'
]
=
$item
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$item
[
'create_time'
])
:
''
;
$item
[
'supplier_type_name'
]
=
array_get
(
config
(
'field.ChainSupplierType'
),
$item
[
'supplier_type'
],
'无'
);
$item
[
'data_type_name'
]
=
array_get
(
config
(
'field.ChainDataType'
),
$item
[
'data_type'
],
'无'
);
}
}
unset
(
$item
);
unset
(
$item
);
...
...
app/Http/routes.php
View file @
4d494e0a
...
@@ -32,6 +32,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
...
@@ -32,6 +32,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route
::
match
([
'get'
,
'post'
],
'/supplier_apply/{key}'
,
'SupplierApplyController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/supplier_apply/{key}'
,
'SupplierApplyController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/purchase_remark/{key}'
,
'PurchaseRemarkController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/purchase_remark/{key}'
,
'PurchaseRemarkController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/shipping_cost_ruler/{key}'
,
'ShippingCostRulerController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/shipping_cost_ruler/{key}'
,
'ShippingCostRulerController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/chain/{key}'
,
'ChainController@info'
);
});
});
Route
::
group
([
'middleware'
=>
[
'web'
],
'namespace'
=>
'Api'
],
function
()
{
Route
::
group
([
'middleware'
=>
[
'web'
],
'namespace'
=>
'Api'
],
function
()
{
...
@@ -54,6 +55,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
...
@@ -54,6 +55,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
Route
::
match
([
'get'
,
'post'
],
'/api/supplier_apply/{key}'
,
'SupplierApplyApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/supplier_apply/{key}'
,
'SupplierApplyApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/purchase_remark/{key}'
,
'PurchaseRemarkApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/purchase_remark/{key}'
,
'PurchaseRemarkApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/shipping_cost_ruler/{key}'
,
'ShippingCostRulerApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/shipping_cost_ruler/{key}'
,
'ShippingCostRulerApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/chain/{key}'
,
'ChainApiController@Entrance'
);
//单独的统计接口
//单独的统计接口
Route
::
match
([
'get'
,
'post'
],
'/statisticsSkuNumber'
,
function
()
{
Route
::
match
([
'get'
,
'post'
],
'/statisticsSkuNumber'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumberFromSKu
();
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumberFromSKu
();
...
...
app/Model/ChainModel.php
View file @
4d494e0a
...
@@ -9,7 +9,8 @@ use Illuminate\Support\Facades\Redis;
...
@@ -9,7 +9,8 @@ use Illuminate\Support\Facades\Redis;
class
ChainModel
extends
Model
class
ChainModel
extends
Model
{
{
protected
$table
=
'lie_chain'
;
protected
$connection
=
'liexin'
;
protected
$table
=
'chain'
;
protected
$primaryKey
=
'chain_id'
;
protected
$primaryKey
=
'chain_id'
;
public
$timestamps
=
false
;
public
$timestamps
=
false
;
}
}
config/field.php
View file @
4d494e0a
...
@@ -275,5 +275,17 @@ return [
...
@@ -275,5 +275,17 @@ return [
1
=>
'国内代购'
,
1
=>
'国内代购'
,
2
=>
'海外代购'
,
2
=>
'海外代购'
,
3
=>
'非代购'
,
3
=>
'非代购'
,
]
],
'ChainDataType'
=>
[
1
=>
'PC端'
,
2
=>
'移动端'
],
'ChainSupplierType'
=>
[
1
=>
'自营供应商'
,
2
=>
'联营供应商'
,
3
=>
'国产推荐'
],
];
];
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment