Storesnssetting.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\common\model;
  3. use think\facade\Db;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 数据层模型
  14. */
  15. class Storesnssetting extends BaseModel
  16. {
  17. /**
  18. * 获取单条动态设置设置信息
  19. * @access public
  20. * @author csdeshang
  21. * @param array $condition 条件
  22. * @param string $field 字段
  23. * @return array
  24. */
  25. public function getStoresnssettingInfo($condition, $field = '*')
  26. {
  27. return Db::name('storesnssetting')->field($field)->where($condition)->find();
  28. }
  29. /**
  30. * 保存店铺动态设置
  31. * @access public
  32. * @author csdeshang
  33. * @param array $data 参数数据
  34. * @return boolean
  35. */
  36. public function addStoresnssetting($data)
  37. {
  38. return Db::name('storesnssetting')->insert($data);
  39. }
  40. /**
  41. * 保存店铺动态设置
  42. * @access public
  43. * @author csdeshang
  44. * @param type $update 更新数据
  45. * @param type $condition 条件
  46. * @return boolean
  47. */
  48. public function editStoresnssetting($update, $condition)
  49. {
  50. return Db::name('storesnssetting')->where($condition)->update($update);
  51. }
  52. }