Esempio n. 1
0
        private string BatchSetSort(HttpContext context)
        {
            string sort = context.Request["sort"];
            string pids = context.Request["pids"];

            if (string.IsNullOrEmpty(sort))
            {
                apiResp.msg  = "排序不能为空";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                return(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
            }
            if (string.IsNullOrEmpty(pids))
            {
                apiResp.msg  = "商品ID不能为空";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                return(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
            }
            int count = bllMall.Update(new WXMallProductInfo(), string.Format(" Sort={0}", int.Parse(sort)), string.Format(" WebsiteOwner='{0}' AND PID IN ({1})", bllMall.WebsiteOwner, pids));

            if (count > 0)
            {
                BLLRedis.ClearProductByIds(bllMall.WebsiteOwner, pids, false);
                BLLRedis.ClearProductList(bllMall.WebsiteOwner);
                apiResp.msg    = "操作完成";
                apiResp.status = true;
            }
            else
            {
                apiResp.msg  = "操作出错";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.OperateFail;
            }
            return(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
        }
Esempio n. 2
0
        /// <summary>
        /// 审核通过
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string NoPass(HttpContext context)
        {
            string        ids    = context.Request["ids"];
            List <string> IdList = ids.Split(',').ToList();

            for (int i = 0; i < IdList.Count; i++)
            {
                if (string.IsNullOrWhiteSpace(IdList[i]))
                {
                    continue;
                }
                bllReview.UpdateByKey <ReviewInfo>("AutoId", IdList[i], "AuditStatus", "2");
            }
            BLLRedis.ClearProductList(bllReview.WebsiteOwner);
            resp.Status = 1;
            resp.Msg    = "审核不通过";
            return(Common.JSONHelper.ObjectToJson(resp));
        }