async def news_article_offline(ns={}): if not ns.get('id'): return { 'status': False, 'msg': '请传递id' } db = DBPools() async with db.sqlorContext('kboss') as sor: try: ns_dic = { 'id': ns.get('id'), 'status': '0' } await sor.U('enterprise_news_article', ns_dic) return { 'status': True, 'msg': 'offline news article success' } except Exception as e: await sor.rollback() return { 'status': False, 'msg': 'offline news article failed, %s' % str(e) } ret = await news_article_offline(params_kw) return ret