Example #1
0
def delete():
    form = request.form.to_dict()
    id = form.get('id')
    r = Stock.delete_by_batch_id(id=id)
    r = Batch.delete_by_ids(id)
    r = Batch.all()
    print('删除', r)
    return make_response(jsonify(r))
Example #2
0
def query_all():
    # 查询商品大类
    r = Batch.all()
    r = Res.success(r)
    print('查询所有商品', r)
    return make_response(jsonify(r))