Userproduct.php 573 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\home\model;
  3. use think\Model;
  4. /**
  5. * 用户管理
  6. */
  7. class Userproduct extends Model
  8. {
  9. public function addUserProduct($data)
  10. {
  11. $result = $this->insert($data);
  12. return $result;
  13. }
  14. public function findUserProduct($condition)
  15. {
  16. $result = $this
  17. ->where($condition)
  18. ->find();
  19. return $result;
  20. }
  21. public function updateUserProduct($condition, $data)
  22. {
  23. $result = $this
  24. ->where($condition)
  25. ->update($data);
  26. return $result;
  27. }
  28. }