作者 tangxvhui

Merge branch 'test' of http://gitlab.fjmaimaimai.com/mmm-go/oppmg into test

@@ -505,7 +505,7 @@ func TemplateDelete(uid, companyId int64, request *protocol.TemplateDeleteReques @@ -505,7 +505,7 @@ func TemplateDelete(uid, companyId int64, request *protocol.TemplateDeleteReques
505 template *models.AuditTemplate 505 template *models.AuditTemplate
506 num int 506 num int
507 sql1 string = `select count(0) from chance where audit_template_id = ? limit 1` 507 sql1 string = `select count(0) from chance where audit_template_id = ? limit 1`
508 - sql2 string = `select count(0) from achievement where chance_type_id = ? and status in (1,2)` 508 + sql2 string = `select count(0) from achievement where audit_template_id = ? and status in (1,2)`
509 ) 509 )
510 if template, err = models.GetAuditTemplateById(int64(request.TemplateId)); err != nil { 510 if template, err = models.GetAuditTemplateById(int64(request.TemplateId)); err != nil {
511 log.Error(err.Error()) 511 log.Error(err.Error())