|
@@ -130,8 +130,8 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
|
|
|
SampleNum: conv.MustInt(request.SampleNum, 0),
|
|
|
RemainNum: conv.MustInt(request.SampleNum, 0),
|
|
|
CommissionRate: conv.MustInt(request.CommissionRate, 0),
|
|
|
- TaskReward: conv.MustString(request.TaskReward, "0"),
|
|
|
- SettlementAmount: conv.MustString(request.SettlementAmount, "0"),
|
|
|
+ TaskReward: conv.MustString(request.TaskReward, ""),
|
|
|
+ SettlementAmount: conv.MustString(request.SettlementAmount, ""),
|
|
|
EstimatedCost: estimatedCostToString,
|
|
|
SampleCondition: request.SampleCondition,
|
|
|
RewardCondition: request.RewardCondition,
|
|
@@ -141,7 +141,7 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
|
|
|
ProductPhotoSnap: string(productPhotosToJson),
|
|
|
CreatedAt: selectionInfo.CreatedAt,
|
|
|
UpdatedAt: time.Now(),
|
|
|
- //SubmitAt: time.Now(),
|
|
|
+ SubmitAt: time.Now(),
|
|
|
}
|
|
|
// 合并传入参数和数据表中原记录,若传入参数字段值为空,则将字段赋值为原记录中值
|
|
|
//fmt.Printf("MergeTest %+v %+v", updateSelection, selectionInfo)
|
|
@@ -170,7 +170,7 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
|
|
|
for _, v := range request.SecBrief {
|
|
|
brief := gorm_model.YounggeeSecBrief{
|
|
|
SelectionID: selectionInfo.SelectionID,
|
|
|
- FileUid: v.PhotoUid,
|
|
|
+ FileUid: conv.MustString(v.PhotoUid, ""),
|
|
|
FileName: v.Name,
|
|
|
FileUrl: v.PhotoUrl,
|
|
|
CreatedAt: time.Now(),
|
|
@@ -192,7 +192,7 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
|
|
|
for _, v := range request.SecExample {
|
|
|
Example := gorm_model.YounggeeSecExample{
|
|
|
SelectionID: selectionInfo.SelectionID,
|
|
|
- FileUid: v.PhotoUid,
|
|
|
+ FileUid: conv.MustString(v.PhotoUid, ""),
|
|
|
FileName: v.Name,
|
|
|
FileUrl: v.PhotoUrl,
|
|
|
CreatedAt: time.Now(),
|