|
|
@@ -249,22 +249,23 @@ type AdminRewardOperateReq struct { |
|
|
|
} |
|
|
|
|
|
|
|
type RewardOperateRecordShow struct { |
|
|
|
SerialNo string |
|
|
|
Status string |
|
|
|
OperateType string |
|
|
|
SourceId string |
|
|
|
Amount int64 |
|
|
|
LossAmount int64 |
|
|
|
BalanceAfter int64 |
|
|
|
Remark string |
|
|
|
SourceType string |
|
|
|
UserName string |
|
|
|
LastOperateDate timeutil.TimeStamp |
|
|
|
UnitPrice int64 |
|
|
|
SuccessCount int |
|
|
|
Action *ActionShow |
|
|
|
Cloudbrain *CloudbrainShow |
|
|
|
AdminLog *RewardAdminLogShow |
|
|
|
SerialNo string |
|
|
|
Status string |
|
|
|
OperateType string |
|
|
|
SourceId string |
|
|
|
Amount int64 |
|
|
|
LossAmount int64 |
|
|
|
BalanceAfter int64 |
|
|
|
Remark string |
|
|
|
SourceType string |
|
|
|
SourceTemplateId string |
|
|
|
UserName string |
|
|
|
LastOperateDate timeutil.TimeStamp |
|
|
|
UnitPrice int64 |
|
|
|
SuccessCount int |
|
|
|
Action *ActionShow |
|
|
|
Cloudbrain *CloudbrainShow |
|
|
|
AdminLog *RewardAdminLogShow |
|
|
|
} |
|
|
|
|
|
|
|
func getPointOperateRecord(tl *RewardOperateRecord) (*RewardOperateRecord, error) { |
|
|
@@ -419,7 +420,7 @@ func GetRewardRecordShowList(opts *RewardRecordListOpts) (RewardRecordShowList, |
|
|
|
r := make([]*RewardOperateRecordShow, 0) |
|
|
|
err = x.Table("reward_operate_record").Cols("reward_operate_record.source_id", "reward_operate_record.serial_no", |
|
|
|
"reward_operate_record.status", "reward_operate_record.operate_type", "reward_operate_record.amount", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", "reward_operate_record.source_template_id", |
|
|
|
"reward_operate_record.last_operate_unix as last_operate_date"). |
|
|
|
Where(cond).Limit(opts.PageSize, (opts.Page-1)*opts.PageSize).OrderBy(string(opts.OrderBy)).Find(&r) |
|
|
|
|
|
|
@@ -441,7 +442,7 @@ func GetAdminRewardRecordShowList(opts *RewardRecordListOpts) (RewardRecordShowL |
|
|
|
case OperateTypeIncrease: |
|
|
|
err = x.Table("reward_operate_record").Cols("reward_operate_record.source_id", "reward_operate_record.serial_no", |
|
|
|
"reward_operate_record.status", "reward_operate_record.operate_type", "reward_operate_record.amount", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", "reward_operate_record.source_template_id", |
|
|
|
"reward_operate_record.last_operate_unix as last_operate_date", "public.user.name as user_name", |
|
|
|
"point_account_log.balance_after"). |
|
|
|
Join("LEFT", "public.user", "reward_operate_record.user_id = public.user.id"). |
|
|
@@ -450,7 +451,7 @@ func GetAdminRewardRecordShowList(opts *RewardRecordListOpts) (RewardRecordShowL |
|
|
|
case OperateTypeDecrease: |
|
|
|
err = x.Table("reward_operate_record").Cols("reward_operate_record.source_id", "reward_operate_record.serial_no", |
|
|
|
"reward_operate_record.status", "reward_operate_record.operate_type", "reward_operate_record.amount", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", |
|
|
|
"reward_operate_record.loss_amount", "reward_operate_record.remark", "reward_operate_record.source_type", "reward_operate_record.source_template_id", |
|
|
|
"reward_operate_record.last_operate_unix as last_operate_date", "public.user.name as user_name", |
|
|
|
"reward_periodic_task.amount as unit_price", "reward_periodic_task.success_count"). |
|
|
|
Join("LEFT", "public.user", "reward_operate_record.user_id = public.user.id"). |
|
|
|