Beispiel #1
0
        /// <summary>
        /// 根据小票编号获取小票信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public object Do_UpdateQRCoder(object param)
        {
            ItemParam itemParam = JsonConvert.DeserializeObject <ItemParam>(param.ToString());

            if (itemParam == null)
            {
                throw new ApiException(CodeMessage.InvalidParam, "InvalidParam");
            }
#if DEBUG
            var openId = itemParam.token;
#endif
#if !DEBUG
            AppBag appBag = AppContainer.GetAppBag(itemParam.token);
            if (appBag == null)
            {
                throw new ApiException(CodeMessage.GetUserError, "GetUserError");
            }
            var openId = appBag.Values;
#endif

            UserDao userDao = new UserDao();

            UserResult ur = new UserResult();
            ur.url = userDao.updateQRCode(openId);
            return(ur);
        }
Beispiel #2
0
        /// <summary>
        /// 根据小票编号获取小票信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public object Do_GetTicketItem(object param)
        {
            ItemParam itemParam = JsonConvert.DeserializeObject <ItemParam>(param.ToString());

            if (itemParam == null)
            {
                throw new ApiException(CodeMessage.InvalidParam, "InvalidParam");
            }
    #if DEBUG
            var openId = itemParam.token;
#endif
#if !DEBUG
            AppBag appBag = AppContainer.GetAppBag(itemParam.token);
            if (appBag == null)
            {
                throw new ApiException(CodeMessage.GetUserError, "GetUserError");
            }
            var openId = appBag.Values;
#endif

            TicketDao ticketDao = new TicketDao();

            return(ticketDao.getTicketItem(openId, itemParam.ticketNum));
        }