浏览代码

Merge branch 'master' into debug

* master:
  修复bug
boweniac 5 月之前
父节点
当前提交
247a60aef8
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      internal/logic/Wx/create_wx_logic.go

+ 6 - 0
internal/logic/Wx/create_wx_logic.go

@@ -65,6 +65,8 @@ func (l *CreateWxLogic) CreateWx(req *types.WxInfo) (*types.BaseMsgResp, error)
 		return nil, err
 	}
 
+	var stringSlice []string
+
 	if ent.IsNotFound(err) {
 		wxid := strconv.Itoa(rand.New(rand.NewSource(time.Now().UnixNano())).Intn(1000000))
 		_, err := l.svcCtx.DB.Wx.Create().
@@ -76,6 +78,10 @@ func (l *CreateWxLogic) CreateWx(req *types.WxInfo) (*types.BaseMsgResp, error)
 			SetNotNilAPIKey(req.ApiKey).
 			SetWxid(wxid).
 			SetStatus(0).
+			SetAllowList(stringSlice).
+			SetGroupAllowList(stringSlice).
+			SetBlockList(stringSlice).
+			SetGroupBlockList(stringSlice).
 			Save(l.ctx)
 		if err != nil {
 			return nil, dberrorhandler.DefaultEntError(l.Logger, err, req)