Skip to content

Commit

Permalink
修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
penley277 committed Nov 21, 2019
1 parent 5d04edc commit eda1a8b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions list/StudentList.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,8 @@ def getStuByPhNum(self, phone):
return None
return Student(select[0][0], select[0][1], select[0][2], select[0][3], select[0][4], select[0][5])

def setPassWdByIdPasswd(self, no, oldPasswd, newPassWd):
select = self.db.select_items('student', '*', '%s%s%s' % ('where studNo=\'', no, '\''))
if len(select) == 0:
print('哪来的野生孩子?')
return False
student = Student(select[0][0], select[0][1], select[0][2], select[0][3], select[0][4], select[0][5])
print(student.getPassWd())
if student.getPassWd() != oldPasswd:
print('密码错了')
return False
def setPassWdByIdPasswd(self, no, newPassWd):
self.db.update_values('student', {'passwd':newPassWd}, '%s%s%s' % ('where studNo=\'', no, '\''))
return True

def outputStuList(self):
"""
Expand Down

0 comments on commit eda1a8b

Please sign in to comment.