Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
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
zengtianlai3
ioc_sixiang_license
Commits
775e8ef8
Commit
775e8ef8
authored
Jun 10, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
准备发布版本
parent
3316d7f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
ResourceContrller.java
...ava/iot/sixiang/license/controller/ResourceContrller.java
+1
-1
SamMapController.java
...java/iot/sixiang/license/controller/SamMapController.java
+3
-2
JwtFilter.java
license/src/main/java/iot/sixiang/license/jwt/JwtFilter.java
+2
-1
ApplyServiceImpl.java
...va/iot/sixiang/license/service/impl/ApplyServiceImpl.java
+2
-4
application-prod.yml
license/src/main/resources/application-prod.yml
+3
-3
application-test.yml
license/src/main/resources/application-test.yml
+3
-3
application.yml
license/src/main/resources/application.yml
+1
-1
No files found.
license/src/main/java/iot/sixiang/license/controller/ResourceContrller.java
View file @
775e8ef8
...
...
@@ -12,7 +12,7 @@ import java.io.IOException;
@RestController
@RequestMapping
(
"/
iot_license/
resource"
)
@RequestMapping
(
"/resource"
)
public
class
ResourceContrller
{
@Autowired
...
...
license/src/main/java/iot/sixiang/license/controller/SamMapController.java
View file @
775e8ef8
package
iot
.
sixiang
.
license
.
controller
;
import
iot.sixiang.license.model.ResResult
;
import
iot.sixiang.license.model.SamMonitor
;
import
iot.sixiang.license.operate.OperateManager
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -23,7 +24,7 @@ public class SamMapController {
public
OperateManager
operateManager
;
@GetMapping
(
"count"
)
public
Map
<
String
,
Integer
>
getSamTotalCount
()
{
public
ResResult
getSamTotalCount
()
{
Map
<
String
,
SamMonitor
>
samMonitorMap
=
operateManager
.
getSamMonitorMap
();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
int
totalSamCount
=
0
;
...
...
@@ -34,6 +35,6 @@ public class SamMapController {
}
map
.
put
(
"totalSamCount"
,
totalSamCount
);
map
.
put
(
"totalOnlineCount"
,
totalOnlineCount
);
return
map
;
return
ResResult
.
success
().
record
(
map
)
;
}
}
license/src/main/java/iot/sixiang/license/jwt/JwtFilter.java
View file @
775e8ef8
...
...
@@ -7,13 +7,14 @@ import iot.sixiang.license.model.ResResult;
import
lombok.extern.slf4j.Slf4j
;
import
javax.servlet.*
;
import
javax.servlet.annotation.WebFilter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.Map
;
@Slf4j
//
@WebFilter(filterName = "jwtFilter", urlPatterns = "/iot_license/*")
@WebFilter
(
filterName
=
"jwtFilter"
,
urlPatterns
=
"/iot_license/*"
)
public
class
JwtFilter
implements
Filter
{
...
...
license/src/main/java/iot/sixiang/license/service/impl/ApplyServiceImpl.java
View file @
775e8ef8
...
...
@@ -39,7 +39,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
throw
new
IotLicenseException
(
400
,
"应用key不能为空"
);
}
if
(
userId
==
0
)
{
throw
new
IotLicenseException
(
400
,
"用户
名
不能为空"
);
throw
new
IotLicenseException
(
400
,
"用户
Id
不能为空"
);
}
Apply
res
=
applyMapper
.
getApplyByAppName
(
appName
);
if
(
res
!=
null
)
{
...
...
@@ -56,9 +56,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
if
(
pageSize
==
0
)
{
throw
new
IotLicenseException
(
400
,
"pageSize不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
appName
))
{
throw
new
IotLicenseException
(
400
,
"应用名不能为空"
);
}
List
<
AppVo
>
records
=
applyMapper
.
getAppList
(
appName
);
records
=
records
.
stream
().
sorted
(
Comparator
.
comparing
(
AppVo:
:
getAppId
)).
collect
(
Collectors
.
toList
());
List
<
AppVo
>
result
=
new
ArrayList
<>();
...
...
license/src/main/resources/application-prod.yml
View file @
775e8ef8
...
...
@@ -3,9 +3,9 @@ server:
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://
localhost
:3306/iot_license?serverTimezone=GMT%2B8
username
:
root
password
:
123456
url
:
jdbc:mysql://
rm-wz9w0x7a26q11av687o.mysql.rds.aliyuncs.com
:3306/iot_license?serverTimezone=GMT%2B8
username
:
dada
password
:
Acc2019123
mybatis-plus
:
mapper-locations
:
classpath:/mapper/**.xml
type-aliases-package
:
iot.sixiang.license.entity
\ No newline at end of file
license/src/main/resources/application-test.yml
View file @
775e8ef8
...
...
@@ -3,9 +3,9 @@ server:
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://
192.168.1.19
:3306/iot_license?serverTimezone=GMT%2B8
username
:
root
password
:
123456
url
:
jdbc:mysql://
rm-wz9w0x7a26q11av687o.mysql.rds.aliyuncs.com
:3306/iot_license?serverTimezone=GMT%2B8
username
:
dada
password
:
Acc2019123
mybatis-plus
:
mapper-locations
:
classpath:/mapper/**.xml
type-aliases-package
:
iot.sixiang.license.entity
\ No newline at end of file
license/src/main/resources/application.yml
View file @
775e8ef8
spring
:
profiles
:
active
:
dev
active
:
test
application
:
name
:
iot_license
#当前服务的名称
\ No newline at end of file
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