organization

pull/232/head
wangchuxiao 3 years ago
parent 29e75a4851
commit f98da25fda

@ -16,6 +16,7 @@ spec:
containers:
- name: admin-cms
image: openim/admin_cms:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10200
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: api
image: openim/api:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10002
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: auth
image: openim/auth:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10160
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: cache
image: openim/cache:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10240
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: cms-api
image: openim/cms_api:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10006
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: conversation
image: openim/conversation:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10230
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: demo
image: openim/demo:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10004
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: friend
image: openim/friend:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10120
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: group
image: openim/group:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10150
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: message-cms
image: openim/message_cms:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10190
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: msg
image: openim/msg:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10130
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: msg-gateway
image: openim/msg_gateway:v2.0.10k
imagePullPolicy: Always
ports:
- name: rpc-port
containerPort: 10140

@ -16,6 +16,7 @@ spec:
containers:
- name: msg-transfer
image: openim/msg_transfer:v2.0.10k
imagePullPolicy: Always
volumeMounts:
- name: config
mountPath: /Open-IM-Server/config

@ -16,6 +16,7 @@ spec:
containers:
- name: office
image: openim/office:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10210
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: organization
image: openim/organization:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10220
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: push
image: openim/push:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10170
volumeMounts:

@ -16,6 +16,7 @@ spec:
containers:
- name: sdk-server
image: openim/sdk_server:v2.0.10k
imagePullPolicy: Always
ports:
- containerPort: 10003
volumeMounts:

@ -161,6 +161,7 @@ func onboardingProcessNotification(operationID, userID, groupID string) {
}()
var tips commonPb.TipsComm
tips.DefaultTips = config.Config.Notification.JoinDepartmentNotification.DefaultTips.Tips
tips.JsonDetail = ""
content, err := proto.Marshal(&tips)
if err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), "proto marshal failed")

@ -154,7 +154,6 @@ func (s *organizationServer) UpdateDepartment(ctx context.Context, req *rpc.Upda
department := db.Department{}
utils.CopyStructFields(&department, req.DepartmentInfo)
log.Debug(req.OperationID, "dst ", department, "src ", req.DepartmentInfo)
if err := imdb.UpdateDepartment(&department, nil); err != nil {
errMsg := req.OperationID + " " + "UpdateDepartment failed " + err.Error()
@ -343,6 +342,7 @@ func (s *organizationServer) GetDepartmentParentIDList(_ context.Context, req *r
resp = &rpc.GetDepartmentParentIDListResp{}
resp.ParentIDList, err = imdb.GetDepartmentParentIDList(req.DepartmentID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetDepartmentParentIDList failed", err.Error())
resp.ErrMsg = constant.ErrDB.ErrMsg + ": " + err.Error()
resp.ErrCode = constant.ErrDB.ErrCode
return resp, nil

@ -249,10 +249,11 @@ func GetDepartmentRelatedGroupIDList(departmentIDList []string) ([]string, error
func getDepartmentParent(departmentID string, dbConn *gorm.DB) (*db.Department, error) {
var department db.Department
var parentID string
//var parentID string
dbConn.LogMode(true)
// select * from departments where department_id = (select parent_id from departments where department_id= zx234fd);
err := dbConn.Table("departments").Where("department_id=?", dbConn.Table("departments").Where("department_id=?", departmentID).Pluck("parent_id", parentID)).Find(&department).Error
//dbConn.Table("departments").Where("department_id=?", departmentID).Pluck("parent_id", parentID).Error
err := dbConn.Table("departments").Where("department_id=?").Find(&department).Error
return &department, err
}

Loading…
Cancel
Save