Exemple #1
0
    def deleteUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'DELETEUSER'
        log.log_content = '用户 ' + self.__user_id + ' 删除了用户 ' + userid
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #2
0
    def addUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'ADDUSER'
        log.log_content = '用户 ' + self.__user_id + ' 新增用户 ' + userid
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #3
0
    def loginLog(self):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'LOGIN'
        log.log_content = '用户 ' + self.__user_id + ' 登录系统成功'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #4
0
    def updateUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'UPDATEUSER'
        log.log_content = '用户 ' + self.__user_id + ' 更新用户 ' + userid + ' 信息'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #5
0
    def addUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'ADDUSER'
        log.log_content = '用户 ' + self.__user_id + ' 新增用户 ' + userid
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #6
0
    def deleteUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'DELETEUSER'
        log.log_content = '用户 ' + self.__user_id + ' 删除了用户 ' + userid
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #7
0
    def loginLog(self):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'LOGIN'
        log.log_content = '用户 ' + self.__user_id + ' 登录系统成功'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #8
0
    def updateUser(self, userid):
        log = Logs()

        log.user_id = self.__user_id
        log.log_type = 'UPDATEUSER'
        log.log_content = '用户 ' + self.__user_id + ' 更新用户 ' + userid + ' 信息'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #9
0
    def info(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = self.__log_type
        log.log_content = self.__log_content
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #10
0
    def returnDevice(self, lenderid):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'RETURNDEVICE'
        log.log_content = '用户 ' + lenderid + ' 归还设备 ' + self.__device_id + ' 操作人 ' + self.__user_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #11
0
    def deleteDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'DELETEDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 删除了设备 ' + self.__device_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #12
0
    def updateDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'UPDATEDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 更新了设备 ' + self.__device_id + ' 信息'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #13
0
    def addDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'ADDDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 新增设备 ' + self.__device_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #14
0
    def info(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = self.__log_type
        log.log_content = self.__log_content
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #15
0
    def returnDevice(self, lenderid):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'RETURNDEVICE'
        log.log_content = '用户 ' + lenderid + ' 归还设备 ' + self.__device_id + ' 操作人 ' + self.__user_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #16
0
    def deleteDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'DELETEDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 删除了设备 ' + self.__device_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #17
0
    def updateDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'UPDATEDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 更新了设备 ' + self.__device_id + ' 信息'
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()
Exemple #18
0
    def addDevice(self):
        log = Logs()

        log.user_id = self.__user_id
        log.device_id = self.__device_id
        log.log_type = 'ADDDEVICE'
        log.log_content = '用户 ' + self.__user_id + ' 新增设备 ' + self.__device_id
        log.log_time = datetime.utcnow()

        db.session.add(log)
        db.session.commit()