...
|
...
|
@@ -34,7 +34,7 @@ func TemplateAdd(uid, companyId int64, request *protocol.TemplateAddRequest) (rs |
|
|
err = protocol.NewErrWithMessage("10064")
|
|
|
return
|
|
|
}
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name); err == nil {
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name, request.Template.ChanceTypeId); err == nil {
|
|
|
err = protocol.NewErrWithMessage("10279")
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -163,7 +163,7 @@ func TemplateUpdate(uid, companyId int64, request *protocol.TemplateUpdateReques |
|
|
return
|
|
|
}
|
|
|
if template.Name != request.Template.Name {
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name); err == nil {
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name, request.Template.ChanceTypeId); err == nil {
|
|
|
err = protocol.NewErrWithMessage("10279")
|
|
|
return
|
|
|
}
|
...
|
...
|
|