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
3857c8b5
Commit
3857c8b5
authored
Jun 10, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加Resource下载
parent
1443f018
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
1 deletion
+90
-1
OperateSAMStatusResponseEventHandler.java
...g/license/event/OperateSAMStatusResponseEventHandler.java
+2
-1
ResourceMapper.java
.../main/java/iot/sixiang/license/mapper/ResourceMapper.java
+13
-0
ResourceVo.java
...rc/main/java/iot/sixiang/license/model/vo/ResourceVo.java
+23
-0
ResourceService.java
...ain/java/iot/sixiang/license/service/ResourceService.java
+13
-0
ResourceServiceImpl.java
...iot/sixiang/license/service/impl/ResourceServiceImpl.java
+29
-0
ResourceMapper.xml
license/src/main/resources/mapper/ResourceMapper.xml
+10
-0
No files found.
license/src/main/java/iot/sixiang/license/event/OperateSAMStatusResponseEventHandler.java
View file @
3857c8b5
...
...
@@ -38,11 +38,12 @@ public class OperateSAMStatusResponseEventHandler {
onlineCount
++;
}
}
SamMonitor
samMonitor
=
new
SamMonitor
();
samMonitor
.
setServerIp
(
serverIp
);
samMonitor
.
setOnlineCount
(
onlineCount
);
samMonitor
.
setSamCount
(
samCount
);
operateManager
.
putSamMonitorMap
(
serverIp
,
samMonitor
);
int
allSamCount
=
0
;
int
allOnlineCount
=
0
;
}
}
license/src/main/java/iot/sixiang/license/mapper/ResourceMapper.java
0 → 100644
View file @
3857c8b5
package
iot
.
sixiang
.
license
.
mapper
;
import
iot.sixiang.license.model.vo.ResourceVo
;
import
java.util.List
;
/**
* Created by m33 on 2022/6/10 16:22
*/
public
interface
ResourceMapper
{
List
<
ResourceVo
>
getResource
(
int
userId
);
}
license/src/main/java/iot/sixiang/license/model/vo/ResourceVo.java
0 → 100644
View file @
3857c8b5
package
iot
.
sixiang
.
license
.
model
.
vo
;
import
lombok.Data
;
/**
* Created by m33 on 2022/6/10 16:17
*/
@Data
public
class
ResourceVo
{
private
String
userName
;
private
String
password
;
private
String
company
;
private
String
appName
;
private
String
appKey
;
private
String
sn
;
}
\ No newline at end of file
license/src/main/java/iot/sixiang/license/service/ResourceService.java
0 → 100644
View file @
3857c8b5
package
iot
.
sixiang
.
license
.
service
;
import
iot.sixiang.license.model.vo.ResourceVo
;
import
java.util.List
;
/**
* Created by m33 on 2022/6/10 16:15
*/
public
interface
ResourceService
{
List
<
ResourceVo
>
getResource
(
int
userId
);
}
license/src/main/java/iot/sixiang/license/service/impl/ResourceServiceImpl.java
0 → 100644
View file @
3857c8b5
package
iot
.
sixiang
.
license
.
service
.
impl
;
import
iot.sixiang.license.handler.IotLicenseException
;
import
iot.sixiang.license.mapper.ResourceMapper
;
import
iot.sixiang.license.model.vo.ResourceVo
;
import
iot.sixiang.license.service.ResourceService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* Created by m33 on 2022/6/10 16:20
*/
@Service
public
class
ResourceServiceImpl
implements
ResourceService
{
@Resource
private
ResourceMapper
resourceMapper
;
@Override
public
List
<
ResourceVo
>
getResource
(
int
userId
)
{
if
(
userId
==
0
)
{
throw
new
IotLicenseException
(
400
,
"用户Id不能为空"
);
}
List
<
ResourceVo
>
record
=
resourceMapper
.
getResource
(
userId
);
return
record
;
}
}
license/src/main/resources/mapper/ResourceMapper.xml
0 → 100644
View file @
3857c8b5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"iot.sixiang.license.mapper.ResourceMapper"
>
<select
id=
"getResource"
resultType=
"iot.sixiang.license.model.vo.ResourceVo"
>
SELECT a.user_name,a.password,a.company,b.app_name,b.app_key,c.sn
FROM USER a, apply b, device c WHERE a.user_id = b.user_id
AND b.app_id = c.app_id AND a.user_id = #{userId}
</select>
</mapper>
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