...
|
...
|
@@ -50,6 +50,8 @@ func (repo *RewardStandardRepository) Save(param *domain.RewardStandard) (*domai |
|
|
CreatedAt: param.CreatedAt,
|
|
|
UpdatedAt: param.UpdatedAt,
|
|
|
DeletedAt: param.DeletedAt,
|
|
|
CompanyId: param.CompanyId,
|
|
|
OrgId: param.OrgId,
|
|
|
}
|
|
|
tx := repo.transactionContext.PgTx
|
|
|
if param.Id == 0 {
|
...
|
...
|
@@ -117,13 +119,13 @@ func (repo *RewardStandardRepository) Find(queryOptions map[string]interface{}) |
|
|
query.Offset(v)
|
|
|
}
|
|
|
if v, ok := queryOptions["workshopId"]; ok {
|
|
|
query.Where("work_shop->>'workshopId'='?'", v)
|
|
|
query.Where("workshop->>'workshopId'='?'", v)
|
|
|
}
|
|
|
if v, ok := queryOptions["lineId"]; ok {
|
|
|
query.Where("product_line->>lineId='?'", v)
|
|
|
query.Where("product_line->>'lineId'='?'", v)
|
|
|
}
|
|
|
if v, ok := queryOptions["sectionId"]; ok {
|
|
|
query.Where("product_section->>sectionId='?'", v)
|
|
|
query.Where("product_section->>'sectionId'='?'", v)
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["targetType"]; ok {
|
...
|
...
|
@@ -168,5 +170,7 @@ func (repo *RewardStandardRepository) TransformToDomain(param *models.RewardStan |
|
|
CreatedAt: param.CreatedAt,
|
|
|
UpdatedAt: param.UpdatedAt,
|
|
|
DeletedAt: param.DeletedAt,
|
|
|
CompanyId: param.CompanyId,
|
|
|
OrgId: param.OrgId,
|
|
|
}
|
|
|
} |
...
|
...
|
|