feat:parmas
This commit is contained in:
@@ -65,6 +65,14 @@ def book_room(data: dict, params: dict) -> str:
|
||||
content = getinfo.book_meeting_room(params, data)
|
||||
return content
|
||||
|
||||
def query_booking_info(params: dict):
|
||||
tenant_id = params.get('ytenantId', None)
|
||||
access_token = getinfo.get_access_token(tenant_id)
|
||||
params['access_token'] = access_token
|
||||
|
||||
meeting_room = getinfo.query_meetingbooking_info(params)
|
||||
content = json.loads(json.dumps(meeting_room))
|
||||
return str(content)
|
||||
|
||||
|
||||
def check_and_process_think(content: str) -> str:
|
||||
|
||||
@@ -130,5 +130,6 @@ GATEWAY_INTF = '/open-auth/dataCenter/getGatewayAddress'
|
||||
QUERY_MEETING_ROOM_TYPE = ['GET', '/yonbip/uspace/external/access/getMeetingRoomType']
|
||||
QUERY_MEETING_ROOM = ['GET', '/yonbip/uspace/external/access/getMeetingRoom']
|
||||
QUERY_MEETINGBOOKING_INFO = ['GET', '/yonbip/uspace/external/access/getDestineInformation']
|
||||
BOOK_MEETING_ROOM = ['GET', '/yonbip/uspace/destine/Meeting']
|
||||
BOOK_MEETING_ROOM = ['POST', '/yonbip/uspace/destine/Meeting']
|
||||
CANCEL_MEETING = ['POST', '/yonbip/uspace/cancel/Meeting']
|
||||
|
||||
|
||||
@@ -25,5 +25,6 @@ urlpatterns = [
|
||||
path('getMeetingType/', views.query_meeting_type),
|
||||
path('getMeeting/', views.query_meeting),
|
||||
path('getMeetingBookingDetails/', views.query_meetingooking_info),
|
||||
path('bookMeetingRoom/', views.book_meeting_room)
|
||||
path('bookMeetingRoom/', views.book_meeting_room),
|
||||
# path('cancelmeeting/',)
|
||||
]
|
||||
|
||||
@@ -117,7 +117,39 @@ def book_meeting_room(request):
|
||||
except Exception as ex:
|
||||
return JsonResponse(str(ex))
|
||||
|
||||
def cancel_meeting_room(request):
|
||||
"""
|
||||
:data {
|
||||
startDateTime (not null)
|
||||
endDateTime (not null)
|
||||
qzId (not null)
|
||||
ownnerId (not null)
|
||||
subject (not null)
|
||||
meetingroomId (not null)
|
||||
content (not null)
|
||||
personAmount (not null)
|
||||
}
|
||||
:params: ytenantId (not null)
|
||||
:return:
|
||||
"""
|
||||
if request.method == 'POST':
|
||||
params = request.GET.dict()
|
||||
data = request.POST.dict()
|
||||
print("data is {0}".format(data))
|
||||
print("当前params : {0}".format(params))
|
||||
tenant_id = params.get('ytenantId', None)
|
||||
if not tenant_id:
|
||||
raise Exception("ytenantId 不能为空")
|
||||
try:
|
||||
access_token = getinfo.get_access_token(tenant_id)
|
||||
params['access_token'] = access_token
|
||||
|
||||
book_meeting = getinfo.book_meeting_room(params,data)
|
||||
content = json.loads(json.dumps(book_meeting))
|
||||
print("room type :", content)
|
||||
return JsonResponse(content)
|
||||
except Exception as ex:
|
||||
return JsonResponse(str(ex))
|
||||
|
||||
@require_POST
|
||||
def room_chat(request):
|
||||
|
||||
Reference in New Issue
Block a user