WH01243 4 年之前
父節點
當前提交
a203e49194

+ 24 - 24
api/integral.api

@@ -18,15 +18,15 @@ type RespList {
 }
 
 type Point {
-	Id             int64  `form:"id"`
-	PointType      int64  `form:"pointType"`
-	BusinessTypeId string `form:"businessTypeId"`
-	BusinessType   string `form:"businessType"`
-	Point          int64  `form:"point"`
-	CreateTime     string `form:"createTime"`
-	EndDate        string `form:"endDate"`
-	Sort           int64  `form:"sort"`
-	Name           string `form:"name"`
+	Id         int64  `form:"id"`
+	PointType  int64  `form:"pointType"`
+	SourceId   string `form:"sourceId"`
+	SourceType string `form:"sourceType"`
+	Point      int64  `form:"point"`
+	CreateTime string `form:"createTime"`
+	EndDate    string `form:"endDate"`
+	Sort       int64  `form:"sort"`
+	Name       string `form:"name"`
 }
 
 type response {
@@ -50,14 +50,14 @@ type expireReq {
 
 type (
 	addReq {
-		UserId         string `form:"userId"`
-		AppId          string `form:"appId"`
-		PointType      int64  `form:"pointType"`
-		BusinessTypeId string `form:"businessTypeId"`
-		BusinessType   string `form:"businessType"`
-		Point          int64  `form:"point"`
-		EndDate        string `form:"endDate"`
-		OperationType  bool   `form:"operationType"`
+		UserId        string `form:"userId"`
+		AppId         string `form:"appId"`
+		PointType     int64  `form:"pointType"`
+		SourceId      string `form:"sourceId"`
+		SourceType    string `form:"sourceType"`
+		Point         int64  `form:"point"`
+		EndDate       string `form:"endDate"`
+		OperationType bool   `form:"operationType"`
 	}
 
 	addResp {
@@ -67,13 +67,13 @@ type (
 )
 type (
 	ConsumeReq {
-		UserId         string `form:"userId"`
-		AppId          string `form:"appId"`
-		PointType      int64  `form:"pointType"`
-		BusinessTypeId string `form:"businessTypeId"`
-		BusinessType   string `form:"businessType"`
-		Point          int64  `form:"point"`
-		EndDate        string `form:"endDate"`
+		UserId     string `form:"userId"`
+		AppId      string `form:"appId"`
+		PointType  int64  `form:"pointType"`
+		SourceId   string `form:"sourceId"`
+		SourceType string `form:"sourceType"`
+		Point      int64  `form:"point"`
+		EndDate    string `form:"endDate"`
 	}
 
 	ConsumeResp {

+ 8 - 9
api/internal/logic/integralconsumelogic.go

@@ -1,8 +1,8 @@
 package logic
 
 import (
-	"context"
 	"app.yhyue.com/moapp/jyPoints/rpc/integral"
+	"context"
 
 	"app.yhyue.com/moapp/jyPoints/api/internal/svc"
 	"app.yhyue.com/moapp/jyPoints/api/internal/types"
@@ -24,20 +24,19 @@ func NewIntegralConsumeLogic(ctx context.Context, svcCtx *svc.ServiceContext) In
 	}
 }
 
-
 //积分消耗
 func (l *IntegralConsumeLogic) IntegralConsume(req types.ConsumeReq) (*types.ConsumeResp, error) {
 	// todo: add your logic here and delete this line
 	result := &types.ConsumeResp{}
 	lsi := l.svcCtx.Integral
 	resp, err := lsi.IntegralConsume(l.ctx, &integral.Req{
-		UserId:         req.UserId,
-		AppId:          req.AppId,
-		EndDate:        req.EndDate,
-		BusinessType:   req.BusinessType,
-		BusinessTypeId: req.BusinessTypeId,
-		PointType:      req.PointType,
-		Point:          req.Point,
+		UserId:     req.UserId,
+		AppId:      req.AppId,
+		EndDate:    req.EndDate,
+		SourceType: req.SourceType,
+		SourceId:   req.SourceId,
+		PointType:  req.PointType,
+		Point:      req.Point,
 	})
 	if err != nil {
 		return nil, err

+ 2 - 2
api/internal/logic/integraldetailedchecklogic.go

@@ -47,8 +47,8 @@ func (l *IntegralDetailedCheckLogic) IntegralDetailedCheck(req types.DetailedReq
 		point.Point= value.Point
 		point.CreateTime=value.CreateTime
 		point.PointType=value.PointType
-		point.BusinessTypeId=value.BusinessTypeId
-		point.BusinessType=value.BusinessType
+		point.SourceId=value.SourceId
+		point.SourceType=value.SourceType
 		point.Name=value.Name
 		result.Data=append(result.Data,&point )
 	}

+ 10 - 10
api/internal/logic/integralharvestlogic.go

@@ -1,10 +1,10 @@
 package logic
 
 import (
-	"context"
-	"app.yhyue.com/moapp/jyPoints/rpc/integral"
 	"app.yhyue.com/moapp/jyPoints/api/internal/svc"
 	"app.yhyue.com/moapp/jyPoints/api/internal/types"
+	"app.yhyue.com/moapp/jyPoints/rpc/integral"
+	"context"
 
 	"github.com/tal-tech/go-zero/core/logx"
 )
@@ -29,14 +29,14 @@ func (l *IntegralHarvestLogic) IntegralHarvest(req types.AddReq) (*types.AddResp
 	result := &types.AddResp{}
 	lsi := l.svcCtx.Integral
 	resp, err := lsi.IntegralHarvest(l.ctx, &integral.Req{
-		UserId:         req.UserId,
-		AppId:          req.AppId,
-		EndDate:        req.EndDate,
-		BusinessType:   req.BusinessType,
-		BusinessTypeId: req.BusinessTypeId,
-		Point:          req.Point,
-		PointType:      req.PointType,
-		OperationType:  req.OperationType,
+		UserId:        req.UserId,
+		AppId:         req.AppId,
+		EndDate:       req.EndDate,
+		SourceType:    req.SourceType,
+		SourceId:      req.SourceId,
+		Point:         req.Point,
+		PointType:     req.PointType,
+		OperationType: req.OperationType,
 	})
 	if err != nil {
 		return nil, err

+ 24 - 24
api/internal/types/types.go

@@ -17,15 +17,15 @@ type RespList struct {
 }
 
 type Point struct {
-	Id             int64  `form:"id"`
-	PointType      int64  `form:"pointType"`
-	BusinessTypeId string `form:"businessTypeId"`
-	BusinessType   string `form:"businessType"`
-	Point          int64  `form:"point"`
-	CreateTime     string `form:"createTime"`
-	EndDate        string `form:"endDate"`
-	Sort           int64  `form:"sort"`
-	Name           string `form:"name"`
+	Id         int64  `form:"id"`
+	PointType  int64  `form:"pointType"`
+	SourceId   string `form:"sourceId"`
+	SourceType string `form:"sourceType"`
+	Point      int64  `form:"point"`
+	CreateTime string `form:"createTime"`
+	EndDate    string `form:"endDate"`
+	Sort       int64  `form:"sort"`
+	Name       string `form:"name"`
 }
 
 type Response struct {
@@ -47,14 +47,14 @@ type ExpireReq struct {
 }
 
 type AddReq struct {
-	UserId         string `form:"userId"`
-	AppId          string `form:"appId"`
-	PointType      int64  `form:"pointType"`
-	BusinessTypeId string `form:"businessTypeId"`
-	BusinessType   string `form:"businessType"`
-	Point          int64  `form:"point"`
-	EndDate        string `form:"endDate"`
-	OperationType  bool   `form:"operationType"`
+	UserId        string `form:"userId"`
+	AppId         string `form:"appId"`
+	PointType     int64  `form:"pointType"`
+	SourceId      string `form:"sourceId"`
+	SourceType    string `form:"sourceType"`
+	Point         int64  `form:"point"`
+	EndDate       string `form:"endDate"`
+	OperationType bool   `form:"operationType"`
 }
 
 type AddResp struct {
@@ -63,13 +63,13 @@ type AddResp struct {
 }
 
 type ConsumeReq struct {
-	UserId         string `form:"userId"`
-	AppId          string `form:"appId"`
-	PointType      int64  `form:"pointType"`
-	BusinessTypeId string `form:"businessTypeId"`
-	BusinessType   string `form:"businessType"`
-	Point          int64  `form:"point"`
-	EndDate        string `form:"endDate"`
+	UserId     string `form:"userId"`
+	AppId      string `form:"appId"`
+	PointType  int64  `form:"pointType"`
+	SourceId   string `form:"sourceId"`
+	SourceType string `form:"sourceType"`
+	Point      int64  `form:"point"`
+	EndDate    string `form:"endDate"`
 }
 
 type ConsumeResp struct {

+ 22 - 22
entity/integral.go

@@ -24,29 +24,29 @@ type Balance struct {
 	Id          int64  `xorm:"pk autoincr id" form:"id" json:"id"`
 	UserId      string `xorm:"userId" form:"userId" json:"userId"`                //用户标识
 	CountPoints int64  `xorm:"countPoints" form:"countPoints" json:"countPoints"` //合计
-	AppId       string  `xorm:"appId" form:"appId" json:"appId"`                   //剑鱼标识
+	AppId       string `xorm:"appId" form:"appId" json:"appId"`                   //剑鱼标识
 }
 
 //积分余额
 type BalanceUpdate struct {
 	UserId      string `xorm:"userId" form:"userId" json:"userId"`                //用户标识
 	CountPoints int64  `xorm:"countPoints" form:"countPoints" json:"countPoints"` //合计
-	AppId       string  `xorm:"appId" form:"appId" json:"appId"`                   //剑鱼标识
+	AppId       string `xorm:"appId" form:"appId" json:"appId"`                   //剑鱼标识
 	Change      bool   `xorm:"change" form:"change" json:"change"`                //修改方式true新增 false消耗
 }
 
 //积分流水
 type Flow struct {
-	Id             int64  `xorm:"pk autoincr id" form:"id" json:"id"`
-	UserId         string `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
-	PointType      int64  `xorm:"pointType" form:"pointType" json:"pointType"`                //积分类型
-	BusinessTypeId string  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
-	BusinessType   string `xorm:"businessType" form:"businessType" json:"businessType"`       //业务类型
-	Point          int64  `xorm:"point" form:"point" json:"point"`                            //积分
-	CreateTime     string `xorm:"createTime" form:"createTime" json:"createTime"`             //创建时间
-	EndDate        string `xorm:"endDate" form:"endDate" json:"endDate"`                      //截止时间
-	AppId          string  `xorm:"appId" form:"appId" json:"appId"`                            //剑鱼标识
-	Sort           int64  `xorm:"sort" form:"sort" json:"sort"`                               //操作类型1加-1减
+	Id           int64  `xorm:"pk autoincr id" form:"id" json:"id"`
+	UserId       string `xorm:"userId" form:"userId" json:"userId"`                   //用户标识
+	PointType    int64  `xorm:"pointType" form:"pointType" json:"pointType"`          //积分类型
+	SourceId   string `xorm:"sourceId" form:"sourceId" json:"sourceId"`               //来源标识
+	SourceType string `xorm:"sourceType" form:"sourceType" json:"sourceType"` 		  //来源类型
+	Point        int64  `xorm:"point" form:"point" json:"point"`                      //积分
+	CreateTime   string `xorm:"createTime" form:"createTime" json:"createTime"`       //创建时间
+	EndDate      string `xorm:"endDate" form:"endDate" json:"endDate"`                //截止时间
+	AppId        string `xorm:"appId" form:"appId" json:"appId"`                      //剑鱼标识
+	Sort         int64  `xorm:"sort" form:"sort" json:"sort"`                         //操作类型1加-1减
 }
 
 //积分流水
@@ -54,12 +54,12 @@ type FlowReq struct {
 	Id             int64  `xorm:"pk autoincr id" form:"id" json:"id"`
 	UserId         string `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
 	PointType      int64  `xorm:"pointType" form:"pointType" json:"pointType"`                //积分类型
-	BusinessTypeId string  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
-	BusinessType   string `xorm:"businessType" form:"businessType" json:"businessType"`       //业务类型
+	SourceId   string `xorm:"sourceId" form:"sourceId" json:"sourceId"`               //来源标识
+	SourceType string `xorm:"sourceType" form:"sourceType" json:"sourceType"` 		  //来源类型
 	Point          int64  `xorm:"point" form:"point" json:"point"`                            //积分
 	CreateTime     string `xorm:"createTime" form:"createTime" json:"createTime"`             //创建时间
 	EndDate        string `xorm:"endDate" form:"endDate" json:"endDate"`                      //截止时间
-	AppId          string  `xorm:"appId" form:"appId" json:"appId"`                            //剑鱼标识
+	AppId          string `xorm:"appId" form:"appId" json:"appId"`                            //剑鱼标识
 	Sort           int64  `xorm:"sort" form:"sort" json:"sort"`                               //操作类型1加-1减
 	Name           string `xorm:"name" form:"name" json:"name"`                               //积分类型名称
 }
@@ -71,18 +71,18 @@ type Solde struct {
 	UserId          string `xorm:"userId" form:"userId" json:"userId"`                            //用户标识
 	TimePoints      int64  `xorm:"timePoints" form:"timePoints" json:"timePoints"`                //时效积分
 	EndDate         string `xorm:"endDate" form:"endDate" json:"endDate"`                         //有效期止
-	AppId           string  `xorm:"appId" form:"appId" json:"appId"`                               //剑鱼标识
+	AppId           string `xorm:"appId" form:"appId" json:"appId"`                               //剑鱼标识
 }
 
 //积分流水
 type FlowJSON struct {
 	UserId         string `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
 	PointType      int64  `xorm:"pointType" form:"pointType" json:"pointType"`                //积分类型
-	BusinessTypeId string  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
-	BusinessType   string `xorm:"businessType" form:"businessType" json:"businessType"`       //业务类型
+	SourceId   string `xorm:"sourceId" form:"sourceId" json:"sourceId"`               //来源标识
+	SourceType string `xorm:"sourceType" form:"sourceType" json:"sourceType"` 		  //来源类型
 	Point          int64  `xorm:"point" form:"point" json:"point"`                            //积分
 	EndDate        string `xorm:"endDate" form:"endDate" json:"endDate"`                      //截止时间
-	AppId          string  `xorm:"appId" form:"appId" json:"appId"`                            //剑鱼标识
+	AppId          string `xorm:"appId" form:"appId" json:"appId"`                            //剑鱼标识
 	OperationType  bool   `xorm:"operationType" form:"operationType" json:"operationType"`    //永久:true、时效:false
 	Sort           int64  `xorm:"sort" form:"sort" json:"sort"`                               //操作类型1加-1减
 	Page           int64  `xorm:"page" form:"page" json:"page"`                               //当前页数
@@ -94,7 +94,7 @@ type FlowJSON struct {
 type ExpireJSON struct {
 	UserId  string `xorm:"userId" form:"userId" json:"userId"`    //用户标识
 	EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
-	AppId   string  `xorm:"appId" form:"appId" json:"appId"`       //剑鱼标识
+	AppId   string `xorm:"appId" form:"appId" json:"appId"`       //剑鱼标识
 }
 
 //积分结存修改
@@ -104,7 +104,7 @@ type SoldeUpdate struct {
 	UserId     string `xorm:"userId" form:"userId" json:"userId"`             //用户标识
 	Points     int64  `xorm:"points" form:"points" json:"points"`             //积分
 	EndDate    string `xorm:"endDate" form:"endDate" json:"endDate"`          //有效期止
-	AppId      string  `xorm:"appId" form:"appId" json:"appId"`                //剑鱼标识
+	AppId      string `xorm:"appId" form:"appId" json:"appId"`                //剑鱼标识
 }
 
 //积分守护
@@ -112,5 +112,5 @@ type GuardJSON struct {
 	UserId    string `xorm:"userId" form:"userId" json:"userId"`          //用户标识
 	PointType int64  `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
 	EndDate   string `xorm:"endDate" form:"endDate" json:"endDate"`       //截止时间
-	AppId     string  `xorm:"appId" form:"appId" json:"appId"`             //剑鱼标识
+	AppId     string `xorm:"appId" form:"appId" json:"appId"`             //剑鱼标识
 }

+ 4 - 4
rpc/integral.proto

@@ -6,8 +6,8 @@ message Req {
   string userId = 1;
   string appId = 2;
   int64 pointType = 3;
-  string businessTypeId = 4;
-  string businessType = 5;
+  string sourceId = 4;
+  string sourceType = 5;
   int64 point = 6;
   string endDate = 7;
   int64 page = 8;
@@ -34,8 +34,8 @@ message RespList {
 message Point {
     int64 id=1;
     int64 pointType = 2;
-    string businessTypeId = 3;
-    string businessType = 4;
+    string sourceId = 3;
+    string sourceType = 4;
     int64 point = 5;
     string CreateTime = 6;
     string endDate = 7;

+ 39 - 41
rpc/integral/integral.pb.go

@@ -34,17 +34,17 @@ type Req struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserId         string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
-	AppId          string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
-	PointType      int64  `protobuf:"varint,3,opt,name=pointType,proto3" json:"pointType,omitempty"`
-	BusinessTypeId string `protobuf:"bytes,4,opt,name=businessTypeId,proto3" json:"businessTypeId,omitempty"`
-	BusinessType   string `protobuf:"bytes,5,opt,name=businessType,proto3" json:"businessType,omitempty"`
-	Point          int64  `protobuf:"varint,6,opt,name=point,proto3" json:"point,omitempty"`
-	EndDate        string `protobuf:"bytes,7,opt,name=endDate,proto3" json:"endDate,omitempty"`
-	Page           int64  `protobuf:"varint,8,opt,name=page,proto3" json:"page,omitempty"`
-	PageSize       int64  `protobuf:"varint,9,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
-	OperationType  bool   `protobuf:"varint,10,opt,name=operationType,proto3" json:"operationType,omitempty"`
-	SearchType     int64  `protobuf:"varint,11,opt,name=SearchType,proto3" json:"SearchType,omitempty"`
+	UserId        string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
+	AppId         string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
+	PointType     int64  `protobuf:"varint,3,opt,name=pointType,proto3" json:"pointType,omitempty"`
+	SourceId      string `protobuf:"bytes,4,opt,name=sourceId,proto3" json:"sourceId,omitempty"`
+	SourceType    string `protobuf:"bytes,5,opt,name=sourceType,proto3" json:"sourceType,omitempty"`
+	Point         int64  `protobuf:"varint,6,opt,name=point,proto3" json:"point,omitempty"`
+	EndDate       string `protobuf:"bytes,7,opt,name=endDate,proto3" json:"endDate,omitempty"`
+	Page          int64  `protobuf:"varint,8,opt,name=page,proto3" json:"page,omitempty"`
+	PageSize      int64  `protobuf:"varint,9,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
+	OperationType bool   `protobuf:"varint,10,opt,name=operationType,proto3" json:"operationType,omitempty"`
+	SearchType    int64  `protobuf:"varint,11,opt,name=SearchType,proto3" json:"SearchType,omitempty"`
 }
 
 func (x *Req) Reset() {
@@ -100,16 +100,16 @@ func (x *Req) GetPointType() int64 {
 	return 0
 }
 
-func (x *Req) GetBusinessTypeId() string {
+func (x *Req) GetSourceId() string {
 	if x != nil {
-		return x.BusinessTypeId
+		return x.SourceId
 	}
 	return ""
 }
 
-func (x *Req) GetBusinessType() string {
+func (x *Req) GetSourceType() string {
 	if x != nil {
-		return x.BusinessType
+		return x.SourceType
 	}
 	return ""
 }
@@ -303,15 +303,15 @@ type Point struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id             int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	PointType      int64  `protobuf:"varint,2,opt,name=pointType,proto3" json:"pointType,omitempty"`
-	BusinessTypeId string `protobuf:"bytes,3,opt,name=businessTypeId,proto3" json:"businessTypeId,omitempty"`
-	BusinessType   string `protobuf:"bytes,4,opt,name=businessType,proto3" json:"businessType,omitempty"`
-	Point          int64  `protobuf:"varint,5,opt,name=point,proto3" json:"point,omitempty"`
-	CreateTime     string `protobuf:"bytes,6,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`
-	EndDate        string `protobuf:"bytes,7,opt,name=endDate,proto3" json:"endDate,omitempty"`
-	Sort           int64  `protobuf:"varint,8,opt,name=Sort,proto3" json:"Sort,omitempty"`
-	Name           string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
+	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	PointType  int64  `protobuf:"varint,2,opt,name=pointType,proto3" json:"pointType,omitempty"`
+	SourceId   string `protobuf:"bytes,3,opt,name=sourceId,proto3" json:"sourceId,omitempty"`
+	SourceType string `protobuf:"bytes,4,opt,name=sourceType,proto3" json:"sourceType,omitempty"`
+	Point      int64  `protobuf:"varint,5,opt,name=point,proto3" json:"point,omitempty"`
+	CreateTime string `protobuf:"bytes,6,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`
+	EndDate    string `protobuf:"bytes,7,opt,name=endDate,proto3" json:"endDate,omitempty"`
+	Sort       int64  `protobuf:"varint,8,opt,name=Sort,proto3" json:"Sort,omitempty"`
+	Name       string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
 }
 
 func (x *Point) Reset() {
@@ -360,16 +360,16 @@ func (x *Point) GetPointType() int64 {
 	return 0
 }
 
-func (x *Point) GetBusinessTypeId() string {
+func (x *Point) GetSourceId() string {
 	if x != nil {
-		return x.BusinessTypeId
+		return x.SourceId
 	}
 	return ""
 }
 
-func (x *Point) GetBusinessType() string {
+func (x *Point) GetSourceType() string {
 	if x != nil {
-		return x.BusinessType
+		return x.SourceType
 	}
 	return ""
 }
@@ -413,17 +413,16 @@ var File_integral_proto protoreflect.FileDescriptor
 
 var file_integral_proto_rawDesc = []byte{
 	0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x12, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0xc3, 0x02, 0x0a, 0x03, 0x52,
+	0x12, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0xb3, 0x02, 0x0a, 0x03, 0x52,
 	0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70,
 	0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
 	0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26,
-	0x0a, 0x0e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73,
-	0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65,
-	0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75,
-	0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a,
+	0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f,
 	0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74,
 	0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
 	0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
@@ -447,15 +446,14 @@ var file_integral_proto_rawDesc = []byte{
 	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75,
 	0x6e, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
 	0x32, 0x0f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x69, 0x6e,
-	0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf9, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e,
+	0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe9, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e,
 	0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
 	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02,
 	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
-	0x26, 0x0a, 0x0e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x49,
-	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73,
-	0x73, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x75, 0x73, 0x69, 0x6e,
-	0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62,
-	0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
+	0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
 	0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e,
 	0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
 	0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,

+ 1 - 1
rpc/integralclient/integral.go

@@ -14,10 +14,10 @@ import (
 )
 
 type (
+	Req      = integral.Req
 	Resp     = integral.Resp
 	RespList = integral.RespList
 	Point    = integral.Point
-	Req      = integral.Req
 
 	Integral interface {
 		// 收获积分

+ 2 - 2
rpc/internal/logic/integralconsumelogic.go

@@ -36,8 +36,8 @@ func (l *IntegralConsumeLogic) IntegralConsume(in *integral.Req) (*integral.Resp
 	dat := entity.FlowJSON{}
 	dat.UserId = in.UserId
 	dat.PointType = in.PointType
-	dat.BusinessTypeId = in.BusinessTypeId
-	dat.BusinessType = in.BusinessType
+	dat.SourceId = in.SourceId
+	dat.SourceType = in.SourceType
 	dat.Point = in.Point
 	dat.EndDate = in.EndDate
 	dat.AppId = in.AppId

+ 2 - 2
rpc/internal/logic/integralharvestlogic.go

@@ -29,8 +29,8 @@ func (l *IntegralHarvestLogic) IntegralHarvest(in *integral.Req) (*integral.Resp
 	result := &integral.Resp{}
 	dat := entity.FlowJSON{}
 	dat.PointType = in.PointType
-	dat.BusinessTypeId = in.BusinessTypeId
-	dat.BusinessType = in.BusinessType
+	dat.SourceId = in.SourceId
+	dat.SourceType = in.SourceType
 	dat.EndDate = in.EndDate
 	dat.AppId = in.AppId
 	dat.OperationType = in.OperationType

+ 3 - 3
rpc/test/consume_test.go

@@ -32,7 +32,7 @@ func init() {
 func  Test_Consume(t *testing.T)  {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem :=integralclient.NewIntegral(zrpc.MustNewClient(c.FileSystemConf))
-	req := &integral.Req{UserId: "111111",PointType:2003,BusinessTypeId:1,BusinessType:"1", Point: 110,EndDate:"2021-03-11",AppId: 10000}
+	req := &integral.Req{UserId: "111111",PointType:2003,SourceId:"1",SourceType:"1", Point: 110,EndDate:"2021-03-11",AppId: "10000"}
 	res, err := FileSystem.IntegralConsume(ctx, req)
 	log.Println("err ", err)
 	log.Println("req ", res)
@@ -41,7 +41,7 @@ func  Test_Consume(t *testing.T)  {
 func  Test_Add(t *testing.T)  {
 	ctx, _ := context.WithTimeout(context.Background(), 500*time.Second)
 	FileSystem :=integralclient.NewIntegral(zrpc.MustNewClient(c.FileSystemConf))
-	req := &integral.Req{UserId: "111111",PointType:1002,BusinessTypeId:1,BusinessType:"1", Point: 60,EndDate:"2021-03-11",AppId: 10000,OperationType:false}
+	req := &integral.Req{UserId: "111111",PointType:1002,SourceId:"1",SourceType:"1", Point: 60,EndDate:"2021-03-11",AppId: "10000",OperationType:false}
 	res, err := FileSystem.IntegralHarvest(ctx, req)
 	log.Println("err ", err)
 	log.Println("req ", res)
@@ -50,7 +50,7 @@ func  Test_Add(t *testing.T)  {
 func  Test_serach(t *testing.T)  {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem :=integralclient.NewIntegral(zrpc.MustNewClient(c.FileSystemConf))
-	req := &integral.Req{UserId: "111111", Page:1,PageSize:2,AppId:10000,EndDate:"2021-03",}
+	req := &integral.Req{UserId: "111111", Page:1,PageSize:2,AppId:"10000",EndDate:"2021-03",}
 	res, err := FileSystem.IntegralDetailedCheck(ctx, req)
 	log.Println("err ", err)
 	log.Println("req ", res)

+ 8 - 8
service/integralService.go

@@ -17,8 +17,8 @@ func (service *IntegralService) IntegralAddService(data entity.FlowJSON) (int64,
 	err := orm.Begin()
 	flow := entity.Flow{}
 	flow.UserId = data.UserId
-	flow.BusinessTypeId = data.BusinessTypeId
-	flow.BusinessType = data.BusinessType
+	flow.SourceId = data.SourceId
+	flow.SourceType = data.SourceType
 	flow.PointType = data.PointType
 	flow.Point = data.Point
 	flow.EndDate=data.EndDate
@@ -217,8 +217,8 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 	flow := entity.Flow{}
 	flow.UserId = data.UserId
 	flow.PointType = data.PointType
-	flow.BusinessTypeId = data.BusinessTypeId
-	flow.BusinessType = data.BusinessType
+	flow.SourceId = data.SourceId
+	flow.SourceType = data.SourceType
 	flow.Point = data.Point
 	flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
 	flow.EndDate = data.EndDate
@@ -431,8 +431,8 @@ func (service *IntegralService) IntegralGuardService(endDate string) bool {
 		flow := entity.Flow{}
 		flow.UserId = solde.UserId
 		flow.PointType = 2004
-		flow.BusinessTypeId = ""
-		flow.BusinessType = "0"
+		flow.SourceId = ""
+		flow.SourceType = ""
 		flow.Point = solde.TimePoints
 		flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
 		flow.EndDate = solde.EndDate
@@ -518,8 +518,8 @@ func (service *IntegralService) IntegralDetailedCheck(data entity.FlowJSON) ([]*
 		point.Point = value.Point
 		point.CreateTime = value.CreateTime
 		point.PointType = value.PointType
-		point.BusinessTypeId = value.BusinessTypeId
-		point.BusinessType = value.BusinessType
+		point.SourceId = value.SourceId
+		point.SourceType = value.SourceType
 		point.Name = value.Name
 		flowReq = append(flowReq, &point)
 	}