恢复余额功能 & 管理员修改余额功能

This commit is contained in:
2026-03-30 14:59:35 +08:00
parent 22cb2d50d3
commit 4481c581e9
27 changed files with 1246 additions and 204 deletions

View File

@@ -20,7 +20,9 @@ func (s *productService) GetPrice(code string) {
// 获取所有产品
func (s *productService) AllProducts() ([]*m.Product, error) {
return q.Product.Find()
return q.Product.
Order(q.Product.Sort.Asc(), q.Product.CreatedAt.Desc()).
Find()
}
// 新增产品