Browse Source

运营端用户管理修改

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
79d6fd6064
  1. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-user/epmet-user-server/pom.xml
  3. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/OperUserController.java
  4. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/OperUserServiceImpl.java

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.47
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.48
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.47</version>
<version>0.3.48</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

7
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/OperUserController.java

@ -31,7 +31,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.OperUserDTO;
import com.epmet.dto.result.QueryOperUserResultDto;
import com.epmet.excel.OperUserExcel;
import com.epmet.feign.OperRoleUserFeignClient;
import com.epmet.service.OperUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -53,8 +52,6 @@ public class OperUserController {
@Autowired
private OperUserService operUserService;
@Autowired
private OperRoleUserFeignClient operRoleUserFeignClient;
@GetMapping("page")
public Result<PageData<OperUserDTO>> page(@RequestParam Map<String, Object> params) {
@ -65,9 +62,7 @@ public class OperUserController {
@GetMapping("{id}")
public Result<OperUserDTO> get(@PathVariable("id") String id) {
OperUserDTO data = operUserService.get(id);
//用户角色列表
Result<List<String>> roleIdList = operRoleUserFeignClient.getRoleIdList(id);
data.setRoleIdList(roleIdList.getData());
return new Result<OperUserDTO>().ok(data);
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/OperUserServiceImpl.java

@ -26,6 +26,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.OperUserDao;
import com.epmet.dto.OperUserDTO;
import com.epmet.entity.OperUserEntity;
@ -90,7 +91,11 @@ public class OperUserServiceImpl extends BaseServiceImpl<OperUserDao, OperUserEn
@Override
public OperUserDTO get(String id) {
OperUserEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, OperUserDTO.class);
OperUserDTO result = ConvertUtils.sourceToTarget(entity, OperUserDTO.class);
//用户角色列表
Result<List<String>> roleIdList = operRoleUserFeignClient.getRoleIdList(result.getUserId());
result.setRoleIdList(roleIdList.getData());
return result;
}
@Override

Loading…
Cancel
Save