Exemple #1
0
 def delete_address(id, user_id):
     address = Address.get_or_404(id=id, user_id=user_id)
     address.delete()
Exemple #2
0
def get_address(id):
    '''查询「配送信息」'''
    address = Address.get_or_404(id=id, error_code=6001, msg='配送地址不存在')
    return Success(address)
Exemple #3
0
 def update_address(id, user_id, **form):
     address = Address.get_or_404(id=id, user_id=user_id)
     address.update(**form)