Skip to content

Commit 94d0b70

Browse files
tknsnail
authored andcommitted
feat: ✨ 财务管理
1 parent a202595 commit 94d0b70

63 files changed

Lines changed: 2544 additions & 72 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/res/NetAdmin.Fields.ln

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
以什么结束
1818
作业名称
1919
作业状态
20-
2120
信息
2221
倒序排序
2322
全部数据
@@ -45,6 +44,7 @@
4544
字典内容导出
4645
宕机
4746
客户端IP
47+
4848
小于
4949
小于等于
5050
小学
@@ -71,6 +71,8 @@
7171
接口路径
7272
插入种子数据
7373
操作系统
74+
支出
75+
收入
7476
数据范围
7577
文档内容
7678
文档内容导出
@@ -99,6 +101,7 @@
99101
用户代理
100102
用户名
101103
用户导出
104+
用户钱包导出
102105
电子邮箱
103106
104107
登录
@@ -111,11 +114,14 @@
111114
站内信导出
112115
等于
113116
等待发送
117+
管理员充值
118+
管理员扣费
114119
管理模块
115120
系统模块
116121
绑定手机号码
117122
结果非预期
118123
群众
124+
自助充值
119125
自定义
120126
范围
121127
菜单
@@ -128,16 +134,17 @@
128134
请求方式
129135
请求日志导出
130136
调试
131-
追踪
132-
追踪标识
133137
身份证
134138
运行
139+
追踪
140+
追踪标识
135141
通知
136142
邮箱号
137143
部门名称
138144
部门导出
139145
配置导出
140146
重设密码
147+
钱包交易导出
141148
链接
142149
错误
143150
随机排序

assets/res/NetAdmin.Statements.ln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ XML注释文件不存在
55
中文姓名
66
事务已回滚
77
事务已提交
8+
交易失败
9+
交易金额不正确
810
人机校验请求不能为空
911
人机验证未通过
1012
作业名称不能为空
@@ -108,6 +110,7 @@ XML注释文件不存在
108110
部门可见
109111
部门名称不能为空
110112
配置文件初始化完毕
113+
钱包余额不足
111114
键值不能为空
112115
键名称不能为空
113116
随机延时结束时间不正确

