Compare commits
No commits in common. "main" and "dev-lzh" have entirely different histories.
@ -112,22 +112,6 @@ func UpdateOrderRecordByOrderNO(orderRecord *model.BundleOrderRecords) (res *bun
|
|||||||
valueAdd.CheckoutSessionId = orderRecord.CheckoutSessionId
|
valueAdd.CheckoutSessionId = orderRecord.CheckoutSessionId
|
||||||
valueAdd.CheckoutSessionUrl = orderRecord.CheckoutSessionUrl
|
valueAdd.CheckoutSessionUrl = orderRecord.CheckoutSessionUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
if orderRecord.Status == 2 {
|
|
||||||
tempValues := make([]*model.BundleOrderValueAdd, 0)
|
|
||||||
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderValueAdd{}).
|
|
||||||
Where("order_no = ?", orderRecord.OrderNo).
|
|
||||||
Find(&tempValues).Error
|
|
||||||
if len(tempValues) > 0 {
|
|
||||||
for _, value := range tempValues {
|
|
||||||
if value.PaymentStatus == 2 {
|
|
||||||
fmt.Println("====================已经付过了")
|
|
||||||
return nil, errors.New("已付款了")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderValueAdd{}).
|
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderValueAdd{}).
|
||||||
Where("order_no = ?", orderRecord.OrderNo).
|
Where("order_no = ?", orderRecord.OrderNo).
|
||||||
Updates(valueAdd).Error
|
Updates(valueAdd).Error
|
||||||
@ -468,9 +452,6 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
|
|||||||
if req.OrderAddCreateAtStart != "" && req.OrderAddCreateAtEnd != "" {
|
if req.OrderAddCreateAtStart != "" && req.OrderAddCreateAtEnd != "" {
|
||||||
modelObj = modelObj.Where("bundle_order_records.created_at between ? and ?", req.OrderAddCreateAtStart, req.OrderAddCreateAtEnd)
|
modelObj = modelObj.Where("bundle_order_records.created_at between ? and ?", req.OrderAddCreateAtStart, req.OrderAddCreateAtEnd)
|
||||||
}
|
}
|
||||||
if req.BundlePayStart != "" && req.BundlePayEnd != "" {
|
|
||||||
modelObj = modelObj.Where("bundle_order_records.pay_time between ? and ?", req.BundlePayStart, req.BundlePayEnd)
|
|
||||||
}
|
|
||||||
err = modelObj.Count(&count).Error
|
err = modelObj.Count(&count).Error
|
||||||
if req.PageSize != 0 && req.Page != 0 {
|
if req.PageSize != 0 && req.Page != 0 {
|
||||||
modelObj = modelObj.Limit(int(req.PageSize)).Offset(int(req.Page-1) * int(req.PageSize))
|
modelObj = modelObj.Limit(int(req.PageSize)).Offset(int(req.Page-1) * int(req.PageSize))
|
||||||
@ -496,7 +477,6 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
|
|||||||
BundleCreateAt: record.CreatedAt.Format("2006-01-02 15:04:05"),
|
BundleCreateAt: record.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||||
Amount: record.Amount,
|
Amount: record.Amount,
|
||||||
CustomerId: customerID,
|
CustomerId: customerID,
|
||||||
PayTime: record.PayTime,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 聚合子订单
|
// 聚合子订单
|
||||||
@ -513,7 +493,6 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
|
|||||||
OrderAddNo: orderAddNo,
|
OrderAddNo: orderAddNo,
|
||||||
Amount: amount,
|
Amount: amount,
|
||||||
CurrencyType: int32(sub.CurrencyType),
|
CurrencyType: int32(sub.CurrencyType),
|
||||||
HandlingFee: sub.HandlingFee, //手续费
|
|
||||||
OrderAddCreateAt: sub.CreatedAt.Format("2006-01-02 15:04:05"),
|
OrderAddCreateAt: sub.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||||
AddPayStatus: int32(sub.PaymentStatus),
|
AddPayStatus: int32(sub.PaymentStatus),
|
||||||
Contract: sub.SignContract,
|
Contract: sub.SignContract,
|
||||||
|
@ -65,7 +65,6 @@ type BundleOrderValueAdd struct {
|
|||||||
Snapshot string `gorm:"column:snapshot;comment:快照" json:"snapshot"` //订单快照
|
Snapshot string `gorm:"column:snapshot;comment:快照" json:"snapshot"` //订单快照
|
||||||
CheckoutSessionId string `json:"checkoutSessionId" gorm:"column:checkout_session_id;type:varchar(1024);default:null;comment:checkoutSessionId"`
|
CheckoutSessionId string `json:"checkoutSessionId" gorm:"column:checkout_session_id;type:varchar(1024);default:null;comment:checkoutSessionId"`
|
||||||
CheckoutSessionUrl string `json:"checkoutSessionUrl" gorm:"column:checkout_session_url;type:varchar(1024);default:null;comment:checkoutSessionUrl"`
|
CheckoutSessionUrl string `json:"checkoutSessionUrl" gorm:"column:checkout_session_url;type:varchar(1024);default:null;comment:checkoutSessionUrl"`
|
||||||
HandlingFee string `gorm:"column:handling_fee;comment:手续费" json:"handlingFee"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 财务确认状态
|
// 财务确认状态
|
||||||
|
@ -180,8 +180,6 @@ message OrderRecordsRequestV2{
|
|||||||
int32 page = 12;
|
int32 page = 12;
|
||||||
int32 pageSize = 13;
|
int32 pageSize = 13;
|
||||||
repeated int64 userIds = 14;
|
repeated int64 userIds = 14;
|
||||||
string bundlePayStart = 15;
|
|
||||||
string bundlePayEnd = 16;
|
|
||||||
}
|
}
|
||||||
message OrderRecordsResponseV2{
|
message OrderRecordsResponseV2{
|
||||||
repeated OrderBundleRecordInfo bundleInfo = 1;
|
repeated OrderBundleRecordInfo bundleInfo = 1;
|
||||||
@ -199,14 +197,13 @@ message OrderBundleRecordInfo{
|
|||||||
float amount = 7;
|
float amount = 7;
|
||||||
repeated OrderAddBundleRecordInfo addBundleInfo = 8;
|
repeated OrderAddBundleRecordInfo addBundleInfo = 8;
|
||||||
int64 customerId = 9;
|
int64 customerId = 9;
|
||||||
string payTime = 10;
|
|
||||||
}
|
}
|
||||||
message OrderAddBundleRecordInfo{
|
message OrderAddBundleRecordInfo{
|
||||||
string orderAddNo = 1;
|
string orderAddNo = 1;
|
||||||
float amount = 2;
|
float amount = 2;
|
||||||
float settlementAmount = 3;
|
float settlementAmount = 3;
|
||||||
int32 currencyType = 4;
|
int32 currencyType = 4;
|
||||||
string handlingFee = 5;
|
float handlingFee = 5;
|
||||||
float exchangeRate = 6;
|
float exchangeRate = 6;
|
||||||
string orderAddCreateAt = 7;
|
string orderAddCreateAt = 7;
|
||||||
int32 addPayStatus = 8;
|
int32 addPayStatus = 8;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user