刘磊
2025-06-09 dabbcafc629ef87d11ba55ef8cc1cdc776c047d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBusinessesRepository;
using WIDESEA_IBusinessServices;
using WIDESEA_Model.Models;
 
namespace WIDESEA_BusinessServices
{
    public class Dt_AreaInfoService : ServiceBase<Dt_AreaInfo, IDt_AreaInfoRepository>, IDt_AreaInfoService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public Dt_AreaInfoService(IDt_AreaInfoRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
        }
 
        /// <summary>
        /// 获取区域列表
        /// </summary>
        /// <returns></returns>
        [HttpGet, Route("GetArea"), AllowAnonymous]
        public object GetArea()
        {
            var data = BaseDal.QueryData();
 
            List<object> list = new List<object>();
            foreach (var item in data)
            {
                var obj = new
                {
                    areaCode = item.AreaCode,
                    areaName = item.AreaName
                };
                list.Add(obj);
            }
            return list;
        }
    }
}