解决冲突
This commit is contained in:
commit
c22977816b
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,7 @@
|
||||
syntax = "proto3";
|
||||
package accountFiee;
|
||||
import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto";
|
||||
|
||||
option go_package = "./;accountFiee";
|
||||
|
||||
//protoc -I . -I C:\Users\lenovo\go\src --go_out=. --go-triple_out=. ./accountFiee.proto
|
||||
@ -184,6 +185,8 @@ message UserListRequest{
|
||||
int32 auditStatus = 7;
|
||||
uint64 page = 8;
|
||||
uint64 pageSize = 9;
|
||||
string blurNameTel = 10;
|
||||
repeated int64 ids = 11;
|
||||
}
|
||||
message UserInfoResponse{
|
||||
uint64 id = 1;
|
||||
|
@ -525,3 +525,175 @@ func (this *ClockLogListResponse) Validate() error {
|
||||
func (this *SubmitInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonMsg) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatRecordData) Validate() error {
|
||||
for _, item := range this.Medias {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Medias", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatRecordResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatRecordRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterWaiterRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterWaiterResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatMediaData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatMediaResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatMediaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListRequest2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatUser2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListResp2) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ChatAutoReplyRulerData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatAutoReplyRulerResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatAutoReplyRulerRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ChatUserData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatUserResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v4.22.0--rc2
|
||||
// source: accountFiee.proto
|
||||
// - protoc v4.24.0--rc1
|
||||
// source: api/accountFiee/accountFiee.proto
|
||||
|
||||
package accountFiee
|
||||
|
||||
@ -35,7 +35,7 @@ type AccountFieeClient interface {
|
||||
OnlineLog(ctx context.Context, in *LoginInfosByUserIdRequest, opts ...grpc_go.CallOption) (*LoginLogsResponse, common.ErrorWithAttachment)
|
||||
OnlineLogById(ctx context.Context, in *OnlineLogByIdRequest, opts ...grpc_go.CallOption) (*LoginLog, common.ErrorWithAttachment)
|
||||
CheckPwd(ctx context.Context, in *CheckPwdRequest, opts ...grpc_go.CallOption) (*UpdateResponse, common.ErrorWithAttachment)
|
||||
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
SendCustomMsg(ctx context.Context, in *SendCustomMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
SendExCustomMsg(ctx context.Context, in *SendCustomMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
@ -70,7 +70,7 @@ type AccountFieeClient interface {
|
||||
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
||||
// submit info
|
||||
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
// -----------------------------客服聊天系统--------------------------------
|
||||
//-----------------------------客服聊天系统--------------------------------
|
||||
CreateChatUser(ctx context.Context, in *ChatUserData, opts ...grpc_go.CallOption) (*CreateChatUserResp, common.ErrorWithAttachment)
|
||||
UpdateChatUser(ctx context.Context, in *ChatUserData, opts ...grpc_go.CallOption) (*CommonMsg, common.ErrorWithAttachment)
|
||||
SaveChatUser(ctx context.Context, in *ChatUserData, opts ...grpc_go.CallOption) (*CommonMsg, common.ErrorWithAttachment)
|
||||
@ -591,7 +591,7 @@ type AccountFieeServer interface {
|
||||
OnlineLog(context.Context, *LoginInfosByUserIdRequest) (*LoginLogsResponse, error)
|
||||
OnlineLogById(context.Context, *OnlineLogByIdRequest) (*LoginLog, error)
|
||||
CheckPwd(context.Context, *CheckPwdRequest) (*UpdateResponse, error)
|
||||
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
SendMsg(context.Context, *SendMsgRequest) (*SendMsgStatusResponse, error)
|
||||
SendCustomMsg(context.Context, *SendCustomMsgRequest) (*SendMsgStatusResponse, error)
|
||||
SendExCustomMsg(context.Context, *SendCustomMsgRequest) (*SendMsgStatusResponse, error)
|
||||
@ -626,7 +626,7 @@ type AccountFieeServer interface {
|
||||
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||
// submit info
|
||||
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
||||
// -----------------------------客服聊天系统--------------------------------
|
||||
//-----------------------------客服聊天系统--------------------------------
|
||||
CreateChatUser(context.Context, *ChatUserData) (*CreateChatUserResp, error)
|
||||
UpdateChatUser(context.Context, *ChatUserData) (*CommonMsg, error)
|
||||
SaveChatUser(context.Context, *ChatUserData) (*CommonMsg, error)
|
||||
@ -3074,5 +3074,5 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "accountFiee.proto",
|
||||
Metadata: "api/accountFiee/accountFiee.proto",
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,32 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *OrderRecordsRequestV2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderRecordsResponseV2) Validate() error {
|
||||
for _, item := range this.BundleInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("BundleInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderBundleRecordInfo) Validate() error {
|
||||
for _, item := range this.AddBundleInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderAddBundleRecordInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PackagePriceAndTimeResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ type BundleClient interface {
|
||||
UpdateFinancialConfirmationStatus(ctx context.Context, in *FinancialConfirmationRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment)
|
||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, 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)
|
||||
@ -53,6 +54,7 @@ type BundleClient interface {
|
||||
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)
|
||||
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
||||
ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment)
|
||||
// 余量管理
|
||||
BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment)
|
||||
BundleExtendRecordsList(ctx context.Context, in *BundleExtendRecordsListRequest, opts ...grpc_go.CallOption) (*BundleExtendRecordsListResponse, common.ErrorWithAttachment)
|
||||
@ -63,31 +65,33 @@ type bundleClient struct {
|
||||
}
|
||||
|
||||
type BundleClientImpl struct {
|
||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||
HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error)
|
||||
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
|
||||
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error)
|
||||
PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||
SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error)
|
||||
ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||
HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error)
|
||||
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
|
||||
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error)
|
||||
PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||
SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error)
|
||||
ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||
ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
}
|
||||
|
||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||
@ -204,6 +208,12 @@ func (c *bundleClient) PackagePriceAndTime(ctx context.Context, in *OrderRecord,
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PackagePriceAndTime", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment) {
|
||||
out := new(OrderRecordsResponseV2)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsListV2", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateValueAddBundleResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -240,6 +250,12 @@ func (c *bundleClient) ValueAddServiceDetail(ctx context.Context, in *ValueAddSe
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment) {
|
||||
out := new(ValueAddServiceLang)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceLangByUuidAndLanguage", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment) {
|
||||
out := new(BundleExtendResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -273,6 +289,7 @@ type BundleServer interface {
|
||||
UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||
CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error)
|
||||
PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
//增值套餐
|
||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
@ -281,6 +298,7 @@ type BundleServer interface {
|
||||
SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error)
|
||||
ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||
ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||
// 余量管理
|
||||
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
@ -343,6 +361,9 @@ func (UnimplementedBundleServer) CreateOrderAddRecord(context.Context, *OrderAdd
|
||||
func (UnimplementedBundleServer) PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PackagePriceAndTime not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsListV2 not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||
}
|
||||
@ -361,6 +382,9 @@ func (UnimplementedBundleServer) ValueAddServiceList(context.Context, *ValueAddS
|
||||
func (UnimplementedBundleServer) ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceDetail not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceLangByUuidAndLanguage not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleExtend not implemented")
|
||||
}
|
||||
@ -888,6 +912,35 @@ func _Bundle_PackagePriceAndTime_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_OrderRecordsListV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OrderRecordsRequestV2)
|
||||
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("OrderRecordsListV2", 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_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateValueAddBundleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1062,6 +1115,35 @@ func _Bundle_ValueAddServiceDetail_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_ValueAddServiceLangByUuidAndLanguage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ValueAddServiceDetailRequest)
|
||||
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("ValueAddServiceLangByUuidAndLanguage", 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_BundleExtend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BundleExtendRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1195,6 +1277,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "PackagePriceAndTime",
|
||||
Handler: _Bundle_PackagePriceAndTime_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OrderRecordsListV2",
|
||||
Handler: _Bundle_OrderRecordsListV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateValueAddBundle",
|
||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||
@ -1219,6 +1305,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "ValueAddServiceDetail",
|
||||
Handler: _Bundle_ValueAddServiceDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ValueAddServiceLangByUuidAndLanguage",
|
||||
Handler: _Bundle_ValueAddServiceLangByUuidAndLanguage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BundleExtend",
|
||||
Handler: _Bundle_BundleExtend_Handler,
|
||||
|
@ -23,6 +23,7 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web")
|
||||
{
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list-V2", bundle.OrderRecordsListV2)
|
||||
}
|
||||
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
||||
{
|
||||
|
@ -86,33 +86,33 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
||||
totalAmount float64
|
||||
mainDeadline = orderRecordResp.OrderRecord.ExpirationTime
|
||||
)
|
||||
//for _, opt := range req.AddPriceOptionsList {
|
||||
// valueAddInfo, err := service.BundleProvider.ValueAddServiceDetail(context.Background(), &bundle.ValueAddServiceDetailRequest{
|
||||
// Uuid: opt.ValueUid,
|
||||
// Language: req.Language,
|
||||
// })
|
||||
// if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
// }
|
||||
// // 找到匹配的选项
|
||||
// var selectedOption *bundle.ValueAddPriceOptions
|
||||
// for _, option := range valueAddInfo.ValueAddServiceLang.Options {
|
||||
// if int32(option.Id) == opt.Id {
|
||||
// selectedOption = option
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// if selectedOption == nil {
|
||||
// service.Error(c, errors.New("未找到匹配的价格选项"))
|
||||
// return
|
||||
// }
|
||||
// valueAddServices = append(valueAddServices, ValueAddServiceInfo{
|
||||
// Service: valueAddInfo.ValueAddServiceLang,
|
||||
// Options: selectedOption,
|
||||
// ID: opt.Id,
|
||||
// })
|
||||
//}
|
||||
for _, opt := range req.AddPriceOptionsList {
|
||||
valueAddInfo, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &bundle.ValueAddServiceDetailRequest{
|
||||
Uuid: opt.ValueUid,
|
||||
Language: req.Language,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 找到匹配的选项
|
||||
var selectedOption *bundle.ValueAddPriceOptions
|
||||
for _, option := range valueAddInfo.Options {
|
||||
if int32(option.Id) == opt.Id {
|
||||
selectedOption = option
|
||||
break
|
||||
}
|
||||
}
|
||||
if selectedOption == nil {
|
||||
service.Error(c, errors.New("未找到匹配的价格选项"))
|
||||
return
|
||||
}
|
||||
valueAddServices = append(valueAddServices, ValueAddServiceInfo{
|
||||
Service: valueAddInfo,
|
||||
Options: selectedOption,
|
||||
ID: opt.Id,
|
||||
})
|
||||
}
|
||||
// 计算总金额和确定截止日期
|
||||
var expirationDate string
|
||||
var addPriceList []*bundle.AddPriceOptionsInfo
|
||||
@ -421,7 +421,87 @@ func UpdateBundleOrderStatusPaid(c *gin.Context) {
|
||||
|
||||
service.Success(c, nil)
|
||||
}
|
||||
func OrderRecordsListV2(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequestV2
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := &bundle.OrderRecordsResponseV2{}
|
||||
|
||||
// Step 1: 如果有姓名/电话筛选,先查用户列表
|
||||
if req.CustomerName != "" {
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
BlurNameTel: req.CustomerName,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(userListResp.UserList) == 0 {
|
||||
// 没查到用户,直接返回空结果
|
||||
res.Page = req.Page
|
||||
res.PageSize = req.PageSize
|
||||
res.Total = 0
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
|
||||
// 提取用户ID列表
|
||||
for _, u := range userListResp.UserList {
|
||||
req.UserIds = append(req.UserIds, int64(u.Id))
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2: 查询订单列表
|
||||
orderList, err := service.BundleProvider.OrderRecordsListV2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// Step 3: 如果订单不为空,查一次用户信息填充(只查一次)
|
||||
if len(orderList.BundleInfo) > 0 {
|
||||
// 收集订单里的所有用户ID
|
||||
userIdSet := make(map[int64]struct{})
|
||||
for _, i := range orderList.BundleInfo {
|
||||
userIdSet[i.CustomerId] = struct{}{}
|
||||
}
|
||||
|
||||
var userIds []int64
|
||||
for id := range userIdSet {
|
||||
userIds = append(userIds, id)
|
||||
}
|
||||
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
Ids: userIds,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 建立用户ID -> 用户信息映射
|
||||
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
|
||||
for _, u := range userListResp.UserList {
|
||||
userMap[int64(u.Id)] = u
|
||||
}
|
||||
|
||||
// 填充订单中的用户信息
|
||||
for _, item := range orderList.BundleInfo {
|
||||
if u, ok := userMap[item.CustomerId]; ok {
|
||||
item.CustomerName = u.Name
|
||||
item.TelNum = u.TelNum
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
service.Success(c, orderList)
|
||||
}
|
||||
func OrderRecordsList(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequest
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user