...
|
...
|
@@ -530,6 +530,19 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate |
|
|
err = protocol.NewCustomMessage(5101, "该机会已被关闭或您没有权限查看")
|
|
|
return
|
|
|
}
|
|
|
if chance.UserId == header.UserId {
|
|
|
if chance.ReviewStatus == protocol.ReviewStatusAuditging && chance.PublishStatus > 0 && len(chance.ApproveData) > 0 {
|
|
|
//不可编辑
|
|
|
err = protocol.NewErrWithMessage(5202)
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
if chance.ReviewStatus == protocol.ReviewStatusReturn {
|
|
|
//不可编辑
|
|
|
err = protocol.NewErrWithMessage(5202)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
//1.模板是否存在
|
|
|
if template, err = models.GetAuditTemplateById(int64(chance.AuditTemplateId)); err != nil {
|
|
|
log.Error("模板不存在:", chance.AuditTemplateId, err)
|
...
|
...
|
@@ -1916,6 +1929,11 @@ func ChanceDelete(header *protocol.RequestHeader, request *protocol.ChanceDelete |
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
|
|
if chance.UserId != header.UserId {
|
|
|
err = protocol.NewErrWithMessage(5202)
|
|
|
log.Warn(chance.UserId, header.UserId, err)
|
|
|
return
|
|
|
}
|
|
|
if chance.ReviewStatus == protocol.ReviewStatusPass {
|
|
|
err = protocol.NewErrWithMessage(5202)
|
|
|
return
|
...
|
...
|
|