Skip to content

Commit 9c2df21

Browse files
committed
Merge branch 'marketingcampaign' into dev
2 parents a9c185a + dd32372 commit 9c2df21

54 files changed

Lines changed: 867 additions & 88 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docker-compose-windows.override.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,16 @@ services:
9595
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
9696
- EventBusConnection=rabbitmq
9797
ports:
98-
- "5109:80"
98+
- "5109:80"
99+
100+
marketing.api:
101+
environment:
102+
- ASPNETCORE_ENVIRONMENT=Development
103+
- ASPNETCORE_URLS=http://0.0.0.0:80
104+
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
105+
- EventBusConnection=rabbitmq
106+
- MongoConnectionString=mongodb://nosql.data
107+
- MongoDatabase=MarketingDb
108+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
109+
ports:
110+
- "5110:80"

docker-compose-windows.prod.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,19 @@ services:
7575
- BasketUrl=http://basket.api
7676
ports:
7777
- "5100:80"
78-
78+
79+
marketing.api:
80+
environment:
81+
- ASPNETCORE_ENVIRONMENT=Production
82+
- ASPNETCORE_URLS=http://0.0.0.0:80
83+
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
84+
- EventBusConnection=rabbitmq
85+
- MongoConnectionString=mongodb://nosql.data
86+
- MongoDatabase=MarketingDb
87+
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
88+
ports:
89+
- "5110:80"
90+
7991
sql.data:
8092
environment:
8193
- SA_PASSWORD=Pass@word

docker-compose-windows.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,19 @@ services:
6161
dockerfile: Dockerfile
6262
depends_on:
6363
- nosql.data
64-
64+
- rabbitmq
65+
66+
marketing.api:
67+
image: eshop/marketing.api
68+
build:
69+
context: ./src/Services/Marketing/Marketing.API
70+
dockerfile: Dockerfile
71+
depends_on:
72+
- sql.data
73+
- nosql.data
74+
- identity.api
75+
- rabbitmq
76+
6577
sql.data:
6678
image: microsoft/mssql-server-windows
6779

docker-compose.override.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ services:
5858
- ASPNETCORE_ENVIRONMENT=Development
5959
- ASPNETCORE_URLS=http://0.0.0.0:80
6060
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
61+
- MongoConnectionString=mongodb://nosql.data
62+
- MongoDatabase=MarketingDb
63+
- EventBusConnection=rabbitmq
6164
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
6265
ports:
6366
- "5110:80"

docker-compose.prod.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ services:
5959
- ASPNETCORE_ENVIRONMENT=Production
6060
- ASPNETCORE_URLS=http://0.0.0.0:80
6161
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
62+
- MongoConnectionString=mongodb://nosql.data
63+
- MongoDatabase=MarketingDb
64+
- EventBusConnection=rabbitmq
6265
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
6366
ports:
6467
- "5110:80"

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ services:
5353
dockerfile: Dockerfile
5454
depends_on:
5555
- sql.data
56+
- nosql.data
5657
- identity.api
58+
- rabbitmq
5759

5860
webspa:
5961
image: eshop/webspa
@@ -112,3 +114,4 @@ services:
112114
dockerfile: Dockerfile
113115
depends_on:
114116
- nosql.data
117+
- rabbitmq

eShopOnContainers-ServicesAndWebApps.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26430.6
4+
VisualStudioVersion = 15.0.26430.12
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}"
77
EndProject

src/Services/Location/Locations.API/Controllers/LocationsController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task<IActionResult> GetAllLocations()
4141
//GET api/v1/[controller]/1
4242
[Route("{locationId}")]
4343
[HttpGet]
44-
public async Task<IActionResult> GetLocation(string locationId)
44+
public async Task<IActionResult> GetLocation(int locationId)
4545
{
4646
var location = await _locationsService.GetLocation(locationId);
4747
return Ok(location);
@@ -54,6 +54,7 @@ public async Task<IActionResult> CreateOrUpdateUserLocation([FromBody]LocationRe
5454
{
5555
var userId = _identityService.GetUserIdentity();
5656
var result = await _locationsService.AddOrUpdateUserLocation(userId, newLocReq);
57+
5758
return result ?
5859
(IActionResult)Ok() :
5960
(IActionResult)BadRequest();

src/Services/Location/Locations.API/Infrastructure/LocationsContextSeed.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ static async Task SetUSLocations()
3232
var us = new Locations()
3333
{
3434
Code = "US",
35-
Description = "United States"
35+
Description = "United States",
36+
LocationId = 1
3637
};
3738
us.SetLocation(-101.357386, 41.650455);
3839
us.SetArea(GetUSPoligon());
@@ -46,7 +47,8 @@ static async Task SetWashingtonLocations(string parentId)
4647
{
4748
Parent_Id = parentId,
4849
Code = "WHT",
49-
Description = "Washington"
50+
Description = "Washington",
51+
LocationId = 2
5052
};
5153
wht.SetLocation(-119.542781, 47.223652);
5254
wht.SetArea(GetWashingtonPoligon());
@@ -61,7 +63,8 @@ static async Task SetSeattleLocations(string parentId)
6163
{
6264
Parent_Id = parentId,
6365
Code = "SEAT",
64-
Description = "Seattle"
66+
Description = "Seattle",
67+
LocationId = 3
6568
};
6669
stl.SetArea(GetSeattlePoligon());
6770
stl.SetLocation(-122.330747, 47.603111);
@@ -74,7 +77,8 @@ static async Task SetRedmondLocations(string parentId)
7477
{
7578
Parent_Id = parentId,
7679
Code = "REDM",
77-
Description = "Redmond"
80+
Description = "Redmond",
81+
LocationId = 4
7882
};
7983
rdm.SetLocation(-122.122887, 47.674961);
8084
rdm.SetArea(GetRedmondPoligon());

src/Services/Location/Locations.API/Infrastructure/Repositories/ILocationsRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public interface ILocationsRepository
99
{
10-
Task<Locations> GetAsync(string locationId);
10+
Task<Locations> GetAsync(int locationId);
1111

1212
Task<List<Locations>> GetLocationListAsync();
1313

0 commit comments

Comments
 (0)