Exemplo n.º 1
0
        /// <summary>
        /// 获取默认分佣比
        /// </summary>
        /// <param name="shopId"></param>
        public static DistributionShopRateConfigInfo GetDefaultBrokerageRate(long shopId)
        {
            var result = _iDistributionService.GetDefaultBrokerageRate(shopId);

            if (result == null)
            {
                result = new DistributionShopRateConfigInfo()
                {
                    ShopId         = shopId,
                    BrokerageRate1 = 0,
                    BrokerageRate2 = 0,
                    BrokerageRate3 = 0,
                };
                _iDistributionService.UpdateDefaultBrokerageRate(shopId, result);
                result = _iDistributionService.GetDefaultBrokerageRate(shopId);
            }
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 修改默认分佣比
 /// </summary>
 /// <param name="shopId"></param>
 /// <param name="data"></param>
 public static void UpdateDefaultBrokerageRate(long shopId, DistributionShopRateConfigInfo data)
 {
     _iDistributionService.UpdateDefaultBrokerageRate(shopId, data);
 }