Storesnssetting.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\common\model;
  3. use think\facade\Db;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 数据层模型
  10. */
  11. class Storesnssetting extends BaseModel
  12. {
  13. /**
  14. * 获取单条动态设置设置信息
  15. * @access public
  16. * @author csdeshang
  17. * @param array $condition 条件
  18. * @param string $field 字段
  19. * @return array
  20. */
  21. public function getStoresnssettingInfo($condition, $field = '*')
  22. {
  23. return Db::name('storesnssetting')->field($field)->where($condition)->find();
  24. }
  25. /**
  26. * 保存店铺动态设置
  27. * @access public
  28. * @author csdeshang
  29. * @param array $data 参数数据
  30. * @return boolean
  31. */
  32. public function addStoresnssetting($data)
  33. {
  34. return Db::name('storesnssetting')->insert($data);
  35. }
  36. /**
  37. * 保存店铺动态设置
  38. * @access public
  39. * @author csdeshang
  40. * @param type $update 更新数据
  41. * @param type $condition 条件
  42. * @return boolean
  43. */
  44. public function editStoresnssetting($update, $condition)
  45. {
  46. return Db::name('storesnssetting')->where($condition)->update($update);
  47. }
  48. }