順序依時間排序

This commit is contained in:
威勝 張 2025-02-22 19:38:02 +08:00
parent e2148ff17a
commit a946293f16
2 changed files with 12 additions and 9 deletions

View File

@ -36,6 +36,7 @@ namespace TCM_API.Controllers.lamiter
var data = await(from a in _context.company_detail_table var data = await(from a in _context.company_detail_table
join b in _context.user_table on a.guid equals b.guid into joined join b in _context.user_table on a.guid equals b.guid into joined
from b in joined.DefaultIfEmpty() from b in joined.DefaultIfEmpty()
orderby a.data_create_time
select new select new
{ {
company_name = a.company_name, company_name = a.company_name,

View File

@ -33,6 +33,7 @@ namespace TCM_API.Controllers.manage
{ {
var data = await (from c in _context.health_detail_table var data = await (from c in _context.health_detail_table
orderby c.data_create_time
select new select new
{ {
health_name = c.health_name, health_name = c.health_name,
@ -55,6 +56,7 @@ namespace TCM_API.Controllers.manage
join b in _context.user_table on a.guid equals b.guid into joined join b in _context.user_table on a.guid equals b.guid into joined
from b in joined.DefaultIfEmpty() // LEFT JOIN from b in joined.DefaultIfEmpty() // LEFT JOIN
where a.company_guid == guid where a.company_guid == guid
orderby a.data_create_time
select new select new
{ {
health_name = a.health_name, health_name = a.health_name,