Compare commits
30 Commits
feat-zjy-f
...
main
Author | SHA1 | Date | |
---|---|---|---|
6cded5543f | |||
f0dbb9c9be | |||
76390c3f66 | |||
6c5ae80059 | |||
24e1eaed14 | |||
422d2acb5a | |||
5edac38772 | |||
61b7fedf0d | |||
17b557df77 | |||
64c56d5ca3 | |||
81e5d2f440 | |||
52c23bdd43 | |||
2edf4b82ae | |||
145486aec2 | |||
b149446170 | |||
24102eccbd | |||
383a64077d | |||
68dd832b32 | |||
346dcb1d94 | |||
de204751ac | |||
744328055c | |||
234d86896a | |||
402a7644e6 | |||
841ec173c4 | |||
87b7805c42 | |||
d5e4c9590f | |||
e9f12cd0eb | |||
e7a5e19472 | |||
76e2b893a1 | |||
0f40072e22 |
36
.gitignore
vendored
Normal file
36
.gitignore
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
*.iml
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
||||||
|
|
||||||
|
/cmd/runtime
|
||||||
|
/cmd/logs/*.log
|
||||||
|
/cmd/runtime/log/*.log
|
||||||
|
/build/*
|
||||||
|
.vscode
|
||||||
|
.idea/*
|
||||||
|
/.idea/*
|
2
clear.sh
2
clear.sh
@ -1,2 +1,4 @@
|
|||||||
|
protoc --proto_path=. --go_out=./pb --go-triple_out=./pb --govalidators_out=./pb ./pb/bundle.proto
|
||||||
ls pb/bundle/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
ls pb/bundle/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||||
|
|
||||||
|
|
||||||
|
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module micro-bundle
|
module micro-bundle
|
||||||
|
|
||||||
go 1.18
|
go 1.23.3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||||
|
@ -117,3 +117,13 @@ func (b *BundleProvider) UpdateReconciliationStatusBySerialNumber(_ context.Cont
|
|||||||
func (b *BundleProvider) DeleteValueAddService(_ context.Context, req *bundle.DeleteValueAddServiceRequest) (res *bundle.CommonResponse, err error) {
|
func (b *BundleProvider) DeleteValueAddService(_ context.Context, req *bundle.DeleteValueAddServiceRequest) (res *bundle.CommonResponse, err error) {
|
||||||
return logic.DeleteValueAddService(req)
|
return logic.DeleteValueAddService(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自动创建用户且实名且下订单
|
||||||
|
func (b *BundleProvider) ListUnfinishedInfos(_ context.Context, req *bundle.AutoCreateUserAndOrderRequest) (res *bundle.UnfinishedInfos, err error) {
|
||||||
|
return logic.ListUnfinishedInfos(req)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动创建用户且实名且下订单
|
||||||
|
func (b *BundleProvider) SoftDeleteUnfinishedInfo(_ context.Context, req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
||||||
|
return logic.SoftDeleteUnfinishedInfo(req)
|
||||||
|
}
|
||||||
|
@ -32,7 +32,8 @@ func AddBundleExtendRecord(data model.BundleExtensionRecords) error {
|
|||||||
et, _ := time.ParseInLocation(time.DateTime, record.ExpirationTime, loc)
|
et, _ := time.ParseInLocation(time.DateTime, record.ExpirationTime, loc)
|
||||||
expireTime = et
|
expireTime = et
|
||||||
} else {
|
} else {
|
||||||
expireTime = time.Now()
|
t, _ := time.Parse("2006-01-02 15:04:05", record.PayTime)
|
||||||
|
expireTime = t
|
||||||
logger.Infof("过期时间为空,使用默认过期时间" + expireTime.Format(time.DateTime))
|
logger.Infof("过期时间为空,使用默认过期时间" + expireTime.Format(time.DateTime))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,39 +218,46 @@ func CreateBundleBalance(data model.BundleBalance) error {
|
|||||||
return app.ModuleClients.BundleDB.Create(&data).Error
|
return app.ModuleClients.BundleDB.Create(&data).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLog, total int64, err error) {
|
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) {
|
||||||
session := app.ModuleClients.BundleDB.Model(&model.CostLog{})
|
session := app.ModuleClients.BundleDB.
|
||||||
if req.Title != "" {
|
Table("cast_cost_log ccl").
|
||||||
session = session.Where("title = ?", req.Title)
|
Select("ccl.*,cwl.cost_type").
|
||||||
|
Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid").
|
||||||
|
Where("cwl.work_status = 1 and cwl.deleted_at = 0 and ccl.deleted_at = 0")
|
||||||
|
if req.WorkTitle != "" {
|
||||||
|
session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%")
|
||||||
}
|
}
|
||||||
if req.Platform != 0 {
|
if req.Platform != 0 {
|
||||||
session = session.Where(fmt.Sprintf("JSON_CONTAINS(platform_ids,'%d')", req.Platform))
|
session = session.Where(fmt.Sprintf("JSON_CONTAINS(ccl.platform_ids,'%d')", req.Platform))
|
||||||
}
|
}
|
||||||
if req.Account != "" {
|
if req.Account != "" {
|
||||||
session = session.Where(fmt.Sprintf(`JSON_CONTAINS(media_names,'"%s"')`, req.Account))
|
session = session.Where(fmt.Sprintf(`JSON_CONTAINS(ccl.media_names,'"%s"')`, req.Account))
|
||||||
}
|
}
|
||||||
if req.SubmitTimeEnd != 0 {
|
if req.SubmitTimeEnd != 0 {
|
||||||
session = session.Where("submit_time <= ?", time.UnixMilli(req.SubmitTimeEnd))
|
session = session.Where("ccl.submit_time <= ?", time.UnixMilli(req.SubmitTimeEnd))
|
||||||
}
|
}
|
||||||
if req.SubmitTimeStart != 0 {
|
if req.SubmitTimeStart != 0 {
|
||||||
session = session.Where("submit_time >= ?", time.UnixMilli(req.SubmitTimeStart))
|
session = session.Where("ccl.submit_time >= ?", time.UnixMilli(req.SubmitTimeStart))
|
||||||
|
}
|
||||||
|
if req.CostType != 0 {
|
||||||
|
session = session.Where("cwl.cost_type = ?", req.CostType)
|
||||||
}
|
}
|
||||||
if req.User != "" {
|
if req.User != "" {
|
||||||
if utils.IsPhoneNumber(req.User) {
|
if utils.IsPhoneNumber(req.User) {
|
||||||
session = session.Where("artist_phone = ?", req.User)
|
session = session.Where("ccl.artist_phone = ?", req.User)
|
||||||
} else {
|
} else {
|
||||||
session = session.Where("artist_name like ?", "%"+req.User+"%")
|
session = session.Where("ccl.artist_name like ?", "%"+req.User+"%")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if req.Operator != "" {
|
if req.Operator != "" {
|
||||||
if utils.IsPhoneNumber(req.Operator) {
|
if utils.IsPhoneNumber(req.Operator) {
|
||||||
session = session.Where("operator_phone = ?", req.Operator)
|
session = session.Where("ccl.operator_phone = ?", req.Operator)
|
||||||
} else {
|
} else {
|
||||||
session = session.Where("operator_name like ?", "%"+req.Operator+"%")
|
session = session.Where("ccl.operator_name like ?", "%"+req.Operator+"%")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if req.Type != 0 {
|
if req.Type != 0 {
|
||||||
session = session.Where("work_category = ?", req.Type)
|
session = session.Where("ccl.work_category = ?", req.Type)
|
||||||
}
|
}
|
||||||
if err = session.Count(&total).Error; err != nil {
|
if err = session.Count(&total).Error; err != nil {
|
||||||
return
|
return
|
||||||
@ -257,7 +265,7 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLog, tota
|
|||||||
if req.Page != 0 && req.PageSize != 0 {
|
if req.Page != 0 && req.PageSize != 0 {
|
||||||
session = session.Offset(int(req.Page-1) * int(req.PageSize)).Limit(int(req.PageSize))
|
session = session.Offset(int(req.Page-1) * int(req.PageSize)).Limit(int(req.PageSize))
|
||||||
}
|
}
|
||||||
err = session.Order("updated_at desc").Find(&data).Error
|
err = session.Order("ccl.updated_at desc").Find(&data).Error
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,6 +468,9 @@ 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))
|
||||||
@ -493,6 +496,7 @@ 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,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 聚合子订单
|
// 聚合子订单
|
||||||
@ -501,20 +505,29 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
|
|||||||
for _, sub := range record.BundleOrderValueAdd {
|
for _, sub := range record.BundleOrderValueAdd {
|
||||||
orderAddNo := sub.OrderNo
|
orderAddNo := sub.OrderNo
|
||||||
amount := float32(sub.Amount)
|
amount := float32(sub.Amount)
|
||||||
|
|
||||||
if existing, ok := addMap[orderAddNo]; ok {
|
if existing, ok := addMap[orderAddNo]; ok {
|
||||||
existing.Amount += amount
|
existing.Amount += amount
|
||||||
|
// 仅当 VideoNum 尚未设置且当前是 ServiceType == 1 时赋值
|
||||||
|
if existing.VideoNum == 0 && sub.ServiceType == 1 {
|
||||||
|
existing.VideoNum = sub.Num
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
var videoNum int32
|
||||||
|
if sub.ServiceType == 1 {
|
||||||
|
videoNum = sub.Num
|
||||||
|
}
|
||||||
addMap[orderAddNo] = &bundle.OrderAddBundleRecordInfo{
|
addMap[orderAddNo] = &bundle.OrderAddBundleRecordInfo{
|
||||||
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,
|
||||||
Snapshot: sub.Snapshot,
|
Snapshot: sub.Snapshot,
|
||||||
CheckoutSessionId: sub.CheckoutSessionId,
|
CheckoutSessionId: sub.CheckoutSessionId,
|
||||||
CustomerID: sub.CustomerID,
|
CustomerID: sub.CustomerID,
|
||||||
|
VideoNum: videoNum,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,6 +671,7 @@ func CreateReconciliation(req *bundle.ReconciliationInfo) (res *bundle.CommonRes
|
|||||||
PayStatus: int(req.PayStatus),
|
PayStatus: int(req.PayStatus),
|
||||||
SerialNumber: req.SerialNumber,
|
SerialNumber: req.SerialNumber,
|
||||||
CreationTime: time.Now().Format("2006-01-02 15:04:05"),
|
CreationTime: time.Now().Format("2006-01-02 15:04:05"),
|
||||||
|
HandlingFee: req.HandlingFee,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建记录
|
// 创建记录
|
||||||
@ -688,6 +702,7 @@ func UpdateReconciliation(req *bundle.ReconciliationInfo) (res *bundle.CommonRes
|
|||||||
PayTime: req.PayTime,
|
PayTime: req.PayTime,
|
||||||
PayStatus: int(req.PayStatus),
|
PayStatus: int(req.PayStatus),
|
||||||
SerialNumber: req.SerialNumber,
|
SerialNumber: req.SerialNumber,
|
||||||
|
HandlingFee: req.HandlingFee,
|
||||||
}
|
}
|
||||||
if err := app.ModuleClients.BundleDB.Model(&existing).Updates(updates).Error; err != nil {
|
if err := app.ModuleClients.BundleDB.Model(&existing).Updates(updates).Error; err != nil {
|
||||||
return nil, fmt.Errorf("更新对账单失败: %v", err)
|
return nil, fmt.Errorf("更新对账单失败: %v", err)
|
||||||
@ -776,3 +791,65 @@ func DeleteValueAddService(req *bundle.DeleteValueAddServiceRequest) (res *bundl
|
|||||||
res.Msg = msg.SuccessDeletedOrderInfo
|
res.Msg = msg.SuccessDeletedOrderInfo
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ListUnfinishedInfos(req *bundle.AutoCreateUserAndOrderRequest) (res *bundle.UnfinishedInfos, err error) {
|
||||||
|
res = new(bundle.UnfinishedInfos)
|
||||||
|
res.UnfinishedInfos = make([]*bundle.UnfinishedInfo, 0)
|
||||||
|
|
||||||
|
// TODO 0.捞出指定数量的数据
|
||||||
|
infos := make([]*model.FieePaymentAuto, 0)
|
||||||
|
query := app.ModuleClients.BundleDB.Where("deleted_at is null")
|
||||||
|
if req.Num != 0 {
|
||||||
|
query.Limit(int(req.Num))
|
||||||
|
}
|
||||||
|
err = query.Find(&infos).Error
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, info := range infos {
|
||||||
|
unfinishedInfo := new(bundle.UnfinishedInfo)
|
||||||
|
unfinishedInfo.ID = uint32(info.ID)
|
||||||
|
unfinishedInfo.UserNum = info.UserNum
|
||||||
|
unfinishedInfo.UserName = info.UserName
|
||||||
|
unfinishedInfo.UserTelArea = info.UserTelArea
|
||||||
|
unfinishedInfo.UserTel = info.UserTel
|
||||||
|
unfinishedInfo.UserSex = info.UserSex
|
||||||
|
unfinishedInfo.Nationality = info.Nationality
|
||||||
|
unfinishedInfo.PlaceOfResidence = info.PlaceOfResidence
|
||||||
|
unfinishedInfo.DocumentType = int32(info.DocumentType)
|
||||||
|
unfinishedInfo.UserIdCardFrontUrl = info.UserIdCardFrontUrl
|
||||||
|
unfinishedInfo.UserIdCardReverseUrl = info.UserIdCardReverseUrl
|
||||||
|
unfinishedInfo.UserIdCardValidity = info.UserIdCardValidity
|
||||||
|
unfinishedInfo.OrderNo = info.OrderNo
|
||||||
|
unfinishedInfo.OrderPayAmount = info.OrderPayAmount
|
||||||
|
unfinishedInfo.OrderSettlementAmount = info.OrderSettlementAmount
|
||||||
|
unfinishedInfo.OrderFeeAmount = info.OrderFeeAmount
|
||||||
|
unfinishedInfo.OrderPayCurrency = info.OrderPayCurrency
|
||||||
|
unfinishedInfo.OrderAccountCurrency = info.OrderAccountCurrency
|
||||||
|
unfinishedInfo.PayTime = info.PayTime.Format("2006-01-02 15:04:05")
|
||||||
|
res.UnfinishedInfos = append(res.UnfinishedInfos, unfinishedInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
||||||
|
res = new(bundle.CommonResponse)
|
||||||
|
|
||||||
|
exist := new(model.FieePaymentAuto)
|
||||||
|
// 查询未处理的数据
|
||||||
|
err = app.ModuleClients.BundleDB.Model(&model.FieePaymentAuto{}).
|
||||||
|
Where("id = ?", req.ID).
|
||||||
|
First(&exist).Error
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.New("数据不存在")
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = app.ModuleClients.BundleDB.Where("id = ?", req.ID).
|
||||||
|
Delete(&model.FieePaymentAuto{}).Error; err != nil {
|
||||||
|
return res, errors.New("删除自动导入表数据失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
|
@ -123,7 +123,7 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (*bundle.GetUsedRecordListR
|
|||||||
}
|
}
|
||||||
resp := &bundle.GetUsedRecordListResp{}
|
resp := &bundle.GetUsedRecordListResp{}
|
||||||
resp.Total = total
|
resp.Total = total
|
||||||
resp.Data = lo.Map(data, func(m model.CostLog, _ int) *bundle.WorkCastItem {
|
resp.Data = lo.Map(data, func(m model.CostLogPo, _ int) *bundle.WorkCastItem {
|
||||||
result := &bundle.WorkCastItem{}
|
result := &bundle.WorkCastItem{}
|
||||||
copier.Copy(result, &m)
|
copier.Copy(result, &m)
|
||||||
return result
|
return result
|
||||||
|
@ -13,6 +13,9 @@ func CreateOrderRecord(req *bundle.OrderCreateRecord) (res *bundle.CommonRespons
|
|||||||
res = new(bundle.CommonResponse)
|
res = new(bundle.CommonResponse)
|
||||||
orderUUID := app.ModuleClients.SfNode.Generate().Base64()
|
orderUUID := app.ModuleClients.SfNode.Generate().Base64()
|
||||||
orderNo := utils.GetOrderNo()
|
orderNo := utils.GetOrderNo()
|
||||||
|
if req.OrderNo != "" {
|
||||||
|
orderNo = req.OrderNo
|
||||||
|
}
|
||||||
var addRecords []model.BundleOrderValueAdd
|
var addRecords []model.BundleOrderValueAdd
|
||||||
for _, i := range req.AddRecords {
|
for _, i := range req.AddRecords {
|
||||||
addRecords = append(addRecords, model.BundleOrderValueAdd{
|
addRecords = append(addRecords, model.BundleOrderValueAdd{
|
||||||
@ -34,6 +37,7 @@ func CreateOrderRecord(req *bundle.OrderCreateRecord) (res *bundle.CommonRespons
|
|||||||
Signature: req.Signature,
|
Signature: req.Signature,
|
||||||
SignedTime: req.SignedTime,
|
SignedTime: req.SignedTime,
|
||||||
Snapshot: req.Snapshot,
|
Snapshot: req.Snapshot,
|
||||||
|
HandlingFee: i.HandlingFee,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
orderRecord := &model.BundleOrderRecords{
|
orderRecord := &model.BundleOrderRecords{
|
||||||
@ -161,3 +165,15 @@ func DeleteValueAddService(req *bundle.DeleteValueAddServiceRequest) (res *bundl
|
|||||||
res, err = dao.DeleteValueAddService(req)
|
res, err = dao.DeleteValueAddService(req)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ListUnfinishedInfos(req *bundle.AutoCreateUserAndOrderRequest) (res *bundle.UnfinishedInfos, err error) {
|
||||||
|
res = new(bundle.UnfinishedInfos)
|
||||||
|
res, err = dao.ListUnfinishedInfos(req)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
||||||
|
res = new(bundle.CommonResponse)
|
||||||
|
res, err = dao.SoftDeleteUnfinishedInfo(req)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -165,7 +165,18 @@ func SaveValueAddService(in *bundle.ValueAddServiceLang) (res *bundle.SaveRespon
|
|||||||
price, parseErr1 := strconv.ParseFloat(option.Price, 32)
|
price, parseErr1 := strconv.ParseFloat(option.Price, 32)
|
||||||
if parseErr1 != nil {
|
if parseErr1 != nil {
|
||||||
fmt.Println("优惠单价转换失败: ", parseErr1)
|
fmt.Println("优惠单价转换失败: ", parseErr1)
|
||||||
return res, errors.New("优惠单价转换失败")
|
return res, errors.New("单价不能为空: " + parseErr1.Error())
|
||||||
|
}
|
||||||
|
if option.TotalPrice == "" {
|
||||||
|
if option.Symbol == "=" {
|
||||||
|
return res, errors.New("总价不能为空")
|
||||||
|
}
|
||||||
|
option.TotalPrice = "0"
|
||||||
|
}
|
||||||
|
totalPrice, parseErr2 := strconv.ParseFloat(option.TotalPrice, 32)
|
||||||
|
if parseErr2 != nil {
|
||||||
|
fmt.Println("总价转换失败: ", parseErr2)
|
||||||
|
return res, errors.New("总价转换失败: " + parseErr2.Error())
|
||||||
}
|
}
|
||||||
if option.Num < 0 || option.Num > 99 {
|
if option.Num < 0 || option.Num > 99 {
|
||||||
return res, errors.New("数量参数需为0-99")
|
return res, errors.New("数量参数需为0-99")
|
||||||
@ -174,10 +185,11 @@ func SaveValueAddService(in *bundle.ValueAddServiceLang) (res *bundle.SaveRespon
|
|||||||
return res, errors.New("优惠单价需小于等于原价")
|
return res, errors.New("优惠单价需小于等于原价")
|
||||||
}
|
}
|
||||||
options = append(options, &model.PriceOption{
|
options = append(options, &model.PriceOption{
|
||||||
Id: int32(index),
|
Id: int32(index),
|
||||||
Num: option.Num,
|
Num: option.Num,
|
||||||
Symbol: option.Symbol,
|
Symbol: option.Symbol,
|
||||||
Price: float32(price),
|
Price: float32(price),
|
||||||
|
TotalPrice: float32(totalPrice),
|
||||||
})
|
})
|
||||||
index++
|
index++
|
||||||
}
|
}
|
||||||
@ -358,7 +370,12 @@ func ValueAddServiceList(req *bundle.ValueAddServiceListRequest) (res *bundle.Va
|
|||||||
original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
||||||
price := decimal.NewFromFloat(float64(option.Price))
|
price := decimal.NewFromFloat(float64(option.Price))
|
||||||
num := decimal.NewFromInt(int64(option.Num))
|
num := decimal.NewFromInt(int64(option.Num))
|
||||||
saveAmount = original.Sub(price).Mul(num)
|
totalPrice := decimal.NewFromFloat(float64(option.TotalPrice))
|
||||||
|
if !totalPrice.IsZero() {
|
||||||
|
saveAmount = (original.Mul(num)).Sub(totalPrice)
|
||||||
|
} else {
|
||||||
|
saveAmount = original.Sub(price).Mul(num)
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
//original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
//original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
||||||
//price := decimal.NewFromFloat(float64(option.Price))
|
//price := decimal.NewFromFloat(float64(option.Price))
|
||||||
@ -371,6 +388,7 @@ func ValueAddServiceList(req *bundle.ValueAddServiceListRequest) (res *bundle.Va
|
|||||||
Num: option.Num,
|
Num: option.Num,
|
||||||
Symbol: option.Symbol,
|
Symbol: option.Symbol,
|
||||||
Price: fmt.Sprintf("%.2f", option.Price),
|
Price: fmt.Sprintf("%.2f", option.Price),
|
||||||
|
TotalPrice: fmt.Sprintf("%.2f", option.TotalPrice),
|
||||||
SaveAmount: saveAmount.StringFixed(2),
|
SaveAmount: saveAmount.StringFixed(2),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -416,7 +434,12 @@ func ValueAddServiceDetail(req *bundle.ValueAddServiceDetailRequest) (res *bundl
|
|||||||
original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
||||||
price := decimal.NewFromFloat(float64(opt.Price))
|
price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
num := decimal.NewFromInt(int64(opt.Num))
|
num := decimal.NewFromInt(int64(opt.Num))
|
||||||
saveAmount = original.Sub(price).Mul(num)
|
totalPrice := decimal.NewFromFloat(float64(opt.TotalPrice))
|
||||||
|
if !totalPrice.IsZero() {
|
||||||
|
saveAmount = (original.Mul(num)).Sub(totalPrice)
|
||||||
|
} else {
|
||||||
|
saveAmount = original.Sub(price).Mul(num)
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
//original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
//original := decimal.NewFromFloat(float64(serviceLang.OriginalPrice))
|
||||||
//price := decimal.NewFromFloat(float64(opt.Price))
|
//price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
@ -429,6 +452,7 @@ func ValueAddServiceDetail(req *bundle.ValueAddServiceDetailRequest) (res *bundl
|
|||||||
Num: opt.Num,
|
Num: opt.Num,
|
||||||
Symbol: opt.Symbol,
|
Symbol: opt.Symbol,
|
||||||
Price: fmt.Sprintf("%.2f", opt.Price),
|
Price: fmt.Sprintf("%.2f", opt.Price),
|
||||||
|
TotalPrice: fmt.Sprintf("%.2f", opt.TotalPrice),
|
||||||
SaveAmount: saveAmount.StringFixed(2),
|
SaveAmount: saveAmount.StringFixed(2),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -499,7 +523,12 @@ func ValueAddServiceDetailByUuidAndLanguage(req *bundle.ValueAddServiceDetailReq
|
|||||||
original := decimal.NewFromFloat(float64(detail.OriginalPrice))
|
original := decimal.NewFromFloat(float64(detail.OriginalPrice))
|
||||||
price := decimal.NewFromFloat(float64(opt.Price))
|
price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
num := decimal.NewFromInt(int64(opt.Num))
|
num := decimal.NewFromInt(int64(opt.Num))
|
||||||
saveAmount = original.Sub(price).Mul(num)
|
totalPrice := decimal.NewFromFloat(float64(opt.TotalPrice))
|
||||||
|
if !totalPrice.IsZero() {
|
||||||
|
saveAmount = (original.Mul(num)).Sub(totalPrice)
|
||||||
|
} else {
|
||||||
|
saveAmount = original.Sub(price).Mul(num)
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
//original := decimal.NewFromFloat(float64(detail.OriginalPrice))
|
//original := decimal.NewFromFloat(float64(detail.OriginalPrice))
|
||||||
//price := decimal.NewFromFloat(float64(opt.Price))
|
//price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
@ -512,6 +541,7 @@ func ValueAddServiceDetailByUuidAndLanguage(req *bundle.ValueAddServiceDetailReq
|
|||||||
Num: opt.Num,
|
Num: opt.Num,
|
||||||
Symbol: opt.Symbol,
|
Symbol: opt.Symbol,
|
||||||
Price: fmt.Sprintf("%.2f", opt.Price),
|
Price: fmt.Sprintf("%.2f", opt.Price),
|
||||||
|
TotalPrice: fmt.Sprintf("%.2f", opt.TotalPrice),
|
||||||
SaveAmount: saveAmount.StringFixed(2),
|
SaveAmount: saveAmount.StringFixed(2),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -586,7 +616,12 @@ func BatchGetValueAddServiceLang(req *bundle.BatchGetValueAddServiceLangRequest)
|
|||||||
original := decimal.NewFromFloat(float64(v.OriginalPrice))
|
original := decimal.NewFromFloat(float64(v.OriginalPrice))
|
||||||
price := decimal.NewFromFloat(float64(opt.Price))
|
price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
num := decimal.NewFromInt(int64(opt.Num))
|
num := decimal.NewFromInt(int64(opt.Num))
|
||||||
saveAmount = original.Sub(price).Mul(num)
|
totalPrice := decimal.NewFromFloat(float64(opt.TotalPrice))
|
||||||
|
if !totalPrice.IsZero() {
|
||||||
|
saveAmount = (original.Mul(num)).Sub(totalPrice)
|
||||||
|
} else {
|
||||||
|
saveAmount = original.Sub(price).Mul(num)
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
//original := decimal.NewFromFloat(float64(v.OriginalPrice))
|
//original := decimal.NewFromFloat(float64(v.OriginalPrice))
|
||||||
//price := decimal.NewFromFloat(float64(opt.Price))
|
//price := decimal.NewFromFloat(float64(opt.Price))
|
||||||
@ -599,6 +634,7 @@ func BatchGetValueAddServiceLang(req *bundle.BatchGetValueAddServiceLangRequest)
|
|||||||
Num: opt.Num,
|
Num: opt.Num,
|
||||||
Symbol: opt.Symbol,
|
Symbol: opt.Symbol,
|
||||||
Price: fmt.Sprintf("%.2f", opt.Price),
|
Price: fmt.Sprintf("%.2f", opt.Price),
|
||||||
|
TotalPrice: fmt.Sprintf("%.2f", opt.TotalPrice),
|
||||||
SaveAmount: saveAmount.StringFixed(2),
|
SaveAmount: saveAmount.StringFixed(2),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,7 @@ type BundleExtendRecordItemPo struct {
|
|||||||
OperatorName string
|
OperatorName string
|
||||||
OperatorPhoneNumber string
|
OperatorPhoneNumber string
|
||||||
AssociatedOrderNumber string `gorm:"column:associated_order_number;type:varchar(256);comment:关联订单号" json:"associatedOrderNumber"`
|
AssociatedOrderNumber string `gorm:"column:associated_order_number;type:varchar(256);comment:关联订单号" json:"associatedOrderNumber"`
|
||||||
|
TimeUnit uint `gorm:"column:time_unit;type:int(11) unsigned;comment:时间单位" json:"timeUnit"`
|
||||||
OrderUUID string
|
OrderUUID string
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ 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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 财务确认状态
|
// 财务确认状态
|
||||||
|
@ -101,6 +101,7 @@ type CastWorkLog struct {
|
|||||||
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);comment:艺人ID;NOT NULL" json:"artist_uuid"`
|
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);comment:艺人ID;NOT NULL" json:"artist_uuid"`
|
||||||
MediaAccUserIds string `gorm:"column:media_acc_user_ids;type:json;comment:自媒体账号user_ids集合;NOT NULL" json:"media_acc_user_ids"`
|
MediaAccUserIds string `gorm:"column:media_acc_user_ids;type:json;comment:自媒体账号user_ids集合;NOT NULL" json:"media_acc_user_ids"`
|
||||||
MediaNames string `gorm:"column:media_names;type:varchar(600);comment:自媒体账号名称集合;NOT NULL" json:"media_names"`
|
MediaNames string `gorm:"column:media_names;type:varchar(600);comment:自媒体账号名称集合;NOT NULL" json:"media_names"`
|
||||||
|
CostType int `gorm:"column:cost_type;type:int(11)" json:"costType"`
|
||||||
ConfirmedAt int64 `gorm:"column:confirmed_at;type:int(11)" json:"confirmedAt"`
|
ConfirmedAt int64 `gorm:"column:confirmed_at;type:int(11)" json:"confirmedAt"`
|
||||||
CreatedAt int `gorm:"column:created_at;type:int(11)" json:"created_at"`
|
CreatedAt int `gorm:"column:created_at;type:int(11)" json:"created_at"`
|
||||||
UpdatedAt int `gorm:"column:updated_at;type:int(11)" json:"updated_at"`
|
UpdatedAt int `gorm:"column:updated_at;type:int(11)" json:"updated_at"`
|
||||||
@ -110,3 +111,8 @@ type CastWorkLog struct {
|
|||||||
func (m *CastWorkLog) TableName() string {
|
func (m *CastWorkLog) TableName() string {
|
||||||
return "cast_work_log"
|
return "cast_work_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CostLogPo struct {
|
||||||
|
CostLog
|
||||||
|
CostType int `gorm:"column:cost_type;type:int(11)" json:"costType"`
|
||||||
|
}
|
||||||
|
29
internal/model/fiee_payment_auto.go
Normal file
29
internal/model/fiee_payment_auto.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 用来自动导入 来创建用户和订单的 数据
|
||||||
|
type FieePaymentAuto struct {
|
||||||
|
gorm.Model
|
||||||
|
UserNum string `json:"userNum" gorm:"column:user_num;type:varchar(64);comment:用户编号"`
|
||||||
|
UserName string `json:"userName" gorm:"column:user_name;type:varchar(128);comment:用户姓名"`
|
||||||
|
UserTelArea string `json:"userTelArea" gorm:"column:user_tel_area;type:varchar(32);comment:用户手机号区号"`
|
||||||
|
UserTel string `json:"userTel" gorm:"column:user_tel;type:varchar(32);comment:用户手机号"`
|
||||||
|
UserSex string `json:"userSex" gorm:"column:user_sex;type:varchar(16);comment:用户性别"`
|
||||||
|
Nationality string `json:"nationality" gorm:"column:nationality;type:varchar(128);comment:国籍"`
|
||||||
|
PlaceOfResidence string `json:"placeOfResidence" gorm:"column:place_of_residence;type:varchar(512);comment:用户居住地"`
|
||||||
|
DocumentType int `json:"documentType" gorm:"column:document_type;type:varchar(512);comment:证件类型:1护照 2身份证 3驾驶证 4居住证 5自拍照 6社保卡"`
|
||||||
|
UserIdCardFrontUrl string `json:"userIdCardFrontUrl" gorm:"column:user_id_card_front_url;type:varchar(1024);comment:用户身份证正面"`
|
||||||
|
UserIdCardReverseUrl string `json:"userIdCardReverseUrl" gorm:"column:user_id_card_reverse_url;type:varchar(1024);comment:用户身份证反面"`
|
||||||
|
UserIdCardValidity string `json:"userIdCardValidity" gorm:"column:user_id_card_validity;type:varchar(64);comment:证件有效期"`
|
||||||
|
OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(128);comment:订单编号"`
|
||||||
|
OrderPayAmount string `gorm:"column:order_pay_amount;type:decimal(20,2);comment:订单支付金额" json:"orderPayAmount"`
|
||||||
|
OrderSettlementAmount string `gorm:"column:order_settlement_amount;type:decimal(20,2);comment:订单结算金额" json:"orderSettlementAmount"`
|
||||||
|
OrderFeeAmount string `gorm:"column:order_fee_amount;type:decimal(20,2);comment:订单手续费金额" json:"orderFeeAmount"`
|
||||||
|
OrderPayCurrency string `json:"orderPayCurrency" gorm:"column:order_pay_currency;type:varchar(16);comment:支付时的币种:cny人民币,usd美元"`
|
||||||
|
OrderAccountCurrency string `json:"orderAccountCurrency" gorm:"column:order_account_currency;type:varchar(16);comment:账户上的币种: 暂时固定usd美元"`
|
||||||
|
PayTime time.Time `gorm:"column:pay_time;type:datetime;default:null;comment:支付成功时间" json:"payTime"`
|
||||||
|
}
|
@ -17,4 +17,5 @@ type Reconciliation struct {
|
|||||||
PayStatus int `gorm:"column:pay_status;comment:支付状态" json:"payStatus"`
|
PayStatus int `gorm:"column:pay_status;comment:支付状态" json:"payStatus"`
|
||||||
SerialNumber string `gorm:"column:serial_number;comment:流水号" json:"serialNumber"`
|
SerialNumber string `gorm:"column:serial_number;comment:流水号" json:"serialNumber"`
|
||||||
CreationTime string `gorm:"column:creation_time;comment:创建时间" json:"creationTime"`
|
CreationTime string `gorm:"column:creation_time;comment:创建时间" json:"creationTime"`
|
||||||
|
HandlingFee string `gorm:"column:handling_fee;comment:手续费" json:"handlingFee"`
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ type ValueAddServiceLang struct {
|
|||||||
ServiceType int32 `json:"serviceType" gorm:"column:service_type;type:int;comment:服务类型 1:视频 2:图文 3:数据报表 4:账号数 5:可用时长"`
|
ServiceType int32 `json:"serviceType" gorm:"column:service_type;type:int;comment:服务类型 1:视频 2:图文 3:数据报表 4:账号数 5:可用时长"`
|
||||||
PriceMode int32 `json:"priceMode" gorm:"column:price_mode;type:int;comment:套餐价格类型 1:单价 2:总价"`
|
PriceMode int32 `json:"priceMode" gorm:"column:price_mode;type:int;comment:套餐价格类型 1:单价 2:总价"`
|
||||||
OriginalPrice float32 `json:"originalPrice" gorm:"column:original_price;type:decimal(12,2);comment:原单价"`
|
OriginalPrice float32 `json:"originalPrice" gorm:"column:original_price;type:decimal(12,2);comment:原单价"`
|
||||||
TotalPrice float32 `json:"totalPrice" gorm:"column:total_price;type:decimal(12,2);comment:增值服务总价"`
|
TotalPrice float32 `json:"totalPrice" gorm:"column:total_price;type:decimal(12,2);comment:增值服务总价"` //总价模式不合理,该字段暂时无用
|
||||||
Unit string `json:"unit" gorm:"column:unit;type:varchar(50);comment:单位 1:个 2:条 3:天 4:月 5:年"`
|
Unit string `json:"unit" gorm:"column:unit;type:varchar(50);comment:单位 1:个 2:条 3:天 4:月 5:年"`
|
||||||
Language string `json:"language" gorm:"column:language;type:varchar(32);comment:套餐语言 zh-CN zh-TW EN de-DE ja-JP(中繁英德日)"`
|
Language string `json:"language" gorm:"column:language;type:varchar(32);comment:套餐语言 zh-CN zh-TW EN de-DE ja-JP(中繁英德日)"`
|
||||||
PriceType int64 `json:"priceType" gorm:"column:price_type;type:int;comment:币种 1:人民币 2:美元 3:日元 4:欧元"`
|
PriceType int64 `json:"priceType" gorm:"column:price_type;type:int;comment:币种 1:人民币 2:美元 3:日元 4:欧元"`
|
||||||
@ -74,10 +74,11 @@ type ValueAddServiceHistory struct {
|
|||||||
|
|
||||||
type PriceOptions []*PriceOption
|
type PriceOptions []*PriceOption
|
||||||
type PriceOption struct {
|
type PriceOption struct {
|
||||||
Id int32 `json:"id"`
|
Id int32 `json:"id"`
|
||||||
Num int32 `json:"num"`
|
Num int32 `json:"num"`
|
||||||
Symbol string `json:"symbol"` // 符号> < = >= <=
|
Symbol string `json:"symbol"` // 符号> < = >= <=
|
||||||
Price float32 `json:"price"` // 价格(根据priceMode决定是单价还是总价)
|
Price float32 `json:"price"` // 价格(根据priceMode决定是单价还是总价)
|
||||||
|
TotalPrice float32 `json:"totalPrice"` // 总价-新加
|
||||||
}
|
}
|
||||||
|
|
||||||
// 实现 driver.Valuer 接口
|
// 实现 driver.Valuer 接口
|
||||||
@ -150,6 +151,7 @@ func (m *ValueAddServiceHistory) TableName() string {
|
|||||||
func (options PriceOptions) CalculatePrice(priceMode, target int32) (float32, error) {
|
func (options PriceOptions) CalculatePrice(priceMode, target int32) (float32, error) {
|
||||||
for _, opt := range options {
|
for _, opt := range options {
|
||||||
match := false
|
match := false
|
||||||
|
last := false
|
||||||
switch opt.Symbol {
|
switch opt.Symbol {
|
||||||
case "=":
|
case "=":
|
||||||
match = target == opt.Num
|
match = target == opt.Num
|
||||||
@ -157,6 +159,7 @@ func (options PriceOptions) CalculatePrice(priceMode, target int32) (float32, er
|
|||||||
match = target > opt.Num
|
match = target > opt.Num
|
||||||
case ">=":
|
case ">=":
|
||||||
match = target >= opt.Num
|
match = target >= opt.Num
|
||||||
|
last = true
|
||||||
case "<":
|
case "<":
|
||||||
match = target < opt.Num
|
match = target < opt.Num
|
||||||
case "<=":
|
case "<=":
|
||||||
@ -168,6 +171,12 @@ func (options PriceOptions) CalculatePrice(priceMode, target int32) (float32, er
|
|||||||
if match {
|
if match {
|
||||||
switch priceMode { //1 单价模式
|
switch priceMode { //1 单价模式
|
||||||
case 1:
|
case 1:
|
||||||
|
if last {
|
||||||
|
return float32(target) * opt.Price, nil
|
||||||
|
}
|
||||||
|
if opt.TotalPrice > 0 {
|
||||||
|
return opt.TotalPrice, nil
|
||||||
|
}
|
||||||
return float32(target) * opt.Price, nil
|
return float32(target) * opt.Price, nil
|
||||||
case 2:
|
case 2:
|
||||||
return opt.Price, nil
|
return opt.Price, nil
|
||||||
|
@ -74,6 +74,10 @@ service Bundle {
|
|||||||
rpc CreateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // 创建对账单
|
rpc CreateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // 创建对账单
|
||||||
rpc UpdateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // 更新对账单
|
rpc UpdateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // 更新对账单
|
||||||
rpc UpdateReconciliationStatusBySerialNumber(UpdateStatusAndPayTimeBySerialNumber) returns (CommonResponse) {} // 更新对账单
|
rpc UpdateReconciliationStatusBySerialNumber(UpdateStatusAndPayTimeBySerialNumber) returns (CommonResponse) {} // 更新对账单
|
||||||
|
|
||||||
|
// 查出没处理的数据
|
||||||
|
rpc ListUnfinishedInfos(AutoCreateUserAndOrderRequest) returns (UnfinishedInfos) {} // 查出没处理的数据
|
||||||
|
rpc SoftDeleteUnfinishedInfo(SoftDeleteUnfinishedInfoRequest) returns (CommonResponse) {} // 软删除
|
||||||
}
|
}
|
||||||
message DeleteValueAddServiceRequest{
|
message DeleteValueAddServiceRequest{
|
||||||
string orderNo = 1;
|
string orderNo = 1;
|
||||||
@ -116,6 +120,8 @@ message ReconciliationInfo{
|
|||||||
int32 payStatus = 12;
|
int32 payStatus = 12;
|
||||||
string serialNumber = 13;
|
string serialNumber = 13;
|
||||||
uint64 userID = 14;
|
uint64 userID = 14;
|
||||||
|
string handlingFee = 15;
|
||||||
|
string subNum = 16;
|
||||||
}
|
}
|
||||||
message OrderInfoByOrderNoRequest{
|
message OrderInfoByOrderNoRequest{
|
||||||
string orderNo = 1;
|
string orderNo = 1;
|
||||||
@ -154,6 +160,7 @@ message OrderCreateRecord{
|
|||||||
string snapshot = 18 [json_name = "snapshot"];
|
string snapshot = 18 [json_name = "snapshot"];
|
||||||
int32 payType = 19 [json_name = "payType"];
|
int32 payType = 19 [json_name = "payType"];
|
||||||
repeated OrderCreateAddRecord addRecords = 20 [json_name = "addRecords"]; //增值服务
|
repeated OrderCreateAddRecord addRecords = 20 [json_name = "addRecords"]; //增值服务
|
||||||
|
string orderNo = 21 [json_name = "orderNo"];
|
||||||
}
|
}
|
||||||
message OrderCreateAddRecord{
|
message OrderCreateAddRecord{
|
||||||
int32 serviceType = 1 [json_name = "serviceType"];
|
int32 serviceType = 1 [json_name = "serviceType"];
|
||||||
@ -164,6 +171,7 @@ message OrderCreateAddRecord{
|
|||||||
string unit = 6 [json_name = "unit"];
|
string unit = 6 [json_name = "unit"];
|
||||||
int32 source = 7 [json_name = "source"];
|
int32 source = 7 [json_name = "source"];
|
||||||
int32 paymentStatus = 8 [json_name = "paymentStatus"];
|
int32 paymentStatus = 8 [json_name = "paymentStatus"];
|
||||||
|
string handlingFee = 9 [json_name = "handlingFee"];
|
||||||
}
|
}
|
||||||
message OrderRecordsRequestV2{
|
message OrderRecordsRequestV2{
|
||||||
string customerName = 1;
|
string customerName = 1;
|
||||||
@ -180,6 +188,8 @@ 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;
|
||||||
@ -197,13 +207,15 @@ 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;
|
||||||
|
string subNum = 11;
|
||||||
}
|
}
|
||||||
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;
|
||||||
float handlingFee = 5;
|
string handlingFee = 5;
|
||||||
float exchangeRate = 6;
|
float exchangeRate = 6;
|
||||||
string orderAddCreateAt = 7;
|
string orderAddCreateAt = 7;
|
||||||
int32 addPayStatus = 8;
|
int32 addPayStatus = 8;
|
||||||
@ -211,6 +223,7 @@ message OrderAddBundleRecordInfo{
|
|||||||
string snapshot = 10;
|
string snapshot = 10;
|
||||||
string CheckoutSessionId = 11;
|
string CheckoutSessionId = 11;
|
||||||
string CustomerID = 12;
|
string CustomerID = 12;
|
||||||
|
int32 videoNum = 13;
|
||||||
}
|
}
|
||||||
message PackagePriceAndTimeResponse{
|
message PackagePriceAndTimeResponse{
|
||||||
float price = 1 [json_name = "price"];
|
float price = 1 [json_name = "price"];
|
||||||
@ -511,6 +524,7 @@ message ValueAddPriceOptions {
|
|||||||
string symbol = 3 [json_name = "symbol"];
|
string symbol = 3 [json_name = "symbol"];
|
||||||
string price = 4 [json_name = "price"];
|
string price = 4 [json_name = "price"];
|
||||||
string saveAmount = 5 [json_name = "saveAmount"];
|
string saveAmount = 5 [json_name = "saveAmount"];
|
||||||
|
string totalPrice = 6 [json_name = "totalPrice"];
|
||||||
|
|
||||||
}
|
}
|
||||||
//增值服务列表
|
//增值服务列表
|
||||||
@ -600,8 +614,9 @@ message BundleExtendRecordItem{
|
|||||||
uint64 createdAt = 9;
|
uint64 createdAt = 9;
|
||||||
string remark = 10;
|
string remark = 10;
|
||||||
string associatedOrderNumber = 11;
|
string associatedOrderNumber = 11;
|
||||||
string operatorName = 12;
|
uint32 timeUnit = 12;
|
||||||
string operatorPhoneNumber = 13;
|
string operatorName = 13;
|
||||||
|
string operatorPhoneNumber = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetBundleBalanceListReq{
|
message GetBundleBalanceListReq{
|
||||||
@ -692,11 +707,12 @@ message GetUsedRecordListReq{
|
|||||||
string account = 3;
|
string account = 3;
|
||||||
int32 platform = 4;
|
int32 platform = 4;
|
||||||
int32 type = 5;
|
int32 type = 5;
|
||||||
string title = 6;
|
string workTitle = 6;
|
||||||
int64 submitTimeStart = 7;
|
int64 submitTimeStart = 7;
|
||||||
int64 submitTimeEnd = 8;
|
int64 submitTimeEnd = 8;
|
||||||
int32 page = 9;
|
int32 page = 9;
|
||||||
int32 pageSize = 10;
|
int32 pageSize = 10;
|
||||||
|
int32 costType = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetUsedRecordListResp {
|
message GetUsedRecordListResp {
|
||||||
@ -720,6 +736,7 @@ message WorkCastItem{
|
|||||||
string operatorName = 13; // 操作人名称
|
string operatorName = 13; // 操作人名称
|
||||||
string operatorPhone = 14; // 操作人手机号
|
string operatorPhone = 14; // 操作人手机号
|
||||||
uint32 status = 15; // 1 有效 2 失效
|
uint32 status = 15; // 1 有效 2 失效
|
||||||
|
uint32 costType = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetImageWorkDetailReq {
|
message GetImageWorkDetailReq {
|
||||||
@ -763,6 +780,7 @@ message workItem{
|
|||||||
int64 createdAt = 11; // 提交时间
|
int64 createdAt = 11; // 提交时间
|
||||||
string artistName = 12;
|
string artistName = 12;
|
||||||
string artistUuid = 13;
|
string artistUuid = 13;
|
||||||
|
uint32 costType = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ToBeComfirmedWorksResp{
|
message ToBeComfirmedWorksResp{
|
||||||
@ -827,4 +845,38 @@ message ConfirmWorkReq{
|
|||||||
|
|
||||||
message ConfirmWorkResp{
|
message ConfirmWorkResp{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message AutoCreateUserAndOrderRequest {
|
||||||
|
int32 num = 1; // 处理数量
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnfinishedInfos {
|
||||||
|
repeated UnfinishedInfo unfinishedInfos = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnfinishedInfo {
|
||||||
|
uint32 ID = 1;
|
||||||
|
string userNum = 2;
|
||||||
|
string userName = 3;
|
||||||
|
string userTelArea = 4;
|
||||||
|
string userTel = 5;
|
||||||
|
string userSex = 6;
|
||||||
|
string nationality = 7;
|
||||||
|
string placeOfResidence = 8;
|
||||||
|
int32 documentType = 9;
|
||||||
|
string userIdCardFrontUrl = 10;
|
||||||
|
string userIdCardReverseUrl = 11;
|
||||||
|
string userIdCardValidity = 12;
|
||||||
|
string orderNo = 13;
|
||||||
|
string orderPayAmount = 14;
|
||||||
|
string orderSettlementAmount = 15;
|
||||||
|
string orderFeeAmount = 16;
|
||||||
|
string orderPayCurrency = 17;
|
||||||
|
string orderAccountCurrency = 18;
|
||||||
|
string payTime = 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SoftDeleteUnfinishedInfoRequest {
|
||||||
|
uint32 ID = 1;
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
math "math"
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||||
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -447,3 +447,22 @@ func (this *ConfirmWorkReq) Validate() error {
|
|||||||
func (this *ConfirmWorkResp) Validate() error {
|
func (this *ConfirmWorkResp) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *AutoCreateUserAndOrderRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *UnfinishedInfos) Validate() error {
|
||||||
|
for _, item := range this.UnfinishedInfos {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("UnfinishedInfos", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *UnfinishedInfo) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SoftDeleteUnfinishedInfoRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -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.8
|
// - protoc-gen-go-triple v1.0.8
|
||||||
// - protoc v4.24.0--rc1
|
// - protoc v3.12.4
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -50,11 +50,11 @@ type BundleClient interface {
|
|||||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
||||||
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
||||||
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
||||||
//增值套餐
|
// 增值套餐
|
||||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
||||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||||
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
|
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
|
||||||
//新增值服务
|
// 新增值服务
|
||||||
SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
||||||
ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment)
|
ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment)
|
||||||
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
||||||
@ -75,11 +75,14 @@ type BundleClient interface {
|
|||||||
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
||||||
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
||||||
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
||||||
//对账单
|
// 对账单
|
||||||
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
|
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
|
||||||
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
|
// 查出没处理的数据
|
||||||
|
ListUnfinishedInfos(ctx context.Context, in *AutoCreateUserAndOrderRequest, opts ...grpc_go.CallOption) (*UnfinishedInfos, common.ErrorWithAttachment)
|
||||||
|
SoftDeleteUnfinishedInfo(ctx context.Context, in *SoftDeleteUnfinishedInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type bundleClient struct {
|
type bundleClient struct {
|
||||||
@ -134,6 +137,8 @@ type BundleClientImpl struct {
|
|||||||
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||||
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||||
UpdateReconciliationStatusBySerialNumber func(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
UpdateReconciliationStatusBySerialNumber func(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
||||||
|
ListUnfinishedInfos func(ctx context.Context, in *AutoCreateUserAndOrderRequest) (*UnfinishedInfos, error)
|
||||||
|
SoftDeleteUnfinishedInfo func(ctx context.Context, in *SoftDeleteUnfinishedInfoRequest) (*CommonResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||||
@ -430,6 +435,18 @@ func (c *bundleClient) UpdateReconciliationStatusBySerialNumber(ctx context.Cont
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliationStatusBySerialNumber", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliationStatusBySerialNumber", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) ListUnfinishedInfos(ctx context.Context, in *AutoCreateUserAndOrderRequest, opts ...grpc_go.CallOption) (*UnfinishedInfos, common.ErrorWithAttachment) {
|
||||||
|
out := new(UnfinishedInfos)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListUnfinishedInfos", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) SoftDeleteUnfinishedInfo(ctx context.Context, in *SoftDeleteUnfinishedInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SoftDeleteUnfinishedInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
// BundleServer is the server API for Bundle service.
|
// BundleServer is the server API for Bundle service.
|
||||||
// All implementations must embed UnimplementedBundleServer
|
// All implementations must embed UnimplementedBundleServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -456,11 +473,11 @@ type BundleServer interface {
|
|||||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||||
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
//增值套餐
|
// 增值套餐
|
||||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||||
//新增值服务
|
// 新增值服务
|
||||||
SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error)
|
SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error)
|
||||||
ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||||
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||||
@ -481,11 +498,14 @@ type BundleServer interface {
|
|||||||
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||||
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||||
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||||
//对账单
|
// 对账单
|
||||||
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
||||||
|
// 查出没处理的数据
|
||||||
|
ListUnfinishedInfos(context.Context, *AutoCreateUserAndOrderRequest) (*UnfinishedInfos, error)
|
||||||
|
SoftDeleteUnfinishedInfo(context.Context, *SoftDeleteUnfinishedInfoRequest) (*CommonResponse, error)
|
||||||
mustEmbedUnimplementedBundleServer()
|
mustEmbedUnimplementedBundleServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -635,6 +655,12 @@ func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *Reconcil
|
|||||||
func (UnimplementedBundleServer) UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error) {
|
func (UnimplementedBundleServer) UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliationStatusBySerialNumber not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliationStatusBySerialNumber not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) ListUnfinishedInfos(context.Context, *AutoCreateUserAndOrderRequest) (*UnfinishedInfos, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ListUnfinishedInfos not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) SoftDeleteUnfinishedInfo(context.Context, *SoftDeleteUnfinishedInfoRequest) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SoftDeleteUnfinishedInfo not implemented")
|
||||||
|
}
|
||||||
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -2026,6 +2052,64 @@ func _Bundle_UpdateReconciliationStatusBySerialNumber_Handler(srv interface{}, c
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_ListUnfinishedInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AutoCreateUserAndOrderRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||||
|
args := []interface{}{}
|
||||||
|
args = append(args, in)
|
||||||
|
md, _ := metadata.FromIncomingContext(ctx)
|
||||||
|
invAttachment := make(map[string]interface{}, len(md))
|
||||||
|
for k, v := range md {
|
||||||
|
invAttachment[k] = v
|
||||||
|
}
|
||||||
|
invo := invocation.NewRPCInvocation("ListUnfinishedInfos", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_SoftDeleteUnfinishedInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SoftDeleteUnfinishedInfoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||||
|
args := []interface{}{}
|
||||||
|
args = append(args, in)
|
||||||
|
md, _ := metadata.FromIncomingContext(ctx)
|
||||||
|
invAttachment := make(map[string]interface{}, len(md))
|
||||||
|
for k, v := range md {
|
||||||
|
invAttachment[k] = v
|
||||||
|
}
|
||||||
|
invo := invocation.NewRPCInvocation("SoftDeleteUnfinishedInfo", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -2221,6 +2305,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "UpdateReconciliationStatusBySerialNumber",
|
MethodName: "UpdateReconciliationStatusBySerialNumber",
|
||||||
Handler: _Bundle_UpdateReconciliationStatusBySerialNumber_Handler,
|
Handler: _Bundle_UpdateReconciliationStatusBySerialNumber_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListUnfinishedInfos",
|
||||||
|
Handler: _Bundle_ListUnfinishedInfos_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SoftDeleteUnfinishedInfo",
|
||||||
|
Handler: _Bundle_SoftDeleteUnfinishedInfo_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/bundle.proto",
|
Metadata: "pb/bundle.proto",
|
||||||
|
Loading…
Reference in New Issue
Block a user