chenjunkai %!s(int64=6) %!d(string=hai) anos
pai
achega
68025e8e98
Modificáronse 1 ficheiros con 1 adicións e 14 borrados
  1. 1 14
      Controller/DeviceMeal.py

+ 1 - 14
Controller/DeviceMeal.py

@@ -158,25 +158,12 @@ class DeviceMeal(View):
         id = request_dict.get('id', None)
         status = request_dict.get('status', None)
         uid = request_dict.get('uid', None)
-        channel = request_dict.get('channel', None)
-        rank = request_dict.get('rank', None)
-        param_flag = CommonService.get_param_flag(data=[status, uid, channel, rank, id])
+        param_flag = CommonService.get_param_flag(data=[status, uid,id])
         if param_flag is True:
             try:
-                store_meal = Store_Meal.objects.get(id=rank)
                 dmqs = Device_Meal.objects.get(id=id)
-                if rank != dmqs.rank_id:
-                    days = store_meal.day
-                    now_time = timezone.localtime(timezone.now())
-                    if now_time > dmqs.end_time:
-                        end_time = now_time + datetime.timedelta(days=int(days))
-                    else:
-                        end_time = dmqs.end_time + datetime.timedelta(days=int(days))
-                    dmqs.end_time = end_time
                 dmqs.status = status
                 dmqs.uid = uid
-                dmqs.channel = channel
-                dmqs.rank = store_meal
                 dmqs.save()
             except Exception as e:
                 errorInfo = traceback.format_exc()