Updata:增加套餐类型字段
This commit is contained in:
parent
d11a7a5c6a
commit
0e64d40489
@ -194,9 +194,16 @@ func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (*bundle.
|
|||||||
if data.Activate != 2 {
|
if data.Activate != 2 {
|
||||||
return nil, errors.New("套餐未激活")
|
return nil, errors.New("套餐未激活")
|
||||||
}
|
}
|
||||||
|
var bundleStatus int32
|
||||||
|
if data.ExpiredTime < time.Now().Format("2006-01-02 15:04:05") {
|
||||||
|
bundleStatus = 1
|
||||||
|
} else {
|
||||||
|
bundleStatus = 0
|
||||||
|
}
|
||||||
result := &bundle.GetBundleBalanceByUserIdResp{
|
result := &bundle.GetBundleBalanceByUserIdResp{
|
||||||
OrderUUID: data.OrderUUID,
|
OrderUUID: data.OrderUUID,
|
||||||
BundleName: data.BundleName,
|
BundleName: data.BundleName,
|
||||||
|
BundleStatus: bundleStatus,
|
||||||
PayTime: data.StartAt.UnixMilli(),
|
PayTime: data.StartAt.UnixMilli(),
|
||||||
ExpiredTime: data.ExpiredAt.UnixMilli(),
|
ExpiredTime: data.ExpiredAt.UnixMilli(),
|
||||||
PaymentAmount: data.PaymentAmount,
|
PaymentAmount: data.PaymentAmount,
|
||||||
|
|||||||
@ -1066,7 +1066,7 @@ message GetBundleBalanceByUserIdResp{
|
|||||||
string orderUUID = 1;
|
string orderUUID = 1;
|
||||||
string bundleUuid = 2; // 套餐ID uuid
|
string bundleUuid = 2; // 套餐ID uuid
|
||||||
string bundleName = 3; // 套餐名称
|
string bundleName = 3; // 套餐名称
|
||||||
string bundleStatus = 4; // 套餐名称
|
int32 bundleStatus = 4; // 套餐状态是否过期 1 是 0 否
|
||||||
int64 payTime = 5;
|
int64 payTime = 5;
|
||||||
int64 expiredTime = 6;
|
int64 expiredTime = 6;
|
||||||
string paymentAmount = 7;
|
string paymentAmount = 7;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.5
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v6.32.0
|
// - protoc v5.26.0
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user