|
@@ -96,12 +96,14 @@ func AddAchievement(addData *protocol.RequestAddAchievement, companyid int64) er |
|
@@ -96,12 +96,14 @@ func AddAchievement(addData *protocol.RequestAddAchievement, companyid int64) er |
96
|
return protocol.NewErrWithMessage("1")
|
96
|
return protocol.NewErrWithMessage("1")
|
97
|
}
|
97
|
}
|
98
|
//操作achievement_provider 成果提供人表
|
98
|
//操作achievement_provider 成果提供人表
|
|
|
99
|
+ if len(addData.Provider) > 0 {
|
99
|
err = addAchievementProvider(addData.Provider, achievementId, o)
|
100
|
err = addAchievementProvider(addData.Provider, achievementId, o)
|
100
|
if err != nil {
|
101
|
if err != nil {
|
101
|
log.Error("添加achievement_provider失败:%s", err)
|
102
|
log.Error("添加achievement_provider失败:%s", err)
|
102
|
o.Rollback()
|
103
|
o.Rollback()
|
103
|
return protocol.NewErrWithMessage("1")
|
104
|
return protocol.NewErrWithMessage("1")
|
104
|
}
|
105
|
}
|
|
|
106
|
+ }
|
105
|
o.Commit()
|
107
|
o.Commit()
|
106
|
return nil
|
108
|
return nil
|
107
|
}
|
109
|
}
|
|
@@ -163,12 +165,14 @@ func EditAchievement(editData *protocol.RequestEditAchievement, companyid int64) |
|
@@ -163,12 +165,14 @@ func EditAchievement(editData *protocol.RequestEditAchievement, companyid int64) |
163
|
return protocol.NewErrWithMessage("1")
|
165
|
return protocol.NewErrWithMessage("1")
|
164
|
}
|
166
|
}
|
165
|
//操作achievement_provider 成果提供人表
|
167
|
//操作achievement_provider 成果提供人表
|
|
|
168
|
+ if len(editData.Provider) > 0 {
|
166
|
err = addAchievementProvider(editData.Provider, achievementData.Id, o)
|
169
|
err = addAchievementProvider(editData.Provider, achievementData.Id, o)
|
167
|
if err != nil {
|
170
|
if err != nil {
|
168
|
log.Error("添加achievement_provider失败:%s", err)
|
171
|
log.Error("添加achievement_provider失败:%s", err)
|
169
|
o.Rollback()
|
172
|
o.Rollback()
|
170
|
return protocol.NewErrWithMessage("1")
|
173
|
return protocol.NewErrWithMessage("1")
|
171
|
}
|
174
|
}
|
|
|
175
|
+ }
|
172
|
o.Commit()
|
176
|
o.Commit()
|
173
|
return nil
|
177
|
return nil
|
174
|
}
|
178
|
}
|