store_msg_tpl.model.php 1.1 KB

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