...
|
...
|
@@ -96,11 +96,13 @@ func AddAchievement(addData *protocol.RequestAddAchievement, companyid int64) er |
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
//操作achievement_provider 成果提供人表
|
|
|
err = addAchievementProvider(addData.Provider, achievementId, o)
|
|
|
if err != nil {
|
|
|
log.Error("添加achievement_provider失败:%s", err)
|
|
|
o.Rollback()
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
if len(addData.Provider) > 0 {
|
|
|
err = addAchievementProvider(addData.Provider, achievementId, o)
|
|
|
if err != nil {
|
|
|
log.Error("添加achievement_provider失败:%s", err)
|
|
|
o.Rollback()
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
}
|
|
|
o.Commit()
|
|
|
return nil
|
...
|
...
|
@@ -163,11 +165,13 @@ func EditAchievement(editData *protocol.RequestEditAchievement, companyid int64) |
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
//操作achievement_provider 成果提供人表
|
|
|
err = addAchievementProvider(editData.Provider, achievementData.Id, o)
|
|
|
if err != nil {
|
|
|
log.Error("添加achievement_provider失败:%s", err)
|
|
|
o.Rollback()
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
if len(editData.Provider) > 0 {
|
|
|
err = addAchievementProvider(editData.Provider, achievementData.Id, o)
|
|
|
if err != nil {
|
|
|
log.Error("添加achievement_provider失败:%s", err)
|
|
|
o.Rollback()
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
}
|
|
|
o.Commit()
|
|
|
return nil
|
...
|
...
|
|