Пример #1
0
def add_system_mail(info):
    system_mail_id = int(info["system_mail_id"])
    if system_mail_id:
        system_mail = get_system_mail(system_mail_id)
    else:
        system_mail = SystemMail()

    if system_mail_id:
        del info["created_user"]

    for k, v in info.iteritems():
        setattr(system_mail, k, v)
    system_mail.persist()
Пример #2
0
def add_system_mail(info):
    system_mail_id = int(info["system_mail_id"])
    if system_mail_id:
        system_mail = get_system_mail(system_mail_id)
    else:
        system_mail = SystemMail()
        
    if system_mail_id:
        del info["created_user"]
        
    for k, v in info.iteritems():
        setattr(system_mail, k, v)
    system_mail.persist()
Пример #3
0
def get_system_mail_list(page=1, pagesize=20, status=-1):
    condition = "1=1"
    if status != -1:
        condition = "status=%s" % status
    return SystemMail.paging(page,
                             pagesize,
                             order="system_mail_id desc",
                             condition=condition)
Пример #4
0
def get_system_mail(system_mail_id):
    return SystemMail.load(system_mail_id=system_mail_id)
Пример #5
0
def get_system_mail(system_mail_id):
    return SystemMail.load(system_mail_id=system_mail_id)
Пример #6
0
def get_system_mail_list(page=1, pagesize=20, status=-1):
    condition = "1=1"
    if status != -1:
        condition = "status=%s" % status
    return SystemMail.paging(page, pagesize, order="system_mail_id desc", condition=condition)