Storemsgtpl.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 Storemsgtpl extends BaseModel {
  15. /**
  16. * 店铺消息模板列表
  17. * @access public
  18. * @author csdeshang
  19. * @param array $condition 条件
  20. * @param string $field 字段
  21. * @param string $order 排序
  22. * @return array
  23. */
  24. public function getStoremsgtplList($condition, $field = '*', $order = 'storemt_code asc') {
  25. return Db::name('storemsgtpl')->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. * @return array
  34. */
  35. public function getStoremsgtplInfo($condition, $field = '*') {
  36. return Db::name('storemsgtpl')->field($field)->where($condition)->find();
  37. }
  38. /**
  39. * 编辑店铺消息模板
  40. * @access public
  41. * @author csdeshang
  42. * @param arrat $condition 条件
  43. * @param array $update 更新数据
  44. * @return array
  45. */
  46. public function editStoremsgtpl($condition, $update) {
  47. return Db::name('storemsgtpl')->where($condition)->update($update);
  48. }
  49. }