Esempio n. 1
0
    def delete_user_by_name(cls, user_name):
        user_name = dbSession.query(cls).filter(
            cls.user_name == user_name).first()

        if user_name is not None:
            dbSession.delete(user_name)
            return True
        else:
            return False
Esempio n. 2
0
def create_root_user():
    # 先查询用户是否存在
    user = dbSession.query(UsersInfoModule).filter(
        UsersInfoModule.user_role == "root").first()
    # 不存在创建用户
    if user is None:
        user_module = UsersInfoModule()
        user_module.user_name = DefaultAdminUser.user_name
        user_module.chinese_name = DefaultAdminUser.chinese_name
        user_module.nick_name = DefaultAdminUser.nick_name
        user_module.pass_word = DefaultAdminUser.pass_word
        user_module.address = DefaultAdminUser.address
        user_module.department = DefaultAdminUser.department
        user_module.email = DefaultAdminUser.email
        user_module.user_role = DefaultAdminUser.user_role
        user_module.pwd_modified = False
        user_module.change_pwd_count = 0

        dbSession.add(user_module)
        dbSession.commit()
Esempio n. 3
0
 def get_all_organizer_info(cls):
     return dbSession.query(cls).all()
Esempio n. 4
0
 def get_all_exchange_apply_info(cls):
     return dbSession.query(cls).all()
Esempio n. 5
0
 def get_all_users_info(cls):
     return dbSession.query(cls).all()
Esempio n. 6
0
 def get_all_history_info(cls):
     return dbSession.query(cls).all()
Esempio n. 7
0
 def get_all_issues_info(cls):
     return dbSession.query(cls).all()
Esempio n. 8
0
 def get_all_scoring_criteria(cls):
     return dbSession.query(cls).all()
Esempio n. 9
0
 def get_all_exchanged_history(cls):
     return dbSession.query(cls).all()
Esempio n. 10
0
 def get_all_attendance_info(cls):
     return dbSession.query(cls).all()
Esempio n. 11
0
 def get_all_score_history(cls):
     return dbSession.query(cls).all()
Esempio n. 12
0
 def get_all_score_info(cls):
     return dbSession.query(cls).all()
Esempio n. 13
0
 def get_all_exchange_rules(cls):
     return dbSession.query(cls).all()
Esempio n. 14
0
 def get_all_meeting_info(cls):
     return dbSession.query(cls).all()