WH01243 9 сар өмнө
parent
commit
f247ab2795

+ 1 - 1
api/internal/logic/updateinitinfologic.go

@@ -38,7 +38,7 @@ func (l *UpdateInitInfoLogic) UpdateInitInfo(req *types.UpdateInitInfoReq) (resp
 		PositionId:   req.PositionId,
 		EntUserId:    req.EntUserId,
 	}
-	fool := initInfoService.UpdateInitInfo(req.Company, req.BusinessType)
+	fool := initInfoService.UpdateInitInfo(req.Company, req.Business)
 	resp.Data = map[string]interface{}{
 		"status": gconv.Int64(common.If(fool, 1, 0)),
 	}

+ 6 - 4
api/internal/service/initInfo.go

@@ -2,6 +2,7 @@ package service
 
 import (
 	. "bp.jydev.jianyu360.cn/CRM/networkManage/api/common"
+	"encoding/json"
 	"github.com/gogf/gf/v2/util/gconv"
 	"log"
 )
@@ -31,13 +32,14 @@ func (t *InitInfoService) UpdateInitInfo(company, business string) bool {
 		}, false, false)
 		if userInfo.Ent.EntRoleId == 1 {
 			//企业管理员
+			info, _ := json.Marshal(map[string]interface{}{
+				"company":  company,
+				"business": business,
+			})
 			fool = JianyuMysql.Update("entniche_info", map[string]interface{}{
 				"id": t.EntId,
 			}, map[string]interface{}{
-				"identityInfo": map[string]interface{}{
-					"company":  company,
-					"business": business,
-				},
+				"identityInfo": string(info),
 			})
 
 		}

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

@@ -145,7 +145,7 @@ type CooperateOwnerListReq struct {
 }
 
 type UpdateInitInfoReq struct {
-	BusinessType string `json:"businessType,optional"`
+	Business     string `json:"business,optional"`
 	Company      string `json:"company,optional"`
 	EntId        int64  `header:"entId,optional"`
 	MgoUserId    string `header:"mgoUserId,optional"` //原userId

+ 1 - 1
api/networkmanage.api

@@ -132,7 +132,7 @@ type (
 		PositionId    int64  `header:"positionId,optional"`
 	}
 	UpdateInitInfoReq {
-		BusinessType string `json:"businessType,optional"`
+		Business     string `json:"business,optional"`
 		Company      string `json:"company,optional"`
 		EntId        int64  `header:"entId,optional"`
 		MgoUserId    string `header:"mgoUserId,optional"` //原userId