org_id = (await get_userorgid()) or '0' rid = params_kw.get('id', '') now = datetime.now().strftime("%Y-%m-%d %H:%M:%S") dbname = get_module_dbname('reallife_asset') db = DBPools() async with db.sqlorContext(dbname) as sor: upd = {"update_time": now, "id": rid, "org_id": org_id} for f in ['name', 'status']: v = params_kw.get(f) if v is not None: upd[f] = v await sor.U("rl_asset", upd) return {"widgettype":"Message","options":{"title":"更新成功","message":"ok","cwidth":16,"cheight":9,"timeout":3}}