def remover_by_id():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, First)
    entity = first_service.delete_by_guid(guid)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
def save():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, First)
    entity = FirstService().update(entity)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
Пример #3
0
def save():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, DocNewCheckPlan)
    entity = docNewCheckPlanService.update(entity)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
Пример #4
0
def remover_by_id():
    json_dict = RequestBody()
    entity = json_dict_entity(json_dict, DocNewCheckPlan)
    entity = docNewCheckPlanService.delete_by_guid(guid)
    if entity is not None:
        return ReturnUtil().ok(entity)
    else:
        return ReturnUtil().falid()
Пример #5
0
def createBatch():
    json_dict = RequestBody()
    entities = [
        json_dict_entity(entity, DocNewCheckPlan) for entity in json_dict
    ]
    docNewCheckPlanService.create_batch(entities)
    return ReturnUtil().ok()
def profile():
    profilex=FakeDataService().profile()
    return ReturnUtil().ok(profilex)
Пример #7
0
def find_list():
    dict_json = RequestBody()
    query = json_to_query(dict_json, DocNewCheckPlan)
    entity_list = docNewCheckPlanService.find_pagenation(query, Pagenation())
    return ReturnUtil().ok(entity_list)
Пример #8
0
def create():
    dict_json = RequestBody()
    entity = json_dict_entity(dict_json, DocNewCheckPlan)
    entity = docNewCheckPlanService.create(entity)
    return ReturnUtil().ok(entity)
Пример #9
0
    # session=Session()
    # st=Student(Sname="中文名字",Ssex="女",Sage=2,Sdept="3")
    # session.add(st)
    # session.commit()
    # session.close()
    #
    # session=Session()
    # list=session.query(Student).all()
    # print(list)
    # session.commit()

    # page_size = 2
    # page_index = 1
    # Session = sessionmaker(bind=engine)
    # session = Session()
    # entity_query={
    #     First.id==988014
    # }
    # x=session.query(First).filter(*entity_query).limit(page_size).offset((page_index-1)*page_size).all()
    # print(x)
    # entity_query={}
    # print(session.query(First).filter(*entity_query).all())
    # session.close()
    # entity_query={}

    # print(FirstService().find_by_id(988014))

    query = {}
    entity_list = FirstService().find_pagenation(query, Pagenation())
    print(ReturnUtil().ok(entity_list))
Пример #10
0
def find_by_id():
    id = request.args.get("id")  # 获取  get  参数
    entity = docNewCheckPlanService.find_by_id(id)
    return ReturnUtil().ok(entity)
Пример #11
0
def find_by_id():
    id = request.args.get("id")  # 获取  get  参数
    entity = AccessFileService().find_by_id(id)
    return ReturnUtil().ok(entity);
Пример #12
0
def find_by_guid():
    guid = request.form.get("guid")  # 获取  get  参数
    entity = AccessFileService().find_by_guid(guid)
    return ReturnUtil().ok(entity);
def find_by_id():
    id = request.args.get("id")  # 获取  get  参数
    entity = first_service.find_by_id(id)
    return ReturnUtil().ok(entity)
def find_list():
    dict_json = RequestBody()
    query = json_to_query(dict_json, First)
    entity_list = first_service.find_pagenation(query, Pagenation())
    return ReturnUtil().ok(entity_list)
Пример #15
0
 def get(self):
     list=picture_service.find_list()
     return ReturnUtil.ok(list)
def create():
    dict_json = RequestBody()
    entity = json_dict_entity(dict_json, First)
    entity = first_service.create(entity)
    return ReturnUtil().ok(entity)
def createBatch():
    json_dict = RequestBody()
    entities = [json_dict_entity(entity, First) for entity in json_dict]
    FirstService().create_batch(entities)
    return ReturnUtil().ok()
Пример #18
0
def upload():
    if request.method == 'POST':
        requestfile = request.files['myfile']
        fp = FileParam(UniqueIdUtil.gen_guid(), request.form.get("moduleName"), requestfile.filename)
        result = AccessFileService().save_file(requestfile, fp)
        return ReturnUtil().ok(result)
Пример #19
0
def number():
    return ReturnUtil().ok(tushare_service.find_list())