Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
df27b9ec
Commit
df27b9ec
authored
Jul 06, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户列表更新
parent
67f372b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
29 deletions
+22
-29
common-lib/src/main/java/com/mortals/xhx/common/pdu/UserPdu.java
...lib/src/main/java/com/mortals/xhx/common/pdu/UserPdu.java
+0
-18
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
.../src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
+15
-1
device-manager/pom.xml
device-manager/pom.xml
+3
-3
device-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+4
-2
device-manager/src/main/java/com/mortals/xhx/module/sitestat/web/SitestatController.java
...m/mortals/xhx/module/sitestat/web/SitestatController.java
+0
-5
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/UserPdu.java
deleted
100644 → 0
View file @
67f372b3
package
com.mortals.xhx.common.pdu
;
import
lombok.Data
;
/**
* @author: zxfei
* @date: 2022/6/28 17:21
* @description:
**/
@Data
public
class
UserPdu
{
private
String
loginName
;
private
String
password
;
private
String
securityCode
;
}
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
View file @
df27b9ec
...
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
* @author zxfei
* @author zxfei
* @date 2022-07-06
* @date 2022-07-06
*/
*/
@FeignClient
(
name
=
"portal-manager
"
,
path
=
"/zwfw"
,
fallback
=
UserFeignFallbackFactory
.
class
)
@FeignClient
(
name
=
"portal-manager"
,
path
=
"/zwfw"
,
fallback
=
UserFeignFallbackFactory
.
class
)
public
interface
IUserFeign
extends
IFeign
{
public
interface
IUserFeign
extends
IFeign
{
...
@@ -61,6 +61,15 @@ public interface IUserFeign extends IFeign {
...
@@ -61,6 +61,15 @@ public interface IUserFeign extends IFeign {
@PostMapping
(
value
=
"/login/login"
)
@PostMapping
(
value
=
"/login/login"
)
String
portalLogin
(
@RequestBody
UserPdu
userPdu
);
String
portalLogin
(
@RequestBody
UserPdu
userPdu
);
/**
* 查询用户列表
*
* @param userPdu
* @return
*/
@PostMapping
(
"/api/user/findAllUser"
)
String
findAllUser
(
@RequestBody
UserPdu
userPdu
);
}
}
...
@@ -94,6 +103,11 @@ class UserFeignFallbackFactory implements FallbackFactory<IUserFeign> {
...
@@ -94,6 +103,11 @@ class UserFeignFallbackFactory implements FallbackFactory<IUserFeign> {
public
String
portalLogin
(
UserPdu
userPdu
)
{
public
String
portalLogin
(
UserPdu
userPdu
)
{
return
JSON
.
toJSONString
(
Rest
.
fail
(
"登录失败!"
));
return
JSON
.
toJSONString
(
Rest
.
fail
(
"登录失败!"
));
}
}
@Override
public
String
findAllUser
(
UserPdu
userPdu
)
{
return
null
;
}
};
};
}
}
}
}
...
...
device-manager/pom.xml
View file @
df27b9ec
...
@@ -61,11 +61,11 @@
...
@@ -61,11 +61,11 @@
<![CDATA[jdbc:mysql://192.168.0.98:3306/device-new-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<![CDATA[jdbc:mysql://192.168.0.98:3306/device-new-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.password>
nacos@2020
</profiles.datasource.password>
<profiles.datasource.password>
nacos@2020
</profiles.datasource.password>
<profiles.redis.uri>
192.168.0.
98
</profiles.redis.uri>
<profiles.redis.uri>
192.168.0.
252
</profiles.redis.uri>
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password></profiles.redis.password>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.database>
9
</profiles.redis.database>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.kafka.brokers>
192.168.0.251:9092
</profiles.kafka.brokers>
<profiles.kafka.brokers>
192.168.0.251:9092
</profiles.kafka.brokers>
<profiles.queue.type>
rabbitmq
</profiles.queue.type>
<profiles.queue.type>
rabbitmq
</profiles.queue.type>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
df27b9ec
...
@@ -36,8 +36,10 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
...
@@ -36,8 +36,10 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Override
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
String
resp
=
userFeign
.
list
(
new
UserPdu
());
UserPdu
userPdu
=
new
UserPdu
();
userPdu
.
setPage
(
1
);
userPdu
.
setSize
(-
1
);
String
resp
=
userFeign
.
findAllUser
(
userPdu
);
log
.
info
(
"resp:{}"
,
resp
);
log
.
info
(
"resp:{}"
,
resp
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
resp
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
resp
);
if
(
jsonObject
.
getInteger
(
"code"
)
==
1
)
{
if
(
jsonObject
.
getInteger
(
"code"
)
==
1
)
{
...
...
device-manager/src/main/java/com/mortals/xhx/module/sitestat/web/SitestatController.java
View file @
df27b9ec
package
com.mortals.xhx.module.sitestat.web
;
package
com.mortals.xhx.module.sitestat.web
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.IAuthTokenService
;
import
com.mortals.framework.service.IAuthTokenService
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.UserPdu
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.module.sitestat.model.SitestatEntity
;
import
com.mortals.xhx.module.sitestat.model.SitestatEntity
;
import
com.mortals.xhx.module.sitestat.service.SitestatService
;
import
com.mortals.xhx.module.sitestat.service.SitestatService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
...
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