Commit df27b9ec authored by 赵啸非's avatar 赵啸非

用户列表更新

parent 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;
}
...@@ -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;
}
}; };
} }
} }
......
...@@ -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>
......
...@@ -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) {
......
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;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment