12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- class Storemsgsetting extends BaseModel
- {
- public $page_info;
-
- public function getStoremsgsettingList($condition, $field = '*', $key = '', $pagesize = 0, $order = 'storemt_code asc')
- {
- if ($pagesize) {
- $res = Db::name('storemsgsetting')->field($field)->where($condition)->order($order)->paginate(['list_rows' => $pagesize, 'query' => request()->param()], false);
- $this->page_info = $res;
- $result = $res->items();
- } else {
- $result = Db::name('storemsgsetting')->field($field)->where($condition)->order($order)->select()->toArray();
- }
- return ds_change_arraykey($result, $key);
- }
-
- public function getStoremsgsettingInfo($condition, $field = '*')
- {
- return Db::name('storemsgsetting')->field($field)->where($condition)->find();
- }
-
- public function addStoremsgsetting($data)
- {
- return Db::name('storemsgsetting')->insert($data);
- }
-
- public function editStoremsgsetting($data, $condition)
- {
- return Db::name('storemsgsetting')->where($condition)->update($data);
- }
- }
|