Skip to content

Commit

Permalink
refactor(marketing): 将注册福利发放日期延后到9.30 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
longyue0521 authored and flycash committed Jun 30, 2024
1 parent 5e24751 commit acea275
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .script/integration_test_compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
mysql8:
image: mysql:8.0.29
Expand Down
6 changes: 3 additions & 3 deletions internal/marketing/internal/integration/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ func (s *ModuleTestSuite) TestConsumer_ConsumeUserRegistrationEvent() {
mockConsumer.EXPECT().Consume(gomock.Any()).Return(s.newUserRegistrationEventMessage(t, evt), nil).Times(2)

mockProducer := mocks.NewMockProducer(ctrl)
endAtDate := time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)
endAtDate := time.Date(2024, 9, 30, 23, 59, 59, 0, time.UTC)
memberEvent := s.newMemberEventMessage(t, event.MemberEvent{
Key: fmt.Sprintf("user-registration-%d", evt.Uid),
Uid: evt.Uid,
Expand Down Expand Up @@ -1062,7 +1062,7 @@ func (s *ModuleTestSuite) TestConsumer_ConsumeUserRegistrationEvent() {
mockConsumer.EXPECT().Consume(gomock.Any()).Return(s.newUserRegistrationEventMessage(t, evt), nil).Times(2)

mockProducer := mocks.NewMockProducer(ctrl)
endAtDate := time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)
endAtDate := time.Date(2024, 9, 30, 23, 59, 59, 0, time.UTC)
memberEvent := s.newMemberEventMessage(t, event.MemberEvent{
Key: fmt.Sprintf("user-registration-%d", evt.Uid),
Uid: evt.Uid,
Expand Down Expand Up @@ -1145,7 +1145,7 @@ func (s *ModuleTestSuite) TestConsumer_ConsumeUserRegistrationEvent() {
mockConsumer.EXPECT().Consume(gomock.Any()).Return(s.newUserRegistrationEventMessage(t, evt), nil).Times(2)

mockProducer := mocks.NewMockProducer(ctrl)
endAtDate := time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)
endAtDate := time.Date(2024, 9, 30, 23, 59, 59, 0, time.UTC)
memberEvent := s.newMemberEventMessage(t, event.MemberEvent{
Key: fmt.Sprintf("user-registration-%d", evt.Uid),
Uid: evt.Uid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s *ActivityExecutor) Execute(ctx context.Context, act domain.UserRegistrat
}

func (s *ActivityExecutor) awardRegistrationBonus(ctx context.Context, act domain.UserRegistrationActivity) error {
endAtDate := time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)
endAtDate := time.Date(2024, 9, 30, 23, 59, 59, 0, time.UTC)
if endAtDate.Before(time.Now()) {
return nil
}
Expand Down

0 comments on commit acea275

Please sign in to comment.