正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -96,7 +96,7 @@ func DeleteAuditTemplate(id int64) (err error) { | @@ -96,7 +96,7 @@ func DeleteAuditTemplate(id int64) (err error) { | ||
| 96 | func GetAuditTemplateByTypeId(chanceTypeId int) (v []*AuditTemplate, err error) { | 96 | func GetAuditTemplateByTypeId(chanceTypeId int) (v []*AuditTemplate, err error) { |
| 97 | o := orm.NewOrm() | 97 | o := orm.NewOrm() |
| 98 | _, err = o.QueryTable(&AuditTemplate{}). | 98 | _, err = o.QueryTable(&AuditTemplate{}). |
| 99 | - Filter("chance_type_id", chanceTypeId).All(&v) | 99 | + Filter("chance_type_id", chanceTypeId).OrderBy("sort_num").All(&v) |
| 100 | 100 | ||
| 101 | if err == orm.ErrNoRows { | 101 | if err == orm.ErrNoRows { |
| 102 | return v, nil | 102 | return v, nil |
| @@ -86,7 +86,7 @@ func GetChanceTypeAll() (v []*ChanceType, err error) { | @@ -86,7 +86,7 @@ func GetChanceTypeAll() (v []*ChanceType, err error) { | ||
| 86 | 86 | ||
| 87 | func GetChanceTypeByCompany(companyId int) (v []*ChanceType, err error) { | 87 | func GetChanceTypeByCompany(companyId int) (v []*ChanceType, err error) { |
| 88 | o := orm.NewOrm() | 88 | o := orm.NewOrm() |
| 89 | - sql := "select * from chance_type where company_id=?" | 89 | + sql := "select * from chance_type where company_id=? order by sort_num" |
| 90 | if _, err = o.Raw(sql, companyId).QueryRows(&v); err == nil { | 90 | if _, err = o.Raw(sql, companyId).QueryRows(&v); err == nil { |
| 91 | return | 91 | return |
| 92 | } | 92 | } |
-
请 注册 或 登录 后发表评论