assets/seed-data/Sys_Menu.json

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Id": 373837957840901,
2727
"Name": "sys/user",
2828
"ParentId": 373837917724677,
29-
"Path": "/sys/user",
29+
"Path": "/power/user",
3030
"Sort": 100,
3131
"Title": "用户管理",
3232
"Type": 1
@@ -37,7 +37,7 @@
3737
"Id": 373838018527237,
3838
"Name": "sys/role",
3939
"ParentId": 373837917724677,
40-
"Path": "/sys/role",
40+
"Path": "/power/role",
4141
"Sort": 99,
4242
"Title": "角色管理",
4343
"Type": 1
@@ -48,7 +48,7 @@
4848
"Id": 373838045605893,
4949
"Name": "sys/dept",
5050
"ParentId": 373837917724677,
51-
"Path": "/sys/dept",
51+
"Path": "/power/dept",
5252
"Sort": 98,
5353
"Title": "部门管理",
5454
"Type": 1
@@ -59,18 +59,50 @@
5959
"Id": 373838070898693,
6060
"Name": "sys/menu",
6161
"ParentId": 373837917724677,
62-
"Path": "/sys/menu",
62+
"Path": "/power/menu",
6363
"Sort": 97,
6464
"Title": "菜单管理",
6565
"Type": 1
6666
},
67+
// ------------------------------ 财务管理 ------------------------------
68+
{
69+
"Icon": "el-icon-money",
70+
"Id": 690906994118665,
71+
"Name": "finance",
72+
"Path": "/finance",
73+
"Sort": 99,
74+
"Title": "财务管理",
75+
"Type": 1
76+
},
77+
{
78+
"Component": "sys/wallet",
79+
"Icon": "el-icon-wallet",
80+
"Id": 690907673255942,
81+
"Name": "sys/wallet",
82+
"ParentId": 690906994118665,
83+
"Path": "/finance/wallet",
84+
"Sort": 100,
85+
"Title": "钱包管理",
86+
"Type": 1
87+
},
88+
{
89+
"Component": "sys/trade",
90+
"Icon": "el-icon-calendar",
91+
"Id": 690907673255943,
92+
"Name": "sys/trade",
93+
"ParentId": 690906994118665,
94+
"Path": "/finance/trade",
95+
"Sort": 99,
96+
"Title": "交易流水",
97+
"Type": 1
98+
},
6799
// ------------------------------ 系统管理 ------------------------------
68100
{
69101
"Icon": "sc-icon-App",
70102
"Id": 485278637670422,
71103
"Name": "sys",
72104
"Path": "/sys",
73-
"Sort": 99,
105+
"Sort": 98,
74106
"Title": "系统管理",
75107
"Type": 1
76108
},
@@ -80,7 +112,7 @@
80112
"Id": 380415005847557,
81113
"Name": "sys/config",
82114
"ParentId": 485278637670422,
83-
"Path": "/sys/config",
115+
"Path": "/system/config",
84116
"Sort": 100,
85117
"Title": "系统设置",
86118
"Type": 1
@@ -91,7 +123,7 @@
91123
"Id": 510067557638158,
92124
"Name": "sys/job",
93125
"ParentId": 485278637670422,
94-
"Path": "/sys/job",
126+
"Path": "/system/job",
95127
"Sort": 99,
96128
"Title": "计划作业",
97129
"Type": 1
@@ -102,7 +134,7 @@
102134
"Id": 375315654221829,
103135
"Name": "sys/dic",
104136
"ParentId": 485278637670422,
105-
"Path": "/sys/dic",
137+
"Path": "/system/dic",
106138
"Sort": 98,
107139
"Title": "字典管理",
108140
"Type": 1
@@ -113,7 +145,7 @@
113145
"Id": 482779610341392,
114146
"Name": "sys/msg",
115147
"ParentId": 485278637670422,
116-
"Path": "/sys/msg",
148+
"Path": "/system/msg",
117149
"Sort": 97,
118150
"Title": "消息管理",
119151
"Type": 1,
@@ -124,7 +156,7 @@
124156
"Id": 397880678895621,
125157
"Name": "sys/api",
126158
"ParentId": 485278637670422,
127-
"Path": "/sys/api",
159+
"Path": "/system/api",
128160
"Sort": 96,
129161
"Title": "接口管理",
130162
"Type": 1
@@ -135,7 +167,7 @@
135167
"Id": 374911555702789,
136168
"Name": "sys/cache",
137169
"ParentId": 485278637670422,
138-
"Path": "/sys/cache",
170+
"Path": "/system/cache",
139171
"Sort": 95,
140172
"Title": "缓存管理",
141173
"Type": 1
@@ -146,7 +178,7 @@
146178
"Id": 616214756757512,
147179
"Name": "archive",
148180
"Path": "/archive",
149-
"Sort": 98,
181+
"Sort": 97,
150182
"Title": "档案管理",
151183
"Type": 1
152184
},
@@ -167,7 +199,7 @@
167199
"Id": 374792687640581,
168200
"Name": "log",
169201
"Path": "/log",
170-
"Sort": 97,
202+
"Sort": 96,
171203
"Title": "日志管理",
172204
"Type": 1
173205
},
@@ -177,7 +209,7 @@
177209
"Id": 485285246504976,
178210
"Name": "sys/log/operation",
179211
"ParentId": 374792687640581,
180-
"Path": "/sys/log/operation",
212+
"Path": "/log/operation",
181213
"Sort": 100,
182214
"Title": "操作日志",
183215
"Type": 1,
@@ -188,7 +220,7 @@
188220
"Id": 485285246504970,
189221
"Name": "sys/log/login",
190222
"ParentId": 374792687640581,
191-
"Path": "/sys/log/login",
223+
"Path": "/log/login",
192224
"Sort": 99,
193225
"Title": "登录日志",
194226
"Type": 1,
@@ -199,7 +231,7 @@
199231
"Id": 373838105399301,
200232
"Name": "dev",
201233
"Path": "/dev",
202-
"Sort": 96,
234+
"Sort": 95,
203235
"Title": "开发管理",
204236
"Type": 1
205237
},

