mail_templates.model.php 857 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * 通知模板表
  4. *
  5. *
  6. *
  7. */
  8. defined('InShopNC') or exit('Access Invalid!');
  9. class mail_templatesModel extends Model {
  10. public function __construct(){
  11. parent::__construct('mail_msg_temlates');
  12. }
  13. /**
  14. * 取单条信息
  15. * @param unknown $condition
  16. * @param string $fields
  17. */
  18. public function getTplInfo($condition = array(), $fields = '*') {
  19. return $this->where($condition)->field($fields)->find();
  20. }
  21. /**
  22. * 模板列表
  23. *
  24. * @param array $condition 检索条件
  25. * @return array 数组形式的返回结果
  26. */
  27. public function getTplList($condition = array()){
  28. return $this->where($condition)->select();
  29. }
  30. public function editTpl($data = array(), $condition = array()) {
  31. return $this->where($condition)->update($data);
  32. }
  33. }