Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
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
吴迪
gs1-office-web-sit
Commits
ce8a3931
Commit
ce8a3931
authored
Dec 12, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】修改业务大厅跳转代码
parent
52c10a6a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
LogLoginService.java
...ava/io/office/modules/manage/service/LogLoginService.java
+4
-0
LogLoginServiceImpl.java
...fice/modules/manage/service/impl/LogLoginServiceImpl.java
+16
-3
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+8
-5
No files found.
src/main/java/io/office/modules/manage/service/LogLoginService.java
View file @
ce8a3931
...
...
@@ -33,5 +33,9 @@ public interface LogLoginService extends IService<LogLoginEntity> {
*/
JSONObject
loginNew
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
);
JSONObject
loginNewTest
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
);
}
src/main/java/io/office/modules/manage/service/impl/LogLoginServiceImpl.java
View file @
ce8a3931
...
...
@@ -214,12 +214,13 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
}
else
{
//手机用户
userType
=
2
;
id
=
phon
e
;
id
=
userNam
e
;
}
}
else
{
//手机用户
userType
=
2
;
phone
=
userName
;
id
=
userName
;
}
}
}
...
...
@@ -276,7 +277,19 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
return
jsonObject
;
}
@Override
public
JSONObject
loginNewTest
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userType"
,
1
);
jsonObject
.
put
(
"id"
,
"13852147293"
);
jsonObject
.
put
(
"carno"
,
"13852147293"
);
jsonObject
.
put
(
"username"
,
"13852147293"
);
jsonObject
.
put
(
"phone"
,
"13852147293"
);
R
token
=
sysUserTokenService
.
createToken
(
"qianduan_"
,
Long
.
parseLong
(
"13852147293"
));
//将token信息存入 数据库
Object
token1
=
token
.
get
(
"token"
);
jsonObject
.
put
(
"token"
,
token1
);
return
jsonObject
;
}
private
static
String
doGet
(
String
url
)
{
...
...
@@ -292,7 +305,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
}
return
null
;
}
...
...
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
ce8a3931
...
...
@@ -684,6 +684,8 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
String
phone
=
""
;
//用户类型 1.业务大厅(手机号用户) 2.业务大厅(条码卡成员) 3.官网用户
Integer
userType
=
Integer
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"userType"
)));
String
token
=
""
;
String
url
=
""
;
if
(
userType
==
2
)
{
phone
=
memberUser
.
getId
()
+
""
;
//手机号
}
else
if
(
userType
==
1
)
{
...
...
@@ -695,9 +697,8 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
String
phone_M
=
DESUtils
.
byteToHexString
(
DESUtils
.
DES_CBC_Encrypt
(
phone
.
getBytes
(),
"loginkey"
.
getBytes
()));
String
password
=
memberEntity
.
getPassword
();
//名文密码
String
password_M
=
DESUtils
.
byteToHexString
(
DESUtils
.
DES_CBC_Encrypt
(
password
.
getBytes
(),
"loginkey"
.
getBytes
()));
String
url
=
"http://wsdt.gs1cn.org/anccoh/login?method=gdsLoginSSO&gdsCode="
+
phone_M
+
"&password="
+
password_M
;
url
=
"http://wsdt.gs1cn.org/anccoh/login?method=gdsLoginSSO&gdsCode="
+
phone_M
+
"&password="
+
password_M
;
log
.
info
(
url
);
return
url
;
}
else
{
MemberEntity
memberEntity
=
memberDao
.
selectById
(
memberUser
.
getId
());
if
(
StringUtils
.
isNoneBlank
(
memberEntity
.
getPhone
()))
{
...
...
@@ -709,11 +710,13 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
else
{
throw
new
RRException
(
"你还没有绑定手机号!"
);
}
String
phone_M
=
DESUtils
.
byteToHexString
(
DESUtils
.
DES_CBC_Encrypt
(
phone
.
getBytes
(),
"loginkey"
.
getBytes
()));
url
=
"http://wsdt.gs1cn.org/anccoh/login?method=phoneSSO&phone="
+
phone_M
;
log
.
info
(
url
);
}
String
phone_M
=
DESUtils
.
byteToHexString
(
DESUtils
.
DES_CBC_Encrypt
(
phone
.
getBytes
(),
"loginkey"
.
getBytes
()));
String
url
=
"http://wsdt.gs1cn.org/anccoh/login?method=phoneSSO&phone="
+
phone_M
;
String
token
=
HttpUtil
.
get
(
url
);
token
=
HttpUtil
.
get
(
url
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
token
);
log
.
info
(
jsonObject
.
toString
());
String
status
=
jsonObject
.
getString
(
"status"
);
String
msg
=
jsonObject
.
getString
(
"msg"
);
if
(!
"200"
.
equals
(
status
))
{
...
...
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