コード例 #1
0
        public object Do_CheckAsnGoods(BaseApi baseApi)
        {
            CheckAsnGoodsParam checkAsnGoodsParam = JsonConvert.DeserializeObject <CheckAsnGoodsParam>(baseApi.param.ToString());

            if (checkAsnGoodsParam == 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.CheckAsnGoods(storeUser.storeId, checkAsnGoodsParam.goodsId, storeUser.storeUserId))
            {
                throw new ApiException(CodeMessage.CheckAsnGoodsError, "CheckAsnGoodsError");
            }

            return("");
        }