Compare commits
	
		
			3 Commits
		
	
	
		
			b415537dd7
			...
			ece5feb935
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ece5feb935 | |||
| 9b6549f141 | |||
| d85bfa4fa0 | 
| @ -138,6 +138,7 @@ func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (data mod | |||||||
| 		Where("bb.user_id = ?", req.UserId). | 		Where("bb.user_id = ?", req.UserId). | ||||||
| 		Where("bor.expiration_time > ?", time.Now()). | 		Where("bor.expiration_time > ?", time.Now()). | ||||||
| 		Where("bor.deleted_at IS NULL"). | 		Where("bor.deleted_at IS NULL"). | ||||||
|  | 		Order("bb.created_at desc"). | ||||||
| 		First(&data).Error | 		First(&data).Error | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return | 		return | ||||||
|  | |||||||
| @ -47,7 +47,7 @@ func BundleExtendRecordsList(req *bundle.BundleExtendRecordsListRequest) (*bundl | |||||||
| 		result := &bundle.BundleExtendRecordItem{} | 		result := &bundle.BundleExtendRecordItem{} | ||||||
| 		copier.Copy(result, &m) | 		copier.Copy(result, &m) | ||||||
| 		result.CreatedAt = uint64(m.CreatedAt.UnixMilli()) | 		result.CreatedAt = uint64(m.CreatedAt.UnixMilli()) | ||||||
| 		if result.Type == 2 {  // 自行购买的情况下操作人就是用户
 | 		if result.Type == 2 { // 自行购买的情况下操作人就是用户
 | ||||||
| 			result.OperatorName = result.UserName | 			result.OperatorName = result.UserName | ||||||
| 			result.OperatorPhoneNumber = result.UserPhoneNumber | 			result.OperatorPhoneNumber = result.UserPhoneNumber | ||||||
| 		} | 		} | ||||||
|  | |||||||
| @ -89,12 +89,13 @@ type BundleExtensionRecords struct { | |||||||
| 	ImagesAdditional            uint   `gorm:"column:images_additional;type:int(11) unsigned;comment:图文额外增加" json:"images_additional"` | 	ImagesAdditional            uint   `gorm:"column:images_additional;type:int(11) unsigned;comment:图文额外增加" json:"images_additional"` | ||||||
| 	DataAdditional              uint   `gorm:"column:data_additional;type:int(11) unsigned;comment:数据额外增加" json:"data_additional"` | 	DataAdditional              uint   `gorm:"column:data_additional;type:int(11) unsigned;comment:数据额外增加" json:"data_additional"` | ||||||
| 	AvailableDurationAdditional uint   `gorm:"column:available_duration_additional;type:int(11) unsigned;comment:可用时长增加" json:"available_duration_additional"` | 	AvailableDurationAdditional uint   `gorm:"column:available_duration_additional;type:int(11) unsigned;comment:可用时长增加" json:"available_duration_additional"` | ||||||
| 	TimeUnit                    uint   `gorm:"column:time_unit;type:int(11) unsigned;comment:时间单位" json:"timeUnit"` |  | ||||||
| 	Type                        int    `gorm:"column:type;type:tinyint(4);comment:类型 1:手动操作 2:自行购买" json:"type"` | 	Type                        int    `gorm:"column:type;type:tinyint(4);comment:类型 1:手动操作 2:自行购买" json:"type"` | ||||||
| 	Remark                      string `gorm:"column:remark;type:text;comment:备注" json:"remark"` | 	Remark                      string `gorm:"column:remark;type:text;comment:备注" json:"remark"` | ||||||
|  | 	AssociatedOrderNumber       string `gorm:"column:associated_order_number;type:varchar(256);comment:关联订单号" json:"associatedOrderNumber"` | ||||||
| 	OperatorId                  int    `gorm:"column:operator_id;type:int(11);comment:操作人id" json:"operator_id"` | 	OperatorId                  int    `gorm:"column:operator_id;type:int(11);comment:操作人id" json:"operator_id"` | ||||||
| 	OperatorName                string `gorm:"column:operator_name;type:varchar(256)" json:"operatorName"` | 	OperatorName                string `gorm:"column:operator_name;type:varchar(256)" json:"operatorName"` | ||||||
| 	OperatorPhoneNumber         string `gorm:"column:operator_phone_number;type:varchar(256)" json:"operatorPhoneNumber"` | 	OperatorPhoneNumber         string `gorm:"column:operator_phone_number;type:varchar(256)" json:"operatorPhoneNumber"` | ||||||
|  | 	TimeUnit                    uint   `gorm:"column:time_unit;type:int(11) unsigned;comment:时间单位" json:"timeUnit"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // TableName 表名称
 | // TableName 表名称
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user