正在显示
5 个修改的文件
包含
10 行增加
和
11 行删除
@@ -27,7 +27,6 @@ func main() { | @@ -27,7 +27,6 @@ func main() { | ||
27 | if err != nil { | 27 | if err != nil { |
28 | fmt.Printf("启动kafka消息消费者失败 err%s \n", err) | 28 | fmt.Printf("启动kafka消息消费者失败 err%s \n", err) |
29 | logs.Error("启动kafka消息消费者失败:%s", err) | 29 | logs.Error("启动kafka消息消费者失败:%s", err) |
30 | - return | ||
31 | } | 30 | } |
32 | for { | 31 | for { |
33 | select { | 32 | select { |
@@ -793,7 +793,7 @@ func (service OrderInfoService) PageListOrderBonus(listOrderQuery query.ListOrde | @@ -793,7 +793,7 @@ func (service OrderInfoService) PageListOrderBonus(listOrderQuery query.ListOrde | ||
793 | return orders, cnt, nil | 793 | return orders, cnt, nil |
794 | } | 794 | } |
795 | 795 | ||
796 | -//GetOrderBestshopInfo 获取来源于海鲜干货订单的详情以及分红数据 | 796 | +//GetOrderBestshopInfo 获取来源于xiangmi订单的详情以及分红数据 |
797 | func (service OrderInfoService) GetOrderBestshopInfoWithBonus(orderBaseId int64, companyId int64) (interface{}, error) { | 797 | func (service OrderInfoService) GetOrderBestshopInfoWithBonus(orderBaseId int64, companyId int64) (interface{}, error) { |
798 | var ( | 798 | var ( |
799 | transactionContext, _ = factory.CreateTransactionContext(nil) | 799 | transactionContext, _ = factory.CreateTransactionContext(nil) |
@@ -877,12 +877,12 @@ func (service OrderInfoService) GetOrderBestshopInfoWithBonus(orderBaseId int64, | @@ -877,12 +877,12 @@ func (service OrderInfoService) GetOrderBestshopInfoWithBonus(orderBaseId int64, | ||
877 | orderData.PartnerInfo = partnerInfo.Partner | 877 | orderData.PartnerInfo = partnerInfo.Partner |
878 | orderBestshopData, err = orderBestshopRepository.FindOne(domain.OrderBestshopFindOneQuery{OrderId: orderData.DataFrom.DataId}) | 878 | orderBestshopData, err = orderBestshopRepository.FindOne(domain.OrderBestshopFindOneQuery{OrderId: orderData.DataFrom.DataId}) |
879 | if err != nil { | 879 | if err != nil { |
880 | - e := fmt.Sprintf("获取海鲜干货订单(order_bestshop)数据失败,id=%d,err=%s", orderData.DataFrom.DataId, err) | 880 | + e := fmt.Sprintf("获取xiangmi订单(order_bestshop)数据失败,id=%d,err=%s", orderData.DataFrom.DataId, err) |
881 | return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) | 881 | return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) |
882 | } | 882 | } |
883 | orderGoodBestshop, err = orderGoodBestshopRepository.Find(domain.OrderGoodBestshopFindQuery{OrderId: orderBestshopData.Id}) | 883 | orderGoodBestshop, err = orderGoodBestshopRepository.Find(domain.OrderGoodBestshopFindQuery{OrderId: orderBestshopData.Id}) |
884 | if err != nil { | 884 | if err != nil { |
885 | - e := fmt.Sprintf("获取海鲜干货订单货品(order_good_bestshop)数据失败,order_id=%d,err=%s", orderBestshopData.Id, err) | 885 | + e := fmt.Sprintf("获取xiangmi订单货品(order_good_bestshop)数据失败,order_id=%d,err=%s", orderBestshopData.Id, err) |
886 | return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) | 886 | return nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) |
887 | } | 887 | } |
888 | orderBestshopData.Goods = orderGoodBestshop | 888 | orderBestshopData.Goods = orderGoodBestshop |
@@ -27,7 +27,7 @@ func NewOrderInfoService(option map[string]interface{}) *SyncOrderService { | @@ -27,7 +27,7 @@ func NewOrderInfoService(option map[string]interface{}) *SyncOrderService { | ||
27 | return newService | 27 | return newService |
28 | } | 28 | } |
29 | 29 | ||
30 | -//SyncOrderFromBestshop 接收来源于海鲜干货小程序的订单数据 | 30 | +//SyncOrderFromBestshop 接收来源于xiangmi小程序的订单数据 |
31 | func (s SyncOrderService) SyncOrderFromBestshop(cmd command.CreateOrderFromBestshop) error { | 31 | func (s SyncOrderService) SyncOrderFromBestshop(cmd command.CreateOrderFromBestshop) error { |
32 | var ( | 32 | var ( |
33 | transactionContext, _ = factory.CreateTransactionContext(nil) | 33 | transactionContext, _ = factory.CreateTransactionContext(nil) |
@@ -186,7 +186,7 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord | @@ -186,7 +186,7 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord | ||
186 | } | 186 | } |
187 | } | 187 | } |
188 | if !canCopyOrder { | 188 | if !canCopyOrder { |
189 | - logs.Warning("公司未设置海鲜干货的小程序原始id; order_bestshop.id=%d", orderBestshop.Id) | 189 | + logs.Warning("公司未设置xiangmi小程序原始id; order_bestshop.id=%d", orderBestshop.Id) |
190 | return nil | 190 | return nil |
191 | } | 191 | } |
192 | var ( | 192 | var ( |
@@ -213,13 +213,13 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord | @@ -213,13 +213,13 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord | ||
213 | for i := range ordergoods { | 213 | for i := range ordergoods { |
214 | ordergoods[i].OrderId = orderbase.Id | 214 | ordergoods[i].OrderId = orderbase.Id |
215 | } | 215 | } |
216 | - //TODO 添加goods | 216 | + // 添加goods |
217 | err = orderGoodRepository.Save(ordergoods) | 217 | err = orderGoodRepository.Save(ordergoods) |
218 | if err != nil { | 218 | if err != nil { |
219 | e := fmt.Sprintf("添加order_good数据失败%s", err) | 219 | e := fmt.Sprintf("添加order_good数据失败%s", err) |
220 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) | 220 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e) |
221 | } | 221 | } |
222 | - //TODO 更新isCopy | 222 | + // 更新isCopy |
223 | orderBestshop.IsCopy = true | 223 | orderBestshop.IsCopy = true |
224 | err = orderBestshopRepository.Edit(orderBestshop) | 224 | err = orderBestshopRepository.Edit(orderBestshop) |
225 | if err != nil { | 225 | if err != nil { |
@@ -28,7 +28,7 @@ func NewOrderBonusService(tcx *transaction.TransactionContext) *OrderBonusServic | @@ -28,7 +28,7 @@ func NewOrderBonusService(tcx *transaction.TransactionContext) *OrderBonusServic | ||
28 | } | 28 | } |
29 | 29 | ||
30 | //UpdateBounsWithGoodNumber 分红时,因修改订单中商品的数量发生分红变动 | 30 | //UpdateBounsWithGoodNumber 分红时,因修改订单中商品的数量发生分红变动 |
31 | -//目前只处理 海鲜干货的订单 即 order_type = OrderTypeBestShop (3) | 31 | +//目前只处理 xiangmi的订单 即 order_type = OrderTypeBestShop (3) |
32 | func (serve *OrderBonusService) UpdateBounsByGoodNumber(orderId int64, adminId int64, goodId int64, goodWithNumber int, reason string) error { | 32 | func (serve *OrderBonusService) UpdateBounsByGoodNumber(orderId int64, adminId int64, goodId int64, goodWithNumber int, reason string) error { |
33 | var ( | 33 | var ( |
34 | userRepository domain.UsersRepository | 34 | userRepository domain.UsersRepository |
@@ -129,7 +129,7 @@ func (serve *OrderBonusService) UpdateBounsByGoodNumber(orderId int64, adminId i | @@ -129,7 +129,7 @@ func (serve *OrderBonusService) UpdateBounsByGoodNumber(orderId int64, adminId i | ||
129 | } | 129 | } |
130 | 130 | ||
131 | //UpdateBounsByPartnerBonusPercent 分红时,因修改订单中商品的合伙人分行比例发生分红变动 | 131 | //UpdateBounsByPartnerBonusPercent 分红时,因修改订单中商品的合伙人分行比例发生分红变动 |
132 | -////目前只处理 海鲜干货的订单 即 order_type = OrderTypeBestShop (3) | 132 | +////目前只处理 xiangmi的订单 即 order_type = OrderTypeBestShop (3) |
133 | func (serve *OrderBonusService) UpdateBounsByPartnerBonusPercent(orderId int64, adminId int64, goodId int64, partnerPercent float64, reason string) error { | 133 | func (serve *OrderBonusService) UpdateBounsByPartnerBonusPercent(orderId int64, adminId int64, goodId int64, partnerPercent float64, reason string) error { |
134 | var ( | 134 | var ( |
135 | userRepository domain.UsersRepository | 135 | userRepository domain.UsersRepository |
@@ -82,7 +82,7 @@ func StartConsumer(ctx context.Context) (func(), error) { | @@ -82,7 +82,7 @@ func StartConsumer(ctx context.Context) (func(), error) { | ||
82 | config.Version = sarama.V0_11_0_2 | 82 | config.Version = sarama.V0_11_0_2 |
83 | consumerGroup, err := sarama.NewConsumerGroup(consumer.kafkaHosts, consumer.groupId, config) | 83 | consumerGroup, err := sarama.NewConsumerGroup(consumer.kafkaHosts, consumer.groupId, config) |
84 | if err != nil { | 84 | if err != nil { |
85 | - return nil, err | 85 | + return func() {}, err |
86 | } | 86 | } |
87 | wg := &sync.WaitGroup{} | 87 | wg := &sync.WaitGroup{} |
88 | wg.Add(1) | 88 | wg.Add(1) |
-
请 注册 或 登录 后发表评论