2025-11-11 19:49:52 +00:00
|
|
|
|
# Yeni Modul Ekleme
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
`abp new Erp.Notification -t module --no-ui -m none --database-provider ef --version 7.2.2 --old`
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
# Code Format
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
`dotnet format --include .\modules\Erp.Notification\ --folder`
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
# Migrations
|
|
|
|
|
|
|
|
|
|
|
|
- Yeni migration ekleme
|
|
|
|
|
|
`EntityFrameworkCore projesine gir`
|
|
|
|
|
|
`dotnet ef migrations add ""`
|
|
|
|
|
|
`dotnet ef database update`
|
|
|
|
|
|
|
|
|
|
|
|
- Son migrationi siler ve snapshot revert eder
|
|
|
|
|
|
`dotnet ef migrations remove`
|
|
|
|
|
|
`dotnet ef database update "20240822114716_ABP_822"`
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- SQL Veritabanını Entity Class oluştur.
|
2025-05-06 11:03:45 +00:00
|
|
|
|
`dotnet ef dbcontext scaffold "Server=SERVERNAME;Database=DBNAME;User ID=USERNAME;Password=PASSWORD;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer --context MyDbContext --output-dir Models --data-annotations --force`
|
|
|
|
|
|
|
2025-07-27 18:57:19 +00:00
|
|
|
|
# Custom Endpoints
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
```
|
2025-11-11 19:49:52 +00:00
|
|
|
|
Token İsteği Örnek:
|
2025-05-06 06:45:49 +00:00
|
|
|
|
POST /connect/token HTTP/1.1
|
|
|
|
|
|
Host: localhost:44344
|
|
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
|
|
2025-05-06 11:03:45 +00:00
|
|
|
|
username=system%40sozsoft.com
|
2025-05-06 06:45:49 +00:00
|
|
|
|
&password=...
|
|
|
|
|
|
&grant_type=password
|
|
|
|
|
|
&client_id=Platform_PublicApi
|
|
|
|
|
|
&scope=offline_access%20Platform
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
## Whatsapp Ayarları
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- Normal facebook üyeliği yapılır.
|
|
|
|
|
|
- https://developers.facebook.com/ sitesinden yeni developer üyeliği oluşturulur. Developer üyeliği seçilir.
|
|
|
|
|
|
- CreateApp butonu ile yeni uygulama oluşturulur. Uygulama adı belirlenir. 'Erp Messenger'
|
|
|
|
|
|
- AppType olarak İşletme seçilir ve App oluşturulur.
|
|
|
|
|
|
- Add Products kısmında WhatsApp seçilir ve Business Account oluşturulur.
|
|
|
|
|
|
- 3 noktadan (menüden) WhatsApp Manager sayfasına gidilir. Manage Templates seçilir, istenirse yeni template oluşturulur. 'hello_world'
|
|
|
|
|
|
- WhatsApp Manager üzerinde menüden Settings -> Users -> System Users eklenir. Kullanıcı adı 'admin' ve Role ise 'Admin' seçilir.
|
|
|
|
|
|
- Eklenen 'admin' kullanıcısında 'Assign Assets' seçilir ve full yetki verilir.
|
|
|
|
|
|
- admin kullanıcısı üzerinden 'Generate Token' seçilir ve aşağıdaki yetkiler verilir.
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
- whatsapp_business_management'
|
|
|
|
|
|
- 'whatsapp_business_messaging'
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- WhatsApp -> API Setup kısmından "From" kısmında yeni telefon numarası eklenir.
|
|
|
|
|
|
- WhatsApp -> API Setup kısmından Generate Access Token oluşturulur.
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
- token: EAASM83pDJf0BO0ZCYBr3Fx4SES0ox8XiZCgP3FIteprYpwawZCkGYjpMlKk4OZCWgRNZC2Ttofgf8amMf929ZBuDcgYIOsXkPMGBNmVxm2czipzq63LmtbYfyCWsKVy0q1jtay0nRoeDuO2FKhqCfLLtNn9cSWjINVLcz26ptK8a2Oko83cZBzrNsp3cpIECnzqRfEjHdEz1U73y3ZB1MZBOhHilax7yZALf4ZA1Tmk
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- WhatsApp telefon numarasını Register etmek için aşağıdaki postman Curl gönderilir.
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
curl --location 'https://graph.facebook.com/v21.0/521106361082067/register' \
|
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
|
--header 'Authorization: Bearer <access token>' \
|
|
|
|
|
|
--data '{
|
|
|
|
|
|
"messaging_product": "whatsapp",
|
|
|
|
|
|
"pin": "238567"
|
|
|
|
|
|
}'
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- Message göndermek için url : https://graph.facebook.com/v21.0/521106361082067/messages
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
{
|
|
|
|
|
|
"messaging_product": "whatsapp",
|
2025-11-11 19:49:52 +00:00
|
|
|
|
"to": "{+gönderilecek gsm numarası}",
|
2025-05-06 06:45:49 +00:00
|
|
|
|
"type": "template",
|
|
|
|
|
|
"template": {
|
|
|
|
|
|
"name": "{message_template_name}",
|
|
|
|
|
|
"language": {
|
|
|
|
|
|
"code": "en"
|
|
|
|
|
|
},
|
|
|
|
|
|
"components": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "body",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "text",
|
2025-11-11 19:49:52 +00:00
|
|
|
|
"text": "Test mesajı"
|
2025-05-06 06:45:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# ABP Update
|
|
|
|
|
|
- https://abp.io/docs/latest/release-info/upgrading
|
|
|
|
|
|
- https://abp.io/docs/9.0/release-info/migration-guides/abp-9-0
|
|
|
|
|
|
- https://learn.microsoft.com/en-us/aspnet/core/migration/80-90?view=aspnetcore-9.0&tabs=visual-studio-code
|
2025-11-11 19:49:52 +00:00
|
|
|
|
- Adımlar:
|
|
|
|
|
|
- abp cli güncellenir dotnet tool update --global Volo.Abp.Cli
|
|
|
|
|
|
- abp update ile sln içindeki referanslar update edilir
|
|
|
|
|
|
- modules/ klasörü *.csproj içinde ara&düzenle ile update edilir (örn. 8.3.4 -> 9.0.2)
|
|
|
|
|
|
- .net sürümü arttıysa Microsoft'un dotnet upgrade dokümanı takip edilir
|
|
|
|
|
|
- Yeni dotnet sdk kurulumu yapılır (örn dotnet 9 sdk)
|
|
|
|
|
|
- ef tools güncellenir (dotnet tool update --global dotnet-ef)
|
|
|
|
|
|
- Dockerfile dosyalarındaki base imajlar yeni dotnet sürümüne güncellenir
|
|
|
|
|
|
- Abp upgrade dokümanı takip edilir
|
|
|
|
|
|
- Proje build olmuyorsa hatalar çözülür
|
|
|
|
|
|
- Yeni migration eklenir (varsa). Migration boş çıkıyorsa kaldırılır. (Örn dotnet ef migrations add Abp902 ve dotnet ef migrations remove)
|
|
|
|
|
|
- Migration boş değilse çalıştırılır (dotnet ef database update)
|
|
|
|
|
|
|