Renewal.php 540 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. class Renewal extends Model
  5. {
  6. public function getRenewal()
  7. {
  8. $result = $this
  9. ->select();
  10. return $result;
  11. }
  12. public function findRenewal($condition)
  13. {
  14. $result = $this
  15. ->where($condition)
  16. ->find();
  17. return $result;
  18. }
  19. public function updateRenewal($id, $data)
  20. {
  21. $result = $this
  22. ->where(['renewal_id' => $id])
  23. ->update($data);
  24. return $result;
  25. }
  26. }