feat:完善项目信息

This commit is contained in:
henry
2022-01-18 17:31:20 +08:00
parent 10224e8db6
commit 26a3205c08
8 changed files with 75 additions and 49 deletions

View File

@ -167,7 +167,7 @@ func examineAgent(id, tenantID uint64) (*ExamineManageInfo, error) {
}
// Launch 发起审核
func (c *Examine) Launch(id uint64, identity, status int) error {
func (c *Examine) Launch(id uint64, identity, status int, params map[string]interface{}) error {
_status := model2.ExamineStatusKind(status)
if _status != model2.ExamineStatusForRefuse && _status != model2.ExamineStatusForAgree {
@ -184,7 +184,14 @@ func (c *Examine) Launch(id uint64, identity, status int) error {
return err
}
return orm.GetDB().Transaction(func(tx *gorm.DB) error {
if err = model2.Updates(data.IModel, map[string]interface{}{"examine_status": status, "updated_at": time.Now()}, tx); err != nil {
values := map[string]interface{}{"examine_status": status, "updated_at": time.Now()}
if identity == config.TenantUserIdentityForCompany {
for k, v := range params {
values[k] = v
}
}
if err = model2.Updates(data.IModel, values, tx); err != nil {
return err
}
// 拒绝后,不执行以下数据