123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 数据层模型
- */
- class Storenavigation extends BaseModel
- {
- protected static function init()
- {
- parent::init(); // TODO: Change the autogenerated stub
- }
- /**
- * 读取列表
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @param type $field 字段
- * @return type
- */
- public function getStorenavigationList($condition, $field='*') {
- $result = Db::name('storenavigation')->field($field)->where($condition)->order('storenav_sort asc')->select()->toArray();
- return $result;
- }
- /**
- * 读取单条记录
- * @access public
- * @author csdeshang
- * @param array $condition
- * @return array
- */
- public function getStorenavigationInfo($condition) {
- $result = Db::name('storenavigation')->where($condition)->find();
- return $result;
- }
- /**
- * 增加
- * @access public
- * @author csdeshang
- * @param array $data 参数内容
- * @return bool
- */
- public function addStorenavigation($data){
- return Db::name('storenavigation')->insertGetId($data);
- }
- /**
- * 更新
- * @access public
- * @author csdeshang
- * @param array $update 更新数据
- * @param array $condition 条件
- * @return bool
- */
- public function editStorenavigation($update, $condition){
- return Db::name('storenavigation')->where($condition)->update($update);
- }
- /**
- * 删除
- * @access public
- * @author csdeshang
- * @param array $condition 条件
- * @return bool
- */
- public function delStorenavigation($condition){
- return Db::name('storenavigation')->where($condition)->delete();
- }
- }
|