WH01243 4 年之前
父节点
当前提交
8f548364e7

+ 3 - 3
api/integral.api

@@ -21,7 +21,7 @@ type Point {
 	Id             int64  `form:"id"`
 	UserId         string `form:"userId"`
 	PointType      int64  `form:"pointType"`
-	BusinessTypeId int64  `form:"businessTypeId"`
+	BusinessTypeId string `form:"businessTypeId"`
 	BusinessType   string `form:"businessType"`
 	Point          int64  `form:"point"`
 	CreateTime     string `form:"createTime"`
@@ -55,7 +55,7 @@ type (
 		UserId         string `form:"userId"`
 		AppId          int64  `form:"appId"`
 		PointType      int64  `form:"pointType"`
-		BusinessTypeId int64  `form:"businessTypeId"`
+		BusinessTypeId string `form:"businessTypeId"`
 		BusinessType   string `form:"businessType"`
 		Point          int64  `form:"point"`
 		EndDate        string `form:"endDate"`
@@ -72,7 +72,7 @@ type (
 		UserId         string `form:"userId"`
 		AppId          int64  `form:"appId"`
 		PointType      int64  `form:"pointType"`
-		BusinessTypeId int64  `form:"businessTypeId"`
+		BusinessTypeId string `form:"businessTypeId"`
 		BusinessType   string `form:"businessType"`
 		Point          int64  `form:"point"`
 		EndDate        string `form:"endDate"`

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

@@ -20,7 +20,7 @@ type Point struct {
 	Id             int64  `form:"id"`
 	UserId         string `form:"userId"`
 	PointType      int64  `form:"pointType"`
-	BusinessTypeId int64  `form:"businessTypeId"`
+	BusinessTypeId string `form:"businessTypeId"`
 	BusinessType   string `form:"businessType"`
 	Point          int64  `form:"point"`
 	CreateTime     string `form:"createTime"`
@@ -52,7 +52,7 @@ type AddReq struct {
 	UserId         string `form:"userId"`
 	AppId          int64  `form:"appId"`
 	PointType      int64  `form:"pointType"`
-	BusinessTypeId int64  `form:"businessTypeId"`
+	BusinessTypeId string `form:"businessTypeId"`
 	BusinessType   string `form:"businessType"`
 	Point          int64  `form:"point"`
 	EndDate        string `form:"endDate"`
@@ -68,7 +68,7 @@ type ConsumeReq struct {
 	UserId         string `form:"userId"`
 	AppId          int64  `form:"appId"`
 	PointType      int64  `form:"pointType"`
-	BusinessTypeId int64  `form:"businessTypeId"`
+	BusinessTypeId string `form:"businessTypeId"`
 	BusinessType   string `form:"businessType"`
 	Point          int64  `form:"point"`
 	EndDate        string `form:"endDate"`

+ 3 - 3
entity/integral.go

@@ -40,7 +40,7 @@ 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 int64  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
+	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"`             //创建时间
@@ -54,7 +54,7 @@ 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 int64  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
+	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"`             //创建时间
@@ -78,7 +78,7 @@ type Solde struct {
 type FlowJSON struct {
 	UserId         string `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
 	PointType      int64  `xorm:"pointType" form:"pointType" json:"pointType"`                //积分类型
-	BusinessTypeId int64  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
+	BusinessTypeId string  `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
 	BusinessType   string `xorm:"businessType" form:"businessType" json:"businessType"`       //业务类型
 	Point          int64  `xorm:"point" form:"point" json:"point"`                            //积分
 	EndDate        string `xorm:"endDate" form:"endDate" json:"endDate"`                      //截止时间

+ 2 - 2
rpc/integral.proto

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

+ 8 - 8
rpc/integral/integral.pb.go

@@ -37,7 +37,7 @@ type Req struct {
 	UserId         string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
 	AppId          int64  `protobuf:"varint,2,opt,name=appId,proto3" json:"appId,omitempty"`
 	PointType      int64  `protobuf:"varint,3,opt,name=pointType,proto3" json:"pointType,omitempty"`
-	BusinessTypeId int64  `protobuf:"varint,4,opt,name=businessTypeId,proto3" json:"businessTypeId,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"`
@@ -100,11 +100,11 @@ func (x *Req) GetPointType() int64 {
 	return 0
 }
 
-func (x *Req) GetBusinessTypeId() int64 {
+func (x *Req) GetBusinessTypeId() string {
 	if x != nil {
 		return x.BusinessTypeId
 	}
-	return 0
+	return ""
 }
 
 func (x *Req) GetBusinessType() string {
@@ -306,7 +306,7 @@ type Point struct {
 	Id             int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
 	UserId         string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
 	PointType      int64  `protobuf:"varint,3,opt,name=pointType,proto3" json:"pointType,omitempty"`
-	BusinessTypeId int64  `protobuf:"varint,4,opt,name=businessTypeId,proto3" json:"businessTypeId,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"`
 	CreateTime     string `protobuf:"bytes,7,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`
@@ -369,11 +369,11 @@ func (x *Point) GetPointType() int64 {
 	return 0
 }
 
-func (x *Point) GetBusinessTypeId() int64 {
+func (x *Point) GetBusinessTypeId() string {
 	if x != nil {
 		return x.BusinessTypeId
 	}
-	return 0
+	return ""
 }
 
 func (x *Point) GetBusinessType() string {
@@ -436,7 +436,7 @@ var file_integral_proto_rawDesc = []byte{
 	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, 0x03, 0x52, 0x0e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73,
+	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,
@@ -469,7 +469,7 @@ var file_integral_proto_rawDesc = []byte{
 	0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 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, 0x03, 0x52,
+	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,

+ 0 - 2
rpc/internal/logic/integraldetailedchecklogic.go

@@ -16,7 +16,6 @@ type IntegralDetailedCheckLogic struct {
 	svcCtx *svc.ServiceContext
 	logx.Logger
 }
-
 func NewIntegralDetailedCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralDetailedCheckLogic {
 	return &IntegralDetailedCheckLogic{
 		ctx:    ctx,
@@ -24,7 +23,6 @@ func NewIntegralDetailedCheckLogic(ctx context.Context, svcCtx *svc.ServiceConte
 		Logger: logx.WithContext(ctx),
 	}
 }
-
 // 积分明细查询
 func (l *IntegralDetailedCheckLogic) IntegralDetailedCheck(in *integral.Req) (*integral.RespList, error) {
 	// todo: add your logic here and delete this line

+ 1 - 1
service/integralService.go

@@ -431,7 +431,7 @@ func (service *IntegralService) IntegralGuardService(endDate string) bool {
 		flow := entity.Flow{}
 		flow.UserId = solde.UserId
 		flow.PointType = 2004
-		flow.BusinessTypeId = 0
+		flow.BusinessTypeId = ""
 		flow.BusinessType = "0"
 		flow.Point = solde.TimePoints
 		flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")