Store.php
1.08 KB
<?php
namespace YHMStore\SqlMap\Store;
class Store {
const SELECT_STOREID_BY_UID = 'select `id` from store where `uid`=:uid';
const SELECT_BY_UID = 'select * from store where uid=:uid';
const SELECT_BY_ID = 'select * from store where id=:id';
const INSERT_STORE = 'insert into store(
`uid`,`store_type`,`status`,`create_time`)
values(:uid,:store_type,:status,UNIX_TIMESTAMP())';
## Admin ##
const UPDATE_STORE_TYPE_BY_UID = 'update store set store_type=:store_type where uid=:uid';
const UPDATE_STORE_STAR_BY_UID = 'update store set star=:star where uid=:uid';
const SELECT_COUNT_STORE_BY_TYPE = 'select count(1) from store where store_type=:store_type #sql#';
const SELECT_STORE_LIST_BY_TYPE = 'select * from store where store_type=:store_type #sql# order by sort desc,id desc limit :offset,:num';
const UPDATE_STORE_SORT_BY_UID = 'update store set sort=:sort where uid=:uid';
const UPDATE_REAL_BY_UID = 'update store set is_real=:is_real where uid=:uid';
const GET_UID_BY_STORE_ID = ' select uid from store where id = :store_id';
}