Beispiel #1
0
        public object Do_PickupOrderGoods(BaseApi baseApi)
        {
            PickupOrderGoodsParam pickupOrderGoodsParam = JsonConvert.DeserializeObject <PickupOrderGoodsParam>(baseApi.param.ToString());

            if (pickupOrderGoodsParam == null)
            {
                throw new ApiException(CodeMessage.InvalidParam, "InvalidParam");
            }
            OpenDao   openDao   = new OpenDao();
            StoreUser storeUser = openDao.GetStoreUser(Utils.GetOpenID(baseApi.token));
            StoreDao  storeDao  = new StoreDao();

            if (!storeDao.UpdateOrderState(pickupOrderGoodsParam.orderId, storeUser.storeUserId))
            {
                throw new ApiException(CodeMessage.PickupGoodsError, "PickupGoodsError");
            }
            WsPayStateParam wsPayStateParam = new WsPayStateParam
            {
                scanCode = pickupOrderGoodsParam.code,
            };
            WsPayState wsPayState = new WsPayState
            {
                wsType = WsType.ORDER,
                Unique = wsPayStateParam.GetUnique(),
            };

            Utils.SetCache(wsPayState, 0, 0, 10);
            return("");
        }