Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
f11a2d63
Commit
f11a2d63
authored
Jun 16, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:商铺
parent
35b2e6f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
0 deletions
+161
-0
Shop.php
application/models/shop/mysql/Shop.php
+66
-0
SubShop.php
application/models/shop/mysql/SubShop.php
+66
-0
Shop.php
application/modules/Shop/controllers/Shop.php
+29
-0
No files found.
application/models/shop/mysql/Shop.php
0 → 100644
View file @
f11a2d63
<?php
namespace
App\Models\shop\mysql
;
use
Api\PhpUtils\Mysql\MysqlBase
;
class
Shop
extends
MysqlBase
{
const
TABLE_NAME
=
'shop'
;
const
CONFIG_INDEX
=
'goods'
;
const
PRIMARY_KEY
=
'shop_id'
;
public
static
function
getRecord
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
get
(
$colums
,
$where
);
}
public
static
function
getRecordMaster
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
selectMaster
(
$colums
,
$where
);
}
public
static
function
insertRecord
(
$colums
)
{
return
self
::
insert
(
$colums
);
}
public
static
function
updateRecord
(
$colums
,
$where
)
{
return
self
::
update
(
$colums
,
$where
);
}
public
static
function
save
(
$data
,
$where
=
[])
{
if
(
empty
(
$where
))
{
return
self
::
insert
(
$data
);
}
return
self
::
update
(
$data
,
$where
);
}
public
static
function
deleteRecord
(
$where
)
{
return
self
::
delete
(
$where
);
}
public
static
function
getRecords
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
select
(
$colums
,
$where
);
}
public
static
function
getCount
(
$where
)
{
return
self
::
count
(
$where
);
}
}
application/models/shop/mysql/SubShop.php
0 → 100644
View file @
f11a2d63
<?php
namespace
App\Models\shop\mysql
;
use
Api\PhpUtils\Mysql\MysqlBase
;
class
SubShop
extends
MysqlBase
{
const
TABLE_NAME
=
'sub_shop'
;
const
CONFIG_INDEX
=
'goods'
;
const
PRIMARY_KEY
=
'stores_id'
;
public
static
function
getRecord
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
self
::
get
(
$colums
,
$where
);
}
public
static
function
getRecordMaster
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
selectMaster
(
$colums
,
$where
);
}
public
static
function
insertRecord
(
$colums
)
{
return
self
::
insert
(
$colums
);
}
public
static
function
updateRecord
(
$colums
,
$where
)
{
return
self
::
update
(
$colums
,
$where
);
}
public
static
function
save
(
$data
,
$where
=
[])
{
if
(
empty
(
$where
))
{
return
self
::
insert
(
$data
);
}
return
self
::
update
(
$data
,
$where
);
}
public
static
function
deleteRecord
(
$where
)
{
return
self
::
delete
(
$where
);
}
public
static
function
getRecords
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
select
(
$colums
,
$where
);
}
public
static
function
getCount
(
$where
)
{
return
self
::
count
(
$where
);
}
}
application/modules/Shop/controllers/Shop.php
0 → 100644
View file @
f11a2d63
<?php
use
App\Base\Base
;
use
App\Models\shop\mysql\Shop
;
use
App\Models\shop\mysql\SubShop
;
// use Validate\ShopValidate;
// use App\Exception\custom\ShopException;
class
ShopController
extends
Base
{
public
function
get_shop_listAction
()
{
//$params = $this->getRequest()->getRequest();
$where
[
'life_account_id'
]
=
0
;
$subShop
=
SubShop
::
getRecord
(
$where
);
print_r
(
$subShop
);
}
}
\ 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