parameters: (self,args = None,level=None,msg=None,expire=None)
return_statement: return public.returnMsg(True,'Created successfully!')
docstring: @name 创建新的消息
              @author hwliang <2020-05-18>
              @param args dict_obj{
                  level: 消息级别(info/warning/danger/error),
                  msg: 消息内容
                  expire: 过期时间
              }
              @return dict
function: def create_message(self,args = None,level=None,msg=None,expire=None):
          '''
              @name 创建新的消息
              @author hwliang <2020-05-18>
              @param args dict_obj{
                  level: 消息级别(info/warning/danger/error),
                  msg: 消息内容
                  expire: 过期时间
              }
              @return dict
          '''
          if args:
              level = args.level
              msg = args.msg
              expire = args.expire
          pdata = {
              "level":level,
              "msg":msg,
              "state":1,
              "expire":int(time.time()) + (int(expire) * 86400),
              "addtime": int(time.time())
          }
  
          public.M('messages').insert(pdata)
          return public.returnMsg(True,'Created successfully!')
function_tokens: def create_message ( self , args = None , level = None , msg = None , expire = None ) : if args : level = args . level msg = args . msg expire = args . expire pdata = { "level" : level , "msg" : msg , "state" : 1 , "expire" : int ( time . time ( ) ) + ( int ( expire ) * 86400 ) , "addtime" : int ( time . time ( ) ) } public . M ( 'messages' ) . insert ( pdata ) return public . returnMsg ( True , 'Created successfully!' )