|
@@ -1,18 +1,17 @@
|
|
package logic
|
|
package logic
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "app.yhyue.com/moapp/jybase/common"
|
|
"context"
|
|
"context"
|
|
"encoding/json"
|
|
"encoding/json"
|
|
"fmt"
|
|
"fmt"
|
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
it "jyBXSubscribe/api/init"
|
|
it "jyBXSubscribe/api/init"
|
|
"jyBXSubscribe/api/internal/svc"
|
|
"jyBXSubscribe/api/internal/svc"
|
|
"jyBXSubscribe/api/internal/types"
|
|
"jyBXSubscribe/api/internal/types"
|
|
. "jyBXSubscribe/entity"
|
|
. "jyBXSubscribe/entity"
|
|
"jyBXSubscribe/rpc/bxsubscribe"
|
|
"jyBXSubscribe/rpc/bxsubscribe"
|
|
"time"
|
|
"time"
|
|
-
|
|
|
|
- "app.yhyue.com/moapp/jybase/common"
|
|
|
|
- "github.com/zeromicro/go-zero/core/logx"
|
|
|
|
)
|
|
)
|
|
|
|
|
|
type SubscribeUpdateLogic struct {
|
|
type SubscribeUpdateLogic struct {
|
|
@@ -29,7 +28,6 @@ func NewSubscribeUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *S
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//
|
|
|
|
func (l *SubscribeUpdateLogic) SubscribeUpdate(req *types.SubscribeUpdateReq) (resp *types.CommonResp, err error) {
|
|
func (l *SubscribeUpdateLogic) SubscribeUpdate(req *types.SubscribeUpdateReq) (resp *types.CommonResp, err error) {
|
|
resp = &types.CommonResp{}
|
|
resp = &types.CommonResp{}
|
|
if req.UserId == "" {
|
|
if req.UserId == "" {
|
|
@@ -67,12 +65,13 @@ func (l *SubscribeUpdateLogic) SubscribeUpdate(req *types.SubscribeUpdateReq) (r
|
|
resp.Err_code, resp.Err_msg = -1, "修改失败"
|
|
resp.Err_code, resp.Err_msg = -1, "修改失败"
|
|
l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
} else {
|
|
} else {
|
|
- it.MgoLog.Save("ovipjy_log", map[string]interface{}{
|
|
|
|
|
|
+ saveData := map[string]interface{}{
|
|
"userid": req.UserId,
|
|
"userid": req.UserId,
|
|
"o_vipjy": req,
|
|
"o_vipjy": req,
|
|
"createtime": time.Now().Unix(),
|
|
"createtime": time.Now().Unix(),
|
|
"type": "o_vipjy",
|
|
"type": "o_vipjy",
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ go it.SubscribeUpdateLog.SendLogs(saveData)
|
|
resp.Data = map[string]interface{}{
|
|
resp.Data = map[string]interface{}{
|
|
"status": rp.Status,
|
|
"status": rp.Status,
|
|
}
|
|
}
|
|
@@ -80,7 +79,7 @@ func (l *SubscribeUpdateLogic) SubscribeUpdate(req *types.SubscribeUpdateReq) (r
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-//判断关键词是否异常,
|
|
|
|
|
|
+// 判断关键词是否异常,
|
|
func KeyWordsRepeat(aitems []map[string]interface{}) bool {
|
|
func KeyWordsRepeat(aitems []map[string]interface{}) bool {
|
|
m := map[string]bool{} //去重的数组
|
|
m := map[string]bool{} //去重的数组
|
|
// 录入的关键词
|
|
// 录入的关键词
|