Пример #1
0
def GetSuplliers():
    req = GetItemsByPageReq(request.json)
    result = SupplierSvc.GetSupplierByPage(req)
    res = GetItemsByPageRsp(has_next=result['has_next'],
                            has_prev=result['has_prev'],
                            items=result['suppliers']).serialize()
    return jsonify(res)
Пример #2
0
def DeleteSupplier():
    req = DeleteSupplierReq(request.json)
    result = SupplierSvc.DeleteSupplier(req)
    return jsonify(result)
Пример #3
0
def UpdateSupplier():
    req = UpdateSupplierReq(request.json)
    result = SupplierSvc.UpdateSupplier(req)
    return jsonify(result)
Пример #4
0
def CreateSupplier():
    req = CreateSupplierReq(request.json)
    result = SupplierSvc.CreateSupplier(req)
    return jsonify(result)
def SearchSuppliers():
    req = SearchSuppliersReq(request.json)
    result = SupplierSvc.SearchSuppliers(req)
    res = SearchSuppliersRsp(result).serialize()
    return jsonify(res['suppliers'])