Merge branch 'jng'
This commit is contained in:
commit
41e28c9aed
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.8
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v4.24.0--rc1
|
// - protoc v6.32.0
|
||||||
// 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,7 +75,7 @@ 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)
|
||||||
@ -473,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)
|
||||||
@ -498,7 +498,7 @@ 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)
|
||||||
|
@ -13,12 +13,13 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/bundle/logic"
|
"fonchain-fiee/pkg/service/bundle/logic"
|
||||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||||
"fonchain-fiee/pkg/service/upload"
|
"fonchain-fiee/pkg/service/upload"
|
||||||
"github.com/360EntSecGroup-Skylar/excelize"
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/360EntSecGroup-Skylar/excelize"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DeleteBundleOrder(c *gin.Context) {
|
func DeleteBundleOrder(c *gin.Context) {
|
||||||
@ -502,6 +503,7 @@ func OrderRecordsListV2(c *gin.Context) {
|
|||||||
if u, ok := userMap[item.CustomerId]; ok {
|
if u, ok := userMap[item.CustomerId]; ok {
|
||||||
item.CustomerName = u.Name
|
item.CustomerName = u.Name
|
||||||
item.TelNum = u.TelNum
|
item.TelNum = u.TelNum
|
||||||
|
item.SubNum = u.SubNum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -583,6 +585,7 @@ func OrderRecordsListDownload(c *gin.Context) {
|
|||||||
if u, ok := userMap[item.CustomerId]; ok {
|
if u, ok := userMap[item.CustomerId]; ok {
|
||||||
item.CustomerName = u.Name
|
item.CustomerName = u.Name
|
||||||
item.TelNum = u.TelNum
|
item.TelNum = u.TelNum
|
||||||
|
item.SubNum = u.SubNum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -606,7 +609,7 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
|
|||||||
f.SetSheetName("Sheet1", sheetName)
|
f.SetSheetName("Sheet1", sheetName)
|
||||||
|
|
||||||
headers := []string{
|
headers := []string{
|
||||||
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
||||||
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
|
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
|
||||||
}
|
}
|
||||||
for i, h := range headers {
|
for i, h := range headers {
|
||||||
@ -636,22 +639,22 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
|
|||||||
f.SetCellValue(sheetName, fmt.Sprintf("B%d", rowIndex), bundleInfo.BundleName)
|
f.SetCellValue(sheetName, fmt.Sprintf("B%d", rowIndex), bundleInfo.BundleName)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
|
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.CustomerName)
|
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.SubNum)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.BundleCreateAt)
|
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.CustomerName)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.PayTime)
|
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.Amount)
|
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.PayTime)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount)
|
||||||
|
|
||||||
if addCount > 0 {
|
if addCount > 0 {
|
||||||
for i, add := range bundleInfo.AddBundleInfo {
|
for i, add := range bundleInfo.AddBundleInfo {
|
||||||
r := rowIndex + i
|
r := rowIndex + i
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("I%d", r), add.OrderAddNo)
|
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.OrderAddNo)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.Amount)
|
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.Amount)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.SettlementAmount)
|
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.SettlementAmount)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), GetCurrencyTypeText(add.CurrencyType))
|
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), add.HandlingFee)
|
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.HandlingFee)
|
||||||
//f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.ExchangeRate)
|
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.OrderAddCreateAt)
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.OrderAddCreateAt)
|
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), GetPayStatusText(add.AddPayStatus))
|
||||||
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), GetPayStatusText(add.AddPayStatus))
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for i := 8; i <= 15; i++ {
|
for i := 8; i <= 15; i++ {
|
||||||
|
@ -11,10 +11,11 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/bundle/logic"
|
"fonchain-fiee/pkg/service/bundle/logic"
|
||||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||||
"fonchain-fiee/pkg/utils"
|
"fonchain-fiee/pkg/utils"
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetReconciliationList(c *gin.Context) {
|
func GetReconciliationList(c *gin.Context) {
|
||||||
@ -28,6 +29,29 @@ func GetReconciliationList(c *gin.Context) {
|
|||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
var userIds []int64
|
||||||
|
for _, u := range detail.List {
|
||||||
|
userIds = append(userIds, int64(u.UserID))
|
||||||
|
}
|
||||||
|
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
Ids: userIds,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
|
||||||
|
if len(userListResp.UserList) > 0 {
|
||||||
|
for _, u := range userListResp.UserList {
|
||||||
|
userMap[int64(u.Id)] = u
|
||||||
|
}
|
||||||
|
for _, u := range detail.List {
|
||||||
|
if user, ok := userMap[int64(u.UserID)]; ok {
|
||||||
|
u.SubNum = user.SubNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
service.Success(c, detail)
|
service.Success(c, detail)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -44,8 +68,31 @@ func GetReconciliationListDownload(c *gin.Context) {
|
|||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
var userIds []int64
|
||||||
|
for _, u := range detail.List {
|
||||||
|
userIds = append(userIds, int64(u.UserID))
|
||||||
|
}
|
||||||
|
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
Ids: userIds,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
|
||||||
|
if len(userListResp.UserList) > 0 {
|
||||||
|
for _, u := range userListResp.UserList {
|
||||||
|
userMap[int64(u.Id)] = u
|
||||||
|
}
|
||||||
|
for _, u := range detail.List {
|
||||||
|
if user, ok := userMap[int64(u.UserID)]; ok {
|
||||||
|
u.SubNum = user.SubNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
titleList := []string{
|
titleList := []string{
|
||||||
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||||
}
|
}
|
||||||
var dataList []interface{}
|
var dataList []interface{}
|
||||||
|
|
||||||
@ -60,6 +107,7 @@ func GetReconciliationListDownload(c *gin.Context) {
|
|||||||
i.BundleOrderOn,
|
i.BundleOrderOn,
|
||||||
i.BundleAddOrderOn,
|
i.BundleAddOrderOn,
|
||||||
i.CreationTime,
|
i.CreationTime,
|
||||||
|
i.SubNum,
|
||||||
i.UserName,
|
i.UserName,
|
||||||
i.UserTel,
|
i.UserTel,
|
||||||
i.BundleName,
|
i.BundleName,
|
||||||
|
Loading…
Reference in New Issue
Block a user