assets/seed-data/Sys_RoleApi.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,25 @@
5858
{
5959
"ApiId": "api/sys/login.log/export",
6060
"RoleId": 371729946431493,
61+
},
62+
{
63+
"ApiId": "api/sys/user.wallet/paged.query",
64+
"RoleId": 371729946431493,
65+
},
66+
{
67+
"ApiId": "api/sys/user.wallet/get",
68+
"RoleId": 371729946431493,
69+
},
70+
{
71+
"ApiId": "api/sys/wallet.trade/paged.query",
72+
"RoleId": 371729946431493,
73+
},
74+
{
75+
"ApiId": "api/sys/wallet.trade/count.by",
76+
"RoleId": 371729946431493,
77+
},
78+
{
79+
"ApiId": "api/sys/wallet.trade/get",
80+
"RoleId": 371729946431493,
6181
}
6282
]

assets/seed-data/Sys_RoleMenu.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,25 @@
66
{
77
"MenuId": 374967228141573,
88
"RoleId": 371729946431493
9+
},
10+
{
11+
"MenuId": 690906994118665,
12+
"RoleId": 371729946431493
13+
},
14+
{
15+
"MenuId": 690907673255942,
16+
"RoleId": 371729946431493
17+
},
18+
{
19+
"MenuId": 374792687640581,
20+
"RoleId": 371729946431493
21+
},
22+
{
23+
"MenuId": 485285246504970,
24+
"RoleId": 371729946431493
25+
},
26+
{
27+
"MenuId": 690907673255943,
28+
"RoleId": 371729946431493
929
}
1030
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"Id": 370942943322181,
4+
"OwnerDeptId": 372119301627909,
5+
"OwnerId": 370942943322181,
6+
},
7+
{
8+
"Id": 560217289236492,
9+
"OwnerDeptId": 372119301627909,
10+
"OwnerId": 560217289236492,
11+
}
12+
]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"devDependencies": {
44
"cz-git": "^1.11.2",
55
"commitizen": "^4.3.1",
6-
"prettier": "^3.5.3",
6+
"prettier": "^3.6.1",
77
"standard-version": "^9.5.0"
88
},
99
"config": {

src/backend/NetAdmin/NetAdmin.Application/Services/ServiceBase.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public abstract class ServiceBase<TLogger> : ServiceBase
1010
/// </summary>
1111
protected ServiceBase() //
1212
{
13-
Logger = App.GetService<ILogger<TLogger>>();
13+
Logger = S<ILogger<TLogger>>();
1414
}
1515

1616
/// <summary>
@@ -29,7 +29,7 @@ public abstract class ServiceBase : IScoped, IService
2929
/// </summary>
3030
protected ServiceBase()
3131
{
32-
UserToken = App.GetService<ContextUserToken>();
32+
UserToken = S<ContextUserToken>();
3333
ServiceId = Guid.NewGuid();
3434
}
3535

@@ -38,4 +38,19 @@ protected ServiceBase()
3838

3939
/// <inheritdoc />
4040
public ContextUserToken UserToken { get; set; }
41+
42+
/// <summary>
43+
/// 获取服务
44+
/// </summary>
45+
#pragma warning disable RCS1036
46+
#pragma warning restore RCS1036
47+
48+
// ReSharper disable once MemberCanBeMadeStatic.Global
49+
#pragma warning disable CA1822, S2325
50+
protected T S<T>()
51+
#pragma warning restore S2325, CA1822
52+
where T : class
53+
{
54+
return App.GetService<T>();
55+
}
4156
}

src/backend/NetAdmin/NetAdmin.Application/Services/Tpl/ExampleService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, s
4242
.ToDictionaryAsync(a => a.Count())
4343
.ConfigureAwait(false);
4444
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
45-
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Tpl_Example).GetProperty(y)!.GetValue(x.Key)!.ToString())
45+
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Tpl_Example).GetProperty(y)!.GetValue(x.Key)?.ToString())
4646
, x.Value))
47+
.Where(x => x.Key.Any(y => !y.Value.NullOrEmpty()))
4748
.OrderByDescending(x => x.Value);
4849
}
4950

0 commit comments

Comments
 (0)