store_msg_setting.model.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * 店铺消息接收设置模型
  4. *
  5. */
  6. defined('InShopNC') or exit('Access Invalid!');
  7. class store_msg_settingModel extends Model{
  8. public function __construct() {
  9. parent::__construct('store_msg_setting');
  10. }
  11. /**
  12. * 店铺消息接收设置列表
  13. * @param array $condition
  14. * @param string $field
  15. * @param number $page
  16. * @param string $order
  17. */
  18. public function getStoreMsgSettingList($condition, $field = '*', $key = '', $page = 0, $order = 'smt_code asc') {
  19. return $this->field($field)->where($condition)->key($key)->order($order)->page($page)->select();
  20. }
  21. /**
  22. * 店铺消息接收设置详细
  23. * @param array $condition
  24. * @param string $field
  25. */
  26. public function getStoreMsgSettingInfo($condition, $field = '*') {
  27. return $this->field($field)->where($condition)->find();
  28. }
  29. /**
  30. * 编辑店铺模板接收设置
  31. * @param array $insert
  32. */
  33. public function addStoreMsgSetting($insert) {
  34. return $this->insert($insert, true);
  35. }
  36. }