Пример #1
0
        /// <summary>
        /// 添加一条记录
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public AddSearchManCheckResponse AddSearchManCheck(SearchManCheckDetail request)
        {
            var result = new AddSearchManCheckResponse();
            var req    = Mapper.Map <SearchManCheckDetail, AddSearchManCheckRequest>(request);

            result = MKMSClient.Send <AddSearchManCheckResponse>(req);
            return(result);
        }
Пример #2
0
        public ActionResult PlDetail(string pid, string key)
        {
            SearchManCheckDetail result = new SearchManCheckDetail();

            if (!string.IsNullOrEmpty(pid))
            {
                result = SearchManagementClient.Instance.QueryWebSearchManagementToAdd(pid);
            }
            if (!string.IsNullOrEmpty(key))
            {
                result.KeyWords = key;
            }
            return(View(result));
        }
Пример #3
0
        public JsonResult AddSearchManCheckEntity(SearchManCheckDetail model)
        {
            var result = new BaseResponse()
            {
                DoFlag = false, DoResult = "新增失败"
            };

            model.ProductIds = string.Join(",", model.ProductIds.Split(new string[] { ",", ",", "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)).TrimEnd(',');
            model.KeyWords   = string.Join(",", model.KeyWords.Split(new string[] { ",", ",", "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)).TrimEnd(',');
            model.CreateBy   = model.CreateBy > 0 ? model.CreateBy : UserInfo.UserSysNo;
            //model.UpdateBy = model.UpdateBy > 0 ? model.UpdateBy : UserInfo.UserSysNo;
            model.CreateDate = DateTime.Now;
            //model.UpdateDate = DateTime.Now;
            model.AuditState = 0;              // 新增记录时状态为待审核
            var res = SearchManagementClient.Instance.AddSearchManCheck(model);

            result.DoFlag   = res.DoFlag;
            result.DoResult = res.DoResult;
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        /// <summary>
        /// 如果先查询了商品有词,将词带到新页面
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        public SearchManCheckDetail QueryWebSearchManagementToAdd(string pid)
        {
            var result = new SearchManCheckDetail();
            var req    = new QueryWebSearchManagementEntity()
            {
                Pids = pid
            };
            var res = MKMSClient.Send <QueryWebSearchManagementEntityResponse>(req);

            if (res.DoFlag)
            {
                result.ProductIds = res.SearchManAddEntity.ProductIds;
                result.KeyWords   = res.SearchManAddEntity.KeyWords;
            }
            else
            {
                result.ProductIds = pid;
            }
            return(result);
        }