...
|
...
|
@@ -241,7 +241,7 @@ func AddCompanyData(data ModuleCompanytData) error { |
|
|
if err != nil {
|
|
|
o.Rollback()
|
|
|
log.Error("处理user_department数据失败:%s", err)
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
return errors.New("处理user_department数据失败")
|
|
|
}
|
|
|
//添加部门主管
|
|
|
log.Info("添加department_charge表数据")
|
...
|
...
|
@@ -622,9 +622,8 @@ func initUserDedaprtmet(newDepartment *models.Department, newUserCompany *models |
|
|
//添加部门
|
|
|
newUserDepartment = &models.UserDepartment{
|
|
|
UserCompanyId: newUserCompany.Id,
|
|
|
//UserId: newUserCompany.UserId,
|
|
|
CompanyId: newUserCompany.CompanyId,
|
|
|
DepartmentId: newDepartment.Id,
|
|
|
CompanyId: newUserCompany.CompanyId,
|
|
|
DepartmentId: newDepartment.Id,
|
|
|
}
|
|
|
_, err = models.AddUserDepartment(newUserDepartment, o)
|
|
|
if err != nil {
|
...
|
...
|
|