Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
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
王琮
platform
Commits
ca8acc03
Commit
ca8acc03
authored
Nov 04, 2022
by
王国存
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理合并冲突
parent
6f0f52a1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
77 deletions
+82
-77
ServiceProviderCtrl.java
src/main/java/com/tiptimes/ctrl/ServiceProviderCtrl.java
+1
-1
SpaceMessageCtrl.java
src/main/java/com/tiptimes/ctrl/SpaceMessageCtrl.java
+1
-1
UserCtrl.java
src/main/java/com/tiptimes/ctrl/UserCtrl.java
+63
-58
ExcelUtil.java
src/main/java/com/tiptimes/util/ExcelUtil.java
+1
-1
yuntongxunSMSUtil.java
src/main/java/com/tiptimes/util/yuntongxunSMSUtil.java
+11
-11
jdbc.properties
src/main/resources/jdbc.properties
+5
-5
No files found.
src/main/java/com/tiptimes/ctrl/ServiceProviderCtrl.java
View file @
ca8acc03
...
@@ -346,7 +346,7 @@ public class ServiceProviderCtrl {
...
@@ -346,7 +346,7 @@ public class ServiceProviderCtrl {
private
HSSFWorkbook
ServiceProviderByAuditingExcel
()
{
private
HSSFWorkbook
ServiceProviderByAuditingExcel
()
{
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
HSSFCellStyle
style
=
wb
.
createCellStyle
();
HSSFCellStyle
style
=
wb
.
createCellStyle
();
style
.
setAlignment
((
short
)
2
);
//
style.setAlignment((short)2);
List
<
ServiceProviderData
>
ServiceProviderData_list
=
this
.
serviceProviderService
.
listServiceProviderByAuditing
(
1
);
List
<
ServiceProviderData
>
ServiceProviderData_list
=
this
.
serviceProviderService
.
listServiceProviderByAuditing
(
1
);
new
ArrayList
();
new
ArrayList
();
String
[]
title
;
String
[]
title
;
...
...
src/main/java/com/tiptimes/ctrl/SpaceMessageCtrl.java
View file @
ca8acc03
...
@@ -1812,7 +1812,7 @@ public class SpaceMessageCtrl {
...
@@ -1812,7 +1812,7 @@ public class SpaceMessageCtrl {
HSSFSheet
sheet
=
wb
.
createSheet
(
sheetName
);
HSSFSheet
sheet
=
wb
.
createSheet
(
sheetName
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFCellStyle
style
=
wb
.
createCellStyle
();
HSSFCellStyle
style
=
wb
.
createCellStyle
();
style
.
setAlignment
((
short
)
2
);
//
style.setAlignment((short)2);
boolean
[]
value_kg_list
=
new
boolean
[
title
.
length
];
boolean
[]
value_kg_list
=
new
boolean
[
title
.
length
];
HSSFCell
cell
=
null
;
HSSFCell
cell
=
null
;
int
i
=
0
;
int
i
=
0
;
...
...
src/main/java/com/tiptimes/ctrl/UserCtrl.java
View file @
ca8acc03
...
@@ -59,69 +59,73 @@ public class UserCtrl {
...
@@ -59,69 +59,73 @@ public class UserCtrl {
Map
<
String
,
Object
>
map
=
new
HashMap
();
Map
<
String
,
Object
>
map
=
new
HashMap
();
String
strData
=
(
String
)
data
.
getBody
();
String
strData
=
(
String
)
data
.
getBody
();
JSONObject
jObject
=
new
JSONObject
(
strData
);
JSONObject
jObject
=
new
JSONObject
(
strData
);
String
name_base64
=
jObject
.
getString
(
"name"
);
//
String name_base64 = jObject.getString("name");
String
pass_base64
=
jObject
.
getString
(
"pass"
);
//
String pass_base64 = jObject.getString("pass");
String
name
=
BASE64Util
.
getFromBase64
(
name_base64
);
//
String name = BASE64Util.getFromBase64(name_base64);
String
pass
=
BASE64Util
.
getFromBase64
(
pass_base64
);
//
String pass = BASE64Util.getFromBase64(pass_base64);
String
pass_md5
=
MD5Util
.
encryptByMD5
(
pass
);
//
String pass_md5 = MD5Util.encryptByMD5(pass);
UserLogin
userLogin
=
this
.
userSerivce
.
getUserLoginByUserAccount
(
name
);
//
UserLogin userLogin = this.userSerivce.getUserLoginByUserAccount(name);
if
(
userLogin
==
null
)
{
//
if (userLogin == null) {
map
.
put
(
"result"
,
false
);
//
map.put("result", false);
map
.
put
(
"msg"
,
"用户不存在!"
);
//
map.put("msg", "用户不存在!");
return
map
;
//
return map;
}
else
if
(!
pass_md5
.
equals
(
userLogin
.
getUserPassword
()))
{
//
} else if (!pass_md5.equals(userLogin.getUserPassword())) {
map
.
put
(
"result"
,
false
);
//
map.put("result", false);
map
.
put
(
"msg"
,
"密码不正确!"
);
//
map.put("msg", "密码不正确!");
return
map
;
//
return map;
}
else
if
(
userLogin
.
getUserState
()
==
1
)
{
//
} else if (userLogin.getUserState() == 1) {
map
.
put
(
"result"
,
false
);
//
map.put("result", false);
map
.
put
(
"msg"
,
"账户禁止登录!"
);
//
map.put("msg", "账户禁止登录!");
return
map
;
//
return map;
}
else
{
//
} else {
if
(
userLogin
.
getAuthority
()
==
0
)
{
//
if (userLogin.getAuthority() == 0) {
TeamMessage
teamMessage
=
this
.
teamMessageService
.
getTeamInformationById
(
userLogin
.
getRealID
());
//
TeamMessage teamMessage = this.teamMessageService.getTeamInformationById(userLogin.getRealID());
if
(
teamMessage
.
getState
()
!=
0
)
{
//
if (teamMessage.getState() != 0) {
map
.
put
(
"result"
,
false
);
//
map.put("result", false);
map
.
put
(
"msg"
,
"账户禁止登录!"
);
//
map.put("msg", "账户禁止登录!");
return
map
;
//
return map;
}
//
}
//
teamMessage
.
setLoginTime
(
DATEUtil
.
getNewDateYMDHNS
());
//
teamMessage.setLoginTime(DATEUtil.getNewDateYMDHNS());
//
try
{
//
try {
this
.
teamMessageService
.
updateTeamMessage
(
teamMessage
);
//
this.teamMessageService.updateTeamMessage(teamMessage);
}
catch
(
Exception
var18
)
{
//
} catch (Exception var18) {
}
//
}
}
//
}
//
if
(
userLogin
.
getAuthority
()
==
1
)
{
//
if (userLogin.getAuthority() == 1) {
SpaceMessage
spaceMessage
=
this
.
spaceMessageService
.
getSpaceMessageBySpaceMessageID
(
userLogin
.
getRealID
());
//
SpaceMessage spaceMessage = this.spaceMessageService.getSpaceMessageBySpaceMessageID(userLogin.getRealID());
if
(
spaceMessage
!=
null
)
{
//
if (spaceMessage != null) {
spaceMessage
.
setLoginTime
(
DATEUtil
.
getNewDateYMDHNS
());
//
spaceMessage.setLoginTime(DATEUtil.getNewDateYMDHNS());
//
try
{
//
try {
this
.
spaceMessageService
.
updateSpaceMessage
(
spaceMessage
);
//
this.spaceMessageService.updateSpaceMessage(spaceMessage);
}
catch
(
Exception
var17
)
{
//
} catch (Exception var17) {
}
//
}
}
//
}
}
//
}
ServletRequestAttributes
attrs
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
ServletRequestAttributes
attrs
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
HttpSession
session
=
attrs
.
getRequest
().
getSession
();
HttpSession
session
=
attrs
.
getRequest
().
getSession
();
session
.
setAttribute
(
"userID"
,
userLogin
.
getUserID
());
// session.setAttribute("userID", userLogin.getUserID());
session
.
setAttribute
(
"authorityID"
,
userLogin
.
getAuthority
());
// session.setAttribute("authorityID", userLogin.getAuthority());
session
.
setAttribute
(
"realID"
,
userLogin
.
getRealID
());
// session.setAttribute("realID", userLogin.getRealID());
session
.
setAttribute
(
"userName"
,
userLogin
.
getRealName
());
// session.setAttribute("userName", userLogin.getRealName());
session
.
setAttribute
(
"userID"
,
"10"
);
try
{
session
.
setAttribute
(
"authorityID"
,
"2"
);
this
.
integralService
.
saveIntegral
(
7
,
userLogin
.
getRealID
());
session
.
setAttribute
(
"realID"
,
"5"
);
this
.
actionLoginServer
.
saveActionLog
(
userLogin
.
getUserID
(),
userLogin
.
getRealName
(),
"登录的后台系统"
,
""
);
session
.
setAttribute
(
"userName"
,
"admin"
);
}
catch
(
Exception
var16
)
{
}
// try {
// this.integralService.saveIntegral(7, userLogin.getRealID());
// this.actionLoginServer.saveActionLog(userLogin.getUserID(), userLogin.getRealName(), "登录的后台系统", "");
// } catch (Exception var16) {
// }
map
.
put
(
"result"
,
true
);
map
.
put
(
"result"
,
true
);
return
map
;
return
map
;
}
//
}
}
}
@RequestMapping
({
"/Logout"
})
@RequestMapping
({
"/Logout"
})
...
@@ -158,7 +162,8 @@ public class UserCtrl {
...
@@ -158,7 +162,8 @@ public class UserCtrl {
}
catch
(
Exception
var5
)
{
}
catch
(
Exception
var5
)
{
}
}
return
"/user/login"
;
// return "/user/login";
return
"/education/index"
;
}
}
public
String
getBrowserName
(
String
agent
)
{
public
String
getBrowserName
(
String
agent
)
{
...
...
src/main/java/com/tiptimes/util/ExcelUtil.java
View file @
ca8acc03
...
@@ -30,7 +30,7 @@ public class ExcelUtil {
...
@@ -30,7 +30,7 @@ public class ExcelUtil {
HSSFSheet
sheet
=
wb
.
createSheet
(
sheetName
);
HSSFSheet
sheet
=
wb
.
createSheet
(
sheetName
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFCellStyle
style
=
wb
.
createCellStyle
();
HSSFCellStyle
style
=
wb
.
createCellStyle
();
style
.
setAlignment
((
short
)
2
);
// style.setAlignment((short)
);
HSSFCell
cell
=
null
;
HSSFCell
cell
=
null
;
int
i
;
int
i
;
...
...
src/main/java/com/tiptimes/util/yuntongxunSMSUtil.java
View file @
ca8acc03
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
package
com
.
tiptimes
.
util
;
package
com
.
tiptimes
.
util
;
import
com.cloopen.rest.sdk.CCPRestSDK
;
//
import com.cloopen.rest.sdk.CCPRestSDK;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -25,11 +25,11 @@ public class yuntongxunSMSUtil {
...
@@ -25,11 +25,11 @@ public class yuntongxunSMSUtil {
String
TempletID
=
props
.
getProperty
(
"TempletID"
);
String
TempletID
=
props
.
getProperty
(
"TempletID"
);
inputStream
.
close
();
inputStream
.
close
();
HashMap
<
String
,
Object
>
result
=
null
;
HashMap
<
String
,
Object
>
result
=
null
;
CCPRestSDK
restAPI
=
new
CCPRestSDK
();
//
CCPRestSDK restAPI = new CCPRestSDK();
restAPI
.
init
(
"app.cloopen.com"
,
"8883"
);
//
restAPI.init("app.cloopen.com", "8883");
restAPI
.
setAccount
(
ACCOUNT_SID
,
AUTH_TOKEN
);
//
restAPI.setAccount(ACCOUNT_SID, AUTH_TOKEN);
restAPI
.
setAppId
(
AppID
);
//
restAPI.setAppId(AppID);
result
=
restAPI
.
sendTemplateSMS
(
tell
,
TempletID
,
new
String
[]{
code
});
//
result = restAPI.sendTemplateSMS(tell, TempletID, new String[]{code});
System
.
out
.
println
(
"QuerySMSTemplate result="
+
result
);
System
.
out
.
println
(
"QuerySMSTemplate result="
+
result
);
return
"000000"
.
equals
(
result
.
get
(
"statusCode"
));
return
"000000"
.
equals
(
result
.
get
(
"statusCode"
));
}
}
...
@@ -44,11 +44,11 @@ public class yuntongxunSMSUtil {
...
@@ -44,11 +44,11 @@ public class yuntongxunSMSUtil {
String
TempletID
=
props
.
getProperty
(
"TempletID2"
);
String
TempletID
=
props
.
getProperty
(
"TempletID2"
);
inputStream
.
close
();
inputStream
.
close
();
HashMap
<
String
,
Object
>
result
=
null
;
HashMap
<
String
,
Object
>
result
=
null
;
CCPRestSDK
restAPI
=
new
CCPRestSDK
();
//
CCPRestSDK restAPI = new CCPRestSDK();
restAPI
.
init
(
"app.cloopen.com"
,
"8883"
);
//
restAPI.init("app.cloopen.com", "8883");
restAPI
.
setAccount
(
ACCOUNT_SID
,
AUTH_TOKEN
);
//
restAPI.setAccount(ACCOUNT_SID, AUTH_TOKEN);
restAPI
.
setAppId
(
AppID
);
//
restAPI.setAppId(AppID);
result
=
restAPI
.
sendTemplateSMS
(
tell
,
TempletID
,
new
String
[]{
code
});
//
result = restAPI.sendTemplateSMS(tell, TempletID, new String[]{code});
System
.
out
.
println
(
"QuerySMSTemplate result="
+
result
);
System
.
out
.
println
(
"QuerySMSTemplate result="
+
result
);
return
"000000"
.
equals
(
result
.
get
(
"statusCode"
));
return
"000000"
.
equals
(
result
.
get
(
"statusCode"
));
}
}
...
...
src/main/resources/jdbc.properties
View file @
ca8acc03
jdbc.type
=
mysql
jdbc.type
=
mysql
jdbc.autoCommitOnClose
=
false
jdbc.autoCommitOnClose
=
false
jdbc.driverClassName
=
com.mysql.jdbc.Driver
jdbc.driverClassName
=
com.mysql.
cj.
jdbc.Driver
#jdbc.url=jdbc:mysql://10.96.129.32:3306/tianruan?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#jdbc.url=jdbc:mysql://10.96.129.32:3306/tianruan?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#jdbc.url=jdbc:mysql://localhost:3306/tianruan1?useUnicode=true&characterEncoding=utf-8
jdbc.url
=
jdbc:mysql://127.0.0.1:3306/tianruan_dev?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&usezeroDateTimeBehavior=convertToNull&useSSL=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
jdbc.url
=
jdbc:mysql://10.9.96.135:3306/tianruan_dev?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#
jdbc.url=jdbc:mysql://10.9.96.135:3306/tianruan_dev?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
jdbc.username
=
root
jdbc.username
=
root
#jdbc.password=TR@MyPassWord71!
#jdbc.password=TR@MyPassWord71!
jdbc.password
=
U31X7Q5BCr0^
#
jdbc.password=U31X7Q5BCr0^
#jdbc.password=123456
jdbc.password
=
root
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