Storesnssetting.php 1.5 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 Storesnssetting extends BaseModel
  15. {
  16. /**
  17. * 获取单条动态设置设置信息
  18. * @access public
  19. * @author csdeshang
  20. * @param array $condition 条件
  21. * @param string $field 字段
  22. * @return array
  23. */
  24. public function getStoresnssettingInfo($condition, $field = '*')
  25. {
  26. return Db::name('storesnssetting')->field($field)->where($condition)->find();
  27. }
  28. /**
  29. * 保存店铺动态设置
  30. * @access public
  31. * @author csdeshang
  32. * @param array $data 参数数据
  33. * @return boolean
  34. */
  35. public function addStoresnssetting($data)
  36. {
  37. return Db::name('storesnssetting')->insert($data);
  38. }
  39. /**
  40. * 保存店铺动态设置
  41. * @access public
  42. * @author csdeshang
  43. * @param type $update 更新数据
  44. * @param type $condition 条件
  45. * @return boolean
  46. */
  47. public function editStoresnssetting($update, $condition)
  48. {
  49. return Db::name('storesnssetting')->where($condition)->update($update);
  50. }
  51. }