Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chatGLM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘坚-丰林-DEV
chatGLM
Commits
dd3947a2
Commit
dd3947a2
authored
May 08, 2023
by
liuxiaohui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For character issues and display waddition
parent
0f7bb16e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3446 additions
and
12 deletions
+3446
-12
.gitignore
.gitignore
+1
-0
appsettings.json
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/appsettings.json
+2
-1
logs-20230508.txt
...core/host/BBM.ChatGLM.HttpApi.Host/logs/logs-20230508.txt
+3429
-0
UserController.cs
...ore/src/BBM.ChatGLM.HttpApi/Controllers/UserController.cs
+11
-7
Template.xlsx
react/public/Template.xlsx
+0
-0
index.tsx
react/src/pages/UserManage/index.tsx
+2
-1
api.ts
react/src/services/chatGLM/api.ts
+1
-3
No files found.
.gitignore
View file @
dd3947a2
...
...
@@ -328,3 +328,4 @@ build
node_modules
*.txt
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/appsettings.json
View file @
dd3947a2
...
...
@@ -35,10 +35,11 @@
"ApiKey"
:
"Uicm6VMjVPdzepbqnwNvpl25xJjRxFekMV8QZdeTLTwacNBl"
},
"ConnectionStrings"
:
{
"Default"
:
"Host=yg-sql-dev-wan.pg.rds.aliyuncs.com;Port=5432;Database=BBMChatGLM;User ID=yg;Password=YG@sql!dev2022123;"
,
"Default"
:
"Host=yg-sql-dev-wan.pg.rds.aliyuncs.com;Port=5432;Database=BBMChatGLM;User ID=yg;Password=YG@sql!dev2022123;"
},
"Redis"
:
{
"Configuration"
:
"yg-redis-dev-wan.redis.rds.aliyuncs.com:6379,password=YG@redis!dev2022123,defaultDatabase=5"
},
"Jwt"
:
{
"Audience"
:
"BBM.ChatGLM"
,
...
...
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/logs/logs-20230508.txt
View file @
dd3947a2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
aspnet-core/src/BBM.ChatGLM.HttpApi/Controllers/UserController.cs
View file @
dd3947a2
...
...
@@ -3,6 +3,8 @@ using BBM.ChatGLM.User;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
OfficeOpenXml
;
using
System
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
Volo.Abp.Application.Dtos
;
using
Volo.Abp.Identity
;
...
...
@@ -77,14 +79,15 @@ namespace BBM.ChatGLM.Controllers
Dtos
.
Results
xiangying
=
new
Dtos
.
Results
();
var
failNum
=
0
;
if
(
file
==
null
)
return
BadRequest
(
"Excel文件为空"
);
var
fileName
=
file
.
FileName
;
var
filePath
=
Path
.
Combine
(
"C:\\Excel"
,
fileName
);
string
directoryPath
=
Environment
.
CurrentDirectory
+
@"\Excels"
;
if
(!
Directory
.
Exists
(
directoryPath
))
Directory
.
CreateDirectory
(
directoryPath
);
var
filePath
=
Path
.
Combine
(
directoryPath
,
file
.
FileName
);
using
(
var
stream
=
new
FileStream
(
filePath
,
FileMode
.
Create
))
{
...
...
@@ -97,9 +100,10 @@ namespace BBM.ChatGLM.Controllers
var
totalRows
=
worksheet
.
Dimension
.
Rows
;
var
row
=
2
;
var
userName
=
""
;
var
userName
=
""
;
var
phoneNumber
=
""
;
var
userRole
=
""
;
var
userRole
=
""
;
while
(
row
<=
totalRows
)
{
...
...
@@ -139,7 +143,7 @@ namespace BBM.ChatGLM.Controllers
userInput
.
Role
=
userRole
;
userInput
.
IsActive
=
true
;
var
userDto
=
await
_usersAppService
.
CreateAsync
(
userInput
);
await
_usersAppService
.
CreateAsync
(
userInput
);
continue
;
}
}
...
...
react/public/Template.xlsx
deleted
100644 → 0
View file @
0f7bb16e
File deleted
react/src/pages/UserManage/index.tsx
View file @
dd3947a2
...
...
@@ -466,7 +466,8 @@ const UserManage = () => {
options=
{
false
}
headerTitle=
"账号列表"
toolBarRender=
{
()
=>
[
<
Button
onClick=
{
downloadExcelTemplate
}
>
批量添加用户Excel模板
</
Button
>,
<
Button
>
<
a
href=
'https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx'
>
批量添加用户Excel模板
</
a
></
Button
>,
<
Upload
beforeUpload=
{
handleUpload
}
disabled=
{
uploadButtonDisable
}
...
...
react/src/services/chatGLM/api.ts
View file @
dd3947a2
...
...
@@ -5,7 +5,6 @@ interface ILoginParams {
password
:
string
;
}
const
request
=
extend
({});
let
host
=
""
;
...
...
@@ -30,7 +29,6 @@ request.interceptors.request.use((url, options) => {
Authorization
:
`Bearer
${
token
||
''
}
`
,
'Content-Type'
:
'application/json'
,
__tenant
:
'3a0a90fe-9a0d-70f4-200d-a80a41fb6195'
,
};
}
return
{
...
...
@@ -200,7 +198,7 @@ export const postExcelFile = (file) => {
export
const
postDowload
=
()
=>
{
return
request
(
'Template.xlsx'
,
{
method
:
'GET'
,
responseType
:
'blob'
,
// 将响应类型设置为二进制流
responseType
:
'blob'
,
// 将响应类型设置为二进制流
}).
then
((
response
)
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
response
]));
const
link
=
document
.
createElement
(
'a'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment