Example #1
0
 /// <summary>
 /// 修改店铺银行帐户
 /// </summary>
 /// <param name="bankAccount"></param>
 public static void UpdateBankAccount(Himall.DTO.BankAccount bankAccount)
 {
     Himall.Model.ShopInfo shopInfo = _iShopService.GetShop(bankAccount.ShopId);
     shopInfo.BankAccountName   = bankAccount.BankAccountName;
     shopInfo.BankAccountNumber = bankAccount.BankAccountNumber;
     shopInfo.BankCode          = bankAccount.BankCode;
     shopInfo.BankName          = bankAccount.BankName;
     shopInfo.BankRegionId      = bankAccount.BankRegionId;
     _iShopService.UpdateShop(shopInfo);
     Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(bankAccount.ShopId, false));
     Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(bankAccount.ShopId, true));
 }
Example #2
0
 /// <summary>
 /// 修改店铺微信帐户
 /// </summary>
 /// <param name="weChatAccount"></param>
 public static void UpdateWeChatAccount(Himall.DTO.WeChatAccount weChatAccount)
 {
     Himall.Model.ShopInfo shopInfo = _iShopService.GetShop(weChatAccount.ShopId);
     shopInfo.WeiXinOpenId   = weChatAccount.WeiXinOpenId;
     shopInfo.WeiXinSex      = weChatAccount.Sex.Equals("男") ? 1 : 0;
     shopInfo.WeiXinTrueName = weChatAccount.WeiXinRealName;
     shopInfo.WeiXinNickName = weChatAccount.WeiXinNickName;
     shopInfo.WeiXinAddress  = weChatAccount.Address;
     shopInfo.WeiXinImg      = weChatAccount.Logo;
     _iShopService.UpdateShop(shopInfo);
     Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(weChatAccount.ShopId, false));
     Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(weChatAccount.ShopId, true));
 }
Example #3
0
        /// <summary>
        /// 商家入驻店铺信息更新
        /// </summary>
        /// <param name="model"></param>
        /// <param name="ShopId"></param>
        /// <returns>0、失败;1、成功;-1、店铺名称已经存在</returns>
        public static int UpdateShop(Himall.DTO.ShopProfileStep3 model, long ShopId)
        {
            int result = 0;

            if (_iShopService.ExistShop(model.ShopName, ShopId))
            {
                result = -1;
            }
            else
            {
                Himall.Model.ShopInfo shopInfo = _iShopService.GetShop(ShopId);
                shopInfo.Id       = ShopId;
                shopInfo.ShopName = model.ShopName;
                shopInfo.GradeId  = model.ShopGrade;
                shopInfo.Stage    = Himall.Model.ShopInfo.ShopStage.UploadPayOrder;
                IEnumerable <long> shopCategories = model.Categories;
                _iShopService.UpdateShop(shopInfo, shopCategories);
                Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(ShopId, false));
                Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(ShopId, true));
                result = 1;
            }
            return(result);
        }