作业需求:
额度 15000或自定义。
实现购物商城,买东西加入 购物车,调用信用卡接口结账。
可以提现,手续费5%。
支持多账户登录。
支持账户间转账。
记录每月日常消费流水。
提供还款接口。
ATM记录操作日志。
提供管理接口,包括添加账户、用户额度,冻结账户等。。。
用户认证用装饰器。
思路:
1. 将用户名,密码,额度,锁,提现额度,等信用卡用户信息写入到字典。
2. 购物车程序请参照 python作业购物车(第二周)。
3. 多用户登陆和转账,可以根据用户名生成不同的字典。
4. 其他请参照README和代码。
程序核心代码:
README:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
bin
atm.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
atm_manage.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
conf
setting.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
core
accounts.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
auth.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
logger.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
main.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
creditcard.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
manage.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
db
111111_creditcard_dict
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
111111_creditcard_record
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
super_user_passwd
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
shoppingdb
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
logs
access.log
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
transactions.log
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
shopping
shopping.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
程序测试样图:
作业需求:
额度 15000或自定义。
实现购物商城,买东西加入 购物车,调用信用卡接口结账。
可以提现,手续费5%。
支持多账户登录。
支持账户间转账。
记录每月日常消费流水。
提供还款接口。
ATM记录操作日志。
提供管理接口,包括添加账户、用户额度,冻结账户等。。。
用户认证用装饰器。
思路:
1. 将用户名,密码,额度,锁,提现额度,等信用卡用户信息写入到字典。
2. 购物车程序请参照 python作业购物车(第二周)。
3. 多用户登陆和转账,可以根据用户名生成不同的字典。
4. 其他请参照README和代码。
程序核心代码:
README:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
bin
atm.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
atm_manage.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
conf
setting.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
core
accounts.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
auth.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
logger.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
main.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
creditcard.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
manage.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
db
111111_creditcard_dict
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
111111_creditcard_record
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
super_user_passwd
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
shoppingdb
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
logs
access.log
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
transactions.log
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
shopping
shopping.py
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
程序测试样图: