|
@@ -2,6 +2,7 @@ package logic
|
|
|
|
|
|
import (
|
|
|
"context"
|
|
|
+ "points_service/service"
|
|
|
|
|
|
"points_service/rpc/integral"
|
|
|
"points_service/rpc/internal/svc"
|
|
@@ -15,6 +16,10 @@ type IntegralConsumeLogic struct {
|
|
|
logx.Logger
|
|
|
}
|
|
|
|
|
|
+var (
|
|
|
+ integralService = &service.IntegralService{}
|
|
|
+)
|
|
|
+
|
|
|
func NewIntegralConsumeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralConsumeLogic {
|
|
|
return &IntegralConsumeLogic{
|
|
|
ctx: ctx,
|
|
@@ -26,6 +31,8 @@ func NewIntegralConsumeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *I
|
|
|
// 消耗积分
|
|
|
func (l *IntegralConsumeLogic) IntegralConsume(in *integral.AddReq) (*integral.AddResp, error) {
|
|
|
// todo: add your logic here and delete this line
|
|
|
-
|
|
|
- return &integral.AddResp{}, nil
|
|
|
+ integralService.IntegralConsumeService("ABC", "1", "2021-03-10 08:00:00", "2021-03-20",1, 1, 1, 10000)
|
|
|
+ return &integral.AddResp{
|
|
|
+ Status: true,
|
|
|
+ },nil
|
|
|
}
|