Bracelet.php 454 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\common\model;
  3. use think\Db;
  4. class Bracelet extends Base
  5. {
  6. protected $table='bracelet_device';
  7. public function saves(){
  8. $data = request()->post();
  9. $data['org_id'] = cur_org_id();
  10. $id = $data['id'];
  11. if($id >0){
  12. $data['update_time'] = getTime();
  13. }else{
  14. $data['create_time'] = getTime();
  15. }
  16. return $this->updateInfo($data,'Bracelet','');
  17. }
  18. }