Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
financial-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
xianyang
financial-system
Commits
478584d0
Commit
478584d0
authored
May 06, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调用接口加密优化地址
parent
125c392f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
guild.py
app/api/statement/guild.py
+3
-3
env.py
core/config/env.py
+4
-2
functions.py
libs/functions.py
+2
-2
No files found.
app/api/statement/guild.py
View file @
478584d0
...
...
@@ -556,7 +556,7 @@ def GuildSettlementAdd(db, data):
return
400
,
{
"msg"
:
"结算错误"
}
first_sta
=
1
try
:
url
=
"http://106.55.103.148:8787
/api/guild/editSettlementLog"
url
=
f
"{env.PHP_URL}
/api/guild/editSettlementLog"
json_data
=
{
'id'
:
guild_data
.
work_id
,
'status'
:
1
}
import
json
str_data
=
json
.
dumps
(
json_data
,
separators
=
(
','
,
':'
))
...
...
@@ -580,7 +580,7 @@ def GuildSettlementAdd(db, data):
return
200
,
{
"msg"
:
"操作成功"
}
if
guild_data
.
status
==
1
:
try
:
url
=
"http://106.55.103.148:8787
/api/guild/editSettlementLog"
url
=
f
"{env.PHP_URL}
/api/guild/editSettlementLog"
json_data
=
{
'id'
:
guild_data
.
work_id
,
'status'
:
2
}
import
json
str_data
=
json
.
dumps
(
json_data
,
separators
=
(
','
,
':'
))
...
...
@@ -613,7 +613,7 @@ def GuildSettlementAdd(db, data):
def
GuildSettlementmodify
(
db
):
url
=
'http://106.55.103.148:8787
/api/guild/getGuildSettlementLog'
url
=
f
'{env.PHP_URL}
/api/guild/getGuildSettlementLog'
response
=
requests
.
get
(
url
)
data
=
json
.
loads
(
response
.
text
)
decode_data
=
AES_Decrypt
(
data
.
get
(
"data"
))
...
...
core/config/env.py
View file @
478584d0
...
...
@@ -69,6 +69,7 @@ class TestingEnv(Env):
CLEARING_CENTER_HOST
:
str
=
'106.55.103.148'
CLEARING_CENTER_PORT
:
int
=
5454
KEY
=
"dK8tZ1jM0wA6oE3j"
PHP_URL
=
"http://106.55.103.148:8787"
class
ProdEnv
(
Env
):
...
...
@@ -93,10 +94,11 @@ class ProdEnv(Env):
CLEARING_CENTER_HOST
:
str
=
'47.103.144.36'
CLEARING_CENTER_PORT
:
int
=
5454
KEY
=
"dK8tZ1jM0wA6oE3j"
PHP_URL
=
"http://47.103.97.109:6750"
#
env = TestingEnv() # 开发环境
env
=
ProdEnv
()
# 生产环境
env
=
TestingEnv
()
# 开发环境
#
env = ProdEnv() # 生产环境
redis_data
=
env
.
Redis
pool
=
redis
.
ConnectionPool
(
host
=
redis_data
.
get
(
"host"
),
port
=
redis_data
.
get
(
"port"
),
password
=
redis_data
.
get
(
"password"
),
...
...
libs/functions.py
View file @
478584d0
...
...
@@ -190,7 +190,7 @@ def time_format(utc_timestamp: int):
def
query_user_info
(
user_uuid
):
"""获取用户信息"""
url
=
"http://106.55.103.148:8787
/api/userInfo/getUserInfo"
url
=
f
"{env.PHP_URL}
/api/userInfo/getUserInfo"
aes_data
=
AES_Encrypt
(
user_uuid
)
result
=
requests
.
post
(
url
=
url
,
json
=
{
"uuid"
:
user_uuid
,
"sign"
:
aes_data
})
return
result
...
...
@@ -198,7 +198,7 @@ def query_user_info(user_uuid):
def
query_guild_info
(
guild_uuid
):
"""获取公会信息"""
url
=
"http://106.55.103.148:8787
/api/userInfo/getGuildInfo"
url
=
f
"{env.PHP_URL}
/api/userInfo/getGuildInfo"
aes_data
=
AES_Encrypt
(
guild_uuid
)
result
=
requests
.
post
(
url
=
url
,
json
=
{
"uuid"
:
guild_uuid
,
"sign"
:
aes_data
})
return
result
...
...
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