Membermsgtpl.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\common\model;
  3. use think\facade\Db;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 数据层模型
  13. */
  14. class Membermsgtpl extends BaseModel {
  15. /**
  16. * 用户消息模板列表
  17. * @access public
  18. * @author csdeshang
  19. * @param array $condition 条件
  20. * @param string $field 字段
  21. * @param int $order 排序
  22. * @return array
  23. */
  24. public function getMembermsgtplList($condition, $field = '*', $order = 'membermt_code asc') {
  25. return Db::name('membermsgtpl')->field($field)->where($condition)->order($order)->select()->toArray();
  26. }
  27. /**
  28. * 用户消息模板详细信息
  29. * @access public
  30. * @author csdeshang
  31. * @param array $condition 条件
  32. * @param string $field 字段
  33. */
  34. public function getMembermsgtplInfo($condition, $field = '*') {
  35. return Db::name('membermsgtpl')->field($field)->where($condition)->find();
  36. }
  37. /**
  38. * 编辑用户消息模板
  39. * @access public
  40. * @author csdeshang
  41. * @param array $condition 条件
  42. * @param unknown $update 更新数据
  43. * @return bool
  44. */
  45. public function editMembermsgtpl($condition, $update) {
  46. return Db::name('membermsgtpl')->where($condition)->update($update);
  47. }
  48. }